lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 May 2022 18:57:53 +0100
From:   Edward Cree <ecree.xilinx@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc:     netdev@...r.kernel.org, pabeni@...hat.com, edumazet@...gle.com,
        Martin Habets <habetsm.xilinx@...il.com>
Subject: Re: [PATCH net-next 3/6] eth: switch to netif_napi_add_weight()

On 06/05/2022 18:07, Jakub Kicinski wrote:
> Switch all Ethernet drivers which use custom napi weights
> to the new API.
> 
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
> index eec80b024195..3f28f9861dfa 100644
> --- a/drivers/net/ethernet/sfc/efx_channels.c
> +++ b/drivers/net/ethernet/sfc/efx_channels.c
> @@ -1316,8 +1316,8 @@ void efx_init_napi_channel(struct efx_channel *channel)
>  	struct efx_nic *efx = channel->efx;
>  
>  	channel->napi_dev = efx->net_dev;
> -	netif_napi_add(channel->napi_dev, &channel->napi_str,
> -		       efx_poll, napi_weight);
> +	netif_napi_add_weight(channel->napi_dev, &channel->napi_str, efx_poll,
> +			      napi_weight);
>  }

This isn't really a custom weight; napi_weight is initialised to
 64 and never changed, so probably we ought to be just using
 NAPI_POLL_WEIGHT here and end up on the non-_weight API.
Same goes for Falcon.

-ed

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ