ethdev: add new flow director masks

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@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
This commit is contained in:
Jingjing Wu 2015-01-29 13:29:17 +08:00 committed by Thomas Monjalon
parent 299191e0c9
commit 2d4c1a9ea2
2 changed files with 14 additions and 0 deletions

View File

@ -343,6 +343,18 @@ struct rte_eth_fdir_filter {
struct rte_eth_fdir_action action; /**< Action taken when match */
};
/**
* 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
*/
@ -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.*/

View File

@ -723,6 +723,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. */
};