Subject: Re: [v2 Patch 2/2] mlx4: add dynamic LRO disable support

From: Cong Wang <[email-masked]>
Date: Thu, 17 Jun 2010 18:48:35 +0800

On 06/15/10 18:14, Stanislaw Gruszka wrote:
> On Tue, 15 Jun 2010 16:35:35 +0800
> Cong Wang<[email-masked]>  wrote:
>>> BTW: seems default ethtool_op_set_flags introduce a bug on many
>>> devices regarding ETH_FLAG_RXHASH. I think default should
>>> be EOPNOTSUPP, and these few devices that actually support RXHASH
>>> should have custom ethtool_ops->set_flags
>>
>> Hmm, you mean this?
>>
>>    if (data&  ETH_FLAG_RXHASH)
>> +    if (!ops->set_flags)
>> +        return -EOPNOTSUPP;
>> ....
>
> Not really, but I do not have good idea how patch with fix should
> looks.
>
> I dislike fact that we setup ->feature that are not in real supported by
> particular device instead of returning EOPNOTSUPP. This actually include
> both flags NETIF_F_LRO and NETIF_F_RXHASH.
>
> Perhaps ethtool_op_set_flags should be removed and drivers should use
> only custom version. In particular seems e1000e and sfc use this
> function improperly and should have NULL as .set_flags.

This depends on if what ethtool_op_set_flags() does is common for
net drivers.

>
> I will think more about that and maybe cook some patches.
>

Yes, please. Cc me when you post patches.

Thanks.