define structures for getting flow director information Signed-off-by: Jingjing Wu <jingjing.wu 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 3efdaae..7ca1d6b 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -231,6 +231,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 to get the status information of flow director filter. + * to support RTE_ETH_FILTER_FDIR with RTE_ETH_FILTER_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 b69a6af..0dc399d 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -795,29 +795,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