[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACKFLi=6xsQwV__xatnb4XmTD=c7TF+3dkcwwu_ugxj-ScP1Pg@mail.gmail.com>
Date: Mon, 4 Dec 2017 14:45:08 -0800
From: Michael Chan <michael.chan@...adcom.com>
To: Yuval Mintz <yuvalm@...lanox.com>
Cc: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Ariel Elior <Ariel.Elior@...ium.com>,
"everest-linux-l2@...ium.com" <everest-linux-l2@...ium.com>
Subject: Re: [PATCH net-next 4/4] qede: Use NETIF_F_GRO_HW.
On Mon, Dec 4, 2017 at 1:48 PM, Yuval Mintz <yuvalm@...lanox.com> wrote:
>> Advertise NETIF_F_GRO_HW and turn on or off hardware GRO based on
>> NETIF_F_GRO_FW flag.
>>
>> Cc: Ariel Elior <Ariel.Elior@...ium.com>
>> Cc: everest-linux-l2@...ium.com
>> Signed-off-by: Michael Chan <michael.chan@...adcom.com>
>> ---
>> drivers/net/ethernet/qlogic/qede/qede_filter.c | 9 ++-------
>> drivers/net/ethernet/qlogic/qede/qede_main.c | 4 ++--
>> 2 files changed, 4 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c
>> b/drivers/net/ethernet/qlogic/qede/qede_filter.c
>> index c1a0708..7ee49b4 100644
>> --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c
>> +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c
>> @@ -901,13 +901,8 @@ int qede_set_features(struct net_device *dev,
>> netdev_features_t features)
>> netdev_features_t changes = features ^ dev->features;
>> bool need_reload = false;
>>
>> - /* No action needed if hardware GRO is disabled during driver load */
>> - if (changes & NETIF_F_GRO) {
>> - if (dev->features & NETIF_F_GRO)
>> - need_reload = !edev->gro_disable;
>> - else
>> - need_reload = edev->gro_disable;
>> - }
>> + if (changes & NETIF_F_GRO_HW)
>> + need_reload = true;
>
> This doesn't look right; edev->gro_disable can change due to other
> conditions as well - otherwise, it would have been synonymous with
> (dev->features & NETIF_F_GRO).
>
Feel free to modify the patch. The idea is for the driver to
determine in ndo_fix_features()/ndo_set_features() if GRO_HW can be
enabled. For things like generic XDP, I think we can add code to
centrally disable GRO_HW and not have to worry about that in the
driver.
Powered by blists - more mailing lists