diff mbox

[dpdk-dev,v5,16/21] ethdev: define structures for configuring flexible payload

Message ID 1414654006-7472-17-git-send-email-jingjing.wu@intel.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Jingjing Wu Oct. 30, 2014, 7:26 a.m. UTC
New Structures are defined for configuring flexible payload

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 lib/librte_ether/rte_eth_ctrl.h | 43 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
diff mbox

Patch

diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
index 74a9c59..4a51c22 100644
--- a/lib/librte_ether/rte_eth_ctrl.h
+++ b/lib/librte_ether/rte_eth_ctrl.h
@@ -138,6 +138,24 @@  struct rte_eth_tunnel_filter_conf {
  */
 
 /**
+ * A structure defined a field vector to specify each field.
+ */
+struct rte_eth_field_vector {
+	uint8_t offset;   /**< Word offset in payload */
+	uint8_t size;     /**< Field size defined in word units */
+};
+
+/**
+ * Payload type
+ */
+enum rte_eth_payload_type {
+	RTE_ETH_PAYLOAD_UNKNOWN = 0,
+	RTE_ETH_L2_PAYLOAD,
+	RTE_ETH_L3_PAYLOAD,
+	RTE_ETH_L4_PAYLOAD,
+};
+
+/**
  * Flow type
  */
 enum rte_eth_flow_type {
@@ -153,6 +171,31 @@  enum rte_eth_flow_type {
 };
 
 /**
+ * A structure used to select fields extracted from the protocol layers to
+ * the Field Vector as flexible payload for filter
+ */
+struct rte_eth_flex_payload_cfg {
+	enum rte_eth_payload_type type;  /**< Payload type */
+	uint8_t nb_field;                /**< The number of following fields */
+	struct rte_eth_field_vector field[0];
+	/**< Field vectors to constitute flexible payload */
+};
+
+#define RTE_ETH_FDIR_CFG_FLX      0x0001
+/**
+ * A structure used to configure FDIR filter global set
+ * It supports RTE_ETH_FILTER_FDIR with RTE_ETH_FILTER_SET operation.
+ */
+struct rte_eth_fdir_cfg {
+	uint16_t cmd;  /**< Sub command  */
+	/**
+	 * A pointer to structure for the configuration e.g.
+	 * struct rte_eth_flex_payload_cfg for FDIR_CFG_FLX
+	*/
+	void *cfg;
+};
+
+/**
  * A structure used to define the input for IPV4 UDP flow
  */
 struct rte_eth_udpv4_flow {