Message ID | 20210918060615.8508-1-xuanzhuo@linux.alibaba.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 9ce4e3d6d85600153e61c4b8c3c346bd84d84470 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] virtio_net: use netdev_warn_once to output warn when without enough queues | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 5 maintainers not CCed: kpsingh@kernel.org yhs@fb.com andrii@kernel.org songliubraving@fb.com kafai@fb.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 10 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Sat, 18 Sep 2021 14:06:15 +0800 you wrote: > This warning is output when virtnet does not have enough queues, but it > only needs to be printed once to inform the user of this situation. It > is not necessary to print it every time. If the user loads xdp > frequently, this log appears too much. > > Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> > > [...] Here is the summary with links: - [net-next] virtio_net: use netdev_warn_once to output warn when without enough queues https://git.kernel.org/netdev/net-next/c/9ce4e3d6d856 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 271d38c1d9f8..34f20993ba6b 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2530,8 +2530,8 @@ static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog, /* XDP requires extra queues for XDP_TX */ if (curr_qp + xdp_qp > vi->max_queue_pairs) { - netdev_warn(dev, "XDP request %i queues but max is %i. XDP_TX and XDP_REDIRECT will operate in a slower locked tx mode.\n", - curr_qp + xdp_qp, vi->max_queue_pairs); + netdev_warn_once(dev, "XDP request %i queues but max is %i. XDP_TX and XDP_REDIRECT will operate in a slower locked tx mode.\n", + curr_qp + xdp_qp, vi->max_queue_pairs); xdp_qp = 0; }
This warning is output when virtnet does not have enough queues, but it only needs to be printed once to inform the user of this situation. It is not necessary to print it every time. If the user loads xdp frequently, this log appears too much. Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> --- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)