diff --git a/VERSION b/VERSION index 7534e512e6c..89e1751fbf4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -25.11.0-rc3 +25.11.0-rc4 diff --git a/doc/api/meson.build b/doc/api/meson.build index e9b7f305247..23ed5bf263d 100644 --- a/doc/api/meson.build +++ b/doc/api/meson.build @@ -27,6 +27,7 @@ example = custom_target('examples.dox', depfile: 'examples.dox.d', install: get_option('enable_docs'), install_dir: htmldir, + install_tag: 'doc', build_by_default: get_option('enable_docs')) # set up common Doxygen configuration @@ -76,6 +77,7 @@ doxy_html_build = custom_target('doxygen-html', command: [generate_doxygen, '@OUTPUT@', doxygen, '@INPUT@'], install: get_option('enable_docs'), install_dir: htmldir, + install_tag: 'doc', build_by_default: get_option('enable_docs')) doc_targets += doxy_html_build @@ -90,6 +92,7 @@ doxy_man_build = custom_target('doxygen-man', command: [generate_doxygen, '@OUTPUT@', doxygen, '@INPUT@'], install: get_option('enable_docs'), install_dir: get_option('datadir'), + install_tag: 'doc', build_by_default: get_option('enable_docs')) doc_targets += doxy_man_build diff --git a/doc/guides/cryptodevs/ionic.rst b/doc/guides/cryptodevs/ionic.rst index d563602ebe9..7c9d2ebd049 100644 --- a/doc/guides/cryptodevs/ionic.rst +++ b/doc/guides/cryptodevs/ionic.rst @@ -1,5 +1,5 @@ .. SPDX-License-Identifier: BSD-3-Clause - Copyright 2021-2024 Advanced Micro Devices, Inc. + Copyright 2021-2025 Advanced Micro Devices, Inc. IONIC Crypto Driver =================== @@ -16,6 +16,8 @@ It currently supports the below models: `(pdf) `__ - DSC3-400 dual-port 400G Distributed Services Card `(pdf) `__ +- Pollara 400 single-port 400G AI NIC + `(pdf) `__ Please visit the `AMD Pensando Networking diff --git a/doc/guides/freebsd_gsg/build_dpdk.rst b/doc/guides/freebsd_gsg/build_dpdk.rst index f98292bf417..45bb4fc4780 100644 --- a/doc/guides/freebsd_gsg/build_dpdk.rst +++ b/doc/guides/freebsd_gsg/build_dpdk.rst @@ -16,16 +16,16 @@ The following FreeBSD packages are required to build DPDK: * meson * ninja * pkgconf -* py38-pyelftools +* py311-pyelftools -.. note: +.. note:: - The specific package for pyelftools is dependent on the version of python in use, - Python 3.8 being the version at type of writing, hence the ``py38`` prefix. + The specific package for pyelftools is dependent on the version of python in use, + Python 3.11 being the version at type of writing, hence the ``py311`` prefix. These can be installed using (as root):: - pkg install meson pkgconf py38-pyelftools + pkg install meson pkgconf py311-pyelftools To compile the required kernel modules for memory management and working with physical NIC devices, the kernel sources for FreeBSD also diff --git a/doc/guides/linux_gsg/amd_platform.rst b/doc/guides/linux_gsg/amd_platform.rst index 43d85273e27..40b65d1c9e0 100644 --- a/doc/guides/linux_gsg/amd_platform.rst +++ b/doc/guides/linux_gsg/amd_platform.rst @@ -22,7 +22,9 @@ Tuning Guides for AMD EPYC SoC #. `GENOA `_ -#. `BERGAMO|SIENNA `_ +#. `BERGAMO|SIENA `_ + +#. `TURIN `_ General Requirements @@ -86,10 +88,43 @@ Core ~~~~ AMD EPYC SoC supports CPU power functions via ``rte_power`` API from `23.11 LTS` onwards. -These are tested and validated on MILAN, GENOA, BERGAMO and SIENA -using Linux kernel `6.4` and above with ``amd_pstate`` power driver. +These are tested and validated on MILAN, GENOA, BERGAMO, SIENA and TURIN +using Linux kernel `6.4` and above with ``amd_pstate`` power driver in ``passive`` mode. .. note:: * Power libraries are supported on Linux only. * DPDK uncore support on Linux is work in progress. + +Uncore +~~~~~~ + +AMD EPYC SoC support UNCORE power functions via ``rte_power_uncore`` from `25.03` onwards. +These are tested and validated on GENOA, SIENA and TURIN. +Please refer the tuning guides to enable ``HSMP`` and DPDK power management guide. + + +NIC +--- + +To use Solarflare x4 on AMD EPYC TURIN, please ensure the following + +#. Upgrade Linux or distro version to 6.13 or higher. + +#. Disable PCIe power option via ``vfio-pci.disable_idle_d3=1`` in GRUB. + +#. Enable the hardware with out-of-tree sfc (contact Solarflare) Linux kernel driver first; + then bind with ``vfio-pci`` next. + +#. Please use PMD args ``fw_variant=ultra-low-latency,perf_profile=throughput``. + +To use Solarflare x2 on AMD EPYC TURIN, please ensure the following + +#. Upgrade Linux or distro version to 6.13 or higher. + +#. Disable PCIe power option via ``vfio-pci.disable_idle_d3=1`` in GRUB. + +#. Enable the hardware with ``sfc`` Linux Kernel Driver first; + then bind with ``vfio-pci`` next. + +#. Please use PMD args ``fw_variant=ultra-low-latency,perf_profile=throughput``. diff --git a/doc/guides/meson.build b/doc/guides/meson.build index c6779310132..8c75beb1c19 100644 --- a/doc/guides/meson.build +++ b/doc/guides/meson.build @@ -22,6 +22,7 @@ html_guides = custom_target('html_guides', depfile: '.html.d', build_by_default: get_option('enable_docs'), install: get_option('enable_docs'), + install_tag: 'doc', install_dir: htmldir) doc_targets += html_guides diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index 6f9dab73e29..165798fb941 100644 --- a/doc/guides/nics/i40e.rst +++ b/doc/guides/nics/i40e.rst @@ -104,6 +104,8 @@ For X710/XL710/XXV710, +--------------+-----------------------+------------------+ | DPDK version | Kernel driver version | Firmware version | +==============+=======================+==================+ + | 25.11 | 2.28.13 | 9.55 | + +--------------+-----------------------+------------------+ | 25.07 | 2.28.7 | 9.54 | +--------------+-----------------------+------------------+ | 25.03 | 2.27.8 | 9.53 | @@ -128,50 +130,6 @@ For X710/XL710/XXV710, +--------------+-----------------------+------------------+ | 21.11 | 2.17.4 | 8.30 | +--------------+-----------------------+------------------+ - | 21.08 | 2.15.9 | 8.30 | - +--------------+-----------------------+------------------+ - | 21.05 | 2.15.9 | 8.30 | - +--------------+-----------------------+------------------+ - | 21.02 | 2.14.13 | 8.00 | - +--------------+-----------------------+------------------+ - | 20.11 | 2.14.13 | 8.00 | - +--------------+-----------------------+------------------+ - | 20.08 | 2.12.6 | 7.30 | - +--------------+-----------------------+------------------+ - | 20.05 | 2.11.27 | 7.30 | - +--------------+-----------------------+------------------+ - | 20.02 | 2.10.19 | 7.20 | - +--------------+-----------------------+------------------+ - | 19.11 | 2.9.21 | 7.00 | - +--------------+-----------------------+------------------+ - | 19.08 | 2.8.43 | 7.00 | - +--------------+-----------------------+------------------+ - | 19.05 | 2.7.29 | 6.80 | - +--------------+-----------------------+------------------+ - | 19.02 | 2.7.26 | 6.80 | - +--------------+-----------------------+------------------+ - | 18.11 | 2.4.6 | 6.01 | - +--------------+-----------------------+------------------+ - | 18.08 | 2.4.6 | 6.01 | - +--------------+-----------------------+------------------+ - | 18.05 | 2.4.6 | 6.01 | - +--------------+-----------------------+------------------+ - | 18.02 | 2.4.3 | 6.01 | - +--------------+-----------------------+------------------+ - | 17.11 | 2.1.26 | 6.01 | - +--------------+-----------------------+------------------+ - | 17.08 | 2.0.19 | 6.01 | - +--------------+-----------------------+------------------+ - | 17.05 | 1.5.23 | 5.05 | - +--------------+-----------------------+------------------+ - | 17.02 | 1.5.23 | 5.05 | - +--------------+-----------------------+------------------+ - | 16.11 | 1.5.23 | 5.05 | - +--------------+-----------------------+------------------+ - | 16.07 | 1.4.25 | 5.04 | - +--------------+-----------------------+------------------+ - | 16.04 | 1.4.25 | 5.02 | - +--------------+-----------------------+------------------+ For X722, @@ -179,6 +137,8 @@ For X722, +--------------+-----------------------+------------------+ | DPDK version | Kernel driver version | Firmware version | +==============+=======================+==================+ + | 25.11 | 2.28.13 | 6.51 | + +--------------+-----------------------+------------------+ | 25.07 | 2.28.7 | 6.50 | +--------------+-----------------------+------------------+ | 25.03 | 2.27.8 | 6.50 | @@ -203,30 +163,6 @@ For X722, +--------------+-----------------------+------------------+ | 21.11 | 2.17.4 | 5.30 | +--------------+-----------------------+------------------+ - | 21.08 | 2.15.9 | 5.30 | - +--------------+-----------------------+------------------+ - | 21.05 | 2.15.9 | 5.30 | - +--------------+-----------------------+------------------+ - | 21.02 | 2.14.13 | 5.00 | - +--------------+-----------------------+------------------+ - | 20.11 | 2.13.10 | 5.00 | - +--------------+-----------------------+------------------+ - | 20.08 | 2.12.6 | 4.11 | - +--------------+-----------------------+------------------+ - | 20.05 | 2.11.27 | 4.11 | - +--------------+-----------------------+------------------+ - | 20.02 | 2.10.19 | 4.11 | - +--------------+-----------------------+------------------+ - | 19.11 | 2.9.21 | 4.10 | - +--------------+-----------------------+------------------+ - | 19.08 | 2.9.21 | 4.10 | - +--------------+-----------------------+------------------+ - | 19.05 | 2.7.29 | 3.33 | - +--------------+-----------------------+------------------+ - | 19.02 | 2.7.26 | 3.33 | - +--------------+-----------------------+------------------+ - | 18.11 | 2.4.6 | 3.33 | - +--------------+-----------------------+------------------+ Configuration diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst index 2d555d2943f..cde31a5694b 100644 --- a/doc/guides/nics/ice.rst +++ b/doc/guides/nics/ice.rst @@ -63,14 +63,6 @@ For E810, +-----------+---------------+-----------------+-----------+--------------+-----------+ | DPDK | Kernel Driver | OS Default DDP | COMMS DDP | Wireless DDP | Firmware | +===========+===============+=================+===========+==============+===========+ - | 20.11 | 1.3.2 | 1.3.20 | 1.3.24 | N/A | 2.3 | - +-----------+---------------+-----------------+-----------+--------------+-----------+ - | 21.02 | 1.4.11 | 1.3.24 | 1.3.28 | 1.3.4 | 2.4 | - +-----------+---------------+-----------------+-----------+--------------+-----------+ - | 21.05 | 1.6.5 | 1.3.26 | 1.3.30 | 1.3.6 | 3.0 | - +-----------+---------------+-----------------+-----------+--------------+-----------+ - | 21.08 | 1.7.16 | 1.3.27 | 1.3.31 | 1.3.7 | 3.1 | - +-----------+---------------+-----------------+-----------+--------------+-----------+ | 21.11 | 1.7.16 | 1.3.27 | 1.3.31 | 1.3.7 | 3.1 | +-----------+---------------+-----------------+-----------+--------------+-----------+ | 22.03 | 1.8.3 | 1.3.28 | 1.3.35 | 1.3.8 | 3.2 | @@ -95,6 +87,8 @@ For E810, +-----------+---------------+-----------------+-----------+--------------+-----------+ | 25.07 | 2.2.8 | 1.3.43 | 1.3.55 | 1.3.23 | 4.8 | +-----------+---------------+-----------------+-----------+--------------+-----------+ + | 25.11 | 2.3.14 | 1.3.43 | 1.3.55 | 1.3.25 | 4.9 | + +-----------+---------------+-----------------+-----------+--------------+-----------+ For E830, @@ -103,7 +97,8 @@ For E830, +===========+===============+=================+===========+==============+===========+ | 25.07 | 2.2.8 | 1.3.43 | 1.3.55 | 1.3.23 | 1.0 | +-----------+---------------+-----------------+-----------+--------------+-----------+ - + | 25.11 | 2.3.14 | 1.3.43 | 1.3.55 | 1.3.25 | 1.2 | + +-----------+---------------+-----------------+-----------+--------------+-----------+ Dynamic Device Personalization (DDP) package loading ---------------------------------------------------- diff --git a/doc/guides/nics/ionic.rst b/doc/guides/nics/ionic.rst index a991a2cf3f2..2709a888fbe 100644 --- a/doc/guides/nics/ionic.rst +++ b/doc/guides/nics/ionic.rst @@ -1,5 +1,5 @@ .. SPDX-License-Identifier: BSD-3-Clause - Copyright 2018-2022 Advanced Micro Devices, Inc. + Copyright 2018-2025 Advanced Micro Devices, Inc. IONIC Driver ============ @@ -15,6 +15,8 @@ It currently supports the below models: `(pdf) `__ - DSC3-400 dual-port 400G Distributed Services Card `(pdf) `__ +- Pollara 400 single-port 400G AI NIC + `(pdf) `__ Please visit the `AMD Pensando Networking diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index 51d7637fba2..8481cc974aa 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -647,6 +647,8 @@ for an additional list of options shared with other mlx5 drivers. - 3, this engages tunnel offload mode. In E-Switch configuration, that mode implicitly activates ``dv_xmeta_en=1``. + Tunnel offload is not supported in synchronous flow API + when using :ref:`HW steering `. - 4, this mode is only supported in :ref:`HW steering `. The Rx/Tx metadata with 32b width copy between FDB and NIC is supported. @@ -694,11 +696,8 @@ for an additional list of options shared with other mlx5 drivers. Value 2 enables the WQE based hardware steering. In this mode, only queue-based flow management is supported. - By default, the PMD will set this value according to capability. - If DV flow steering is supported, it will be set to 1. - If DV flow steering is not supported and HW steering is supported, - then it will be set to 2. - Otherwise, it will be set to 0. + It is configured by default to 1 (DV flow steering) if supported. + Otherwise, the value is 0 which indicates legacy Verbs flow offloading. - ``dv_esw_en`` parameter [int] @@ -834,10 +833,7 @@ for an additional list of options shared with other mlx5 drivers. In this case, all rules are inserted but only the first rule takes effect, the next rule takes effect only if the previous rules are deleted. - This option is not supported in :ref:`HW steering `, - and will be forced to 0 in this mode. - - By default, the PMD will set this value according to capability. + By default, the PMD will set this value to 1. .. _mlx5_net_stats: @@ -1367,6 +1363,13 @@ Reconfiguring HW steering engine is not supported. Any subsequent call to ``rte_flow_configure()`` with different configuration than initially provided will be rejected. +.. note:: + + The application must call ``rte_flow_configure()`` + before creating any flow rules + when using :ref:`asynchronous flow API `. + It is also recommended for synchronous API. + Limitations ^^^^^^^^^^^ @@ -1404,6 +1407,41 @@ Limitations which results in L3 encap. d. Only in transfer (switchdev) mode. +#. When using synchronous flow API, + the following limitations and considerations apply: + + - There are limitations on size of match fields. + Exceeding these limitations will result in an error, + unlike other flow engines (``dv_flow_en`` < 2) + that handle this by creating a tree of rules. + + - When updating a rule by inserting a new one and deleting the old one, + for non-zero group, after adding the new rule, + and before the deletion of the old rule, the new rule will be matched, + contrary to the behavior in other flow engines (``dv_flow_en`` < 2) + in which the old rule will be matched. + + - By default, the port is configured with zeroed ``rte_flow_port_attr``: + there are zero flow queues (one is created by default), + no actions, and no flags set. + The default flow queue size for ``rte_flow_queue_attr`` is 32 + (used for the internal flow queue). + If the application uses any configurable actions + (such as meter, age, conntrack or counter), + the system will allocate the maximum number of available actions per port. + To optimize memory usage, + the application should call ``rte_flow_configure`` + and specify only the required number of actions. + If the application needs to modify flow queue settings, + it should also use ``rte_flow_configure``. + + - When creating a rule with a partial `mask` provided in the flow item, + the `spec` value must be calculated after the "AND" operation with the `mask`. + If more significant bits are present in the `spec` than in the `mask`, + the rule will be created without any error + but the packets will not hit as expected. + Such limitation will be removed in future. + .. _mlx5_bifurcated: @@ -2355,6 +2393,14 @@ Limitations restricts the ``port_id`` configuration to only accept the value ``0xffff``, indicating the E-Switch manager. +#. When using synchronous flow API with :ref:`HW steering `: + + - ``RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR`` is not supported. + ``RTE_FLOW_ITEM_TYPE_TX_QUEUE`` can be used with a rule for each queue. + - Transfer rules are not supported on representor ports. + - Rules created on proxy ports without explicit represented port matching + will match packets from all ports. + Examples ^^^^^^^^ @@ -2544,6 +2590,10 @@ DPDK 19.05 18.11 Limitations ^^^^^^^^^^^ +#. When using synchronous flow API with :ref:`HW steering `, + ``RTE_FLOW_ITEM_TYPE_MARK`` (16-bit match) is unsupported. + ``RTE_FLOW_ITEM_TYPE_META`` (32-bit match) can be used as an alternative. + #. ``RTE_FLOW_ACTION_TYPE_MARK`` can be used in transfer flow rules, since firmware version xx.43.1014, but only on template tables @@ -2718,8 +2768,8 @@ With :ref:`HW steering `: #. Using count action on root tables requires: - - Linux kernel >= 6.4 - - rdma-core >= 60.0 + - Linux kernel >= 6.4 and rdma-core >= 60.0 for upstream drivers/libraries or, + - DOCA >= 3.2.0 for drivers/libraries provided by NVIDIA. .. _mlx5_age: @@ -2759,6 +2809,9 @@ With :ref:`HW steering `, in addition to flow rules using only age (without count action). - ``nb_aging_objects`` is the number of flow rules containing age action. +#. When using synchronous flow API with :ref:`HW steering `, + aged flows are reported only once. + #. With strict queueing enabled (``RTE_FLOW_PORT_FLAG_STRICT_QUEUE`` passed to ``rte_flow_configure()``), indirect age actions can be created only through asynchronous flow API. @@ -2891,10 +2944,12 @@ Limitations it cannot be used by flow matching all ports. #. When using :ref:`HW steering `, - only meter mark action is supported. + only ``RTE_FLOW_ACTION_TYPE_METER_MARK`` is supported, + not ``RTE_FLOW_ACTION_TYPE_METER``. #. The maximal number of HW quota and HW meter objects is ``16e6``. + Examples ^^^^^^^^ @@ -3758,6 +3813,12 @@ Requirements Matching on checksum and sequence needs MLNX_OFED 5.6+. +Limitations +^^^^^^^^^^^ + +#. When using synchronous flow API with :ref:`HW steering `, + matching the field ``c_rsvd0_ver`` is not supported on group 0 (root table). + .. _mlx5_nvgre: diff --git a/doc/guides/prog_guide/img/kni_traffic_flow.png b/doc/guides/prog_guide/img/kni_traffic_flow.png deleted file mode 100644 index a7e749661de..00000000000 Binary files a/doc/guides/prog_guide/img/kni_traffic_flow.png and /dev/null differ diff --git a/doc/guides/prog_guide/img/pkt_flow_kni.png b/doc/guides/prog_guide/img/pkt_flow_kni.png deleted file mode 100644 index ab730bb4c73..00000000000 Binary files a/doc/guides/prog_guide/img/pkt_flow_kni.png and /dev/null differ diff --git a/doc/guides/rel_notes/release_25_11.rst b/doc/guides/rel_notes/release_25_11.rst index 83e86ada64b..c82af81c3f0 100644 --- a/doc/guides/rel_notes/release_25_11.rst +++ b/doc/guides/rel_notes/release_25_11.rst @@ -345,3 +345,256 @@ Tested Platforms This section is a comment. Do not overwrite or remove it. Also, make sure to start the actual text at the margin. ======================================================= + +* Intel\ |reg| platforms with Intel\ |reg| NICs combinations + + * CPU + + * Intel\ |reg| Atom\ |trade| x7835RE + * Intel\ |reg| Xeon\ |reg| 6553P-B CPU @ 2.6GHz + * Intel\ |reg| Xeon\ |reg| 6767P CPU @ 2.4GHz + * Intel\ |reg| Xeon\ |reg| CPU Max 9480 + * Intel\ |reg| Xeon\ |reg| CPU Max 9480 CPU @ 1.9GHz + * Intel\ |reg| Xeon\ |reg| Gold 6330 CPU @ 2.00GHz + * Intel\ |reg| Xeon\ |reg| Gold 6348 CPU @ 2.60GHz + * Intel\ |reg| Xeon\ |reg| Platinum 8280M CPU @ 2.70GHz + * Intel\ |reg| Xeon\ |reg| Platinum 8380 CPU @ 2.30GHz + * Intel\ |reg| Xeon\ |reg| Platinum 8468H CPU @ 2.1GHz + * Intel\ |reg| Xeon\ |reg| Platinum 8490H CPU @ 1.9GHz + + * OS: + + * Fedora 42 + * FreeBSD 14.3 + * Microsoft Azure Linux 3.0 + * OpenAnolis OS 8.10 + * openEuler 24.03 (LTS-SP2) + * Red Hat Enterprise Linux Server release 10 + * Red Hat Enterprise Linux Server release 9.6 + * Ubuntu 24.04 LTS + * Ubuntu 24.04.3 LTS + * Vmware ESXi 8.0.3 + + * NICs: + + * Intel\ |reg| Ethernet Controller E810-C for SFP (4x25G) + + * Firmware version: 4.90 0x80020eeb 1.3863.0 + * Device ID (PF/VF): 8086:1593 / 8086:1889 + * Driver version (out-of-tree): 2.3.14 (ice) + * Driver version (in-tree): 6.8.0-86-generic (Ubuntu24.04 LTS) (ice) + * OS Default DDP: 1.3.43.0 + * COMMS DDP: 1.3.55.0 + * Wireless Edge DDP: 1.3.25.0 + + * Intel\ |reg| Ethernet Controller E810-C for QSFP (2x100G) + + * Firmware version: 4.90 0x80020ef2 1.3863.0 + * Device ID (PF/VF): 8086:1592 / 8086:1889 + * Driver version (out-of-tree): 2.3.14 (ice) + * Driver version (in-tree): 6.6.12.1-1.azl3+ice+ (Microsoft Azure Linux 3.0) / + 6.12.0-55.9.1.el10_0.x86_64+rt (RHEL10) (ice) + * OS Default DDP: 1.3.43.0 + * COMMS DDP: 1.3.55.0 + * Wireless Edge DDP: 1.3.25.0 + + * Intel\ |reg| Ethernet Controller E830-CC for SFP + + * Firmware version: 1.20 0x800179c0 1.3862.0 + * Device ID (PF/VF): 8086:12d3 / 8086:1889 + * Driver version: 2.3.14 (ice) + * OS Default DDP: 1.3.43.0 + * COMMS DDP: 1.3.55.0 + * Wireless Edge DDP: 1.3.25.0 + + * Intel\ |reg| Ethernet Controller E830-CC for QSFP + + * Firmware version: 1.20 0x800179c1 1.3862.0 + * Device ID (PF/VF): 8086:12d2 / 8086:1889 + * Driver version: 2.3.14 (ice) + * OS Default DDP: 1.3.43.0 + * COMMS DDP: 1.3.55.0 + * Wireless Edge DDP: 1.3.25.0 + + * Intel\ |reg| Ethernet Connection E825-C for QSFP + + * Firmware version: 4.04 0x80007e5c 1.3885.0 + * Device ID (PF/VF): 8086:579d / 8086:1889 + * Driver version: 2.3.14 (ice) + * OS Default DDP: 1.3.43.0 + * COMMS DDP: 1.3.55.0 + * Wireless Edge DDP: 1.3.25.0 + + * Intel\ |reg| Ethernet Network Adapter E610-XT2 + + * Firmware version: 1.30 0x8000e8a2 1.3864.0 + * Device ID (PF/VF): 8086:57b0 / 8086:57ad + * Driver version (out-of-tree): 6.2.5 (ixgbe) + + * Intel\ |reg| Ethernet Network Adapter E610-XT4 + + * Firmware version: 1.30 0x8000e8a5 1.3864.0 + * Device ID (PF/VF): 8086:57b0 / 8086:57ad + * Driver version (out-of-tree): 6.2.5 (ixgbe) + + * Intel\ |reg| Ethernet Converged Network Adapter X710-DA4 (4x10G) + + * Firmware version: 9.55 0x8000fdf4 1.3862.0 + * Device ID (PF/VF): 8086:1572 / 8086:154c + * Driver version (in-tree): 6.8.0-88-generic (i40e) + + * Intel\ |reg| Corporation Ethernet Connection X722 for 10GbE SFP+ (2x10G) + + * Firmware version: 6.51 0x80004430 1.3862.0 + * Device ID (PF/VF): 8086:37d0 / 8086:37cd + * Driver version (out-of-tree): 2.28.13 (i40e) + + * Intel\ |reg| Ethernet Converged Network Adapter XXV710-DA2 (2x25G) + + * Firmware version: 9.55 0x8000fe4c 1.3862.0 + * Device ID (PF/VF): 8086:158b / 8086:154c + * Driver version (out-of-tree): 2.28.13 (i40e) + * Driver version (in-tree): 6.8.0-88-generic (Ubuntu24.04.3 LTS) / + 6.12.0-55.9.1.el10_0.x86_64 (RHEL10) (i40e) + + * Intel\ |reg| Ethernet Converged Network Adapter XL710-QDA2 (2X40G) + + * Firmware version(PF): 9.55 0x8000fe31 1.3862.0 + * Device ID (PF/VF): 8086:1583 / 8086:154c + * Driver version (out-of-tree): 2.28.13 (i40e) + + * Intel\ |reg| Ethernet Controller I226-LM + + * Firmware version: 2.14, 0x8000028c + * Device ID (PF): 8086:125b + * Driver version (in-tree): 6.8.0-87-generic (Ubuntu24.04.3 LTS) (igc) + + * Intel\ |reg| Corporation Ethernet Server Adapter I350-T4 + + * Firmware version: 1.63, 0x8000116b + * Device ID (PF/VF): 8086:1521 /8086:1520 + * Driver version: 6.14.0-35-generic (Ubuntu 24.04.3 LTS) (igb) + + * Intel\ |reg| Infrastructure Processing Unit (Intel\ |reg| IPU) E2100 + + * Firmware version: ci-ts.release.2.0.0.11126 + * Device ID (idpf/cpfl): 8086:1452/8086:1453 + * Driver version: 0.0.772 (idpf) + +* Intel\ |reg| platforms with NVIDIA\ |reg| NICs combinations + + * CPU: + + * Intel\ |reg| Xeon\ |reg| Gold 6154 CPU @ 3.00GHz + * Intel\ |reg| Xeon\ |reg| CPU E5-2697A v4 @ 2.60GHz + * Intel\ |reg| Xeon\ |reg| CPU E5-2697 v3 @ 2.60GHz + * Intel\ |reg| Xeon\ |reg| CPU E5-2680 v2 @ 2.80GHz + * Intel\ |reg| Xeon\ |reg| CPU E5-2670 0 @ 2.60GHz + * Intel\ |reg| Xeon\ |reg| CPU E5-2650 v4 @ 2.20GHz + * Intel\ |reg| Xeon\ |reg| CPU E5-2650 v3 @ 2.30GHz + * Intel\ |reg| Xeon\ |reg| CPU E5-2640 @ 2.50GHz + * Intel\ |reg| Xeon\ |reg| CPU E5-2650 0 @ 2.00GHz + * Intel\ |reg| Xeon\ |reg| CPU E5-2620 v4 @ 2.10GHz + + * OS: + + * Red Hat Enterprise Linux release 9.2 (Plow) + * Red Hat Enterprise Linux release 9.1 (Plow) + * Red Hat Enterprise Linux release 8.6 (Ootpa) + * Ubuntu 24.04 + * Ubuntu 22.04 + * Ubuntu 20.04 + * SUSE Enterprise Linux 15 SP4 + + * DOCA: + + * DOCA 3.2.0-125000 and above. + + * upstream kernel: + + * Linux 6.17.0 and above + + * rdma-core: + + * rdma-core-58.0 and above + + * NICs + + * NVIDIA\ |reg| ConnectX\ |reg|-6 Dx EN 100G MCX623106AN-CDAT (2x100G) + + * Host interface: PCI Express 4.0 x16 + * Device ID: 15b3:101d + * Firmware version: 22.47.1026 and above + + * NVIDIA\ |reg| ConnectX\ |reg|-6 Lx EN 25G MCX631102AN-ADAT (2x25G) + + * Host interface: PCI Express 4.0 x8 + * Device ID: 15b3:101f + * Firmware version: 26.47.1026 and above + + * NVIDIA\ |reg| ConnectX\ |reg|-7 200G CX713106AE-HEA_QP1_Ax (2x200G) + + * Host interface: PCI Express 5.0 x16 + * Device ID: 15b3:1021 + * Firmware version: 28.47.1026 and above + + * NVIDIA\ |reg| ConnectX\ |reg|-8 SuperNIC 400G MT4131 - 900-9X81Q-00CN-STA (2x400G) + + * Host interface: PCI Express 6.0 x16 + * Device ID: 15b3:1023 + * Firmware version: 40.47.1026 and above + + * NVIDIA\ |reg| ConnectX\ |reg|-9 SuperNIC 800G MT4133 - 900-9X91E-00EB-STA_Ax (1x800G) + + * Host interface: PCI Express 6.0 x16 + * Device ID: 15b3:1025 + * Firmware version: 82.47.0366 and above + +* NVIDIA\ |reg| BlueField\ |reg| SmartNIC + + * NVIDIA\ |reg| BlueField\ |reg|-2 SmartNIC MT41686 - MBF2H332A-AEEOT_A1 (2x25G) + + * Host interface: PCI Express 3.0 x16 + * Device ID: 15b3:a2d6 + * Firmware version: 24.47.1026 and above + + * NVIDIA\ |reg| BlueField\ |reg|-3 P-Series DPU MT41692 - 900-9D3B6-00CV-AAB (2x200G) + + * Host interface: PCI Express 5.0 x16 + * Device ID: 15b3:a2dc + * Firmware version: 32.47.1026 and above + + * Embedded software: + + * Ubuntu 24.04 + * MLNX_OFED 25.10-1.2.8.0 + * bf-bundle-3.2.0-113_25.10_ubuntu-24.04 + * DPDK application running on ARM cores + +* IBM Power 9 platforms with NVIDIA\ |reg| NICs combinations + + * CPU: + + * POWER9 2.2 (pvr 004e 1202) + + * OS: + + * Ubuntu 20.04 + + * NICs: + + * NVIDIA\ |reg| ConnectX\ |reg|-6 Dx 100G MCX623106AN-CDAT (2x100G) + + * Host interface: PCI Express 4.0 x16 + * Device ID: 15b3:101d + * Firmware version: 22.47.1026 and above + + * NVIDIA\ |reg| ConnectX\ |reg|-7 200G CX713106AE-HEA_QP1_Ax (2x200G) + + * Host interface: PCI Express 5.0 x16 + * Device ID: 15b3:1021 + * Firmware version: 28.47.1026 and above + + * DOCA: + + * DOCA 3.2.0-125000 and above diff --git a/doc/guides/sample_app_ug/l3_forward.rst b/doc/guides/sample_app_ug/l3_forward.rst index 9b0d0350aab..c50a421fd03 100644 --- a/doc/guides/sample_app_ug/l3_forward.rst +++ b/doc/guides/sample_app_ug/l3_forward.rst @@ -77,6 +77,8 @@ The application has a number of command line options:: [-P] [--lookup LOOKUP_METHOD] --config(port,queue,lcore)[,(port,queue,lcore)] + [--rx-burst NPKTS] + [--tx-burst NPKTS] [--eth-dest=X,MM:MM:MM:MM:MM:MM] [--max-pkt-len PKTLEN] [--no-numa] @@ -113,6 +115,10 @@ Where, * ``--config (port,queue,lcore)[,(port,queue,lcore)]:`` Determines which queues from which ports are mapped to which cores. +* ``--rx-burst NPKTS:`` Optional, Rx burst size in decimal (default 32). + +* ``--tx-burst NPKTS:`` Optional, Tx burst size in decimal (default 32). + * ``--eth-dest=X,MM:MM:MM:MM:MM:MM:`` Optional, ethernet destination for port X. * ``--max-pkt-len:`` Optional, maximum packet length in decimal (64-9600). diff --git a/doc/guides/windows_gsg/build_dpdk.rst b/doc/guides/windows_gsg/build_dpdk.rst index 48241f7091a..5a0f5d276b6 100644 --- a/doc/guides/windows_gsg/build_dpdk.rst +++ b/doc/guides/windows_gsg/build_dpdk.rst @@ -14,10 +14,6 @@ environments: * The MinGW-w64 10.0 (or later) toolchain (either native or cross). * Microsoft Visual Studio 2022 (any edition). - - note Microsoft Visual Studio 2022 does not currently build enough - of DPDK to produce a working DPDK application - but may be used to validate that changes are portable between toolchains. - The Meson Build system is used to prepare the sources for compilation with the Ninja backend. The installation of these tools is covered in this section. @@ -30,10 +26,10 @@ Install the Compiler ~~~~~~~~~~~~~~~~~~~~ Download and install the clang compiler from -`LLVM website `_. +`LLVM website `_. For example, Clang-LLVM direct download link:: - http://releases.llvm.org/7.0.1/LLVM-7.0.1-win64.exe + https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-win64.exe Install the Linker @@ -49,7 +45,7 @@ and ensure the Windows SDK is selected. Option 2. MinGW-w64 Toolchain ----------------------------- -On Windows, obtain the latest version installer from +On Windows, obtain the latest installer version from `MinGW-w64 repository `_. Any thread model (POSIX or Win32) can be chosen, DPDK does not rely on it. Install to a folder without spaces in its name, like ``C:\MinGW``. @@ -70,7 +66,7 @@ Download and install the build system from `Meson website `_. A good option to choose is the MSI installer for both meson and ninja together:: - http://mesonbuild.com/Getting-meson.html#installing-meson-and-ninja-with-the-msi-installer%22 + http://mesonbuild.com/Getting-meson.html#installing-meson-and-ninja-with-the-msi-installer The minimal Meson supported version is 1.5.2. @@ -134,14 +130,21 @@ required to build with Visual Studio 2022. Building DPDK applications that run on 32-bit Windows is currently not supported. If your Visual Studio environment defaults to producing 32-bit binaries, you can instruct the toolset to produce 64-bit binaries using "-arch" parameter. -For more details about the Developer Prompt options, look at the -`Visual Studio Developer Command Prompt and Developer PowerShell -`_. + +The command below opens a 'Visual Studio Developer Command Prompt' +when invoked from a Windows Command Prompt. .. code-block:: console "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 +.. note:: + + To open a Developer Prompt from PowerShell, + and for more details about the options available, + look at the `Visual Studio Developer Command Prompt and Developer PowerShell + `_. + Compile the code from the developer prompt. .. code-block:: console diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index 4529ec5085e..abdb0ad50d3 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -242,7 +242,7 @@ static int rte_fslmc_parse(const char *name, void *addr) { uint16_t dev_id; - char *t_ptr; + const char *t_ptr; const char *sep; uint8_t sep_exists = 0; int ret = -1; diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index 22f6b29089e..d885a95c04e 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -784,6 +784,8 @@ mlx5_devx_cmd_create_flex_parser(void *ctx, MLX5_GENERAL_OBJ_TYPE_FLEX_PARSE_GRAPH); MLX5_SET(parse_graph_flex, flex, header_length_mode, data->header_length_mode); + MLX5_SET(parse_graph_flex, flex, header_length_field_offset_mode, + data->header_length_field_offset_mode); MLX5_SET64(parse_graph_flex, flex, modify_field_select, data->modify_field_select); MLX5_SET(parse_graph_flex, flex, header_length_base_value, @@ -911,6 +913,8 @@ mlx5_devx_cmd_query_hca_parse_graph_node_cap max_next_header_offset); attr->header_length_mask_width = MLX5_GET(parse_graph_node_cap, hcattr, header_length_mask_width); + attr->header_length_field_mode_wa = !MLX5_GET(parse_graph_node_cap, hcattr, + header_length_field_offset_mode); /* Get the max supported samples from HCA CAP 2 */ hcattr = mlx5_devx_get_hca_cap(ctx, in, out, &rc, MLX5_GET_HCA_CAP_OP_MOD_GENERAL_DEVICE_2 | @@ -1300,18 +1304,6 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, rx_reg |= ((0xff & reg_c_8_15) << 8); attr->set_reg_c &= (rx_reg & tx_reg); - attr->rx_sw_owner_v2 = MLX5_GET(flow_table_nic_cap, hcattr, - flow_table_properties_nic_receive.sw_owner_v2); - if (!attr->rx_sw_owner_v2) - attr->rx_sw_owner = MLX5_GET(flow_table_nic_cap, hcattr, - flow_table_properties_nic_receive.sw_owner); - - attr->tx_sw_owner_v2 = MLX5_GET(flow_table_nic_cap, hcattr, - flow_table_properties_nic_transmit.sw_owner_v2); - if (!attr->tx_sw_owner_v2) - attr->tx_sw_owner = MLX5_GET(flow_table_nic_cap, hcattr, - flow_table_properties_nic_transmit.sw_owner); - #undef GET_RX_REG_X_BITS #undef GET_TX_REG_X_BITS } @@ -1464,12 +1456,6 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, reg_c_8_15 = MLX5_GET(flow_table_esw_cap, hcattr, ft_field_support_2_esw_fdb.metadata_reg_c_8_15); attr->set_reg_c &= ((0xff & reg_c_8_15) << 8) | esw_reg; - - attr->esw_sw_owner_v2 = MLX5_GET(flow_table_esw_cap, hcattr, - flow_table_properties_nic_esw_fdb.sw_owner_v2); - if (!attr->esw_sw_owner_v2) - attr->esw_sw_owner = MLX5_GET(flow_table_esw_cap, hcattr, - flow_table_properties_nic_esw_fdb.sw_owner); } return 0; error: diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h index 4c7747cbeca..f6e8afbf395 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.h +++ b/drivers/common/mlx5/mlx5_devx_cmds.h @@ -119,6 +119,7 @@ struct mlx5_hca_flex_attr { uint8_t sample_tunnel_inner2:1; uint8_t zero_size_supported:1; uint8_t sample_id_in_out:1; + uint8_t header_length_field_mode_wa:1; uint16_t max_base_header_length; uint8_t max_sample_base_offset; uint16_t max_next_header_offset; @@ -336,12 +337,6 @@ struct mlx5_hca_attr { uint8_t max_header_modify_pattern_length; uint64_t system_image_guid; uint32_t log_max_conn_track_offload:5; - uint8_t rx_sw_owner:1; - uint8_t rx_sw_owner_v2:1; - uint8_t tx_sw_owner:1; - uint8_t tx_sw_owner_v2:1; - uint8_t esw_sw_owner:1; - uint8_t esw_sw_owner_v2:1; }; /* LAG Context. */ @@ -654,6 +649,7 @@ struct mlx5_devx_graph_node_attr { uint32_t header_length_base_value:16; uint32_t header_length_field_shift:4; uint32_t header_length_field_offset:16; + uint32_t header_length_field_offset_mode:1; uint32_t header_length_field_mask; struct mlx5_devx_match_sample_attr sample[MLX5_GRAPH_NODE_SAMPLE_NUM]; uint32_t next_header_field_offset:16; diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index 9383e098933..411c35f456e 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -1597,13 +1597,9 @@ enum { #define MLX5_HCA_FLEX_GTPU_DW_0_ENABLED (1UL << 18) #define MLX5_HCA_FLEX_GTPU_TEID_ENABLED (1UL << 19) -/* The device steering logic format version. */ -enum { - MLX5_STEERING_LOGIC_FORMAT_CONNECTX_5 = 0, - MLX5_STEERING_LOGIC_FORMAT_CONNECTX_6DX = 1, - MLX5_STEERING_LOGIC_FORMAT_CONNECTX_7 = 2, - MLX5_STEERING_LOGIC_FORMAT_CONNECTX_8 = 3, -}; +/* The device steering logic format. */ +#define MLX5_STEERING_LOGIC_FORMAT_CONNECTX_5 0x0 +#define MLX5_STEERING_LOGIC_FORMAT_CONNECTX_6DX 0x1 struct mlx5_ifc_cmd_hca_cap_bits { u8 access_other_hca_roce[0x1]; @@ -2119,7 +2115,9 @@ struct mlx5_ifc_parse_graph_node_cap_bits { u8 max_num_arc_in[0x08]; u8 max_num_arc_out[0x08]; u8 max_num_sample[0x08]; - u8 reserved_at_78[0x03]; + u8 reserved_at_78[0x01]; + u8 header_length_field_offset_mode[0x1]; + u8 reserved_at_79[0x01]; u8 parse_graph_anchor[0x1]; u8 reserved_at_7c[0x01]; u8 sample_tunnel_inner2[0x1]; @@ -2350,9 +2348,7 @@ struct mlx5_ifc_flow_table_nic_cap_bits { }; struct mlx5_ifc_flow_table_esw_cap_bits { - u8 reserved_at_0[0x200]; - struct mlx5_ifc_flow_table_prop_layout_bits flow_table_properties_nic_esw_fdb; - u8 reserved_at_400[0x400]; + u8 reserved_at_0[0x800]; struct mlx5_ifc_ft_fields_support_bits ft_header_modify_esw_fdb; u8 reserved_at_C00[0x800]; struct mlx5_ifc_ft_fields_support_2_bits @@ -4991,7 +4987,9 @@ struct mlx5_ifc_parse_graph_flex_bits { u8 next_header_field_offset[0x10]; u8 reserved_at_160[0x12]; u8 head_anchor_id[0x6]; - u8 reserved_at_178[0x3]; + u8 reserved_at_178[0x1]; + u8 header_length_field_offset_mode[0x1]; + u8 reserved_at_17a[0x1]; u8 next_header_field_size[0x5]; u8 header_length_field_mask[0x20]; u8 reserved_at_224[0x20]; diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index df703134beb..3a99923220b 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -4561,7 +4561,7 @@ hns3_set_rxtx_function(struct rte_eth_dev *eth_dev) } else { eth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy; eth_dev->tx_pkt_burst = rte_eth_pkt_burst_dummy; - eth_dev->tx_pkt_prepare = NULL; + eth_dev->tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy; } hns3_trace_rxtx_function(eth_dev); @@ -4917,7 +4917,7 @@ void hns3_stop_tx_datapath(struct rte_eth_dev *dev) { dev->tx_pkt_burst = rte_eth_pkt_burst_dummy; - dev->tx_pkt_prepare = NULL; + dev->tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy; hns3_eth_dev_fp_ops_config(dev); if (rte_eal_process_type() == RTE_PROC_SECONDARY) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 447fd31fd4f..decf540c519 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1080,9 +1080,15 @@ mlx5_alloc_srh_flex_parser(struct rte_eth_dev *dev) /* The unit is uint64_t. */ node.header_length_field_shift = 0x3; /* Header length is the 2nd byte. */ - node.header_length_field_offset = 0x8; - if (attr->header_length_mask_width < 8) - node.header_length_field_offset += 8 - attr->header_length_mask_width; + if (attr->header_length_field_mode_wa) { + /* Legacy firmware before ConnectX-8, we should provide offset WA. */ + node.header_length_field_offset = 8; + if (attr->header_length_mask_width < 8) + node.header_length_field_offset += 8 - attr->header_length_mask_width; + } else { + /* The new firmware, we can specify the correct offset directly. */ + node.header_length_field_offset = 12; + } node.header_length_field_mask = 0xF; /* One byte next header protocol. */ node.next_header_field_size = 0x8; @@ -1435,45 +1441,6 @@ mlx5_dev_args_check_handler(const char *key, const char *val, void *opaque) return 0; } -static bool -mlx5_hws_is_supported(struct mlx5_dev_ctx_shared *sh) -{ - return (sh->cdev->config.devx && - sh->cdev->config.hca_attr.wqe_based_flow_table_sup); -} - -static bool -mlx5_sws_is_any_supported(struct mlx5_dev_ctx_shared *sh) -{ - struct mlx5_common_device *cdev = sh->cdev; - struct mlx5_hca_attr *hca_attr = &cdev->config.hca_attr; - - if (hca_attr->rx_sw_owner_v2 || hca_attr->rx_sw_owner) - return true; - - if (hca_attr->tx_sw_owner_v2 || hca_attr->tx_sw_owner) - return true; - - if (hca_attr->eswitch_manager && (hca_attr->esw_sw_owner_v2 || hca_attr->esw_sw_owner)) - return true; - - return false; -} - -static bool -mlx5_kvargs_is_used(struct mlx5_kvargs_ctrl *mkvlist, const char *key) -{ - const struct rte_kvargs_pair *pair; - uint32_t i; - - for (i = 0; i < mkvlist->kvlist->count; ++i) { - pair = &mkvlist->kvlist->pairs[i]; - if (strcmp(pair->key, key) == 0 && mkvlist->is_used[i]) - return true; - } - return false; -} - /** * Parse user device parameters and adjust them according to device * capabilities. @@ -1514,8 +1481,6 @@ mlx5_shared_dev_ctx_args_config(struct mlx5_dev_ctx_shared *sh, int ret = 0; size_t alignment = rte_mem_page_size(); uint32_t max_queue_umem_size = MLX5_WQE_SIZE * mlx5_dev_get_max_wq_size(sh); - bool hws_is_supported = mlx5_hws_is_supported(sh); - bool sws_is_supported = mlx5_sws_is_any_supported(sh); if (alignment == (size_t)-1) { alignment = (1 << MLX5_LOG_PAGE_SIZE); @@ -1526,15 +1491,9 @@ mlx5_shared_dev_ctx_args_config(struct mlx5_dev_ctx_shared *sh, memset(config, 0, sizeof(*config)); config->vf_nl_en = 1; config->dv_esw_en = 1; - if (!sws_is_supported && hws_is_supported) - config->dv_flow_en = 2; - else - config->dv_flow_en = 1; + config->dv_flow_en = 1; config->decap_en = 1; - if (config->dv_flow_en == 2) - config->allow_duplicate_pattern = 0; - else - config->allow_duplicate_pattern = 1; + config->allow_duplicate_pattern = 1; config->fdb_def_rule = 1; config->cnt_svc.cycle_time = MLX5_CNT_SVC_CYCLE_TIME_DEFAULT; config->cnt_svc.service_core = rte_get_main_lcore(); @@ -1554,26 +1513,6 @@ mlx5_shared_dev_ctx_args_config(struct mlx5_dev_ctx_shared *sh, DRV_LOG(WARNING, "DV flow is not supported."); config->dv_flow_en = 0; } - /* Inform user if DV flow is not supported. */ - if (config->dv_flow_en == 1 && !sws_is_supported && hws_is_supported) { - DRV_LOG(WARNING, "DV flow is not supported. Changing to HWS mode."); - config->dv_flow_en = 2; - } - /* Handle allow_duplicate_pattern based on final dv_flow_en mode. - * HWS mode (dv_flow_en=2) doesn't support duplicate patterns. - * Warn only if user explicitly requested an incompatible setting. - */ - bool allow_dup_pattern_set = mkvlist != NULL && - mlx5_kvargs_is_used(mkvlist, MLX5_ALLOW_DUPLICATE_PATTERN); - if (config->dv_flow_en == 2) { - if (config->allow_duplicate_pattern == 1 && allow_dup_pattern_set) - DRV_LOG(WARNING, "Duplicate pattern is not supported with HWS. Disabling it."); - config->allow_duplicate_pattern = 0; - } else if (!allow_dup_pattern_set) { - /* Non-HWS mode: set default to 1 only if not explicitly set by user */ - config->allow_duplicate_pattern = 1; - } - if (config->dv_esw_en && !sh->dev_cap.dv_esw_en) { DRV_LOG(DEBUG, "E-Switch DV flow is not supported."); config->dv_esw_en = 0; diff --git a/drivers/net/mlx5/mlx5_flow_flex.c b/drivers/net/mlx5/mlx5_flow_flex.c index b1174fe0eda..d21e28f7fd7 100644 --- a/drivers/net/mlx5/mlx5_flow_flex.c +++ b/drivers/net/mlx5/mlx5_flow_flex.c @@ -554,7 +554,7 @@ mlx5_flex_translate_length(struct mlx5_hca_flex_attr *attr, "mask and shift combination not supported (OFFSET)"); msb++; offset += field->field_size - msb; - if (msb < attr->header_length_mask_width) { + if (attr->header_length_field_mode_wa && msb < attr->header_length_mask_width) { if (attr->header_length_mask_width - msb > offset) return rte_flow_error_set (error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, NULL, @@ -572,6 +572,7 @@ mlx5_flex_translate_length(struct mlx5_hca_flex_attr *attr, node->header_length_field_mask = mask; node->header_length_field_shift = shift; node->header_length_field_offset = offset; + node->header_length_field_offset_mode = !attr->header_length_field_mode_wa; break; } case FIELD_MODE_BITMASK: diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c index 66d72c88dfb..91e215694c8 100644 --- a/drivers/net/ngbe/ngbe_rxtx.c +++ b/drivers/net/ngbe/ngbe_rxtx.c @@ -1921,7 +1921,7 @@ ngbe_set_tx_function(struct rte_eth_dev *dev, struct ngbe_tx_queue *txq) if (txq->offloads == 0 && txq->tx_free_thresh >= RTE_PMD_NGBE_TX_MAX_BURST) { PMD_INIT_LOG(DEBUG, "Using simple tx code path"); - dev->tx_pkt_prepare = NULL; + dev->tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy; if (txq->tx_free_thresh <= RTE_NGBE_TX_MAX_FREE_BUF_SZ && rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128 && (rte_eal_process_type() != RTE_PROC_PRIMARY || diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c index 23c3452d2dd..89e751e7e07 100644 --- a/drivers/net/ntnic/ntnic_ethdev.c +++ b/drivers/net/ntnic/ntnic_ethdev.c @@ -2561,7 +2561,6 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev) NT_LOG_DBGX(DBG, NTNIC, "Setting up RX functions for SCG"); eth_dev->rx_pkt_burst = eth_dev_rx_scg; eth_dev->tx_pkt_burst = eth_dev_tx_scg; - eth_dev->tx_pkt_prepare = NULL; struct rte_eth_link pmd_link; pmd_link.link_speed = RTE_ETH_SPEED_NUM_NONE; diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c index 91a1c3a98e8..868e194509f 100644 --- a/drivers/net/softnic/rte_eth_softnic.c +++ b/drivers/net/softnic/rte_eth_softnic.c @@ -312,7 +312,6 @@ pmd_ethdev_register(struct rte_vdev_device *vdev, /* dev */ dev->rx_pkt_burst = pmd_rx_pkt_burst; dev->tx_pkt_burst = pmd_tx_pkt_burst; - dev->tx_pkt_prepare = NULL; dev->dev_ops = &pmd_ops; dev->device = &vdev->device; diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index 78199ea00b2..e2cd9b8841e 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -2344,7 +2344,7 @@ txgbe_set_tx_function(struct rte_eth_dev *dev, struct txgbe_tx_queue *txq) #endif txq->tx_free_thresh >= RTE_PMD_TXGBE_TX_MAX_BURST) { PMD_INIT_LOG(DEBUG, "Using simple tx code path"); - dev->tx_pkt_prepare = NULL; + dev->tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy; if (txq->tx_free_thresh <= RTE_TXGBE_TX_MAX_FREE_BUF_SZ && rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128 && (rte_eal_process_type() != RTE_PROC_PRIMARY || diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index 17ae76d4bad..25b904dbd44 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -884,6 +884,13 @@ setup_queue_tbl(struct rx_queue *rxq, uint32_t lcore, uint32_t queue) nb_mbuf = RTE_MAX(nb_mbuf, (uint32_t)NB_MBUF); + /* Should never happen but check so that pool name won't be too long. */ + if (lcore > RTE_MAX_LCORE || queue > RTE_MAX_QUEUES_PER_PORT) { + RTE_LOG(ERR, IP_RSMBL, "invalid lcore %u or queue %u", + lcore, queue); + return -1; + } + snprintf(buf, sizeof(buf), "mbuf_pool_%u_%u", lcore, queue); rxq->pool = rte_pktmbuf_pool_create(buf, nb_mbuf, MEMPOOL_CACHE_SIZE, 0, diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index f9ce9e66988..ec12d1cc0b7 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1501,6 +1501,7 @@ print_usage(const char *prgname) " -U: set min/max frequency for uncore to maximum value\n" " -i (frequency index): set min/max frequency for uncore to specified frequency index\n" " --config (port,queue,lcore): rx queues configuration\n" + " --eth-link-speed: force link speed\n" " --cpu-resume-latency LATENCY: set CPU resume latency to control C-state selection," " 0 : just allow to enter C0-state\n" " --high-perf-cores CORELIST: list of high performance cores\n" @@ -1742,12 +1743,14 @@ parse_pmd_mgmt_config(const char *name) #define CMD_LINE_OPT_SCALE_FREQ_MIN "scale-freq-min" #define CMD_LINE_OPT_SCALE_FREQ_MAX "scale-freq-max" #define CMD_LINE_OPT_CPU_RESUME_LATENCY "cpu-resume-latency" +#define CMD_LINK_OPT_ETH_LINK_SPEED "eth-link-speed" /* Parse the argument given in the command line of the application */ static int parse_args(int argc, char **argv) { int opt, ret; + int speed_num; char **argvopt; int option_index; char *prgname = argv[0]; @@ -1767,6 +1770,7 @@ parse_args(int argc, char **argv) {CMD_LINE_OPT_PAUSE_DURATION, 1, 0, 0}, {CMD_LINE_OPT_SCALE_FREQ_MIN, 1, 0, 0}, {CMD_LINE_OPT_SCALE_FREQ_MAX, 1, 0, 0}, + {CMD_LINK_OPT_ETH_LINK_SPEED, 1, 0, 0}, {NULL, 0, 0, 0} }; @@ -1951,6 +1955,20 @@ parse_args(int argc, char **argv) printf("PM QoS configured\n"); } + if (!strncmp(lgopts[option_index].name, + CMD_LINK_OPT_ETH_LINK_SPEED, + sizeof(CMD_LINK_OPT_ETH_LINK_SPEED))) { + speed_num = atoi(optarg); + if ((speed_num == RTE_ETH_SPEED_NUM_10M) || + (speed_num == RTE_ETH_SPEED_NUM_100M)) { + fprintf(stderr, "Unsupported fixed speed\n"); + print_usage(prgname); + return -1; + } + if (speed_num >= 0 && rte_eth_speed_bitflag(speed_num, 0) > 0) + port_conf.link_speeds = rte_eth_speed_bitflag(speed_num, 0); + } + break; default: diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h index 0cce3406ee7..471e3b488fe 100644 --- a/examples/l3fwd/l3fwd.h +++ b/examples/l3fwd/l3fwd.h @@ -32,10 +32,6 @@ #define VECTOR_SIZE_DEFAULT MAX_PKT_BURST #define VECTOR_TMO_NS_DEFAULT 1E6 /* 1ms */ -/* - * Try to avoid TX buffering if we have at least MAX_TX_BURST packets to send. - */ -#define MAX_TX_BURST (MAX_PKT_BURST / 2) #define NB_SOCKETS 8 @@ -116,7 +112,7 @@ extern struct acl_algorithms acl_alg[]; extern uint32_t max_pkt_len; -extern uint32_t nb_pkt_per_burst; +extern uint32_t rx_burst_size; extern uint32_t mb_mempool_cache_size; /* Send burst of packets on an output interface */ @@ -152,8 +148,8 @@ send_single_packet(struct lcore_conf *qconf, len++; /* enough pkts to be sent */ - if (unlikely(len == MAX_PKT_BURST)) { - send_burst(qconf, MAX_PKT_BURST, port); + if (unlikely(len == rx_burst_size)) { + send_burst(qconf, rx_burst_size, port); len = 0; } diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c index 4fc4b986cce..a1275e18bce 100644 --- a/examples/l3fwd/l3fwd_acl.c +++ b/examples/l3fwd/l3fwd_acl.c @@ -1136,7 +1136,7 @@ acl_main_loop(__rte_unused void *dummy) portid = qconf->rx_queue_list[i].port_id; queueid = qconf->rx_queue_list[i].queue_id; nb_rx = rte_eth_rx_burst(portid, queueid, - pkts_burst, nb_pkt_per_burst); + pkts_burst, rx_burst_size); if (nb_rx > 0) { nb_drop = acl_process_pkts(pkts_burst, hops, diff --git a/examples/l3fwd/l3fwd_common.h b/examples/l3fwd/l3fwd_common.h index d94e5f13579..ccaf0cd4021 100644 --- a/examples/l3fwd/l3fwd_common.h +++ b/examples/l3fwd/l3fwd_common.h @@ -25,6 +25,9 @@ */ #define SENDM_PORT_OVERHEAD(x) (x) +extern uint32_t rx_burst_size; +extern uint32_t tx_burst_size; + /* * From http://www.rfc-editor.org/rfc/rfc1812.txt section 5.2.2: * - The IP version number must be 4. @@ -71,7 +74,7 @@ send_packetsx4(struct lcore_conf *qconf, uint16_t port, struct rte_mbuf *m[], * If TX buffer for that queue is empty, and we have enough packets, * then send them straightway. */ - if (num >= MAX_TX_BURST && len == 0) { + if (num >= tx_burst_size && len == 0) { n = rte_eth_tx_burst(port, qconf->tx_queue_id[port], m, num); if (unlikely(n < num)) { do { diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c index da9c45e3a48..58c54ed77e0 100644 --- a/examples/l3fwd/l3fwd_em.c +++ b/examples/l3fwd/l3fwd_em.c @@ -644,7 +644,7 @@ em_main_loop(__rte_unused void *dummy) portid = qconf->rx_queue_list[i].port_id; queueid = qconf->rx_queue_list[i].queue_id; nb_rx = rte_eth_rx_burst(portid, queueid, pkts_burst, - nb_pkt_per_burst); + rx_burst_size); if (nb_rx == 0) continue; diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c index 82f1739df77..4fc6bf90d53 100644 --- a/examples/l3fwd/l3fwd_fib.c +++ b/examples/l3fwd/l3fwd_fib.c @@ -239,7 +239,7 @@ fib_main_loop(__rte_unused void *dummy) portid = qconf->rx_queue_list[i].port_id; queueid = qconf->rx_queue_list[i].queue_id; nb_rx = rte_eth_rx_burst(portid, queueid, pkts_burst, - nb_pkt_per_burst); + rx_burst_size); if (nb_rx == 0) continue; diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c index fec0aeb79c6..a71eee69ec3 100644 --- a/examples/l3fwd/l3fwd_lpm.c +++ b/examples/l3fwd/l3fwd_lpm.c @@ -205,7 +205,7 @@ lpm_main_loop(__rte_unused void *dummy) portid = qconf->rx_queue_list[i].port_id; queueid = qconf->rx_queue_list[i].queue_id; nb_rx = rte_eth_rx_burst(portid, queueid, pkts_burst, - nb_pkt_per_burst); + rx_burst_size); if (nb_rx == 0) continue; diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index ae3b4f6439b..a5626ff02d1 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -57,8 +57,9 @@ static_assert(MEMPOOL_CACHE_SIZE >= MAX_PKT_BURST, "MAX_PKT_BURST should be at most MEMPOOL_CACHE_SIZE"); uint16_t nb_rxd = RX_DESC_DEFAULT; uint16_t nb_txd = TX_DESC_DEFAULT; -uint32_t nb_pkt_per_burst = DEFAULT_PKT_BURST; +uint32_t rx_burst_size = DEFAULT_PKT_BURST; uint32_t mb_mempool_cache_size = MEMPOOL_CACHE_SIZE; +uint32_t tx_burst_size = DEFAULT_PKT_BURST; /**< Ports set in promiscuous mode off by default. */ static int promiscuous_on; @@ -400,7 +401,8 @@ print_usage(const char *prgname) " --config (port,queue,lcore)[,(port,queue,lcore)]" " [--rx-queue-size NPKTS]" " [--tx-queue-size NPKTS]" - " [--burst NPKTS]" + " [--rx-burst NPKTS]" + " [--tx-burst NPKTS]" " [--mbcache CACHESZ]" " [--eth-dest=X,MM:MM:MM:MM:MM:MM]" " [--max-pkt-len PKTLEN]" @@ -423,11 +425,14 @@ print_usage(const char *prgname) " Accepted: em (Exact Match), lpm (Longest Prefix Match), fib (Forwarding Information Base),\n" " acl (Access Control List)\n" " --config (port,queue,lcore): Rx queue configuration\n" + " --eth-link-speed: force link speed\n" " --rx-queue-size NPKTS: Rx queue size in decimal\n" " Default: %d\n" " --tx-queue-size NPKTS: Tx queue size in decimal\n" " Default: %d\n" - " --burst NPKTS: Burst size in decimal\n" + " --rx-burst NPKTS: RX Burst size in decimal\n" + " Default: %d\n" + " --tx-burst NPKTS: TX Burst size in decimal\n" " Default: %d\n" " --mbcache CACHESZ: Mbuf cache size in decimal\n" " Default: %d\n" @@ -460,8 +465,8 @@ print_usage(const char *prgname) " another is route entry at while line leads with character '%c'.\n" " --rule_ipv6=FILE: Specify the ipv6 rules entries file.\n" " --alg: ACL classify method to use, one of: %s.\n\n", - prgname, RX_DESC_DEFAULT, TX_DESC_DEFAULT, DEFAULT_PKT_BURST, MEMPOOL_CACHE_SIZE, - ACL_LEAD_CHAR, ROUTE_LEAD_CHAR, alg); + prgname, RX_DESC_DEFAULT, TX_DESC_DEFAULT, DEFAULT_PKT_BURST, DEFAULT_PKT_BURST, + MEMPOOL_CACHE_SIZE, ACL_LEAD_CHAR, ROUTE_LEAD_CHAR, alg); } static int @@ -695,7 +700,7 @@ parse_mbcache_size(const char *optarg) } static void -parse_pkt_burst(const char *optarg) +parse_pkt_burst(const char *optarg, bool is_rx_burst, uint32_t *burst_sz) { struct rte_eth_dev_info dev_info; unsigned long pkt_burst; @@ -710,31 +715,38 @@ parse_pkt_burst(const char *optarg) if (pkt_burst > MAX_PKT_BURST) { RTE_LOG(INFO, L3FWD, "User provided burst must be <= %d. Using default value %d\n", - MAX_PKT_BURST, nb_pkt_per_burst); + MAX_PKT_BURST, *burst_sz); return; } else if (pkt_burst > 0) { - nb_pkt_per_burst = (uint32_t)pkt_burst; + *burst_sz = (uint32_t)pkt_burst; return; } - /* If user gives a value of zero, query the PMD for its recommended Rx burst size. */ - ret = rte_eth_dev_info_get(0, &dev_info); - if (ret != 0) - return; - burst_size = dev_info.default_rxportconf.burst_size; - if (burst_size == 0) { - RTE_LOG(INFO, L3FWD, "PMD does not recommend a burst size. Using default value %d. " - "User provided value must be in [1, %d]\n", - nb_pkt_per_burst, MAX_PKT_BURST); - return; - } else if (burst_size > MAX_PKT_BURST) { - RTE_LOG(INFO, L3FWD, "PMD recommended burst size %d exceeds maximum value %d. " - "Using default value %d\n", - burst_size, MAX_PKT_BURST, nb_pkt_per_burst); - return; + if (is_rx_burst) { + /* If user gives a value of zero, query the PMD for its recommended + * Rx burst size. + */ + ret = rte_eth_dev_info_get(0, &dev_info); + if (ret != 0) + return; + burst_size = dev_info.default_rxportconf.burst_size; + if (burst_size == 0) { + RTE_LOG(INFO, L3FWD, "PMD does not recommend a burst size. Using default value %d. " + "User provided value must be in [1, %d]\n", + rx_burst_size, MAX_PKT_BURST); + return; + } else if (burst_size > MAX_PKT_BURST) { + RTE_LOG(INFO, L3FWD, "PMD recommended burst size %d exceeds maximum value %d. " + "Using default value %d\n", + burst_size, MAX_PKT_BURST, rx_burst_size); + return; + } + *burst_sz = burst_size; + RTE_LOG(INFO, L3FWD, "Using PMD-provided RX burst value %d\n", burst_size); + } else { + RTE_LOG(INFO, L3FWD, "User provided TX burst is 0. Using default value %d\n", + *burst_sz); } - nb_pkt_per_burst = burst_size; - RTE_LOG(INFO, L3FWD, "Using PMD-provided burst value %d\n", burst_size); } #define MAX_JUMBO_PKT_LEN 9600 @@ -747,6 +759,7 @@ static const char short_options[] = ; #define CMD_LINE_OPT_CONFIG "config" +#define CMD_LINK_OPT_ETH_LINK_SPEED "eth-link-speed" #define CMD_LINE_OPT_RX_QUEUE_SIZE "rx-queue-size" #define CMD_LINE_OPT_TX_QUEUE_SIZE "tx-queue-size" #define CMD_LINE_OPT_ETH_DEST "eth-dest" @@ -768,7 +781,8 @@ static const char short_options[] = #define CMD_LINE_OPT_RULE_IPV4 "rule_ipv4" #define CMD_LINE_OPT_RULE_IPV6 "rule_ipv6" #define CMD_LINE_OPT_ALG "alg" -#define CMD_LINE_OPT_PKT_BURST "burst" +#define CMD_LINE_OPT_PKT_RX_BURST "rx-burst" +#define CMD_LINE_OPT_PKT_TX_BURST "tx-burst" #define CMD_LINE_OPT_MB_CACHE_SIZE "mbcache" enum { @@ -778,6 +792,7 @@ enum { * conflict with short options */ CMD_LINE_OPT_MIN_NUM = 256, CMD_LINE_OPT_CONFIG_NUM, + CMD_LINK_OPT_ETH_LINK_SPEED_NUM, CMD_LINE_OPT_RX_QUEUE_SIZE_NUM, CMD_LINE_OPT_TX_QUEUE_SIZE_NUM, CMD_LINE_OPT_ETH_DEST_NUM, @@ -799,12 +814,14 @@ enum { CMD_LINE_OPT_ENABLE_VECTOR_NUM, CMD_LINE_OPT_VECTOR_SIZE_NUM, CMD_LINE_OPT_VECTOR_TMO_NS_NUM, - CMD_LINE_OPT_PKT_BURST_NUM, + CMD_LINE_OPT_PKT_RX_BURST_NUM, + CMD_LINE_OPT_PKT_TX_BURST_NUM, CMD_LINE_OPT_MB_CACHE_SIZE_NUM, }; static const struct option lgopts[] = { {CMD_LINE_OPT_CONFIG, 1, 0, CMD_LINE_OPT_CONFIG_NUM}, + {CMD_LINK_OPT_ETH_LINK_SPEED, 1, 0, CMD_LINK_OPT_ETH_LINK_SPEED_NUM}, {CMD_LINE_OPT_RX_QUEUE_SIZE, 1, 0, CMD_LINE_OPT_RX_QUEUE_SIZE_NUM}, {CMD_LINE_OPT_TX_QUEUE_SIZE, 1, 0, CMD_LINE_OPT_TX_QUEUE_SIZE_NUM}, {CMD_LINE_OPT_ETH_DEST, 1, 0, CMD_LINE_OPT_ETH_DEST_NUM}, @@ -827,7 +844,8 @@ static const struct option lgopts[] = { {CMD_LINE_OPT_RULE_IPV4, 1, 0, CMD_LINE_OPT_RULE_IPV4_NUM}, {CMD_LINE_OPT_RULE_IPV6, 1, 0, CMD_LINE_OPT_RULE_IPV6_NUM}, {CMD_LINE_OPT_ALG, 1, 0, CMD_LINE_OPT_ALG_NUM}, - {CMD_LINE_OPT_PKT_BURST, 1, 0, CMD_LINE_OPT_PKT_BURST_NUM}, + {CMD_LINE_OPT_PKT_RX_BURST, 1, 0, CMD_LINE_OPT_PKT_RX_BURST_NUM}, + {CMD_LINE_OPT_PKT_TX_BURST, 1, 0, CMD_LINE_OPT_PKT_TX_BURST_NUM}, {CMD_LINE_OPT_MB_CACHE_SIZE, 1, 0, CMD_LINE_OPT_MB_CACHE_SIZE_NUM}, {NULL, 0, 0, 0} }; @@ -860,6 +878,7 @@ parse_args(int argc, char **argv) uint8_t eth_rx_q = 0; struct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc(); #endif + int speed_num; argvopt = argv; @@ -908,7 +927,17 @@ parse_args(int argc, char **argv) } lcore_params = 1; break; - + case CMD_LINK_OPT_ETH_LINK_SPEED_NUM: + speed_num = atoi(optarg); + if ((speed_num == RTE_ETH_SPEED_NUM_10M) || + (speed_num == RTE_ETH_SPEED_NUM_100M)) { + fprintf(stderr, "Unsupported fixed speed\n"); + print_usage(prgname); + return -1; + } + if (speed_num >= 0 && rte_eth_speed_bitflag(speed_num, 0) > 0) + port_conf.link_speeds = rte_eth_speed_bitflag(speed_num, 0); + break; case CMD_LINE_OPT_RX_QUEUE_SIZE_NUM: parse_queue_size(optarg, &nb_rxd, 1); break; @@ -917,8 +946,12 @@ parse_args(int argc, char **argv) parse_queue_size(optarg, &nb_txd, 0); break; - case CMD_LINE_OPT_PKT_BURST_NUM: - parse_pkt_burst(optarg); + case CMD_LINE_OPT_PKT_RX_BURST_NUM: + parse_pkt_burst(optarg, true, &rx_burst_size); + break; + + case CMD_LINE_OPT_PKT_TX_BURST_NUM: + parse_pkt_burst(optarg, false, &tx_burst_size); break; case CMD_LINE_OPT_MB_CACHE_SIZE_NUM: @@ -1654,6 +1687,8 @@ main(int argc, char **argv) if (ret < 0) rte_exit(EXIT_FAILURE, "Invalid L3FWD parameters\n"); + RTE_LOG(INFO, L3FWD, "Using Rx burst %u Tx burst %u\n", rx_burst_size, tx_burst_size); + /* Setup function pointers for lookup method. */ setup_l3fwd_lookup_tables(); diff --git a/examples/meson.build b/examples/meson.build index 8e8968a1fa2..25d9c88457f 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -78,10 +78,9 @@ else examples = get_option('examples').split(',') allow_skips = false # error out if we can't build a requested app endif + default_cflags = machine_args -if cc.has_argument('-Wno-format-truncation') - default_cflags += '-Wno-format-truncation' -endif + default_ldflags = dpdk_extra_ldflags if get_option('default_library') == 'static' and not is_windows default_ldflags += ['-Wl,--export-dynamic'] diff --git a/examples/server_node_efd/efd_server/main.c b/examples/server_node_efd/efd_server/main.c index 75ff0ea5323..62c3f4a16d0 100644 --- a/examples/server_node_efd/efd_server/main.c +++ b/examples/server_node_efd/efd_server/main.c @@ -68,7 +68,7 @@ static const char * get_printable_mac_addr(uint16_t port) { static const char err_address[] = "00:00:00:00:00:00"; - static char addresses[RTE_MAX_ETHPORTS][sizeof(err_address)]; + static char addresses[RTE_MAX_ETHPORTS][RTE_ETHER_ADDR_FMT_SIZE + 1]; struct rte_ether_addr mac; int ret; diff --git a/examples/server_node_efd/shared/common.h b/examples/server_node_efd/shared/common.h index e1ab7e62b71..6726e2031e7 100644 --- a/examples/server_node_efd/shared/common.h +++ b/examples/server_node_efd/shared/common.h @@ -58,8 +58,9 @@ get_rx_queue_name(unsigned int id) /* * Buffer for return value. Size calculated by %u being replaced * by maximum 3 digits (plus an extra byte for safety) + * Used as ring name, so upper limit is ring name size. */ - static char buffer[sizeof(MP_NODE_RXQ_NAME) + 2]; + static char buffer[RTE_RING_NAMESIZE]; snprintf(buffer, sizeof(buffer), MP_NODE_RXQ_NAME, id); return buffer; diff --git a/examples/vdpa/main.c b/examples/vdpa/main.c index 289db26498b..08aa933272f 100644 --- a/examples/vdpa/main.c +++ b/examples/vdpa/main.c @@ -22,6 +22,7 @@ #define MAX_PATH_LEN 128 #define MAX_VDPA_SAMPLE_PORTS 1024 +#define MAX_VDPA_STR_LEN sizeof(RTE_STR(MAX_VDPA_SAMPLE_PORTS)) #define RTE_LOGTYPE_VDPA RTE_LOGTYPE_USER1 struct vdpa_port { @@ -36,7 +37,7 @@ struct vdpa_port { static struct vdpa_port vports[MAX_VDPA_SAMPLE_PORTS]; -static char iface[MAX_PATH_LEN]; +static char iface[MAX_PATH_LEN - MAX_VDPA_STR_LEN]; static int devcnt; static int interactive; static int client_mode; @@ -74,9 +75,8 @@ parse_args(int argc, char **argv) break; /* long options */ case 0: - if (strncmp(long_option[idx].name, "iface", - MAX_PATH_LEN) == 0) { - rte_strscpy(iface, optarg, MAX_PATH_LEN); + if (!strcmp(long_option[idx].name, "iface")) { + rte_strscpy(iface, optarg, sizeof(iface)); printf("iface %s\n", iface); } if (!strcmp(long_option[idx].name, "interactive")) {