ACK: [PATCH][Vivid] net/mlx4_en: Disbale GRO for incoming loopback/selftest packets
Chris J Arges
chris.j.arges at canonical.com
Fri Jun 26 16:36:30 UTC 2015
Only affect 3.19 kernels, looks reasonable.
--chris
On Fri, Jun 26, 2015 at 09:30:56AM -0700, Brad Figg wrote:
> On Thu, Jun 25, 2015 at 09:45:56PM -0300, Rafael David Tinoco wrote:
> > BugLink: https://bugs.launchpad.net/bugs/1432848
> >
> > Packets which are sent from the selftest (ethtool) flow,
> > should not be passed to GRO stack but rather dropped by
> > the driver after validation. To achieve that, we disable
> > GRO for the duration of the selftest.
> >
> > Fixes: dd65beac48a5 ("net/mlx4_en: Extend usage of napi_gro_frags")
> > Reported-by: Carol Soto <clsoto at linux.vnet.ibm.com>
> > OriginalAuthor: Ido Shamay <idos at mellanox.com>
> > (backported from commit 1037ebbbd262227a91dfdd558159e345d4edf6b7 upstream)
> > Signed-off-by: Ido Shamay <idos at mellanox.com>
> > Signed-off-by: Or Gerlitz <ogerlitz at mellanox.com>
> > Signed-off-by: David S. Miller <davem at davemloft.net>
> > Signed-off-by: Rafael David Tinoco <rafael.tinoco at canonical.com>
> > ---
> > drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c
> > index 2d8ee66..a61009f 100644
> > --- a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c
> > +++ b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c
> > @@ -81,12 +81,14 @@ static int mlx4_en_test_loopback(struct mlx4_en_priv *priv)
> > {
> > u32 loopback_ok = 0;
> > int i;
> > -
> > + bool gro_enabled;
> >
> > priv->loopback_ok = 0;
> > priv->validate_loopback = 1;
> > + gro_enabled = priv->dev->features & NETIF_F_GRO;
> >
> > mlx4_en_update_loopback_state(priv->dev, priv->dev->features);
> > + priv->dev->features &= ~NETIF_F_GRO;
> >
> > /* xmit */
> > if (mlx4_en_test_loopback_xmit(priv)) {
> > @@ -108,6 +110,10 @@ static int mlx4_en_test_loopback(struct mlx4_en_priv *priv)
> > mlx4_en_test_loopback_exit:
> >
> > priv->validate_loopback = 0;
> > +
> > + if (gro_enabled)
> > + priv->dev->features |= NETIF_F_GRO;
> > +
> > mlx4_en_update_loopback_state(priv->dev, priv->dev->features);
> > return !loopback_ok;
> > }
> > --
> > 2.1.4
> >
> >
> > --
> > kernel-team mailing list
> > kernel-team at lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
> 1. Clean backport.
> 2. Positive testing.
>
> --
> Brad Figg brad.figg at canonical.com http://www.canonical.com
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
More information about the kernel-team
mailing list