From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, kvalo@kernel.org, johannes@sipsolutions.net,
linux-wireless@vger.kernel.org, mkl@pengutronix.de,
linux-can@vger.kernel.org
Subject: Re: [PATCH net-next] net: drop the weight argument from netif_napi_add
Date: Tue, 27 Sep 2022 17:54:43 +0200 [thread overview]
Message-ID: <YzMcw8S7fuSS9UPw@zx2c4.com> (raw)
In-Reply-To: <20220927132753.750069-1-kuba@kernel.org>
On Tue, Sep 27, 2022 at 06:27:53AM -0700, Jakub Kicinski wrote:
> We tell driver developers to always pass NAPI_POLL_WEIGHT
> as the weight to netif_napi_add(). This may be confusing
> to newcomers, drop the weight argument, those who really
> need to tweak the weight can use netif_napi_add_weight().
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> drivers/net/wireguard/peer.c | 3 +--
>
> diff --git a/drivers/net/wireguard/peer.c b/drivers/net/wireguard/peer.c
> index 1acd00ab2fbc..1cb502a932e0 100644
> --- a/drivers/net/wireguard/peer.c
> +++ b/drivers/net/wireguard/peer.c
> @@ -54,8 +54,7 @@ struct wg_peer *wg_peer_create(struct wg_device *wg,
> skb_queue_head_init(&peer->staged_packet_queue);
> wg_noise_reset_last_sent_handshake(&peer->last_sent_handshake);
> set_bit(NAPI_STATE_NO_BUSY_POLL, &peer->napi.state);
> - netif_napi_add(wg->dev, &peer->napi, wg_packet_rx_poll,
> - NAPI_POLL_WEIGHT);
> + netif_napi_add(wg->dev, &peer->napi, wg_packet_rx_poll);
> napi_enable(&peer->napi);
> list_add_tail(&peer->peer_list, &wg->peer_list);
> INIT_LIST_HEAD(&peer->allowedips_list);
For the wireguard part,
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
next prev parent reply other threads:[~2022-09-27 15:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 13:27 [PATCH net-next] net: drop the weight argument from netif_napi_add Jakub Kicinski
2022-09-27 13:31 ` Marc Kleine-Budde
2022-09-27 15:54 ` Jason A. Donenfeld [this message]
2022-09-27 17:54 ` Eric Dumazet
2022-09-27 18:17 ` Jakub Kicinski
2022-09-27 18:38 ` Eric Dumazet
2022-09-27 18:26 ` Dave Taht
2022-09-29 2:20 ` patchwork-bot+netdevbpf
2022-10-02 17:24 ` Guenter Roeck
2022-10-02 17:59 ` Jakub Kicinski
2022-10-02 23:02 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YzMcw8S7fuSS9UPw@zx2c4.com \
--to=jason@zx2c4.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).