[dpdk-dev] [PATCH] net/ixgbe: add support for VLAN in IP mode FDIR

Lu, Wenzhuo wenzhuo.lu at intel.com
Tue Jun 12 04:25:54 CEST 2018


Hi Wei,


> -----Original Message-----
> From: Zhao1, Wei
> Sent: Tuesday, June 5, 2018 5:12 PM
> To: dev at dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu at intel.com>; stable at dpdk.org; Zhao1, Wei
> <wei.zhao1 at intel.com>
> Subject: [PATCH] net/ixgbe: add support for VLAN in IP mode FDIR
> 
> In IP mode FDIR, X550 can support not only 4 tuple parameters but also vlan
> tci in protocol, so add this feature to flow parser.
> 
> Fixes: 11777435c727 ("net/ixgbe: parse flow director filter")
> 
> Signed-off-by: Wei Zhao <wei.zhao1 at intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_flow.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
> index 0427e6f..f5e7805 100644
> --- a/drivers/net/ixgbe/ixgbe_flow.c
> +++ b/drivers/net/ixgbe/ixgbe_flow.c
> @@ -322,7 +322,8 @@ cons_parse_ntuple_filter(const struct rte_flow_attr
> *attr,
>  		}
>  		/* check if the next not void item is IPv4 */
The comment should be updated too, if we need below change.

>  		item = next_no_void_pattern(pattern, item);
> -		if (item->type != RTE_FLOW_ITEM_TYPE_IPV4) {
> +		if (item->type != RTE_FLOW_ITEM_TYPE_IPV4 &&
> +				item->type != RTE_FLOW_ITEM_TYPE_VLAN) {
>  			rte_flow_error_set(error,
>  			  EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
>  			  item, "Not supported by ntuple filter"); 
Really confused. I see the above code is already wrapped by " if (item->type == RTE_FLOW_ITEM_TYPE_VLAN) {". You want to support double vlan?


More information about the dev mailing list