Subject: Re: [PATCH net 2/2] net/mlx4_en: Disbale GRO for incoming loopback/selftest packets

From: Ido Shamay <[email-masked]>
Date: Mon, 02 Mar 2015 09:47:49 +0200

On 3/1/2015 7:24 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 3/1/2015 5:56 PM, Or Gerlitz wrote:
>
>> From: Ido Shamay <[email-masked]>
>
>> Packets which are sent from the selftest (ethtool) flow, should not
>> be passed to the 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 <[email-masked]>
>> Signed-off-by: Ido Shamay <[email-masked]>
>> Signed-off-by: Or Gerlitz <[email-masked]>
>> ---
>>   drivers/net/ethernet/mellanox/mlx4/en_selftest.c |    8 +++++++-
>>   1 files changed, 7 insertions(+), 1 deletions(-)
>
>> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c
>> b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c
>> index 2d8ee66..ac8870c 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);
>
>     Parens not necessary here.
>
Will be fixed in V1, thanks.
Any chance checkpatch can identify such cases?

> [...]
>
> WBR, Sergei
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to [email-masked]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>