[dpdk-dev] [PATCH 07/15] ethdev: structures definition for flow director masks

Jingjing Wu jingjing.wu at intel.com
Thu Jan 29 06:29:17 CET 2015


This patch defines structure rte_eth_fdir_masks.
It extends rte_fdir_conf and rte_eth_fdir_info to contain mask's configuration.

Signed-off-by: Jingjing Wu <jingjing.wu at intel.com>
---
 lib/librte_ether/rte_eth_ctrl.h | 13 +++++++++++++
 lib/librte_ether/rte_ethdev.h   |  1 +
 2 files changed, 14 insertions(+)

diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
index 74403b7..a5db310 100644
--- a/lib/librte_ether/rte_eth_ctrl.h
+++ b/lib/librte_ether/rte_eth_ctrl.h
@@ -344,6 +344,18 @@ struct rte_eth_fdir_filter {
 };
 
 /**
+ *  A structure used to configure FDIR masks that are used by the device
+ *  to match the various fields of RX packet headers.
+ */
+struct rte_eth_fdir_masks {
+	uint16_t vlan_tci_mask;
+	struct rte_eth_ipv4_flow   ipv4_mask;
+	struct rte_eth_ipv6_flow   ipv6_mask;
+	uint16_t src_port_mask;
+	uint16_t dst_port_mask;
+};
+
+/**
  * Payload type
  */
 enum rte_eth_payload_type {
@@ -409,6 +421,7 @@ enum rte_fdir_mode {
  */
 struct rte_eth_fdir_info {
 	enum rte_fdir_mode mode;     /**< Flow director mode */
+	struct rte_eth_fdir_masks mask;
 	struct rte_eth_fdir_flex_conf flex_conf;
 	/**< Flex payload configuration information */
 	uint32_t guarant_spc;          /**< Guaranteed spaces.*/
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index cbe05b1..6c8ad08 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -720,6 +720,7 @@ struct rte_fdir_conf {
 	enum rte_fdir_status_mode status;  /**< How to report FDIR hash. */
 	/** RX queue of packets matching a "drop" filter in perfect mode. */
 	uint8_t drop_queue;
+	struct rte_eth_fdir_masks mask;
 	struct rte_eth_fdir_flex_conf flex_conf;
 	/**< Flex payload configuration. */
 };
-- 
1.9.3



More information about the dev mailing list