All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] virtio_net: use netdev_warn_once to output warn when without enough queues
@ 2021-09-18  6:06 ` Xuan Zhuo
  0 siblings, 0 replies; 3+ messages in thread
From: Xuan Zhuo @ 2021-09-18  6:06 UTC (permalink / raw)
  To: netdev
  Cc: Michael S. Tsirkin, Jason Wang, David S. Miller, Jakub Kicinski,
	Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
	John Fastabend, virtualization, bpf

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(-)

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;
 	}
 
-- 
2.31.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH net-next] virtio_net: use netdev_warn_once to output warn when without enough queues
@ 2021-09-18  6:06 ` Xuan Zhuo
  0 siblings, 0 replies; 3+ messages in thread
From: Xuan Zhuo @ 2021-09-18  6:06 UTC (permalink / raw)
  To: netdev
  Cc: Jesper Dangaard Brouer, Daniel Borkmann, Michael S. Tsirkin,
	John Fastabend, Alexei Starovoitov, virtualization,
	Jakub Kicinski, bpf, David S. Miller

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(-)

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;
 	}
 
-- 
2.31.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] virtio_net: use netdev_warn_once to output warn when without enough queues
  2021-09-18  6:06 ` Xuan Zhuo
  (?)
@ 2021-09-19 11:50 ` patchwork-bot+netdevbpf
  -1 siblings, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-09-19 11:50 UTC (permalink / raw)
  To: Xuan Zhuo
  Cc: netdev, mst, jasowang, davem, kuba, ast, daniel, hawk,
	john.fastabend, virtualization, bpf

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-19 11:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18  6:06 [PATCH net-next] virtio_net: use netdev_warn_once to output warn when without enough queues Xuan Zhuo
2021-09-18  6:06 ` Xuan Zhuo
2021-09-19 11:50 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.