mlx4: make validate_loopback() more generic
authorEric Dumazet <edumazet@google.com>
Wed, 8 Mar 2017 16:17:17 +0000 (08:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Mar 2017 17:54:46 +0000 (09:54 -0800)
commit6969cf0fdbe9e67ed14cdf7ec95977abcf4a14af
tree2b24c8da27c1e7f603fd915258a192667a346714
parent02e6fd3e5598bace683e05ee783f134722cb21b4
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>
drivers/net/ethernet/mellanox/mlx4/en_rx.c
drivers/net/ethernet/mellanox/mlx4/en_selftest.c