netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen-netback: use default TX queue size for vifs
@ 2023-10-05 14:08 Roger Pau Monne
  2023-10-06 13:15 ` Ross Lagerwall
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Roger Pau Monne @ 2023-10-05 14:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ross Lagerwall, Roger Pau Monne, Wei Liu, Paul Durrant,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Ian Campbell, Ben Hutchings, xen-devel, netdev

Do not set netback interfaces (vifs) default TX queue size to the ring size.
The TX queue size is not related to the ring size, and using the ring size (32)
as the queue size can lead to packet drops.  Note the TX side of the vif
interface in the netback domain is the one receiving packets to be injected
to the guest.

Do not explicitly set the TX queue length to any value when creating the
interface, and instead use the system default.  Note that the queue length can
also be adjusted at runtime.

Fixes: f942dc2552b8 ('xen network backend driver')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 drivers/net/xen-netback/interface.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index f3f2c07423a6..fc3bb63b9ac3 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -41,8 +41,6 @@
 #include <asm/xen/hypercall.h>
 #include <xen/balloon.h>
 
-#define XENVIF_QUEUE_LENGTH 32
-
 /* Number of bytes allowed on the internal guest Rx queue. */
 #define XENVIF_RX_QUEUE_BYTES (XEN_NETIF_RX_RING_SIZE/2 * PAGE_SIZE)
 
@@ -530,8 +528,6 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
 	dev->features = dev->hw_features | NETIF_F_RXCSUM;
 	dev->ethtool_ops = &xenvif_ethtool_ops;
 
-	dev->tx_queue_len = XENVIF_QUEUE_LENGTH;
-
 	dev->min_mtu = ETH_MIN_MTU;
 	dev->max_mtu = ETH_MAX_MTU - VLAN_ETH_HLEN;
 
-- 
2.42.0


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

* Re: [PATCH] xen-netback: use default TX queue size for vifs
  2023-10-05 14:08 [PATCH] xen-netback: use default TX queue size for vifs Roger Pau Monne
@ 2023-10-06 13:15 ` Ross Lagerwall
  2023-10-06 21:44 ` Wei Liu
  2023-10-08 13:01 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Ross Lagerwall @ 2023-10-06 13:15 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: linux-kernel, Wei Liu, Paul Durrant, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Ian Campbell,
	Ben Hutchings, xen-devel, netdev

On Thu, Oct 5, 2023 at 3:08 PM Roger Pau Monne <roger.pau@citrix.com> wrote:
>
> Do not set netback interfaces (vifs) default TX queue size to the ring size.
> The TX queue size is not related to the ring size, and using the ring size (32)
> as the queue size can lead to packet drops.  Note the TX side of the vif
> interface in the netback domain is the one receiving packets to be injected
> to the guest.
>
> Do not explicitly set the TX queue length to any value when creating the
> interface, and instead use the system default.  Note that the queue length can
> also be adjusted at runtime.
>
> Fixes: f942dc2552b8 ('xen network backend driver')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---

Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>

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

* Re: [PATCH] xen-netback: use default TX queue size for vifs
  2023-10-05 14:08 [PATCH] xen-netback: use default TX queue size for vifs Roger Pau Monne
  2023-10-06 13:15 ` Ross Lagerwall
@ 2023-10-06 21:44 ` Wei Liu
  2023-10-08 13:01 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Wei Liu @ 2023-10-06 21:44 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: linux-kernel, Ross Lagerwall, Wei Liu, Paul Durrant,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Ian Campbell, Ben Hutchings, xen-devel, netdev

On Thu, Oct 05, 2023 at 04:08:31PM +0200, Roger Pau Monne wrote:
> Do not set netback interfaces (vifs) default TX queue size to the ring size.
> The TX queue size is not related to the ring size, and using the ring size (32)
> as the queue size can lead to packet drops.  Note the TX side of the vif
> interface in the netback domain is the one receiving packets to be injected
> to the guest.
> 
> Do not explicitly set the TX queue length to any value when creating the
> interface, and instead use the system default.  Note that the queue length can
> also be adjusted at runtime.
> 
> Fixes: f942dc2552b8 ('xen network backend driver')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Wei Liu <wei.liu@kernel.org>

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

* Re: [PATCH] xen-netback: use default TX queue size for vifs
  2023-10-05 14:08 [PATCH] xen-netback: use default TX queue size for vifs Roger Pau Monne
  2023-10-06 13:15 ` Ross Lagerwall
  2023-10-06 21:44 ` Wei Liu
@ 2023-10-08 13:01 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-10-08 13:01 UTC (permalink / raw)
  To: =?utf-8?b?Um9nZXIgUGF1IE1vbm7DqSA8cm9nZXIucGF1QGNpdHJpeC5jb20+?=
  Cc: linux-kernel, ross.lagerwall, wei.liu, paul, davem, edumazet,
	kuba, pabeni, Ian.Campbell, bhutchings, xen-devel, netdev

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Thu,  5 Oct 2023 16:08:31 +0200 you wrote:
> Do not set netback interfaces (vifs) default TX queue size to the ring size.
> The TX queue size is not related to the ring size, and using the ring size (32)
> as the queue size can lead to packet drops.  Note the TX side of the vif
> interface in the netback domain is the one receiving packets to be injected
> to the guest.
> 
> Do not explicitly set the TX queue length to any value when creating the
> interface, and instead use the system default.  Note that the queue length can
> also be adjusted at runtime.
> 
> [...]

Here is the summary with links:
  - xen-netback: use default TX queue size for vifs
    https://git.kernel.org/netdev/net/c/66cf7435a269

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] 4+ messages in thread

end of thread, other threads:[~2023-10-08 13:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-05 14:08 [PATCH] xen-netback: use default TX queue size for vifs Roger Pau Monne
2023-10-06 13:15 ` Ross Lagerwall
2023-10-06 21:44 ` Wei Liu
2023-10-08 13:01 ` patchwork-bot+netdevbpf

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