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

Zhao1, Wei wei.zhao1 at intel.com
Tue Jun 12 04:30:57 CEST 2018


Hi, wenzhuo

> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Tuesday, June 12, 2018 10:26 AM
> To: Zhao1, Wei <wei.zhao1 at intel.com>; dev at dpdk.org
> Cc: stable at dpdk.org
> Subject: RE: [PATCH] net/ixgbe: add support for VLAN in IP mode FDIR
> 
> 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.

Ok, I will update it.
> 
> >  		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?

No, I have get a report that some use the following mode 
sendp([Ether(dst="A0:36:9F:BD:5D:B0")/Dot1Q(vlan=1)/IP(src="192.168.0.1",dst="192.168.0.2",tos=2,ttl=40)/UDP(dport=23, sport=22)/Raw('x'*100)],iface="enp3s0f0",count=10)
to test fdir IP mode.
In order to support this, we need this patch.



More information about the stable mailing list