[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <trinity-b3b6d48a-1d62-4280-b52e-5511074f79c9-1651182467378@3c-app-gmx-bap57>
Date: Thu, 28 Apr 2022 23:47:47 +0200
From: Lino Sanfilippo <LinoSanfilippo@....de>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, pabeni@...hat.com, edumazet@...gle.com,
netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>
Subject: Aw: [PATCH net-next v2 07/15] slic: remove a copy of the
NAPI_POLL_WEIGHT define
Hi,
> Gesendet: Donnerstag, 28. April 2022 um 23:23 Uhr
> Von: "Jakub Kicinski" <kuba@...nel.org>
> An: davem@...emloft.net, pabeni@...hat.com
> Cc: edumazet@...gle.com, netdev@...r.kernel.org, "Jakub Kicinski" <kuba@...nel.org>, LinoSanfilippo@....de
> Betreff: [PATCH net-next v2 07/15] slic: remove a copy of the NAPI_POLL_WEIGHT define
>
> Defining local versions of NAPI_POLL_WEIGHT with the same
> values in the drivers just makes refactoring harder.
>
Agreed, FWIW:
Acked-by: Lino Sanfilippo <LinoSanfilippo@....de>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> CC: LinoSanfilippo@....de
> ---
> drivers/net/ethernet/alacritech/slic.h | 2 --
> drivers/net/ethernet/alacritech/slicoss.c | 2 +-
> 2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/alacritech/slic.h b/drivers/net/ethernet/alacritech/slic.h
> index 3add305d34b4..4eecbdfff3ff 100644
> --- a/drivers/net/ethernet/alacritech/slic.h
> +++ b/drivers/net/ethernet/alacritech/slic.h
> @@ -265,8 +265,6 @@
> #define SLIC_NUM_STAT_DESC_ARRAYS 4
> #define SLIC_INVALID_STAT_DESC_IDX 0xffffffff
>
> -#define SLIC_NAPI_WEIGHT 64
> -
> #define SLIC_UPR_LSTAT 0
> #define SLIC_UPR_CONFIG 1
>
> diff --git a/drivers/net/ethernet/alacritech/slicoss.c b/drivers/net/ethernet/alacritech/slicoss.c
> index 1fc9a1cd3ef8..ce353b0c02a3 100644
> --- a/drivers/net/ethernet/alacritech/slicoss.c
> +++ b/drivers/net/ethernet/alacritech/slicoss.c
> @@ -1803,7 +1803,7 @@ static int slic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> goto unmap;
> }
>
> - netif_napi_add(dev, &sdev->napi, slic_poll, SLIC_NAPI_WEIGHT);
> + netif_napi_add(dev, &sdev->napi, slic_poll, NAPI_POLL_WEIGHT);
> netif_carrier_off(dev);
>
> err = register_netdev(dev);
> --
> 2.34.1
Best regards,
Lino
Powered by blists - more mailing lists