[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB6PR05MB35099AD2D93EDB3888923374BF3C0@DB6PR05MB3509.eurprd05.prod.outlook.com>
Date: Mon, 4 Dec 2017 21:48:24 +0000
From: Yuval Mintz <yuvalm@...lanox.com>
To: Michael Chan <michael.chan@...adcom.com>,
"davem@...emloft.net" <davem@...emloft.net>
CC: "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.
> 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).
>
> if (need_reload) {
> struct qede_reload_args args;
> diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c
> b/drivers/net/ethernet/qlogic/qede/qede_main.c
> index 8f9b3eb..b81620e 100644
> --- a/drivers/net/ethernet/qlogic/qede/qede_main.c
> +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
> @@ -676,7 +676,7 @@ static void qede_init_ndev(struct qede_dev *edev)
> ndev->priv_flags |= IFF_UNICAST_FLT;
>
> /* user-changeble features */
> - hw_features = NETIF_F_GRO | NETIF_F_SG |
> + hw_features = NETIF_F_GRO | NETIF_F_GRO_HW | NETIF_F_SG |
> NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
> NETIF_F_TSO | NETIF_F_TSO6;
>
> @@ -1515,7 +1515,7 @@ static void qede_init_fp(struct qede_dev *edev)
> edev->ndev->name, queue_id);
> }
>
> - edev->gro_disable = !(edev->ndev->features & NETIF_F_GRO);
> + edev->gro_disable = !(edev->ndev->features & NETIF_F_GRO_HW);
> }
>
> static int qede_set_real_num_queues(struct qede_dev *edev)
> --
> 1.8.3.1
Powered by blists - more mailing lists