On Tue, Dec 5, 2017 at 4:32 AM, Chopra, Manish <manish.cho...@cavium.com> wrote:

>
> Since we are now differentiating HW gro with distinct feature bit, I think we 
> should consider this feature bit everywhere where driver disables
> HW gro internally [not explicitly using ethtool]. This is not just specific 
> to XDP but on some other conditions also driver disables HW gro in load flow.
> I think with just this change we would end up with showing HW gro feature 
> enabled but actually driver has disabled it in XDP or other scenarios 
> internally.
>
> I don't know if it's a good thing to do but just a suggestion -
> What if in driver load flow that is in the end of function 
> qede_alloc_mem_rxq() we do something like below so that it will actually 
> represent
> the actual state of the feature ?
>
> If (edev->gro_disable) {
>         ndev->hw_features &= ~ NETIF_F_GRO_HW;
>         ndev->features &= ~ NETIF_F_GRO_HW;
> }

If edev->gro_disable means that the current configuration cannot
support GRO_HW, then this makes sense.  But I think it is best to
centralize this logic in ndo_fix_features().  The driver can then call
netdev_update_features() to update all features whenever there are
changes that can affect features.

Reply via email to