From 60906037033fd87913046b74b9f1962a74c04a7f Mon Sep 17 00:00:00 2001 From: David Marchand Date: Thu, 19 Jun 2025 17:56:33 +0200 Subject: [PATCH] netdev-dpdk: Remove limit on maximum descriptors count. Using larger rxq can be beneficial in highly bursty setups. Remove the artificial limit on the count of descriptors in rxq and txq. The device driver will limit the values in any case. Reported-at: https://issues.redhat.com/browse/FDP-1415 Acked-by: Eelco Chaudron Signed-off-by: David Marchand Signed-off-by: Ilya Maximets --- NEWS | 1 + lib/netdev-dpdk.c | 6 +----- vswitchd/vswitch.xml | 12 ++++++------ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index 6e6858c0b..d7231fabc 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ Post-v3.5.0 have been moved to the DBG log level. - DPDK: * New debug appctl command 'dpdk/get-memzone-stats'. + * Removed upper limit for the number of rx/tx descriptors (n_r/txq_desc). * OVS validated with DPDK 24.11.2. - ovs-ctl: * Added a new option, --oom-score=, to set the daemons' Linux diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 5dee56be3..d33e39c71 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -133,8 +133,6 @@ BUILD_ASSERT_DECL((MAX_NB_MBUF / ROUND_DOWN_POW2(MAX_NB_MBUF / MIN_NB_MBUF)) #define NIC_PORT_DEFAULT_RXQ_SIZE 2048 /* Default size of Physical NIC TXQ */ #define NIC_PORT_DEFAULT_TXQ_SIZE 2048 -/* Maximum size of Physical NIC Queues */ -#define NIC_PORT_MAX_Q_SIZE 4096 #define OVS_VHOST_MAX_QUEUE_NUM 1024 /* Maximum number of vHost TX queues. */ #define OVS_VHOST_QUEUE_MAP_UNKNOWN (-1) /* Mapping not initialized. */ @@ -2252,9 +2250,7 @@ dpdk_process_queue_size(struct netdev *netdev, const struct smap *args, queue_size = new_requested_size; - /* Check for OVS limits. */ - if (queue_size <= 0 || queue_size > NIC_PORT_MAX_Q_SIZE - || !is_pow2(queue_size)) { + if (queue_size <= 0 || !is_pow2(queue_size)) { queue_size = default_size; } diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 76df9aab0..332d8890d 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -3484,22 +3484,22 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ + type='{"type": "integer", "minInteger": 1}'>

Specifies the rx queue size (number rx descriptors) for dpdk ports. - The value must be a power of 2, less than 4096 and supported - by the hardware of the device being configured. + The value must be a power of 2 and supported by the hardware of the + device being configured. If not specified or an incorrect value is specified, 2048 rx descriptors will be used by default.

+ type='{"type": "integer", "minInteger": 1}'>

Specifies the tx queue size (number tx descriptors) for dpdk ports. - The value must be a power of 2, less than 4096 and supported - by the hardware of the device being configured. + The value must be a power of 2 and supported by the hardware of the + device being configured. If not specified or an incorrect value is specified, 2048 tx descriptors will be used by default.