[v3,26/26] config: add computed max queues define for compatibility

Message ID 20240814104933.14062-27-bruce.richardson@intel.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series add meson config options for queues per port |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS

Commit Message

Bruce Richardson Aug. 14, 2024, 10:49 a.m. UTC
End applications may use the RTE_MAX_QUEUES_PER_PORT define in their
structure definitions, so keep a define present in DPDK for backward
compatibility. Rather than having a hard-coded value, we can use the
maximum of the Rx and Tx values as the overall max value. Rather than
using a macro which does the MAX() calculation inside it, we can compute
the actual value at configuration time and write it using meson.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 config/meson.build                     |  8 ++++++++
 doc/guides/rel_notes/deprecation.rst   | 11 +++++++++++
 doc/guides/rel_notes/release_24_11.rst |  8 +++++++-
 3 files changed, 26 insertions(+), 1 deletion(-)
  

Patch

diff --git a/config/meson.build b/config/meson.build
index fc41354c53..9677636754 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -372,6 +372,14 @@  if get_option('mbuf_refcnt_atomic')
 endif
 dpdk_conf.set10('RTE_IOVA_IN_MBUF', get_option('enable_iova_as_pa'))
 
+# set old MAX_QUEUES_PER_PORT option for compatibility. Compute
+# value as max of Rx and Tx counts
+if get_option('max_ethport_rx_queues') > get_option('max_ethport_tx_queues')
+    dpdk_conf.set('RTE_MAX_QUEUES_PER_PORT', get_option('max_ethport_rx_queues'))
+else
+    dpdk_conf.set('RTE_MAX_QUEUES_PER_PORT', get_option('max_ethport_tx_queues'))
+endif
+
 compile_time_cpuflags = []
 subdir(arch_subdir)
 dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 211f59fdc9..e4ba00040f 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -17,6 +17,17 @@  Other API and ABI deprecation notices are to be posted below.
 Deprecation Notices
 -------------------
 
+* config: The define ``RTE_MAX_QUEUES_PER_PORT`` should be considered deprecated
+  and may be removed in a future release.
+  Its use in apps should be replaced by ``RTE_MAX_ETHPORT_RX_QUEUES`` or ``RTE_MAX_ETHPORT_TX_QUEUES``,
+  as appropriate.
+
+* config: The ``RTE_MAX_QUEUES_PER_PORT`` value is no longer hard-coded to 1024.
+  Its value is now computed at configuration time to be the maximum of the configured max Rx and Tx queue values,
+  given by the meson options ``max_ethport_rx_queues`` and ``max_ethport_tx_queues``.
+  If these are unmodified from the defaults,
+  the value of ``RTE_MAX_QUEUES_PER_PORT`` will be 256.
+
 * build: The ``enable_kmods`` option is deprecated and will be removed in a future release.
   Setting/clearing the option has no impact on the build.
   Instead, kernel modules will be always built for OS's where out-of-tree kernel modules
diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst
index 825cc0fad9..130564d38e 100644
--- a/doc/guides/rel_notes/release_24_11.rst
+++ b/doc/guides/rel_notes/release_24_11.rst
@@ -67,9 +67,15 @@  New Features
 
    The default max values for Rx and Tx queue limits are reduced from 1024, in previous releases,
    to 256 in this release.
-   For application that require large numbers of queues,
+   For applications that require large numbers of queues,
    these defaults can be changed via the meson configuration options described above.
 
+.. note::
+
+   The define ``RTE_MAX_QUEUES_PER_PORT`` is kept for backward compatibility.
+   Its value is no longer hard-coded,
+   but is set, at configuration time, to the maximum of the configured max Rx and Tx queue values.
+
 
 Removed Items
 -------------