[dpdk-stable] [v3] net/i40e: fix vlan packets drop

Zhang, Qi Z qi.z.zhang at intel.com
Sat Nov 9 04:01:09 CET 2019



> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Saturday, November 9, 2019 3:49 AM
> To: Kevin Traynor <ktraynor at redhat.com>
> Cc: Zhang, Xiao <xiao.zhang at intel.com>; dev at dpdk.org; Xing, Beilei
> <beilei.xing at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>; Stokes, Ian
> <ian.stokes at intel.com>; stable at dpdk.org; Andrew Rybchenko
> <arybchenko at solarflare.com>; Yigit, Ferruh <ferruh.yigit at intel.com>; Ye,
> Xiaolong <xiaolong.ye at intel.com>
> Subject: Re: [v3] net/i40e: fix vlan packets drop
> 
> 08/11/2019 20:28, Kevin Traynor:
> > Hi Xiao,
> >
> > On 29/10/2019 05:12, Xiao Zhang wrote:
> > > VLAN packets with ip length bigger than 1496 will not be received by
> > > i40e/i40evf due to wrong packets size checking. This patch fixes the
> > > issue by correcting the maximum frame size during checking.
> > >
> > > Fixes: 43e5488c0ac6 ("net/i40e: support MTU configuration")
> > > Cc: stable at dpdk.org
> > >
> > > Signed-off-by: Xiao Zhang <xiao.zhang at intel.com>
> > > ---
> > > v3
> > > Checking more places using max packet len.
> > > v2
> > > Add fix for i40evf and correct the checking when using the max_pkt_len.
> > > ---
> > >  drivers/net/i40e/i40e_ethdev.c    |  2 +-
> > >  drivers/net/i40e/i40e_ethdev_vf.c | 11 +++++++----
> > >  drivers/net/i40e/i40e_fdir.c      |  2 +-
> > >  drivers/net/i40e/i40e_rxtx.c      |  9 ++++++---
> > >  lib/librte_ethdev/rte_ethdev.c    | 10 ++++++++--
> > >  lib/librte_net/rte_ether.h        |  1 +
> > >  6 files changed, 24 insertions(+), 11 deletions(-)
> > >
> > > --- a/lib/librte_ethdev/rte_ethdev.c
> > > +++ b/lib/librte_ethdev/rte_ethdev.c
> > > @@ -1257,11 +1257,17 @@ rte_eth_dev_configure(uint16_t port_id,
> uint16_t nb_rx_q, uint16_t nb_tx_q,
> > >  			goto rollback;
> > >  		}
> > >  	} else {
> > > +		/**
> > > +		 * The overhead from MTU to max frame size.
> > > +		 * Considering VLAN and QinQ packet, the VLAN tag size
> > > +		 * needs to be added to RTE_ETHER_MAX_LEN.
> > > +		 */
> > >  		if (dev_conf->rxmode.max_rx_pkt_len < RTE_ETHER_MIN_LEN
> ||
> > > -			dev_conf->rxmode.max_rx_pkt_len > RTE_ETHER_MAX_LEN)
> > > +			dev_conf->rxmode.max_rx_pkt_len > RTE_ETHER_MAX_LEN
> > > +				+ RTE_ETHER_VLAN_LEN * 2)
> > >  			/* Use default value */
> > >  			dev->data->dev_conf.rxmode.max_rx_pkt_len =
> > > -							RTE_ETHER_MAX_LEN;
> > > +				RTE_ETHER_MAX_LEN + RTE_ETHER_VLAN_LEN * 2;
> >
> > +cc ethdev maintainers
> >
> > This looks ok to me for i40e case, but I don't know if there is a
> > consequence for other PMDs. It seems late to change this, so maybe you
> > can live without this part for now.
> >
> > Even on the i40e parts, there can be some subtle bug and I requested
> > i40e maintainers to review carefully but it has not happened, so for
> > me it shouldn't be merged at present.
> 
> I would nack for another, simpler, reason:
> No ethdev behaviour change should be submitted if title does not start with
> "ethdev:" and if ethdev maintainers are not Cc'ed.
> 
> 
Yes, the patch should be dropped even without the ethdev part change, the fix for i40e need more refine. 
Sorry for review this late.




More information about the stable mailing list