diff options
author | Eric Dumazet <edumazet@google.com> | 2017-03-08 19:17:17 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-09 20:54:46 +0300 |
commit | 6969cf0fdbe9e67ed14cdf7ec95977abcf4a14af (patch) | |
tree | 2b24c8da27c1e7f603fd915258a192667a346714 /drivers/net/ethernet/mellanox/mlx4/en_selftest.c | |
parent | 02e6fd3e5598bace683e05ee783f134722cb21b4 (diff) | |
download | linux-6969cf0fdbe9e67ed14cdf7ec95977abcf4a14af.tar.xz |
mlx4: make validate_loopback() more generic
Testing a boolean in fast path is not worth duplicating
the code allocating packets, when GRO is on or off.
If this proves to be a problem, we might later use a jump label.
Next patch will remove this duplicated code and ease code review.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_selftest.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c index 95290e1fc9fe..17112faafbcc 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c @@ -81,14 +81,11 @@ 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)) { @@ -111,9 +108,6 @@ 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; } |