[dpdk-dev] [PATCH v2 2/7] ethdev: define new ethdev API rx_classification_filter_ctl

Thomas Monjalon thomas.monjalon at 6wind.com
Wed Aug 27 16:22:55 CEST 2014


Hi Jingjing,

2014-08-27 10:13, Jingjing Wu:
> support a new ethdev API rx_classification_filter_ctl for all
> the configuration or queries for receive classification filters.
> this patch supports commands the API used below:
>   RTE_CMD_FDIR_RULE_ADD
>   RTE_CMD_FDIR_RULE_DEL
>   RTE_CMD_FDIR_FLUSH
>   RTE_CMD_FDIR_INFO_GET

Could you explain why existing API (flow director + filters) is not enough?
I'd really like to see a common API for all filtering stuff.

> -/* for 40G only */
> -#define ETH_RSS_NONF_IPV4_UDP_SHIFT           31
> -#define ETH_RSS_NONF_IPV4_TCP_SHIFT           33
> -#define ETH_RSS_NONF_IPV4_SCTP_SHIFT          34
> -#define ETH_RSS_NONF_IPV4_OTHER_SHIFT         35
> -#define ETH_RSS_FRAG_IPV4_SHIFT               36
> -#define ETH_RSS_NONF_IPV6_UDP_SHIFT           41
> -#define ETH_RSS_NONF_IPV6_TCP_SHIFT           43
> -#define ETH_RSS_NONF_IPV6_SCTP_SHIFT          44
> -#define ETH_RSS_NONF_IPV6_OTHER_SHIFT         45
> -#define ETH_RSS_FRAG_IPV6_SHIFT               46
> -#define ETH_RSS_FCOE_OX_SHIFT                 48
> -#define ETH_RSS_FCOE_RX_SHIFT                 49
> -#define ETH_RSS_FCOE_OTHER_SHIFT              50
> -#define ETH_RSS_L2_PAYLOAD_SHIFT              63
> +/* Packet Classification Type for 40G only */
> +#define ETH_PCTYPE_NONF_IPV4_UDP              31
> +#define ETH_PCTYPE_NONF_IPV4_TCP              33
> +#define ETH_PCTYPE_NONF_IPV4_SCTP             34
> +#define ETH_PCTYPE_NONF_IPV4_OTHER            35
> +#define ETH_PCTYPE_FRAG_IPV4                  36
> +#define ETH_PCTYPE_NONF_IPV6_UDP              41
> +#define ETH_PCTYPE_NONF_IPV6_TCP              43
> +#define ETH_PCTYPE_NONF_IPV6_SCTP             44
> +#define ETH_PCTYPE_NONF_IPV6_OTHER            45
> +#define ETH_PCTYPE_FRAG_IPV6                  46
> +#define ETH_PCTYPE_FCOE_OX                    48 /* not used */
> +#define ETH_PCTYPE_FCOE_RX                    49 /* not used */
> +#define ETH_PCTYPE_FCOE_OTHER                 50 /* not used */
> +#define ETH_PCTYPE_L2_PAYLOAD                 63

Why is it specific to i40e? Could we have something generic?
Please take care at having only generic things in librte_ether.

By the way, these renamings should be in a separated patch.

-- 
Thomas


More information about the dev mailing list