[dpdk-dev] [PATCH v3 10/20] lib/librte_ether: define structures for getting flow director information
Jingjing Wu
jingjing.wu at intel.com
Fri Sep 26 08:03:28 CEST 2014
define structures for getting flow director information
Signed-off-by: Jingjing Wu <jingjing.wu at intel.com>
Acked-by: Chen Jing D(Mark) <jing.d.chen at intel.com>
Acked-by: Helin Zhang <helin.zhang at intel.com>
---
lib/librte_ether/rte_eth_ctrl.h | 40 ++++++++++++++++++++++++++++++++++++++++
lib/librte_ether/rte_ethdev.h | 23 -----------------------
2 files changed, 40 insertions(+), 23 deletions(-)
diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
index df1ce4b..208082e 100644
--- a/lib/librte_ether/rte_eth_ctrl.h
+++ b/lib/librte_ether/rte_eth_ctrl.h
@@ -230,6 +230,46 @@ struct rte_eth_fdir_filter {
struct rte_eth_fdir_action action; /**< action taken when match */
};
+/**
+ * A structure used to report the status of the flow director filters in use.
+ */
+struct rte_eth_fdir {
+ /** Number of filters with collision indication. */
+ uint16_t collision;
+ /** Number of free (non programmed) filters. */
+ uint16_t free;
+ /** The Lookup hash value of the added filter that updated the value
+ of the MAXLEN field */
+ uint16_t maxhash;
+ /** Longest linked list of filters in the table. */
+ uint8_t maxlen;
+ /** Number of added filters. */
+ uint64_t add;
+ /** Number of removed filters. */
+ uint64_t remove;
+ /** Number of failed added filters (no more space in device). */
+ uint64_t f_add;
+ /** Number of failed removed filters. */
+ uint64_t f_remove;
+};
+
+struct rte_eth_fdir_ext {
+ uint16_t guarant_spc; /**< guaranteed spaces.*/
+ uint16_t guarant_cnt; /**< Number of filters in guaranteed spaces. */
+ uint16_t best_spc; /**< best effort spaces.*/
+ uint16_t best_cnt; /**< Number of filters in best effort spaces. */
+};
+
+/**
+ * A structure used for user to get the status information of flow director filter
+ * to support RTE_ETH_FILTER_FDIR with RTE_ETH_FILTER_OP_GET_INFO operation.
+ */
+struct rte_eth_fdir_info {
+ int mode; /**< if 0 disbale, if 1 enable*/
+ struct rte_eth_fdir info;
+ struct rte_eth_fdir_ext info_ext;
+};
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index e2ea84a..6407e5d 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -794,29 +794,6 @@ struct rte_fdir_masks {
};
/**
- * A structure used to report the status of the flow director filters in use.
- */
-struct rte_eth_fdir {
- /** Number of filters with collision indication. */
- uint16_t collision;
- /** Number of free (non programmed) filters. */
- uint16_t free;
- /** The Lookup hash value of the added filter that updated the value
- of the MAXLEN field */
- uint16_t maxhash;
- /** Longest linked list of filters in the table. */
- uint8_t maxlen;
- /** Number of added filters. */
- uint64_t add;
- /** Number of removed filters. */
- uint64_t remove;
- /** Number of failed added filters (no more space in device). */
- uint64_t f_add;
- /** Number of failed removed filters. */
- uint64_t f_remove;
-};
-
-/**
* A structure used to enable/disable specific device interrupts.
*/
struct rte_intr_conf {
--
1.8.1.4
More information about the dev
mailing list