patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch has been queued to stable release 23.11.2
@ 2024-07-12 10:43 Xueming Li
  2024-07-12 10:43 ` patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' " Xueming Li
                   ` (79 more replies)
  0 siblings, 80 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: Xueming Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/30/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3d06f2c35c938a268311c3e0a57d0cd6010c3c1d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3d06f2c35c938a268311c3e0a57d0cd6010c3c1d Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Fri, 12 Jul 2024 18:40:13 +0800
Subject: [PATCH] *** SUBJECT HERE ***
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

*** BLURB HERE ***

Abdullah Ömer Yamaç (1):
  hash: fix RCU reclamation size

Akhil Goyal (1):
  test/crypto: fix enqueue/dequeue callback case

Alexander Kozyrev (1):
  net/mlx5: break flow resource release loop

Anatoly Burakov (1):
  net/e1000/base: fix link power down

Anoob Joseph (1):
  common/cnxk: fix segregation of logs based on module

Arkadiusz Kusztal (1):
  test/crypto: fix RSA cases in QAT suite

Bing Zhao (1):
  app/testpmd: fix indirect action flush

Chaoyong He (3):
  net/nfp: fix resource leak in secondary process
  net/nfp: fix configuration BAR
  net/nfp: fix xstats for multi PF firmware

Chengwen Feng (1):
  ethdev: fix strict aliasing in link up

Chenming Chang (1):
  hash: fix return code description in Doxygen

Ciara Loftus (4):
  net/af_xdp: fix port ID in Rx mbuf
  net/af_xdp: count mbuf allocation failures
  net/af_xdp: fix stats reset
  net/af_xdp: remove unused local statistic

Conor Fogarty (1):
  hash: check name when creating a hash

David Marchand (9):
  bus/pci: fix build with musl 1.2.4 / Alpine 3.19
  eal/unix: support ZSTD compression for firmware
  net/ice: fix check for outer UDP checksum offload
  app/testpmd: fix outer IP checksum offload
  net: fix outer UDP checksum in Intel prepare helper
  net/i40e: fix outer UDP checksum offload for X710
  net/iavf: remove outer UDP checksum offload for X710 VF
  telemetry: lower log level on socket error
  doc: fix link to hugepage mapping from Linux guide

Dengdui Huang (4):
  net/hns3: fix offload flag of IEEE 1588
  net/hns3: fix Rx timestamp flag
  net/hns3: fix double free for Rx/Tx queue
  net/hns3: fix variable overflow

Edwin Brossette (1):
  net/ixgbe: do not create delayed interrupt handler twice

Erez Shitrit (2):
  net/mlx5/hws: decrease log level for creation failure
  net/mlx5/hws: extend tag saving for match and jumbo

Ganapati Kundapura (1):
  eventdev/crypto: fix opaque field handling

Gaoxiang Liu (1):
  net/bonding: fix failover time of LACP with mode 4

Gregory Etelson (1):
  net/mlx5: fix access to flow template operations

Haifei Luo (1):
  net/mlx5: fix indexed pool with invalid index

Hamdan Igbaria (1):
  net/mlx5/hws: fix action template dump

Haoqian He (1):
  vhost: cleanup resubmit info before inflight setup

Hernan Vargas (1):
  baseband/acc: fix memory barrier

Itamar Gozlan (1):
  net/mlx5/hws: set default miss when replacing table

Jiawei Wang (1):
  net/mlx5: fix hash Rx queue release in flow sample

Jie Hai (1):
  net/hns3: disable SCTP verification tag for RSS hash input

Julien Meunier (1):
  net/fm10k: fix cleanup during init failure

Kaiwen Deng (1):
  net/iavf: fix VF reset when using DCF

Kevin Traynor (1):
  doc: fix testpmd ring size command

Long Wu (1):
  net/nfp: fix representor port queue release

Luca Boccassi (1):
  bpf: disable on 32-bit x86

Luca Vizzarro (1):
  vhost: fix build with GCC 13

Maayan Kashani (2):
  net/mlx5: fix flow template indirect action failure
  net/mlx5: fix crash on counter pool destroy

Maryam Tahhan (2):
  doc: fix AF_XDP device plugin howto
  net/af_xdp: fix multi-interface support for k8s

Mattias Rönnblom (1):
  net/af_packet: align Rx/Tx structs to cache line

Maxime Coquelin (3):
  net/virtio-user: fix control queue destruction
  net/virtio-user: fix shadow control queue notification init
  net/virtio-user: fix control queue allocation

Mingjin Ye (1):
  bus/vdev: revert fix devargs in secondary process

Nithin Dabilpuram (2):
  net/cnxk: update SA userdata and keep original cookie
  net/cnxk: fix outbound security with higher packet burst

Piotr Pietruszewski (1):
  net/ixgbe/base: revert advertising for X550 2.5G/5G

Piotr Skajewski (1):
  net/ixgbe/base: fix 5G link speed reported on VF

Radoslaw Tyl (1):
  net/ixgbe/base: fix PHY ID for X550

Rahul Bhansali (1):
  net/cnxk: fix promiscuous state after MAC change

Rakesh Kudurumalla (1):
  net/cnxk: fix extbuf handling for multisegment packet

Robin Jarry (2):
  graph: fix ID collisions
  graph: fix stats retrieval while destroying a graph

Ronak Doshi (1):
  net/vmxnet3: add missing register command

Satha Rao (1):
  net/virtio: fix MAC table update

Satheesh Paul (1):
  common/cnxk: fix flow aging cleanup

Shun Hao (1):
  net/mlx5: support jump in meter hierarchy

Sivaprasad Tummala (1):
  app/testpmd: fix lcore ID restriction

Stephen Hemminger (5):
  pcapng: add memcpy check
  net/virtio-user: add memcpy check
  net/tap: fix file descriptor check in isolated flow
  event/sw: fix warning from useless snprintf
  net/ixgbe: do not update link status in secondary process

Sunil Kumar Kori (1):
  net/cnxk: fix RSS config

Tyler Retzlaff (4):
  eal: fix type in destructor macro for MSVC
  eal/windows: install sched.h file
  latencystats: fix literal float suffix
  common/mlx5: fix unsigned/signed mismatch

Venkat Kumar Ande (13):
  net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs
  net/axgbe: reset link when link never comes back
  net/axgbe: fix fluctuations for 1G Bel Fuse SFP
  net/axgbe: update DMA coherency values
  net/axgbe: disable interrupts during device removal
  net/axgbe: disable RRC for yellow carp devices
  net/axgbe: enable PLL control for fixed PHY modes only
  net/axgbe: fix SFP codes check for DAC cables
  net/axgbe: fix connection for SFP+ active cables
  net/axgbe: check only minimum speed for cables
  net/axgbe: fix Tx flow on 30H HW
  net/axgbe: delay AN timeout during KR training
  net/axgbe: fix linkup in PHY status

Vladimir Medvedkin (1):
  net/ice: fix VLAN stripping in double VLAN mode

Xueming Li (1):
  v23.11.2-rc1

Yevgeny Kliteynik (5):
  common/mlx5: fix PRM structs
  net/mlx5/hws: fix function comment
  net/mlx5/hws: fix spinlock release on context open
  net/mlx5/hws: add template match none flag
  net/mlx5/hws: fix matcher reconnect

 .mailmap                                      |  15 +-
 VERSION                                       |   2 +-
 app/test-pmd/config.c                         |  13 +-
 app/test-pmd/csumonly.c                       |  21 +-
 app/test-pmd/parameters.c                     |   4 +-
 app/test-pmd/testpmd.h                        |   2 +-
 app/test/test_cryptodev.c                     | 106 +++++-
 app/test/test_cryptodev_asym.c                | 102 +++---
 app/test/test_cryptodev_rsa_test_vectors.h    |   2 +-
 app/test/test_graph.c                         |  72 ++++
 doc/guides/cryptodevs/cnxk.rst                |   2 +-
 doc/guides/eventdevs/cnxk.rst                 |   4 +-
 doc/guides/howto/af_xdp_cni.rst               | 253 --------------
 doc/guides/howto/af_xdp_dp.rst                | 323 ++++++++++++++++++
 doc/guides/howto/index.rst                    |   2 +-
 doc/guides/linux_gsg/enable_func.rst          |   3 +-
 doc/guides/mempool/cnxk.rst                   |   2 +-
 doc/guides/mldevs/cnxk.rst                    |   2 +-
 doc/guides/nics/af_xdp.rst                    |  19 +-
 doc/guides/nics/cnxk.rst                      |   4 +-
 doc/guides/nics/features/iavf.ini             |   2 +-
 doc/guides/platform/cnxk.rst                  |   4 +-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst   |   2 +-
 drivers/baseband/acc/acc_common.h             |   5 +-
 drivers/bus/pci/linux/pci_vfio.c              |  18 +-
 drivers/bus/vdev/vdev.c                       |  21 +-
 drivers/common/cnxk/roc_npc.c                 |   5 +-
 drivers/common/cnxk/roc_npc_aging.c           |   8 +-
 drivers/common/cnxk/roc_platform.c            |  24 +-
 drivers/common/mlx5/mlx5_devx_cmds.c          |   4 +-
 drivers/common/mlx5/mlx5_prm.h                |   6 +-
 drivers/event/sw/iq_chunk.h                   |   2 -
 drivers/event/sw/sw_evdev.c                   |   5 +-
 drivers/net/af_packet/rte_eth_af_packet.c     |   5 +-
 drivers/net/af_xdp/compat.h                   |  15 +
 drivers/net/af_xdp/meson.build                |  10 +
 drivers/net/af_xdp/rte_eth_af_xdp.c           | 126 ++++---
 drivers/net/axgbe/axgbe_common.h              |   2 -
 drivers/net/axgbe/axgbe_dev.c                 |  67 ++--
 drivers/net/axgbe/axgbe_ethdev.c              |  10 +
 drivers/net/axgbe/axgbe_ethdev.h              |   3 +
 drivers/net/axgbe/axgbe_mdio.c                |  44 ++-
 drivers/net/axgbe/axgbe_phy_impl.c            |  45 ++-
 drivers/net/bonding/rte_eth_bond_8023ad.c     |  13 +-
 drivers/net/cnxk/cn10k_ethdev_sec.c           |  57 +++-
 drivers/net/cnxk/cn10k_tx.h                   |   3 +-
 drivers/net/cnxk/cn9k_tx.h                    |   1 +
 drivers/net/cnxk/cnxk_ethdev.c                |   7 +
 drivers/net/cnxk/cnxk_ethdev_ops.c            |   7 +
 drivers/net/cxgbe/cxgbe_ethdev.c              |   3 +-
 drivers/net/e1000/base/e1000_base.c           |   2 +-
 drivers/net/fm10k/fm10k_ethdev.c              |  39 ++-
 drivers/net/hns3/hns3_common.c                |   2 +-
 drivers/net/hns3/hns3_rss.c                   |   6 +-
 drivers/net/hns3/hns3_rss.h                   |   6 +-
 drivers/net/hns3/hns3_rxtx.c                  | 122 +++----
 drivers/net/i40e/i40e_ethdev.c                |   6 +-
 drivers/net/i40e/i40e_rxtx.c                  |   9 +
 drivers/net/iavf/iavf_ethdev.c                |  15 +-
 drivers/net/ice/ice_ethdev.c                  |  45 ++-
 drivers/net/ice/ice_rxtx.c                    |   6 +-
 drivers/net/ixgbe/base/ixgbe_phy.c            |   7 +-
 drivers/net/ixgbe/base/ixgbe_type.h           |   1 +
 drivers/net/ixgbe/base/ixgbe_vf.c             |   6 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |  25 +-
 drivers/net/mlx5/hws/mlx5dr.h                 |   1 +
 drivers/net/mlx5/hws/mlx5dr_context.c         |   1 +
 drivers/net/mlx5/hws/mlx5dr_debug.c           |   2 +-
 drivers/net/mlx5/hws/mlx5dr_definer.c         |   6 +-
 drivers/net/mlx5/hws/mlx5dr_matcher.c         |   4 +-
 drivers/net/mlx5/hws/mlx5dr_rule.c            |   9 +-
 drivers/net/mlx5/hws/mlx5dr_send.h            |   2 -
 drivers/net/mlx5/hws/mlx5dr_table.c           |  11 +-
 drivers/net/mlx5/mlx5_flow_dv.c               |  39 ++-
 drivers/net/mlx5/mlx5_flow_hw.c               | 103 ++++--
 drivers/net/mlx5/mlx5_hws_cnt.c               |   4 +-
 drivers/net/mlx5/mlx5_utils.c                 |   3 +-
 .../net/nfp/flower/nfp_flower_representor.c   |  69 ++--
 drivers/net/nfp/nfp_ethdev.c                  |  54 ++-
 drivers/net/nfp/nfp_net_common.h              |   5 +-
 drivers/net/nfp/nfpcore/nfp6000_pcie.c        |  34 +-
 drivers/net/tap/tap_flow.c                    |   2 +-
 drivers/net/virtio/virtio_ethdev.c            |   2 +
 drivers/net/virtio/virtio_user/vhost_user.c   |   3 +-
 .../net/virtio/virtio_user/virtio_user_dev.c  | 136 ++++----
 drivers/net/vmxnet3/base/vmxnet3_defs.h       |   1 +
 examples/qos_sched/init.c                     |   3 +-
 lib/bpf/meson.build                           |   6 +
 lib/eal/include/rte_common.h                  |   2 +-
 lib/eal/unix/eal_firmware.c                   |  23 +-
 lib/eal/windows/include/meson.build           |   1 +
 lib/ethdev/ethdev_driver.h                    |  24 +-
 lib/ethdev/rte_ethdev.h                       |  17 +-
 lib/eventdev/rte_event_crypto_adapter.c       |  68 ++++
 lib/graph/graph.c                             |  86 ++++-
 lib/graph/graph_stats.c                       |  57 ++--
 lib/hash/rte_cuckoo_hash.c                    |   2 +
 lib/hash/rte_hash.h                           |  16 +-
 lib/latencystats/rte_latencystats.c           |   2 +-
 lib/net/rte_net.h                             |  18 +-
 lib/pcapng/rte_pcapng.c                       |   3 +-
 lib/telemetry/telemetry.c                     |   2 +-
 lib/vhost/vhost_user.c                        |   1 +
 lib/vhost/virtio_net.c                        |   4 +-
 104 files changed, 1669 insertions(+), 931 deletions(-)
 delete mode 100644 doc/guides/howto/af_xdp_cni.rst
 create mode 100644 doc/guides/howto/af_xdp_dp.rst

--
2.34.1

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

* patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 10:43 ` patch 'eal: fix type in destructor macro for MSVC' " Xueming Li
                   ` (78 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: David Marchand
  Cc: Bruce Richardson, Patrick Robb, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=338632b6637bda222734b6f33900709bb25c5f28

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 338632b6637bda222734b6f33900709bb25c5f28 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 29 Apr 2024 12:00:59 +0200
Subject: [PATCH] bus/pci: fix build with musl 1.2.4 / Alpine 3.19
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 884f83ccf74b5364430d3b21c653d5f6e359e091 ]

Following an upgrade of musl, pread64/pwrite64 wrappers are not provided
anymore. Switch to POSIX pread/pwrite.

Bugzilla ID: 1422

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Patrick Robb <probb@iol.unh.edu>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/bus/pci/linux/pci_vfio.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index 3f3201daf2..baa0b9d9b3 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -80,7 +80,7 @@ pci_vfio_read_config(const struct rte_pci_device *dev,
 	if ((uint64_t)len + offs > size)
 		return -1;
 
-	return pread64(fd, buf, len, offset + offs);
+	return pread(fd, buf, len, offset + offs);
 }
 
 int
@@ -101,7 +101,7 @@ pci_vfio_write_config(const struct rte_pci_device *dev,
 	if ((uint64_t)len + offs > size)
 		return -1;
 
-	return pwrite64(fd, buf, len, offset + offs);
+	return pwrite(fd, buf, len, offset + offs);
 }
 
 /* get PCI BAR number where MSI-X interrupts are */
@@ -155,7 +155,7 @@ pci_vfio_enable_bus_memory(struct rte_pci_device *dev, int dev_fd)
 		return -1;
 	}
 
-	ret = pread64(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
+	ret = pread(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
 
 	if (ret != sizeof(cmd)) {
 		RTE_LOG(ERR, EAL, "Cannot read command from PCI config space!\n");
@@ -166,7 +166,7 @@ pci_vfio_enable_bus_memory(struct rte_pci_device *dev, int dev_fd)
 		return 0;
 
 	cmd |= RTE_PCI_COMMAND_MEMORY;
-	ret = pwrite64(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
+	ret = pwrite(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
 
 	if (ret != sizeof(cmd)) {
 		RTE_LOG(ERR, EAL, "Cannot write command to PCI config space!\n");
@@ -425,7 +425,7 @@ pci_vfio_is_ioport_bar(const struct rte_pci_device *dev, int vfio_dev_fd,
 		return -1;
 	}
 
-	ret = pread64(vfio_dev_fd, &ioport_bar, sizeof(ioport_bar),
+	ret = pread(vfio_dev_fd, &ioport_bar, sizeof(ioport_bar),
 			  offset + RTE_PCI_BASE_ADDRESS_0 + bar_index * 4);
 	if (ret != sizeof(ioport_bar)) {
 		RTE_LOG(ERR, EAL, "Cannot read command (%x) from config space!\n",
@@ -1250,7 +1250,7 @@ pci_vfio_ioport_read(struct rte_pci_ioport *p,
 	if (vfio_dev_fd < 0)
 		return;
 
-	if (pread64(vfio_dev_fd, data,
+	if (pread(vfio_dev_fd, data,
 		    len, p->base + offset) <= 0)
 		RTE_LOG(ERR, EAL,
 			"Can't read from PCI bar (%" PRIu64 ") : offset (%x)\n",
@@ -1267,7 +1267,7 @@ pci_vfio_ioport_write(struct rte_pci_ioport *p,
 	if (vfio_dev_fd < 0)
 		return;
 
-	if (pwrite64(vfio_dev_fd, data,
+	if (pwrite(vfio_dev_fd, data,
 		     len, p->base + offset) <= 0)
 		RTE_LOG(ERR, EAL,
 			"Can't write to PCI bar (%" PRIu64 ") : offset (%x)\n",
@@ -1298,7 +1298,7 @@ pci_vfio_mmio_read(const struct rte_pci_device *dev, int bar,
 	if ((uint64_t)len + offs > size)
 		return -1;
 
-	return pread64(fd, buf, len, offset + offs);
+	return pread(fd, buf, len, offset + offs);
 }
 
 int
@@ -1318,7 +1318,7 @@ pci_vfio_mmio_write(const struct rte_pci_device *dev, int bar,
 	if ((uint64_t)len + offs > size)
 		return -1;
 
-	return pwrite64(fd, buf, len, offset + offs);
+	return pwrite(fd, buf, len, offset + offs);
 }
 
 int
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.456876585 +0800
+++ 0001-bus-pci-fix-build-with-musl-1.2.4-Alpine-3.19.patch	2024-07-12 18:40:13.896594252 +0800
@@ -1 +1 @@
-From 884f83ccf74b5364430d3b21c653d5f6e359e091 Mon Sep 17 00:00:00 2001
+From 338632b6637bda222734b6f33900709bb25c5f28 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 884f83ccf74b5364430d3b21c653d5f6e359e091 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 87c16e6603..05b03a9667 100644
+index 3f3201daf2..baa0b9d9b3 100644
@@ -69 +71 @@
-@@ -1276,7 +1276,7 @@ pci_vfio_ioport_read(struct rte_pci_ioport *p,
+@@ -1250,7 +1250,7 @@ pci_vfio_ioport_read(struct rte_pci_ioport *p,
@@ -78 +80 @@
-@@ -1293,7 +1293,7 @@ pci_vfio_ioport_write(struct rte_pci_ioport *p,
+@@ -1267,7 +1267,7 @@ pci_vfio_ioport_write(struct rte_pci_ioport *p,
@@ -87 +89 @@
-@@ -1324,7 +1324,7 @@ pci_vfio_mmio_read(const struct rte_pci_device *dev, int bar,
+@@ -1298,7 +1298,7 @@ pci_vfio_mmio_read(const struct rte_pci_device *dev, int bar,
@@ -96 +98 @@
-@@ -1344,7 +1344,7 @@ pci_vfio_mmio_write(const struct rte_pci_device *dev, int bar,
+@@ -1318,7 +1318,7 @@ pci_vfio_mmio_write(const struct rte_pci_device *dev, int bar,

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

* patch 'eal: fix type in destructor macro for MSVC' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
  2024-07-12 10:43 ` patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' " Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 10:43 ` patch 'eal/unix: support ZSTD compression for firmware' " Xueming Li
                   ` (77 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=09e70301eeb0804dfa0b0ed6e1f06177b440c396

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 09e70301eeb0804dfa0b0ed6e1f06177b440c396 Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Tue, 16 Apr 2024 09:33:24 -0700
Subject: [PATCH] eal: fix type in destructor macro for MSVC
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e5bf3e397b34082673b9fe06f4b8f667c8e4913d ]

RTE_FINI expansion failed to specify void * type for storage of
destructor function pointer resulting it defaulting to type ``int``.

Update the macro to specify ``void *`` as the type so the correct size
is allocated in the segment.

Fixes: 64eff943ca82 ("eal: implement constructors for MSVC")

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/eal/include/rte_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index c1ba32d00e..40af7164af 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -267,7 +267,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
 #define RTE_FINI_PRIO(name, priority) \
 	static void name(void); \
 	__pragma(const_seg(DTOR_PRIORITY_TO_SECTION(priority))) \
-	__declspec(allocate(DTOR_PRIORITY_TO_SECTION(priority))) name ## _pointer = &name; \
+	__declspec(allocate(DTOR_PRIORITY_TO_SECTION(priority))) void *name ## _pointer = &name; \
 	__pragma(const_seg()) \
 	static void name(void)
 #endif
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.502547379 +0800
+++ 0002-eal-fix-type-in-destructor-macro-for-MSVC.patch	2024-07-12 18:40:13.896594252 +0800
@@ -1 +1 @@
-From e5bf3e397b34082673b9fe06f4b8f667c8e4913d Mon Sep 17 00:00:00 2001
+From 09e70301eeb0804dfa0b0ed6e1f06177b440c396 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e5bf3e397b34082673b9fe06f4b8f667c8e4913d ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 298a5c6215..618ed5694c 100644
+index c1ba32d00e..40af7164af 100644
@@ -28 +30 @@
-@@ -291,7 +291,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
+@@ -267,7 +267,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)

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

* patch 'eal/unix: support ZSTD compression for firmware' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
  2024-07-12 10:43 ` patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' " Xueming Li
  2024-07-12 10:43 ` patch 'eal: fix type in destructor macro for MSVC' " Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 11:05   ` David Marchand
  2024-07-12 10:43 ` patch 'pcapng: add memcpy check' " Xueming Li
                   ` (76 subsequent siblings)
  79 siblings, 1 reply; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d39af49b58a2c17edefa486ee906daf41986ab2b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d39af49b58a2c17edefa486ee906daf41986ab2b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 7 May 2024 13:01:53 +0200
Subject: [PATCH] eal/unix: support ZSTD compression for firmware
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6f80df8cb0f889203d7cd27766abcc6ebc720e33 ]

Ubuntu 24.04 started to compress firmware files with ZSTD compression.

Bugzilla ID: 1437

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/eal/unix/eal_firmware.c | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c
index 1a7cf8e7b7..33e989188e 100644
--- a/lib/eal/unix/eal_firmware.c
+++ b/lib/eal/unix/eal_firmware.c
@@ -15,6 +15,8 @@
 
 #include "eal_firmware.h"
 
+static const char * const compression_suffixes[] = { "xz", "zst" };
+
 #ifdef RTE_HAS_LIBARCHIVE
 
 struct firmware_read_ctx {
@@ -36,7 +38,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
 
 	err = archive_read_support_filter_xz(ctx->a);
 	if (err != ARCHIVE_OK && err != ARCHIVE_WARN)
-		goto error;
+		RTE_LOG(DEBUG, EAL, "could not initialise libarchive for xz compression");
+
+	err = archive_read_support_filter_zstd(ctx->a);
+	if (err != ARCHIVE_OK && err != ARCHIVE_WARN)
+		RTE_LOG(DEBUG, EAL, "could not initialise libarchive for zstd compression");
 
 	if (archive_read_open_filename(ctx->a, name, blocksize) != ARCHIVE_OK)
 		goto error;
@@ -147,16 +153,21 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz)
 
 	ret = firmware_read(name, buf, bufsz);
 	if (ret < 0) {
-		snprintf(path, sizeof(path), "%s.xz", name);
-		path[PATH_MAX - 1] = '\0';
+		unsigned int i;
+
+		for (i = 0; i < RTE_DIM(compression_suffixes); i++) {
+			snprintf(path, sizeof(path), "%s.%s", name, compression_suffixes[i]);
+			path[PATH_MAX - 1] = '\0';
+			if (access(path, F_OK) != 0)
+				continue;
 #ifndef RTE_HAS_LIBARCHIVE
-		if (access(path, F_OK) == 0) {
 			RTE_LOG(WARNING, EAL, "libarchive not linked, %s cannot be decompressed\n",
 				path);
-		}
 #else
-		ret = firmware_read(path, buf, bufsz);
+			ret = firmware_read(path, buf, bufsz);
 #endif
+			break;
+		}
 	}
 	return ret;
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.543349175 +0800
+++ 0003-eal-unix-support-ZSTD-compression-for-firmware.patch	2024-07-12 18:40:13.906594251 +0800
@@ -1 +1 @@
-From 6f80df8cb0f889203d7cd27766abcc6ebc720e33 Mon Sep 17 00:00:00 2001
+From d39af49b58a2c17edefa486ee906daf41986ab2b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6f80df8cb0f889203d7cd27766abcc6ebc720e33 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 1d47e879c8..0d69b1e3f0 100644
+index 1a7cf8e7b7..33e989188e 100644
@@ -21 +23,2 @@
-@@ -16,6 +16,8 @@
+@@ -15,6 +15,8 @@
+ 
@@ -23 +25,0 @@
- #include "eal_private.h"
@@ -30 +32 @@
-@@ -37,7 +39,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
+@@ -36,7 +38,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
@@ -35 +37 @@
-+		EAL_LOG(DEBUG, "could not initialise libarchive for xz compression");
++		RTE_LOG(DEBUG, EAL, "could not initialise libarchive for xz compression");
@@ -39 +41 @@
-+		EAL_LOG(DEBUG, "could not initialise libarchive for zstd compression");
++		RTE_LOG(DEBUG, EAL, "could not initialise libarchive for zstd compression");
@@ -43 +45 @@
-@@ -148,16 +154,21 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz)
+@@ -147,16 +153,21 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz)
@@ -58 +60 @@
- 			EAL_LOG(WARNING, "libarchive not linked, %s cannot be decompressed",
+ 			RTE_LOG(WARNING, EAL, "libarchive not linked, %s cannot be decompressed\n",

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

* patch 'pcapng: add memcpy check' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (2 preceding siblings ...)
  2024-07-12 10:43 ` patch 'eal/unix: support ZSTD compression for firmware' " Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 10:43 ` patch 'net/virtio-user: " Xueming Li
                   ` (75 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=385cf6a859cf218d4d0186b9d633abbaac70c2bb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 385cf6a859cf218d4d0186b9d633abbaac70c2bb Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 20 May 2024 18:01:03 -0700
Subject: [PATCH] pcapng: add memcpy check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 06f69f8fdbd218ed7a7d664ee49bd27ee1641cdd ]

When adding option with no data, the rte_pcapng_add_option would
call memcpy with src of NULL and size of zero. This generates a
warning if fortify is enabled.

Bugzilla ID: 1446
Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/pcapng/rte_pcapng.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index f74ec939a9..7254defce7 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -128,7 +128,8 @@ pcapng_add_option(struct pcapng_option *popt, uint16_t code,
 {
 	popt->code = code;
 	popt->length = len;
-	memcpy(popt->data, data, len);
+	if (len > 0)
+		memcpy(popt->data, data, len);
 
 	return (struct pcapng_option *)((uint8_t *)popt + pcapng_optlen(len));
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.577311370 +0800
+++ 0004-pcapng-add-memcpy-check.patch	2024-07-12 18:40:13.906594251 +0800
@@ -1 +1 @@
-From 06f69f8fdbd218ed7a7d664ee49bd27ee1641cdd Mon Sep 17 00:00:00 2001
+From 385cf6a859cf218d4d0186b9d633abbaac70c2bb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 06f69f8fdbd218ed7a7d664ee49bd27ee1641cdd ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/virtio-user: add memcpy check' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (3 preceding siblings ...)
  2024-07-12 10:43 ` patch 'pcapng: add memcpy check' " Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 10:43 ` patch 'eal/windows: install sched.h file' " Xueming Li
                   ` (74 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8ff4ebb7fcbe853070265f9f676acd4b917b1783

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8ff4ebb7fcbe853070265f9f676acd4b917b1783 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 20 May 2024 18:01:04 -0700
Subject: [PATCH] net/virtio-user: add memcpy check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0ad961387e94a9ccfc1484a1d742d6f79eda9cd9 ]

If fortify is enabled, it will generate a warning if memcpy
src is NULL even if size is zero. This happens if the MP message
sync is called with no file descriptors.

Bugzilla ID: 1446
Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/virtio/virtio_user/vhost_user.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index 3c05ac9cc0..c10252506b 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -128,7 +128,8 @@ vhost_user_write(int fd, struct vhost_user_msg *msg, int *fds, int fd_num)
 	cmsg->cmsg_len = CMSG_LEN(fd_size);
 	cmsg->cmsg_level = SOL_SOCKET;
 	cmsg->cmsg_type = SCM_RIGHTS;
-	memcpy(CMSG_DATA(cmsg), fds, fd_size);
+	if (fd_size > 0)
+		memcpy(CMSG_DATA(cmsg), fds, fd_size);
 
 	do {
 		r = sendmsg(fd, &msgh, 0);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.609189567 +0800
+++ 0005-net-virtio-user-add-memcpy-check.patch	2024-07-12 18:40:13.906594251 +0800
@@ -1 +1 @@
-From 0ad961387e94a9ccfc1484a1d742d6f79eda9cd9 Mon Sep 17 00:00:00 2001
+From 8ff4ebb7fcbe853070265f9f676acd4b917b1783 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0ad961387e94a9ccfc1484a1d742d6f79eda9cd9 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'eal/windows: install sched.h file' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (4 preceding siblings ...)
  2024-07-12 10:43 ` patch 'net/virtio-user: " Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 10:43 ` patch 'latencystats: fix literal float suffix' " Xueming Li
                   ` (73 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a3ecb300cd276f0c8531d365922a8e64ea886222

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a3ecb300cd276f0c8531d365922a8e64ea886222 Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Tue, 12 Mar 2024 10:54:37 -0700
Subject: [PATCH] eal/windows: install sched.h file
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ad645a9317bc93c7e4921afa7bf33e1415b531cd ]

rte_os.h includes sched.h so install sched.h to allow DPDK installed to
DESTDIR to be usable.

Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros")

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/eal/windows/include/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/eal/windows/include/meson.build b/lib/eal/windows/include/meson.build
index 5fb1962ac7..e985a77d58 100644
--- a/lib/eal/windows/include/meson.build
+++ b/lib/eal/windows/include/meson.build
@@ -6,4 +6,5 @@ includes += include_directories('.')
 headers += files(
         'rte_os.h',
         'rte_windows.h',
+        'sched.h',
 )
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.643238663 +0800
+++ 0006-eal-windows-install-sched.h-file.patch	2024-07-12 18:40:13.906594251 +0800
@@ -1 +1 @@
-From ad645a9317bc93c7e4921afa7bf33e1415b531cd Mon Sep 17 00:00:00 2001
+From a3ecb300cd276f0c8531d365922a8e64ea886222 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ad645a9317bc93c7e4921afa7bf33e1415b531cd ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'latencystats: fix literal float suffix' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (5 preceding siblings ...)
  2024-07-12 10:43 ` patch 'eal/windows: install sched.h file' " Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 10:43 ` patch 'net/nfp: fix representor port queue release' " Xueming Li
                   ` (72 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3a67498f5cd4e1b71f1b1407d728f8d73ba259bf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3a67498f5cd4e1b71f1b1407d728f8d73ba259bf Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Mon, 15 Apr 2024 14:32:26 -0700
Subject: [PATCH] latencystats: fix literal float suffix
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 792cb874db647e31183ab6680922cd293dd5bfa6 ]

Add missing f suffix to floating point literal to avoid warning about
truncation from double to float.

Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats")

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/latencystats/rte_latencystats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/latencystats/rte_latencystats.c b/lib/latencystats/rte_latencystats.c
index 8985a377db..e47eac2cf8 100644
--- a/lib/latencystats/rte_latencystats.c
+++ b/lib/latencystats/rte_latencystats.c
@@ -164,7 +164,7 @@ calc_latency(uint16_t pid __rte_unused,
 	 * a constant smoothing factor between 0 and 1. The value
 	 * is used below for measuring average latency.
 	 */
-	const float alpha = 0.2;
+	const float alpha = 0.2f;
 
 	now = rte_rdtsc();
 	for (i = 0; i < nb_pkts; i++) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.683485958 +0800
+++ 0007-latencystats-fix-literal-float-suffix.patch	2024-07-12 18:40:13.906594251 +0800
@@ -1 +1 @@
-From 792cb874db647e31183ab6680922cd293dd5bfa6 Mon Sep 17 00:00:00 2001
+From 3a67498f5cd4e1b71f1b1407d728f8d73ba259bf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 792cb874db647e31183ab6680922cd293dd5bfa6 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 4ea9b0d75b..cae4b50878 100644
+index 8985a377db..e47eac2cf8 100644
@@ -21 +23 @@
-@@ -166,7 +166,7 @@ calc_latency(uint16_t pid __rte_unused,
+@@ -164,7 +164,7 @@ calc_latency(uint16_t pid __rte_unused,

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

* patch 'net/nfp: fix representor port queue release' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (6 preceding siblings ...)
  2024-07-12 10:43 ` patch 'latencystats: fix literal float suffix' " Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 10:43 ` patch 'net/bonding: fix failover time of LACP with mode 4' " Xueming Li
                   ` (71 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: Long Wu; +Cc: Chaoyong He, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=884c6d943aaea21cda14fe9a37d7d4c61f7976c8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 884c6d943aaea21cda14fe9a37d7d4c61f7976c8 Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Tue, 19 Mar 2024 15:07:54 +0800
Subject: [PATCH] net/nfp: fix representor port queue release
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 57f62be098be4c95964691183504c77e31797a42 ]

The PF representor port's queue is different from the VF/physical
representor port. So the release process in close port should
be different too.

Fixes: a256a1227dbe ("net/nfp: fix resource leak for exit of flower firmware")

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 .../net/nfp/flower/nfp_flower_representor.c   | 69 ++++++++++++++-----
 1 file changed, 50 insertions(+), 19 deletions(-)

diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index 4937c0780a..dba9ceee95 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -291,6 +291,54 @@ nfp_flower_repr_tx_burst(void *tx_queue,
 	return sent;
 }
 
+static void
+nfp_flower_repr_free_queue(struct nfp_flower_representor *repr)
+{
+	uint16_t i;
+	struct rte_eth_dev *eth_dev = repr->eth_dev;
+
+	for (i = 0; i < eth_dev->data->nb_tx_queues; i++)
+		rte_free(eth_dev->data->tx_queues[i]);
+
+	for (i = 0; i < eth_dev->data->nb_rx_queues; i++)
+		rte_free(eth_dev->data->rx_queues[i]);
+}
+
+static void
+nfp_flower_pf_repr_close_queue(struct nfp_flower_representor *repr)
+{
+	struct rte_eth_dev *eth_dev = repr->eth_dev;
+
+	/*
+	 * We assume that the DPDK application is stopping all the
+	 * threads/queues before calling the device close function.
+	 */
+	nfp_net_disable_queues(eth_dev);
+
+	/* Clear queues */
+	nfp_net_close_tx_queue(eth_dev);
+	nfp_net_close_rx_queue(eth_dev);
+}
+
+static void
+nfp_flower_repr_close_queue(struct nfp_flower_representor *repr)
+{
+	switch (repr->repr_type) {
+	case NFP_REPR_TYPE_PHYS_PORT:
+		nfp_flower_repr_free_queue(repr);
+		break;
+	case NFP_REPR_TYPE_PF:
+		nfp_flower_pf_repr_close_queue(repr);
+		break;
+	case NFP_REPR_TYPE_VF:
+		nfp_flower_repr_free_queue(repr);
+		break;
+	default:
+		PMD_DRV_LOG(ERR, "Unsupported repr port type.");
+		break;
+	}
+}
+
 static int
 nfp_flower_repr_uninit(struct rte_eth_dev *eth_dev)
 {
@@ -348,8 +396,6 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
 	uint16_t i;
 	struct nfp_net_hw *hw;
 	struct nfp_pf_dev *pf_dev;
-	struct nfp_net_txq *this_tx_q;
-	struct nfp_net_rxq *this_rx_q;
 	struct nfp_flower_representor *repr;
 	struct nfp_app_fw_flower *app_fw_flower;
 
@@ -361,26 +407,11 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
 	hw = app_fw_flower->pf_hw;
 	pf_dev = hw->pf_dev;
 
-	/*
-	 * We assume that the DPDK application is stopping all the
-	 * threads/queues before calling the device close function.
-	 */
-	nfp_net_disable_queues(dev);
-
-	/* Clear queues */
-	for (i = 0; i < dev->data->nb_tx_queues; i++) {
-		this_tx_q = dev->data->tx_queues[i];
-		nfp_net_reset_tx_queue(this_tx_q);
-	}
-
-	for (i = 0; i < dev->data->nb_rx_queues; i++) {
-		this_rx_q = dev->data->rx_queues[i];
-		nfp_net_reset_rx_queue(this_rx_q);
-	}
-
 	if (pf_dev->app_fw_id != NFP_APP_FW_FLOWER_NIC)
 		return -EINVAL;
 
+	nfp_flower_repr_close_queue(repr);
+
 	nfp_flower_repr_free(repr, repr->repr_type);
 
 	for (i = 0; i < MAX_FLOWER_VFS; i++) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.719638353 +0800
+++ 0008-net-nfp-fix-representor-port-queue-release.patch	2024-07-12 18:40:13.906594251 +0800
@@ -1 +1 @@
-From 57f62be098be4c95964691183504c77e31797a42 Mon Sep 17 00:00:00 2001
+From 884c6d943aaea21cda14fe9a37d7d4c61f7976c8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 57f62be098be4c95964691183504c77e31797a42 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index b2c55879ca..d4c3c30682 100644
+index 4937c0780a..dba9ceee95 100644
@@ -24 +26 @@
-@@ -305,6 +305,54 @@ nfp_flower_repr_tx_burst(void *tx_queue,
+@@ -291,6 +291,54 @@ nfp_flower_repr_tx_burst(void *tx_queue,
@@ -79 +81 @@
-@@ -362,8 +410,6 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
+@@ -348,8 +396,6 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
@@ -88 +90 @@
-@@ -375,26 +421,11 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
+@@ -361,26 +407,11 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)

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

* patch 'net/bonding: fix failover time of LACP with mode 4' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (7 preceding siblings ...)
  2024-07-12 10:43 ` patch 'net/nfp: fix representor port queue release' " Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 10:43 ` patch 'app/testpmd: fix indirect action flush' " Xueming Li
                   ` (70 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: Gaoxiang Liu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=19010ae677a1e5fb0927c790fdd8730852b15fed

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 19010ae677a1e5fb0927c790fdd8730852b15fed Mon Sep 17 00:00:00 2001
From: Gaoxiang Liu <liugaoxiang@huawei.com>
Date: Mon, 6 Jun 2022 22:34:45 +0800
Subject: [PATCH] net/bonding: fix failover time of LACP with mode 4
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a78a1ed8ba6ae7666d13fee1895badb8eb2abf5f ]

When the primary port of bond member with bond mode 4 linked down,
the system id of the other member ports changed.
It may cause some switches to renegotiate, and the process takes a few
seconds. It is not acceptable for any Telcos.
We need sub-second switch-over time like in Linux.

Set the MAC of the bond port to the member port's system to solve the
problem.

Bugzilla ID: 551
Fixes: 46fb43683679 ("bond: add mode 4")

Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 79f1b3f1a0..06c21ebe6d 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -865,7 +865,6 @@ bond_mode_8023ad_periodic_cb(void *arg)
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
 	struct port *port;
 	struct rte_eth_link link_info;
-	struct rte_ether_addr member_addr;
 	struct rte_mbuf *lacp_pkt = NULL;
 	uint16_t member_id;
 	uint16_t i;
@@ -892,7 +891,6 @@ bond_mode_8023ad_periodic_cb(void *arg)
 			key = 0;
 		}
 
-		rte_eth_macaddr_get(member_id, &member_addr);
 		port = &bond_mode_8023ad_ports[member_id];
 
 		key = rte_cpu_to_be_16(key);
@@ -904,8 +902,8 @@ bond_mode_8023ad_periodic_cb(void *arg)
 			SM_FLAG_SET(port, NTT);
 		}
 
-		if (!rte_is_same_ether_addr(&port->actor.system, &member_addr)) {
-			rte_ether_addr_copy(&member_addr, &port->actor.system);
+		if (!rte_is_same_ether_addr(&internals->mode4.mac_addr, &port->actor.system)) {
+			rte_ether_addr_copy(&internals->mode4.mac_addr, &port->actor.system);
 			if (port->aggregator_port_id == member_id)
 				SM_FLAG_SET(port, NTT);
 		}
@@ -1173,21 +1171,20 @@ void
 bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev)
 {
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
-	struct rte_ether_addr member_addr;
 	struct port *member, *agg_member;
 	uint16_t member_id, i, j;
 
 	bond_mode_8023ad_stop(bond_dev);
 
+	rte_eth_macaddr_get(internals->port_id, &internals->mode4.mac_addr);
 	for (i = 0; i < internals->active_member_count; i++) {
 		member_id = internals->active_members[i];
 		member = &bond_mode_8023ad_ports[member_id];
-		rte_eth_macaddr_get(member_id, &member_addr);
 
-		if (rte_is_same_ether_addr(&member_addr, &member->actor.system))
+		if (rte_is_same_ether_addr(&internals->mode4.mac_addr, &member->actor.system))
 			continue;
 
-		rte_ether_addr_copy(&member_addr, &member->actor.system);
+		rte_ether_addr_copy(&internals->mode4.mac_addr, &member->actor.system);
 		/* Do nothing if this port is not an aggregator. In other case
 		 * Set NTT flag on every port that use this aggregator. */
 		if (member->aggregator_port_id != member_id)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.755298349 +0800
+++ 0009-net-bonding-fix-failover-time-of-LACP-with-mode-4.patch	2024-07-12 18:40:13.916594250 +0800
@@ -1 +1 @@
-From a78a1ed8ba6ae7666d13fee1895badb8eb2abf5f Mon Sep 17 00:00:00 2001
+From 19010ae677a1e5fb0927c790fdd8730852b15fed Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a78a1ed8ba6ae7666d13fee1895badb8eb2abf5f ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/testpmd: fix indirect action flush' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (8 preceding siblings ...)
  2024-07-12 10:43 ` patch 'net/bonding: fix failover time of LACP with mode 4' " Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 10:43 ` patch 'net/hns3: fix offload flag of IEEE 1588' " Xueming Li
                   ` (69 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Dariusz Sosnowski, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2f51a0fdfb6152de1186000634aba86be17d6bcc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2f51a0fdfb6152de1186000634aba86be17d6bcc Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Mon, 25 Mar 2024 12:58:26 +0200
Subject: [PATCH] app/testpmd: fix indirect action flush
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ecf408d2aa5e8952aac956b001f3ff1de1af1df0 ]

The memory of the indirect action handles should be freed after
being destroyed in the flush. The behavior needs to be consistent
with the single handle destroy port_action_handle_destroy().

Or else, there would be some memory leak when closing / detaching a
port without quitting the application. In the meanwhile, since the
action handles are already destroyed, it makes no sense to hold the
indirect action software resources anymore.

Fixes: f7352c176bbf ("app/testpmd: fix use of indirect action after port close")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Reviewed-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/config.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 6d605556ff..c7d3a968c1 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1891,8 +1891,7 @@ port_action_handle_flush(portid_t port_id)
 		/* Poisoning to make sure PMDs update it in case of error. */
 		memset(&error, 0x44, sizeof(error));
 		if (pia->handle != NULL) {
-			ret = pia->type ==
-			      RTE_FLOW_ACTION_TYPE_INDIRECT_LIST ?
+			ret = pia->type == RTE_FLOW_ACTION_TYPE_INDIRECT_LIST ?
 			      rte_flow_action_list_handle_destroy
 				      (port_id, pia->list_handle, &error) :
 			      rte_flow_action_handle_destroy
@@ -1902,11 +1901,9 @@ port_action_handle_flush(portid_t port_id)
 				       pia->id);
 				ret = port_flow_complain(&error);
 			}
-			tmp = &pia->next;
-		} else {
-			*tmp = pia->next;
-			free(pia);
 		}
+		*tmp = pia->next;
+		free(pia);
 	}
 	return ret;
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.793739845 +0800
+++ 0010-app-testpmd-fix-indirect-action-flush.patch	2024-07-12 18:40:13.916594250 +0800
@@ -1 +1 @@
-From ecf408d2aa5e8952aac956b001f3ff1de1af1df0 Mon Sep 17 00:00:00 2001
+From 2f51a0fdfb6152de1186000634aba86be17d6bcc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ecf408d2aa5e8952aac956b001f3ff1de1af1df0 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index ba1007ace6..f62ba90c87 100644
+index 6d605556ff..c7d3a968c1 100644
@@ -29 +31 @@
-@@ -1918,8 +1918,7 @@ port_action_handle_flush(portid_t port_id)
+@@ -1891,8 +1891,7 @@ port_action_handle_flush(portid_t port_id)
@@ -39 +41 @@
-@@ -1929,11 +1928,9 @@ port_action_handle_flush(portid_t port_id)
+@@ -1902,11 +1901,9 @@ port_action_handle_flush(portid_t port_id)

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

* patch 'net/hns3: fix offload flag of IEEE 1588' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (9 preceding siblings ...)
  2024-07-12 10:43 ` patch 'app/testpmd: fix indirect action flush' " Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 10:43 ` patch 'net/hns3: fix Rx timestamp flag' " Xueming Li
                   ` (68 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=bc0e61340450ca4ad98809fd846c05032e03d4b1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bc0e61340450ca4ad98809fd846c05032e03d4b1 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:19 +0800
Subject: [PATCH] net/hns3: fix offload flag of IEEE 1588
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bd8f90f0175914bc7df9ef2e9170a850faaa253b ]

Currently, the RTE_MBUF_F_RX_IEEE1588_TMST offload flag will
not be set when the scatter algorithm is used.
This patch fixes it.

Fixes: 4801f0403b58 ("net/hns3: fix IEEE 1588 PTP for scalar scattered Rx")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 9087bcffed..923905cb5c 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2668,6 +2668,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
 			continue;
 		}
 
+		first_seg->ol_flags = 0;
 		if (unlikely(bd_base_info & BIT(HNS3_RXD_TS_VLD_B)))
 			hns3_rx_ptp_timestamp_handle(rxq, first_seg, timestamp);
 
@@ -2697,7 +2698,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
 
 		first_seg->port = rxq->port_id;
 		first_seg->hash.rss = rte_le_to_cpu_32(rxd.rx.rss_hash);
-		first_seg->ol_flags = RTE_MBUF_F_RX_RSS_HASH;
+		first_seg->ol_flags |= RTE_MBUF_F_RX_RSS_HASH;
 		if (unlikely(bd_base_info & BIT(HNS3_RXD_LUM_B))) {
 			first_seg->hash.fdir.hi =
 				rte_le_to_cpu_16(rxd.rx.fd_id);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.838292339 +0800
+++ 0011-net-hns3-fix-offload-flag-of-IEEE-1588.patch	2024-07-12 18:40:13.926594249 +0800
@@ -1 +1 @@
-From bd8f90f0175914bc7df9ef2e9170a850faaa253b Mon Sep 17 00:00:00 2001
+From bc0e61340450ca4ad98809fd846c05032e03d4b1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bd8f90f0175914bc7df9ef2e9170a850faaa253b ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 73a388b2fe..e6d277ffad 100644
+index 9087bcffed..923905cb5c 100644
@@ -23 +25 @@
-@@ -2669,6 +2669,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
+@@ -2668,6 +2668,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
@@ -31 +33 @@
-@@ -2698,7 +2699,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
+@@ -2697,7 +2698,7 @@ hns3_recv_scattered_pkts(void *rx_queue,

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

* patch 'net/hns3: fix Rx timestamp flag' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (10 preceding siblings ...)
  2024-07-12 10:43 ` patch 'net/hns3: fix offload flag of IEEE 1588' " Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 10:43 ` patch 'net/hns3: fix double free for Rx/Tx queue' " Xueming Li
                   ` (67 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5bfe01364e8d27bf7bb372ba23dd9da0c2f1af24

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5bfe01364e8d27bf7bb372ba23dd9da0c2f1af24 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:20 +0800
Subject: [PATCH] net/hns3: fix Rx timestamp flag
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e7141041d3aa74ff49b703424f120a6e2c00dcb4 ]

The flag RTE_MBUF_F_RX_IEEE1588_PTP depends on the packet
type and does not need to be set when reading Rx timestamp.

Fixes: 38b539d96eb6 ("net/hns3: support IEEE 1588 PTP")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 923905cb5c..45012455b7 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2388,8 +2388,7 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,
 {
 	struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(rxq->hns);
 
-	mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP |
-			  RTE_MBUF_F_RX_IEEE1588_TMST;
+	mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_TMST;
 	if (hns3_timestamp_rx_dynflag > 0) {
 		*RTE_MBUF_DYNFIELD(mbuf, hns3_timestamp_dynfield_offset,
 			rte_mbuf_timestamp_t *) = timestamp;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.876287835 +0800
+++ 0012-net-hns3-fix-Rx-timestamp-flag.patch	2024-07-12 18:40:13.926594249 +0800
@@ -1 +1 @@
-From e7141041d3aa74ff49b703424f120a6e2c00dcb4 Mon Sep 17 00:00:00 2001
+From 5bfe01364e8d27bf7bb372ba23dd9da0c2f1af24 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e7141041d3aa74ff49b703424f120a6e2c00dcb4 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index e6d277ffad..55311402fe 100644
+index 923905cb5c..45012455b7 100644
@@ -22 +24 @@
-@@ -2389,8 +2389,7 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,
+@@ -2388,8 +2388,7 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,

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

* patch 'net/hns3: fix double free for Rx/Tx queue' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (11 preceding siblings ...)
  2024-07-12 10:43 ` patch 'net/hns3: fix Rx timestamp flag' " Xueming Li
@ 2024-07-12 10:43 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/hns3: fix variable overflow' " Xueming Li
                   ` (66 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:43 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=36a750d9d0c56d0aa6ea719556011d364e3053db

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 36a750d9d0c56d0aa6ea719556011d364e3053db Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:21 +0800
Subject: [PATCH] net/hns3: fix double free for Rx/Tx queue
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bbf6fcc0cc62031a26517608a471873339423d8c ]

The Pointers to some resources on the Rx/Tx queue need to be set to NULL
after free inside the hns3_rx/tx_queue_release(), as this function is
called from multiple threads (reset thread, device config thread, etc),
leading to double memory free error.

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 45012455b7..d20e03b103 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -86,9 +86,14 @@ hns3_rx_queue_release(void *queue)
 	struct hns3_rx_queue *rxq = queue;
 	if (rxq) {
 		hns3_rx_queue_release_mbufs(rxq);
-		if (rxq->mz)
+		if (rxq->mz) {
 			rte_memzone_free(rxq->mz);
-		rte_free(rxq->sw_ring);
+			rxq->mz = NULL;
+		}
+		if (rxq->sw_ring) {
+			rte_free(rxq->sw_ring);
+			rxq->sw_ring = NULL;
+		}
 		rte_free(rxq);
 	}
 }
@@ -99,10 +104,18 @@ hns3_tx_queue_release(void *queue)
 	struct hns3_tx_queue *txq = queue;
 	if (txq) {
 		hns3_tx_queue_release_mbufs(txq);
-		if (txq->mz)
+		if (txq->mz) {
 			rte_memzone_free(txq->mz);
-		rte_free(txq->sw_ring);
-		rte_free(txq->free);
+			txq->mz = NULL;
+		}
+		if (txq->sw_ring) {
+			rte_free(txq->sw_ring);
+			txq->sw_ring = NULL;
+		}
+		if (txq->free) {
+			rte_free(txq->free);
+			txq->free = NULL;
+		}
 		rte_free(txq);
 	}
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.910785730 +0800
+++ 0013-net-hns3-fix-double-free-for-Rx-Tx-queue.patch	2024-07-12 18:40:13.936594247 +0800
@@ -1 +1 @@
-From bbf6fcc0cc62031a26517608a471873339423d8c Mon Sep 17 00:00:00 2001
+From 36a750d9d0c56d0aa6ea719556011d364e3053db Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bbf6fcc0cc62031a26517608a471873339423d8c ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 55311402fe..bf10da1928 100644
+index 45012455b7..d20e03b103 100644

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

* patch 'net/hns3: fix variable overflow' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (12 preceding siblings ...)
  2024-07-12 10:43 ` patch 'net/hns3: fix double free for Rx/Tx queue' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/hns3: disable SCTP verification tag for RSS hash input' " Xueming Li
                   ` (65 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c0c7df12829a4b287cb3763d7a6390583ac5dfda

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c0c7df12829a4b287cb3763d7a6390583ac5dfda Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:22 +0800
Subject: [PATCH] net/hns3: fix variable overflow
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d7a0698ce704852cfb3b3b541107477d9b4bd2fd ]

The function strtoul() returns an unsigned long, which should
be received using the variable uint64_t.

Fixes: 2fc3e696a7f1 ("net/hns3: add runtime config for mailbox limit time")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 28c26b049c..5e6cdfdaa0 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -224,7 +224,7 @@ hns3_parse_dev_caps_mask(const char *key, const char *value, void *extra_args)
 static int
 hns3_parse_mbx_time_limit(const char *key, const char *value, void *extra_args)
 {
-	uint32_t val;
+	uint64_t val;
 
 	RTE_SET_USED(key);
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.944361626 +0800
+++ 0014-net-hns3-fix-variable-overflow.patch	2024-07-12 18:40:13.936594247 +0800
@@ -1 +1 @@
-From d7a0698ce704852cfb3b3b541107477d9b4bd2fd Mon Sep 17 00:00:00 2001
+From c0c7df12829a4b287cb3763d7a6390583ac5dfda Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d7a0698ce704852cfb3b3b541107477d9b4bd2fd ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/hns3: disable SCTP verification tag for RSS hash input' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (13 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/hns3: fix variable overflow' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'doc: fix AF_XDP device plugin howto' " Xueming Li
                   ` (64 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Jie Hai; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=94cdd81ce0bf3175e02bceb5e996f1bc3e7f31f7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 94cdd81ce0bf3175e02bceb5e996f1bc3e7f31f7 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Wed, 3 Apr 2024 18:16:23 +0800
Subject: [PATCH] net/hns3: disable SCTP verification tag for RSS hash input
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bb1f4717636f5b7d27f4f2fe30469b69d8910bd0 ]

When the symmetric RSS algorithm is used, the same packet is
expected to be hashed to the same queue in the upstream and
downstream directions.

The problem is that it could map the packets in the same SCTP
connection to different NIC RX queues depending on the direction
of packets. This is because the verification Tag is used as the
RSS hash input for the SCTP packets, and the value depends on the
peer end of the SCTP connection and could not be symmetrically
used in the hardware-implemented RSS algorithm.

In addition, the ethdev framework doesn't support setting SCTP
V-tag as the RSS hash input. So disable it for all RSS hash
algorithms.

Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_rss.c | 6 ++----
 drivers/net/hns3/hns3_rss.h | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 15feb26043..3eae4caf52 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -153,8 +153,7 @@ static const struct {
 	  BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S) |
 	  BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D) |
 	  BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) |
-	  BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) |
-	  BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER),
+	  BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D),
 	  HNS3_RSS_TUPLE_IPV4_SCTP_M },
 
 	/* IPV6-FRAG */
@@ -274,8 +273,7 @@ static const struct {
 	  BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) |
 	  BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D) |
 	  BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D) |
-	  BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S) |
-	  BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER),
+	  BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S),
 	  HNS3_RSS_TUPLE_IPV6_SCTP_M },
 };
 
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 9d182a8025..0755760b45 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -49,7 +49,6 @@ enum hns3_tuple_field {
 	HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S,
 	HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D,
 	HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S,
-	HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER,
 
 	/* IPV4 ENABLE FIELD */
 	HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D = 24,
@@ -74,7 +73,6 @@ enum hns3_tuple_field {
 	HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S,
 	HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D,
 	HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S,
-	HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER,
 
 	/* IPV6 ENABLE FIELD */
 	HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D = 56,
@@ -96,12 +94,12 @@ enum hns3_tuple_field {
 
 #define HNS3_RSS_TUPLE_IPV4_TCP_M	GENMASK(3, 0)
 #define HNS3_RSS_TUPLE_IPV4_UDP_M	GENMASK(11, 8)
-#define HNS3_RSS_TUPLE_IPV4_SCTP_M	GENMASK(20, 16)
+#define HNS3_RSS_TUPLE_IPV4_SCTP_M	GENMASK(19, 16)
 #define HNS3_RSS_TUPLE_IPV4_NONF_M	GENMASK(25, 24)
 #define HNS3_RSS_TUPLE_IPV4_FLAG_M	GENMASK(27, 26)
 #define HNS3_RSS_TUPLE_IPV6_TCP_M	GENMASK(35, 32)
 #define HNS3_RSS_TUPLE_IPV6_UDP_M	GENMASK(43, 40)
-#define HNS3_RSS_TUPLE_IPV6_SCTP_M	GENMASK(52, 48)
+#define HNS3_RSS_TUPLE_IPV6_SCTP_M	GENMASK(51, 48)
 #define HNS3_RSS_TUPLE_IPV6_NONF_M	GENMASK(57, 56)
 #define HNS3_RSS_TUPLE_IPV6_FLAG_M	GENMASK(59, 58)
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:14.978124522 +0800
+++ 0015-net-hns3-disable-SCTP-verification-tag-for-RSS-hash-.patch	2024-07-12 18:40:13.936594247 +0800
@@ -1 +1 @@
-From bb1f4717636f5b7d27f4f2fe30469b69d8910bd0 Mon Sep 17 00:00:00 2001
+From 94cdd81ce0bf3175e02bceb5e996f1bc3e7f31f7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bb1f4717636f5b7d27f4f2fe30469b69d8910bd0 ]
@@ -20,2 +22,0 @@
-
-Cc: stable@dpdk.org

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

* patch 'doc: fix AF_XDP device plugin howto' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (14 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/hns3: disable SCTP verification tag for RSS hash input' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/af_xdp: fix multi-interface support for k8s' " Xueming Li
                   ` (63 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Maryam Tahhan; +Cc: Ciara Loftus, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=190a4d4844aeca2c94e4b0f49065057928bf202e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 190a4d4844aeca2c94e4b0f49065057928bf202e Mon Sep 17 00:00:00 2001
From: Maryam Tahhan <mtahhan@redhat.com>
Date: Mon, 8 Apr 2024 09:09:20 -0400
Subject: [PATCH] doc: fix AF_XDP device plugin howto
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 696982d5efd1ac40576c076b4358a144181d4a0e ]

Fixup the references to the AF_XDP Device Plugin in
the documentation (was referred to as CNI previously)
and document the single netdev limitation for deploying
an AF_XDP based DPDK pod. Also renames af_xdp_cni.rst to
af_xdp_dp.rst

Fixes: 7fc6ae50369d ("net/af_xdp: support CNI Integration")

Signed-off-by: Maryam Tahhan <mtahhan@redhat.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
---
 .mailmap                        |   2 +-
 doc/guides/howto/af_xdp_cni.rst | 253 --------------------------
 doc/guides/howto/af_xdp_dp.rst  | 306 ++++++++++++++++++++++++++++++++
 doc/guides/howto/index.rst      |   2 +-
 doc/guides/nics/af_xdp.rst      |   4 +-
 5 files changed, 310 insertions(+), 257 deletions(-)
 delete mode 100644 doc/guides/howto/af_xdp_cni.rst
 create mode 100644 doc/guides/howto/af_xdp_dp.rst

diff --git a/.mailmap b/.mailmap
index f3b429b747..c6bf385a59 100644
--- a/.mailmap
+++ b/.mailmap
@@ -899,7 +899,7 @@ Martin Klozik <martinx.klozik@intel.com>
 Martin Spinler <spinler@cesnet.cz>
 Martin Weiser <martin.weiser@allegro-packets.com>
 Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@intel.com> <martyna.szapar@intel.com>
-Maryam Tahhan <maryam.tahhan@intel.com>
+Maryam Tahhan <mtahhan@redhat.com> <maryam.tahhan@intel.com>
 Masoud Hasanifard <masoudhasanifard@gmail.com>
 Masoumeh Farhadi Nia <masoumeh.farhadinia@gmail.com>
 Matan Azrad <matan@nvidia.com> <matan@mellanox.com>
diff --git a/doc/guides/howto/af_xdp_cni.rst b/doc/guides/howto/af_xdp_cni.rst
deleted file mode 100644
index a1a6d5b99c..0000000000
--- a/doc/guides/howto/af_xdp_cni.rst
+++ /dev/null
@@ -1,253 +0,0 @@
-.. SPDX-License-Identifier: BSD-3-Clause
-   Copyright(c) 2023 Intel Corporation.
-
-Using a CNI with the AF_XDP driver
-==================================
-
-Introduction
-------------
-
-CNI, the Container Network Interface, is a technology for configuring
-container network interfaces
-and which can be used to setup Kubernetes networking.
-AF_XDP is a Linux socket Address Family that enables an XDP program
-to redirect packets to a memory buffer in userspace.
-
-This document explains how to enable the `AF_XDP Plugin for Kubernetes`_ within
-a DPDK application using the :doc:`../nics/af_xdp` to connect and use these technologies.
-
-.. _AF_XDP Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes
-
-
-Background
-----------
-
-The standard :doc:`../nics/af_xdp` initialization process involves loading an eBPF program
-onto the kernel netdev to be used by the PMD.
-This operation requires root or escalated Linux privileges
-and thus prevents the PMD from working in an unprivileged container.
-The AF_XDP CNI plugin handles this situation
-by providing a device plugin that performs the program loading.
-
-At a technical level the CNI opens a Unix Domain Socket and listens for a client
-to make requests over that socket.
-A DPDK application acting as a client connects and initiates a configuration "handshake".
-The client then receives a file descriptor which points to the XSKMAP
-associated with the loaded eBPF program.
-The XSKMAP is a BPF map of AF_XDP sockets (XSK).
-The client can then proceed with creating an AF_XDP socket
-and inserting that socket into the XSKMAP pointed to by the descriptor.
-
-The EAL vdev argument ``use_cni`` is used to indicate that the user wishes
-to run the PMD in unprivileged mode and to receive the XSKMAP file descriptor
-from the CNI.
-When this flag is set,
-the ``XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD`` libbpf flag
-should be used when creating the socket
-to instruct libbpf not to load the default libbpf program on the netdev.
-Instead the loading is handled by the CNI.
-
-.. note::
-
-   The Unix Domain Socket file path appear in the end user is "/tmp/afxdp.sock".
-
-
-Prerequisites
--------------
-
-Docker and container prerequisites:
-
-* Set up the device plugin
-  as described in the instructions for `AF_XDP Plugin for Kubernetes`_.
-
-* The Docker image should contain the libbpf and libxdp libraries,
-  which are dependencies for AF_XDP,
-  and should include support for the ``ethtool`` command.
-
-* The Pod should have enabled the capabilities ``CAP_NET_RAW`` and ``CAP_BPF``
-  for AF_XDP along with support for hugepages.
-
-* Increase locked memory limit so containers have enough memory for packet buffers.
-  For example:
-
-  .. code-block:: console
-
-     cat << EOF | sudo tee /etc/systemd/system/containerd.service.d/limits.conf
-     [Service]
-     LimitMEMLOCK=infinity
-     EOF
-
-* dpdk-testpmd application should have AF_XDP feature enabled.
-
-  For further information see the docs for the: :doc:`../../nics/af_xdp`.
-
-
-Example
--------
-
-Howto run dpdk-testpmd with CNI plugin:
-
-* Clone the CNI plugin
-
-  .. code-block:: console
-
-     # git clone https://github.com/intel/afxdp-plugins-for-kubernetes.git
-
-* Build the CNI plugin
-
-  .. code-block:: console
-
-     # cd afxdp-plugins-for-kubernetes/
-     # make build
-
-  .. note::
-
-     CNI plugin has a dependence on the config.json.
-
-  Sample Config.json
-
-  .. code-block:: json
-
-     {
-        "logLevel":"debug",
-        "logFile":"afxdp-dp-e2e.log",
-        "pools":[
-           {
-              "name":"e2e",
-              "mode":"primary",
-              "timeout":30,
-              "ethtoolCmds" : ["-L -device- combined 1"],
-              "devices":[
-                 {
-                    "name":"ens785f0"
-                 }
-              ]
-           }
-        ]
-     }
-
-  For further reference please use the `config.json`_
-
-  .. _config.json: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/v0.0.2/test/e2e/config.json
-
-* Create the Network Attachment definition
-
-  .. code-block:: console
-
-     # kubectl create -f nad.yaml
-
-  Sample nad.yml
-
-  .. code-block:: yaml
-
-      apiVersion: "k8s.cni.cncf.io/v1"
-      kind: NetworkAttachmentDefinition
-      metadata:
-        name: afxdp-e2e-test
-        annotations:
-          k8s.v1.cni.cncf.io/resourceName: afxdp/e2e
-      spec:
-        config: '{
-            "cniVersion": "0.3.0",
-            "type": "afxdp",
-            "mode": "cdq",
-            "logFile": "afxdp-cni-e2e.log",
-            "logLevel": "debug",
-            "ipam": {
-              "type": "host-local",
-              "subnet": "192.168.1.0/24",
-              "rangeStart": "192.168.1.200",
-              "rangeEnd": "192.168.1.216",
-              "routes": [
-                { "dst": "0.0.0.0/0" }
-              ],
-              "gateway": "192.168.1.1"
-            }
-          }'
-
-  For further reference please use the `nad.yaml`_
-
-  .. _nad.yaml: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/v0.0.2/test/e2e/nad.yaml
-
-* Build the Docker image
-
-  .. code-block:: console
-
-     # docker build -t afxdp-e2e-test -f Dockerfile .
-
-  Sample Dockerfile:
-
-  .. code-block:: console
-
-     FROM ubuntu:20.04
-     RUN apt-get update -y
-     RUN apt install build-essential libelf-dev -y
-     RUN apt-get install iproute2  acl -y
-     RUN apt install python3-pyelftools ethtool -y
-     RUN apt install libnuma-dev libjansson-dev libpcap-dev net-tools -y
-     RUN apt-get install clang llvm -y
-     COPY ./libbpf<version>.tar.gz /tmp
-     RUN cd /tmp && tar -xvmf libbpf<version>.tar.gz && cd libbpf/src && make install
-     COPY ./libxdp<version>.tar.gz /tmp
-     RUN cd /tmp && tar -xvmf libxdp<version>.tar.gz && cd libxdp && make install
-
-  .. note::
-
-     All the files that need to COPY-ed should be in the same directory as the Dockerfile
-
-* Run the Pod
-
-  .. code-block:: console
-
-     # kubectl create -f pod.yaml
-
-  Sample pod.yaml:
-
-  .. code-block:: yaml
-
-     apiVersion: v1
-     kind: Pod
-     metadata:
-       name: afxdp-e2e-test
-       annotations:
-         k8s.v1.cni.cncf.io/networks: afxdp-e2e-test
-     spec:
-       containers:
-       - name: afxdp
-         image: afxdp-e2e-test:latest
-         imagePullPolicy: Never
-         env:
-         - name: LD_LIBRARY_PATH
-           value: /usr/lib64/:/usr/local/lib/
-         command: ["tail", "-f", "/dev/null"]
-         securityContext:
-          capabilities:
-             add:
-               - CAP_NET_RAW
-               - CAP_BPF
-         resources:
-           requests:
-             hugepages-2Mi: 2Gi
-             memory: 2Gi
-             afxdp/e2e: '1'
-           limits:
-             hugepages-2Mi: 2Gi
-             memory: 2Gi
-             afxdp/e2e: '1'
-
-  For further reference please use the `pod.yaml`_
-
-  .. _pod.yaml: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/v0.0.2/test/e2e/pod-1c1d.yaml
-
-* Run DPDK with a command like the following:
-
-  .. code-block:: console
-
-     kubectl exec -i <Pod name> --container <containers name> -- \
-           /<Path>/dpdk-testpmd -l 0,1 --no-pci \
-           --vdev=net_af_xdp0,use_cni=1,iface=<interface name> \
-           -- --no-mlockall --in-memory
-
-For further reference please use the `e2e`_ test case in `AF_XDP Plugin for Kubernetes`_
-
-  .. _e2e: https://github.com/intel/afxdp-plugins-for-kubernetes/tree/v0.0.2/test/e2e
diff --git a/doc/guides/howto/af_xdp_dp.rst b/doc/guides/howto/af_xdp_dp.rst
new file mode 100644
index 0000000000..2f51b37f20
--- /dev/null
+++ b/doc/guides/howto/af_xdp_dp.rst
@@ -0,0 +1,306 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+   Copyright(c) 2023 Intel Corporation.
+
+Using the AF_XDP driver in Kubernetes
+=====================================
+
+Introduction
+------------
+
+Two infrastructure components are needed in order to provision a pod
+that is using the AF_XDP PMD in Kubernetes:
+
+1. AF_XDP Device Plugin (DP).
+2. AF_XDP Container Network Interface (CNI) binary.
+
+Both of these components are available through
+the `AF_XDP Device Plugin for Kubernetes`_ repository.
+
+The AF_XDP DP provisions and advertises networking interfaces to Kubernetes,
+while the CNI configures and plumbs network interfaces for the Pod.
+
+This document explains how to use the `AF_XDP Device Plugin for Kubernetes`_
+with a DPDK application using the :doc:`../nics/af_xdp`.
+
+.. _AF_XDP Device Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes
+
+
+Background
+----------
+
+The standard :doc:`../nics/af_xdp` initialization process involves loading an eBPF program
+onto the kernel netdev to be used by the PMD.
+This operation requires root or escalated Linux privileges
+and thus prevents the PMD from working in an unprivileged container.
+The AF_XDP Device Plugin handles this situation
+by managing the eBPF program(s) on behalf of the Pod, outside of the pod context.
+
+At a technical level the AF_XDP Device Plugin opens a Unix Domain Socket (UDS)
+and listens for a client to make requests over that socket.
+A DPDK application acting as a client connects and initiates a configuration "handshake".
+After some validation on the Device Plugin side,
+the client receives a file descriptor which points to the XSKMAP
+associated with the loaded eBPF program.
+The XSKMAP is an eBPF map of AF_XDP sockets (XSK).
+The client can then proceed with creating an AF_XDP socket
+and inserting that socket into the XSKMAP pointed to by the descriptor.
+
+The EAL vdev argument ``use_cni`` is used to indicate that the user wishes
+to run the PMD in unprivileged mode and to receive the XSKMAP file descriptor
+from the CNI.
+When this flag is set,
+the ``XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD`` libbpf flag
+should be used when creating the socket
+to instruct libbpf not to load the default libbpf program on the netdev.
+Instead the loading is handled by the AF_XDP Device Plugin.
+
+
+Limitations
+-----------
+
+For DPDK versions <= v23.11 the Unix Domain Socket file path
+appears in the pod at "/tmp/afxdp.sock".
+The handshake implementation in the AF_XDP PMD
+is only compatible with the AF_XDP Device Plugin up to commit id `38317c2`_
+and the pod is limited to a single netdev.
+
+.. note::
+
+   DPDK AF_XDP PMD <= v23.11 will not work with the latest version
+   of the AF_XDP Device Plugin.
+
+The issue is if a single pod requests different devices from different pools,
+it results in multiple UDS servers serving the pod
+with the container using only a single mount point for their UDS as ``/tmp/afxdp.sock``.
+This means that at best one device might be able to complete the handshake.
+This has been fixed in the AF_XDP Device Plugin so that the mount point in the pods
+for the UDS appear at ``/tmp/afxdp_dp/<netdev>/afxdp.sock``.
+Later versions of DPDK fix this hardcoded path in the PMD
+alongside the ``use_cni`` parameter.
+
+.. _38317c2: https://github.com/intel/afxdp-plugins-for-kubernetes/commit/38317c256b5c7dfb39e013a0f76010c2ded03669
+
+
+Prerequisites
+-------------
+
+Device Plugin and DPDK container prerequisites:
+
+* Create a DPDK container image.
+
+* Set up the device plugin and prepare the Pod Spec as described in
+  the instructions for `AF_XDP Device Plugin for Kubernetes`_.
+
+* The Docker image should contain the libbpf and libxdp libraries,
+  which are dependencies for AF_XDP,
+  and should include support for the ``ethtool`` command.
+
+* The Pod should have enabled the capabilities
+  ``CAP_NET_RAW`` for AF_XDP socket creation,
+  ``IPC_LOCK`` for umem creation and
+  ``CAP_BPF`` (for Kernel < 5.19) along with support for hugepages.
+
+  .. note::
+
+     For Kernel versions < 5.19, all BPF sys calls required CAP_BPF,
+     to access maps shared between the eBFP program and the userspace program.
+     Kernels >= 5.19, only requires CAP_BPF for map creation (BPF_MAP_CREATE)
+     and loading programs (BPF_PROG_LOAD).
+
+* Increase locked memory limit so containers have enough memory for packet buffers.
+  For example:
+
+  .. code-block:: console
+
+     cat << EOF | sudo tee /etc/systemd/system/containerd.service.d/limits.conf
+     [Service]
+     LimitMEMLOCK=infinity
+     EOF
+
+* dpdk-testpmd application should have AF_XDP feature enabled.
+
+  For further information see the docs for the: :doc:`../../nics/af_xdp`.
+
+
+Example
+-------
+
+Build a DPDK container image (using Docker)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+1. Create a Dockerfile (should be placed in top level DPDK directory):
+
+   .. code-block:: console
+
+      FROM fedora:38
+
+      # Setup container to build DPDK applications
+      RUN dnf -y upgrade && dnf -y install \
+          libbsd-devel \
+          numactl-libs \
+          libbpf-devel \
+          libbpf \
+          meson \
+          ninja-build \
+          libxdp-devel \
+          libxdp \
+          numactl-devel \
+          python3-pyelftools \
+          python38 \
+          iproute
+      RUN dnf groupinstall -y 'Development Tools'
+
+      # Create DPDK dir and copy over sources
+      # Create DPDK dir and copy over sources
+      COPY ./ /dpdk
+      WORKDIR /dpdk
+
+      # Build DPDK
+      RUN meson setup build
+      RUN ninja -C build
+
+2. Build a DPDK container image (using Docker)
+
+   .. code-block:: console
+
+      # docker build -t dpdk -f Dockerfile
+
+Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* Clone the AF_XDP Device plugin and CNI
+
+  .. code-block:: console
+
+     # git clone https://github.com/intel/afxdp-plugins-for-kubernetes.git
+
+  .. note::
+
+     Ensure you have the AF_XDP Device Plugin + CNI prerequisites installed.
+
+* Build the AF_XDP Device plugin and CNI
+
+  .. code-block:: console
+
+     # cd afxdp-plugins-for-kubernetes/
+     # make image
+
+* Make sure to modify the image used by the `daemonset.yml`_ file
+  in the deployments directory with the following configuration:
+
+  .. _daemonset.yml : https://github.com/intel/afxdp-plugins-for-kubernetes/blob/main/deployments/daemonset.yml
+
+  .. code-block:: yaml
+
+     image: afxdp-device-plugin:latest
+
+  .. note::
+
+     This will select the AF_XDP DP image that was built locally.
+     Detailed configuration options can be found in the AF_XDP Device Plugin `readme`_ .
+
+  .. _readme: https://github.com/intel/afxdp-plugins-for-kubernetes#readme
+
+* Deploy the AF_XDP Device Plugin and CNI
+
+  .. code-block:: console
+
+     # kubectl create -f deployments/daemonset.yml
+
+* Create the Network Attachment definition
+
+  .. code-block:: console
+
+     # kubectl create -f nad.yaml
+
+  Sample nad.yml
+
+  .. code-block:: yaml
+
+     apiVersion: "k8s.cni.cncf.io/v1"
+     kind: NetworkAttachmentDefinition
+     metadata:
+       name: afxdp-network
+       annotations:
+         k8s.v1.cni.cncf.io/resourceName: afxdp/myPool
+     spec:
+       config: '{
+           "cniVersion": "0.3.0",
+           "type": "afxdp",
+           "mode": "primary",
+           "logFile": "afxdp-cni.log",
+           "logLevel": "debug",
+           "ethtoolCmds" : ["-N -device- rx-flow-hash udp4 fn",
+                            "-N -device- flow-type udp4 dst-port 2152 action 22"
+                         ],
+           "ipam": {
+             "type": "host-local",
+             "subnet": "192.168.1.0/24",
+             "rangeStart": "192.168.1.200",
+             "rangeEnd": "192.168.1.220",
+             "routes": [
+               { "dst": "0.0.0.0/0" }
+             ],
+             "gateway": "192.168.1.1"
+           }
+         }'
+
+  For further reference please use the example provided by the AF_XDP DP `nad.yaml`_
+
+  .. _nad.yaml: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/main/examples/network-attachment-definition.yaml
+
+* Run the Pod
+
+  .. code-block:: console
+
+     # kubectl create -f pod.yaml
+
+  Sample pod.yaml:
+
+  .. code-block:: yaml
+
+     apiVersion: v1
+     kind: Pod
+     metadata:
+      name: dpdk
+      annotations:
+        k8s.v1.cni.cncf.io/networks: afxdp-network
+     spec:
+       containers:
+       - name: testpmd
+         image: dpdk:latest
+         command: ["tail", "-f", "/dev/null"]
+         securityContext:
+           capabilities:
+             add:
+               - NET_RAW
+               - IPC_LOCK
+         resources:
+           requests:
+             afxdp/myPool: '1'
+           limits:
+             hugepages-1Gi: 2Gi
+             cpu: 2
+             memory: 256Mi
+             afxdp/myPool: '1'
+         volumeMounts:
+         - name: hugepages
+           mountPath: /dev/hugepages
+       volumes:
+       - name: hugepages
+         emptyDir:
+           medium: HugePages
+
+  For further reference please use the `pod.yaml`_
+
+  .. _pod.yaml: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/main/examples/pod-spec.yaml
+
+* Run DPDK with a command like the following:
+
+  .. code-block:: console
+
+     kubectl exec -i <Pod name> --container <containers name> -- \
+           /<Path>/dpdk-testpmd -l 0,1 --no-pci \
+           --vdev=net_af_xdp0,use_cni=1,iface=<interface name> \
+           --no-mlockall --in-memory \
+           -- -i --a --nb-cores=2 --rxq=1 --txq=1 --forward-mode=macswap;
diff --git a/doc/guides/howto/index.rst b/doc/guides/howto/index.rst
index 71a3381c36..a7692e8a97 100644
--- a/doc/guides/howto/index.rst
+++ b/doc/guides/howto/index.rst
@@ -8,7 +8,7 @@ HowTo Guides
     :maxdepth: 2
     :numbered:
 
-    af_xdp_cni
+    af_xdp_dp
     lm_bond_virtio_sriov
     lm_virtio_vhost_user
     flow_bifurcation
diff --git a/doc/guides/nics/af_xdp.rst b/doc/guides/nics/af_xdp.rst
index 1932525d4d..4dd9c73742 100644
--- a/doc/guides/nics/af_xdp.rst
+++ b/doc/guides/nics/af_xdp.rst
@@ -155,9 +155,9 @@ use_cni
 ~~~~~~~
 
 The EAL vdev argument ``use_cni`` is used to indicate that the user wishes to
-enable the `AF_XDP Plugin for Kubernetes`_ within a DPDK application.
+enable the `AF_XDP Device Plugin for Kubernetes`_ with a DPDK application/pod.
 
-.. _AF_XDP Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes
+.. _AF_XDP Device Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes
 
 .. code-block:: console
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.022579617 +0800
+++ 0016-doc-fix-AF_XDP-device-plugin-howto.patch	2024-07-12 18:40:13.946594246 +0800
@@ -1 +1 @@
-From 696982d5efd1ac40576c076b4358a144181d4a0e Mon Sep 17 00:00:00 2001
+From 190a4d4844aeca2c94e4b0f49065057928bf202e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 696982d5efd1ac40576c076b4358a144181d4a0e ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 237698aa52..de326949c4 100644
+index f3b429b747..c6bf385a59 100644
@@ -31 +33 @@
-@@ -907,7 +907,7 @@ Martin Klozik <martinx.klozik@intel.com>
+@@ -899,7 +899,7 @@ Martin Klozik <martinx.klozik@intel.com>

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

* patch 'net/af_xdp: fix multi-interface support for k8s' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (15 preceding siblings ...)
  2024-07-12 10:44 ` patch 'doc: fix AF_XDP device plugin howto' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'ethdev: fix strict aliasing in link up' " Xueming Li
                   ` (62 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Maryam Tahhan; +Cc: Ciara Loftus, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=29bcdd02a3cf1673d9c4fe7502300c165e23c446

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 29bcdd02a3cf1673d9c4fe7502300c165e23c446 Mon Sep 17 00:00:00 2001
From: Maryam Tahhan <mtahhan@redhat.com>
Date: Mon, 8 Apr 2024 09:09:21 -0400
Subject: [PATCH] net/af_xdp: fix multi-interface support for k8s
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9c1323736cf91aa46d43def8e8d2349f7498a203 ]

The original 'use_cni' implementation, was added
to enable support for the AF_XDP PMD in a K8s env
without any escalated privileges.
However 'use_cni' used a hardcoded socket rather
than a configurable one. If a DPDK pod is requesting
multiple net devices and these devices are from
different pools, then the AF_XDP PMD attempts to
mount all the netdev UDSes in the pod as /tmp/afxdp.sock.
Which means that at best only 1 netdev will handshake
correctly with the AF_XDP DP. This patch addresses
this by making the socket parameter configurable using
a new vdev param called 'dp_path' alongside the
original 'use_cni' param. If the 'dp_path' parameter
is not set alongside the 'use_cni' parameter, then
it's configured inside the AF_XDP PMD (transparently
to the user). This change has been tested
with the AF_XDP DP PR 81[1], with both single and
multiple interfaces.

[1] https://github.com/intel/afxdp-plugins-for-kubernetes/pull/81

Fixes: 7fc6ae50369d ("net/af_xdp: support CNI Integration")

Signed-off-by: Maryam Tahhan <mtahhan@redhat.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
---
 doc/guides/howto/af_xdp_dp.rst      | 55 ++++++++++------
 doc/guides/nics/af_xdp.rst          | 15 +++++
 drivers/net/af_xdp/compat.h         | 15 +++++
 drivers/net/af_xdp/meson.build      |  4 ++
 drivers/net/af_xdp/rte_eth_af_xdp.c | 97 ++++++++++++++++++-----------
 5 files changed, 131 insertions(+), 55 deletions(-)

diff --git a/doc/guides/howto/af_xdp_dp.rst b/doc/guides/howto/af_xdp_dp.rst
index 2f51b37f20..f0f82c79f6 100644
--- a/doc/guides/howto/af_xdp_dp.rst
+++ b/doc/guides/howto/af_xdp_dp.rst
@@ -54,33 +54,34 @@ should be used when creating the socket
 to instruct libbpf not to load the default libbpf program on the netdev.
 Instead the loading is handled by the AF_XDP Device Plugin.
 
+The EAL vdev argument ``dp_path`` is used alongside the ``use_cni`` argument
+to explicitly tell the AF_XDP PMD where to find the UDS
+to interact with the AF_XDP Device Plugin.
+If this argument is not passed alongside the ``use_cni`` argument
+then the AF_XDP PMD configures it internally.
 
-Limitations
------------
+.. note::
 
-For DPDK versions <= v23.11 the Unix Domain Socket file path
-appears in the pod at "/tmp/afxdp.sock".
-The handshake implementation in the AF_XDP PMD
-is only compatible with the AF_XDP Device Plugin up to commit id `38317c2`_
-and the pod is limited to a single netdev.
+   DPDK AF_XDP PMD <= v23.11 will only work with
+   the AF_XDP Device Plugin <= commit id `38317c2`_.
 
 .. note::
 
-   DPDK AF_XDP PMD <= v23.11 will not work with the latest version
-   of the AF_XDP Device Plugin.
+   DPDK AF_XDP PMD > v23.11 will work with latest version of the AF_XDP Device Plugin
+   through a combination of the ``dp_path`` and/or the ``use_cni`` parameter.
+   In these versions of the PMD if a user doesn't explicitly set the ``dp_path`` parameter
+   when using ``use_cni`` then that path is transparently configured in the AF_XDP PMD
+   to the default `AF_XDP Device Plugin for Kubernetes`_ mount point path.
+   The path can be overridden by explicitly setting the ``dp_path`` param.
+
+.. note::
 
-The issue is if a single pod requests different devices from different pools,
-it results in multiple UDS servers serving the pod
-with the container using only a single mount point for their UDS as ``/tmp/afxdp.sock``.
-This means that at best one device might be able to complete the handshake.
-This has been fixed in the AF_XDP Device Plugin so that the mount point in the pods
-for the UDS appear at ``/tmp/afxdp_dp/<netdev>/afxdp.sock``.
-Later versions of DPDK fix this hardcoded path in the PMD
-alongside the ``use_cni`` parameter.
+   DPDK AF_XDP PMD > v23.11 is backwards compatible
+   with (older) versions of the AF_XDP DP <= commit id `38317c2`_
+   by explicitly setting ``dp_path`` to ``/tmp/afxdp.sock``.
 
 .. _38317c2: https://github.com/intel/afxdp-plugins-for-kubernetes/commit/38317c256b5c7dfb39e013a0f76010c2ded03669
 
-
 Prerequisites
 -------------
 
@@ -291,7 +292,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
          emptyDir:
            medium: HugePages
 
-  For further reference please use the `pod.yaml`_
+  For further reference please see the `pod.yaml`_
 
   .. _pod.yaml: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/main/examples/pod-spec.yaml
 
@@ -304,3 +305,19 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
            --vdev=net_af_xdp0,use_cni=1,iface=<interface name> \
            --no-mlockall --in-memory \
            -- -i --a --nb-cores=2 --rxq=1 --txq=1 --forward-mode=macswap;
+
+  Or
+
+  .. code-block:: console
+
+     kubectl exec -i <Pod name> --container <containers name> -- \
+           /<Path>/dpdk-testpmd -l 0,1 --no-pci \
+           --vdev=net_af_xdp0,use_cni=1,iface=<interface name>,dp_path="/tmp/afxdp_dp/<interface name>/afxdp.sock" \
+           --no-mlockall --in-memory \
+           -- -i --a --nb-cores=2 --rxq=1 --txq=1 --forward-mode=macswap;
+
+.. note::
+
+   If the ``dp_path`` parameter isn't explicitly set (like the example above),
+   the AF_XDP PMD will set the parameter value to
+   ``/tmp/afxdp_dp/<<interface name>>/afxdp.sock``.
diff --git a/doc/guides/nics/af_xdp.rst b/doc/guides/nics/af_xdp.rst
index 4dd9c73742..ec97d0155e 100644
--- a/doc/guides/nics/af_xdp.rst
+++ b/doc/guides/nics/af_xdp.rst
@@ -171,6 +171,21 @@ enable the `AF_XDP Device Plugin for Kubernetes`_ with a DPDK application/pod.
    so enabling and disabling of the promiscuous mode through the DPDK application
    is also not supported.
 
+dp_path
+~~~~~~~
+
+The EAL vdev argument ``dp_path`` is used alongside the ``use_cni`` argument
+to explicitly tell the AF_XDP PMD where to find the UDS
+to interact with the `AF_XDP Device Plugin for Kubernetes`_.
+If this argument is not passed alongside the ``use_cni`` argument
+then the AF_XDP PMD configures it internally.
+
+.. _AF_XDP Device Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes
+
+.. code-block:: console
+
+   --vdev=net_af_xdp0,use_cni=1,dp_path="/tmp/afxdp_dp/<<interface name>>/afxdp.sock"
+
 Limitations
 -----------
 
diff --git a/drivers/net/af_xdp/compat.h b/drivers/net/af_xdp/compat.h
index 28ea64aeaa..3b5a5c1ed5 100644
--- a/drivers/net/af_xdp/compat.h
+++ b/drivers/net/af_xdp/compat.h
@@ -46,6 +46,21 @@ create_shared_socket(struct xsk_socket **xsk_ptr __rte_unused,
 }
 #endif
 
+#ifdef ETH_AF_XDP_UPDATE_XSKMAP
+static __rte_always_inline int
+update_xskmap(struct xsk_socket *xsk, int map_fd, int xsk_queue_idx __rte_unused)
+{
+	return xsk_socket__update_xskmap(xsk, map_fd);
+}
+#else
+static __rte_always_inline int
+update_xskmap(struct xsk_socket *xsk, int map_fd, int xsk_queue_idx)
+{
+	int fd = xsk_socket__fd(xsk);
+	return bpf_map_update_elem(map_fd, &xsk_queue_idx, &fd, 0);
+}
+#endif
+
 #ifdef XDP_USE_NEED_WAKEUP
 static int
 tx_syscall_needed(struct xsk_ring_prod *q)
diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build
index 9f33e57fa2..280bfa8f80 100644
--- a/drivers/net/af_xdp/meson.build
+++ b/drivers/net/af_xdp/meson.build
@@ -77,6 +77,10 @@ if build
                      dependencies : bpf_dep, args: cflags)
       cflags += ['-DRTE_NET_AF_XDP_LIBBPF_XDP_ATTACH']
   endif
+  if cc.has_function('xsk_socket__update_xskmap', prefix : xsk_check_prefix,
+                     dependencies : ext_deps, args: cflags)
+      cflags += ['-DETH_AF_XDP_UPDATE_XSKMAP']
+  endif
 endif
 
 require_iova_in_mbuf = false
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 268a130c49..dea3bab983 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -83,12 +83,13 @@ RTE_LOG_REGISTER_DEFAULT(af_xdp_logtype, NOTICE);
 
 #define ETH_AF_XDP_MP_KEY "afxdp_mp_send_fds"
 
+#define DP_BASE_PATH			"/tmp/afxdp_dp"
+#define DP_UDS_SOCK             "afxdp.sock"
 #define MAX_LONG_OPT_SZ			64
 #define UDS_MAX_FD_NUM			2
 #define UDS_MAX_CMD_LEN			64
 #define UDS_MAX_CMD_RESP		128
 #define UDS_XSK_MAP_FD_MSG		"/xsk_map_fd"
-#define UDS_SOCK			"/tmp/afxdp.sock"
 #define UDS_CONNECT_MSG			"/connect"
 #define UDS_HOST_OK_MSG			"/host_ok"
 #define UDS_HOST_NAK_MSG		"/host_nak"
@@ -171,6 +172,7 @@ struct pmd_internals {
 	bool custom_prog_configured;
 	bool force_copy;
 	bool use_cni;
+	char dp_path[PATH_MAX];
 	struct bpf_map *map;
 
 	struct rte_ether_addr eth_addr;
@@ -191,6 +193,7 @@ struct pmd_process_private {
 #define ETH_AF_XDP_BUDGET_ARG			"busy_budget"
 #define ETH_AF_XDP_FORCE_COPY_ARG		"force_copy"
 #define ETH_AF_XDP_USE_CNI_ARG			"use_cni"
+#define ETH_AF_XDP_DP_PATH_ARG			"dp_path"
 
 static const char * const valid_arguments[] = {
 	ETH_AF_XDP_IFACE_ARG,
@@ -201,6 +204,7 @@ static const char * const valid_arguments[] = {
 	ETH_AF_XDP_BUDGET_ARG,
 	ETH_AF_XDP_FORCE_COPY_ARG,
 	ETH_AF_XDP_USE_CNI_ARG,
+	ETH_AF_XDP_DP_PATH_ARG,
 	NULL
 };
 
@@ -1351,7 +1355,7 @@ err_prefer:
 }
 
 static int
-init_uds_sock(struct sockaddr_un *server)
+init_uds_sock(struct sockaddr_un *server, const char *dp_path)
 {
 	int sock;
 
@@ -1362,7 +1366,7 @@ init_uds_sock(struct sockaddr_un *server)
 	}
 
 	server->sun_family = AF_UNIX;
-	strlcpy(server->sun_path, UDS_SOCK, sizeof(server->sun_path));
+	strlcpy(server->sun_path, dp_path, sizeof(server->sun_path));
 
 	if (connect(sock, (struct sockaddr *)server, sizeof(struct sockaddr_un)) < 0) {
 		close(sock);
@@ -1382,7 +1386,7 @@ struct msg_internal {
 };
 
 static int
-send_msg(int sock, char *request, int *fd)
+send_msg(int sock, char *request, int *fd, const char *dp_path)
 {
 	int snd;
 	struct iovec iov;
@@ -1393,7 +1397,7 @@ send_msg(int sock, char *request, int *fd)
 
 	memset(&dst, 0, sizeof(dst));
 	dst.sun_family = AF_UNIX;
-	strlcpy(dst.sun_path, UDS_SOCK, sizeof(dst.sun_path));
+	strlcpy(dst.sun_path, dp_path, sizeof(dst.sun_path));
 
 	/* Initialize message header structure */
 	memset(&msgh, 0, sizeof(msgh));
@@ -1470,8 +1474,8 @@ read_msg(int sock, char *response, struct sockaddr_un *s, int *fd)
 }
 
 static int
-make_request_cni(int sock, struct sockaddr_un *server, char *request,
-		 int *req_fd, char *response, int *out_fd)
+make_request_dp(int sock, struct sockaddr_un *server, char *request,
+		 int *req_fd, char *response, int *out_fd, const char *dp_path)
 {
 	int rval;
 
@@ -1483,7 +1487,7 @@ make_request_cni(int sock, struct sockaddr_un *server, char *request,
 	if (req_fd == NULL)
 		rval = write(sock, request, strlen(request));
 	else
-		rval = send_msg(sock, request, req_fd);
+		rval = send_msg(sock, request, req_fd, dp_path);
 
 	if (rval < 0) {
 		AF_XDP_LOG(ERR, "Write error %s\n", strerror(errno));
@@ -1507,7 +1511,7 @@ check_response(char *response, char *exp_resp, long size)
 }
 
 static int
-get_cni_fd(char *if_name)
+uds_get_xskmap_fd(char *if_name, const char *dp_path)
 {
 	char request[UDS_MAX_CMD_LEN], response[UDS_MAX_CMD_RESP];
 	char hostname[MAX_LONG_OPT_SZ], exp_resp[UDS_MAX_CMD_RESP];
@@ -1520,14 +1524,14 @@ get_cni_fd(char *if_name)
 		return -1;
 
 	memset(&server, 0, sizeof(server));
-	sock = init_uds_sock(&server);
+	sock = init_uds_sock(&server, dp_path);
 	if (sock < 0)
 		return -1;
 
-	/* Initiates handshake to CNI send: /connect,hostname */
+	/* Initiates handshake to the AF_XDP Device Plugin send: /connect,hostname */
 	snprintf(request, sizeof(request), "%s,%s", UDS_CONNECT_MSG, hostname);
 	memset(response, 0, sizeof(response));
-	if (make_request_cni(sock, &server, request, NULL, response, &out_fd) < 0) {
+	if (make_request_dp(sock, &server, request, NULL, response, &out_fd, dp_path) < 0) {
 		AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
 		goto err_close;
 	}
@@ -1541,7 +1545,7 @@ get_cni_fd(char *if_name)
 	/* Request for "/version" */
 	strlcpy(request, UDS_VERSION_MSG, UDS_MAX_CMD_LEN);
 	memset(response, 0, sizeof(response));
-	if (make_request_cni(sock, &server, request, NULL, response, &out_fd) < 0) {
+	if (make_request_dp(sock, &server, request, NULL, response, &out_fd, dp_path) < 0) {
 		AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
 		goto err_close;
 	}
@@ -1549,7 +1553,7 @@ get_cni_fd(char *if_name)
 	/* Request for file descriptor for netdev name*/
 	snprintf(request, sizeof(request), "%s,%s", UDS_XSK_MAP_FD_MSG, if_name);
 	memset(response, 0, sizeof(response));
-	if (make_request_cni(sock, &server, request, NULL, response, &out_fd) < 0) {
+	if (make_request_dp(sock, &server, request, NULL, response, &out_fd, dp_path) < 0) {
 		AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
 		goto err_close;
 	}
@@ -1571,7 +1575,7 @@ get_cni_fd(char *if_name)
 	/* Initiate close connection */
 	strlcpy(request, UDS_FIN_MSG, UDS_MAX_CMD_LEN);
 	memset(response, 0, sizeof(response));
-	if (make_request_cni(sock, &server, request, NULL, response, &out_fd) < 0) {
+	if (make_request_dp(sock, &server, request, NULL, response, &out_fd, dp_path) < 0) {
 		AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
 		goto err_close;
 	}
@@ -1695,21 +1699,21 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
 	}
 
 	if (internals->use_cni) {
-		int err, fd, map_fd;
+		int err, map_fd;
 
-		/* get socket fd from CNI plugin */
-		map_fd = get_cni_fd(internals->if_name);
+		/* get socket fd from AF_XDP Device Plugin */
+		map_fd = uds_get_xskmap_fd(internals->if_name, internals->dp_path);
 		if (map_fd < 0) {
-			AF_XDP_LOG(ERR, "Failed to receive CNI plugin fd\n");
+			AF_XDP_LOG(ERR, "Failed to receive xskmap fd from AF_XDP Device Plugin\n");
 			goto out_xsk;
 		}
-		/* get socket fd */
-		fd = xsk_socket__fd(rxq->xsk);
-		err = bpf_map_update_elem(map_fd, &rxq->xsk_queue_idx, &fd, 0);
+
+		err = update_xskmap(rxq->xsk, map_fd, rxq->xsk_queue_idx);
 		if (err) {
-			AF_XDP_LOG(ERR, "Failed to insert unprivileged xsk in map.\n");
+			AF_XDP_LOG(ERR, "Failed to insert xsk in map.\n");
 			goto out_xsk;
 		}
+
 	} else if (rxq->busy_budget) {
 		ret = configure_preferred_busy_poll(rxq);
 		if (ret) {
@@ -1881,13 +1885,13 @@ static const struct eth_dev_ops ops = {
 	.get_monitor_addr = eth_get_monitor_addr,
 };
 
-/* CNI option works in unprivileged container environment
- * and ethernet device functionality will be reduced. So
- * additional customiszed eth_dev_ops struct is needed
- * for cni. Promiscuous enable and disable functionality
- * is removed.
+/* AF_XDP Device Plugin option works in unprivileged
+ * container environments and ethernet device functionality
+ * will be reduced. So additional customised eth_dev_ops
+ * struct is needed for the Device Plugin. Promiscuous
+ * enable and disable functionality is removed.
  **/
-static const struct eth_dev_ops ops_cni = {
+static const struct eth_dev_ops ops_afxdp_dp = {
 	.dev_start = eth_dev_start,
 	.dev_stop = eth_dev_stop,
 	.dev_close = eth_dev_close,
@@ -2023,7 +2027,8 @@ xdp_get_channels_info(const char *if_name, int *max_queues,
 static int
 parse_parameters(struct rte_kvargs *kvlist, char *if_name, int *start_queue,
 		 int *queue_cnt, int *shared_umem, char *prog_path,
-		 int *busy_budget, int *force_copy, int *use_cni)
+		 int *busy_budget, int *force_copy, int *use_cni,
+		 char *dp_path)
 {
 	int ret;
 
@@ -2069,6 +2074,11 @@ parse_parameters(struct rte_kvargs *kvlist, char *if_name, int *start_queue,
 	if (ret < 0)
 		goto free_kvlist;
 
+	ret = rte_kvargs_process(kvlist, ETH_AF_XDP_DP_PATH_ARG,
+				 &parse_prog_arg, dp_path);
+	if (ret < 0)
+		goto free_kvlist;
+
 free_kvlist:
 	rte_kvargs_free(kvlist);
 	return ret;
@@ -2108,7 +2118,7 @@ static struct rte_eth_dev *
 init_internals(struct rte_vdev_device *dev, const char *if_name,
 	       int start_queue_idx, int queue_cnt, int shared_umem,
 	       const char *prog_path, int busy_budget, int force_copy,
-	       int use_cni)
+	       int use_cni, const char *dp_path)
 {
 	const char *name = rte_vdev_device_name(dev);
 	const unsigned int numa_node = dev->device.numa_node;
@@ -2138,6 +2148,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
 	internals->shared_umem = shared_umem;
 	internals->force_copy = force_copy;
 	internals->use_cni = use_cni;
+	strlcpy(internals->dp_path, dp_path, PATH_MAX);
 
 	if (xdp_get_channels_info(if_name, &internals->max_queue_cnt,
 				  &internals->combined_queue_cnt)) {
@@ -2199,7 +2210,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
 	if (!internals->use_cni)
 		eth_dev->dev_ops = &ops;
 	else
-		eth_dev->dev_ops = &ops_cni;
+		eth_dev->dev_ops = &ops_afxdp_dp;
 
 	eth_dev->rx_pkt_burst = eth_af_xdp_rx;
 	eth_dev->tx_pkt_burst = eth_af_xdp_tx;
@@ -2328,6 +2339,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
 	int busy_budget = -1, ret;
 	int force_copy = 0;
 	int use_cni = 0;
+	char dp_path[PATH_MAX] = {'\0'};
 	struct rte_eth_dev *eth_dev = NULL;
 	const char *name = rte_vdev_device_name(dev);
 
@@ -2370,7 +2382,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
 
 	if (parse_parameters(kvlist, if_name, &xsk_start_queue_idx,
 			     &xsk_queue_cnt, &shared_umem, prog_path,
-			     &busy_budget, &force_copy, &use_cni) < 0) {
+			     &busy_budget, &force_copy, &use_cni, dp_path) < 0) {
 		AF_XDP_LOG(ERR, "Invalid kvargs value\n");
 		return -EINVAL;
 	}
@@ -2384,7 +2396,19 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
 	if (use_cni && strnlen(prog_path, PATH_MAX)) {
 		AF_XDP_LOG(ERR, "When '%s' parameter is used, '%s' parameter is not valid\n",
 			ETH_AF_XDP_USE_CNI_ARG, ETH_AF_XDP_PROG_ARG);
-			return -EINVAL;
+		return -EINVAL;
+	}
+
+	if (use_cni && !strnlen(dp_path, PATH_MAX)) {
+		snprintf(dp_path, sizeof(dp_path), "%s/%s/%s", DP_BASE_PATH, if_name, DP_UDS_SOCK);
+		AF_XDP_LOG(INFO, "'%s' parameter not provided, setting value to '%s'\n",
+			ETH_AF_XDP_DP_PATH_ARG, dp_path);
+	}
+
+	if (!use_cni && strnlen(dp_path, PATH_MAX)) {
+		AF_XDP_LOG(ERR, "'%s' parameter is set, but '%s' was not enabled\n",
+			ETH_AF_XDP_DP_PATH_ARG, ETH_AF_XDP_USE_CNI_ARG);
+		return -EINVAL;
 	}
 
 	if (strlen(if_name) == 0) {
@@ -2410,7 +2434,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
 
 	eth_dev = init_internals(dev, if_name, xsk_start_queue_idx,
 				 xsk_queue_cnt, shared_umem, prog_path,
-				 busy_budget, force_copy, use_cni);
+				 busy_budget, force_copy, use_cni, dp_path);
 	if (eth_dev == NULL) {
 		AF_XDP_LOG(ERR, "Failed to init internals\n");
 		return -1;
@@ -2471,4 +2495,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_af_xdp,
 			      "xdp_prog=<string> "
 			      "busy_budget=<int> "
 			      "force_copy=<int> "
-			      "use_cni=<int> ");
+			      "use_cni=<int> "
+			      "dp_path=<string> ");
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.072871011 +0800
+++ 0017-net-af_xdp-fix-multi-interface-support-for-k8s.patch	2024-07-12 18:40:13.946594246 +0800
@@ -1 +1 @@
-From 9c1323736cf91aa46d43def8e8d2349f7498a203 Mon Sep 17 00:00:00 2001
+From 29bcdd02a3cf1673d9c4fe7502300c165e23c446 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9c1323736cf91aa46d43def8e8d2349f7498a203 ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -33,7 +35,6 @@
- doc/guides/howto/af_xdp_dp.rst         | 55 ++++++++++-----
- doc/guides/nics/af_xdp.rst             | 15 ++++
- doc/guides/rel_notes/release_24_07.rst | 10 +++
- drivers/net/af_xdp/compat.h            | 15 ++++
- drivers/net/af_xdp/meson.build         |  4 ++
- drivers/net/af_xdp/rte_eth_af_xdp.c    | 97 ++++++++++++++++----------
- 6 files changed, 141 insertions(+), 55 deletions(-)
+ doc/guides/howto/af_xdp_dp.rst      | 55 ++++++++++------
+ doc/guides/nics/af_xdp.rst          | 15 +++++
+ drivers/net/af_xdp/compat.h         | 15 +++++
+ drivers/net/af_xdp/meson.build      |  4 ++
+ drivers/net/af_xdp/rte_eth_af_xdp.c | 97 ++++++++++++++++++-----------
+ 5 files changed, 131 insertions(+), 55 deletions(-)
@@ -153,21 +153,0 @@
-diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst
-index a69f24cf99..0b2e1d328d 100644
---- a/doc/guides/rel_notes/release_24_07.rst
-+++ b/doc/guides/rel_notes/release_24_07.rst
-@@ -55,6 +55,16 @@ New Features
-      Also, make sure to start the actual text at the margin.
-      =======================================================
- 
-+* **Updated AF_XDP driver.**
-+
-+  * Enabled multi-interface (UDS) support with AF_XDP Device Plugin.
-+
-+    The vdev argument for the AF_XDP PMD ``use_cni`` previously limited
-+    a pod to using only a single netdev/interface.
-+    The latest changes (adding the ``dp_path`` parameter) remove this limitation
-+    and maintain backward compatibility for any applications already using
-+    the ``use_cni`` vdev argument with the AF_XDP Device Plugin.
-+
- 
- Removed Items
- -------------
@@ -216 +196 @@
-index 6ba455bb9b..dcd590569e 100644
+index 268a130c49..dea3bab983 100644
@@ -258 +238 @@
-@@ -1352,7 +1356,7 @@ err_prefer:
+@@ -1351,7 +1355,7 @@ err_prefer:
@@ -267 +247 @@
-@@ -1363,7 +1367,7 @@ init_uds_sock(struct sockaddr_un *server)
+@@ -1362,7 +1366,7 @@ init_uds_sock(struct sockaddr_un *server)
@@ -276 +256 @@
-@@ -1383,7 +1387,7 @@ struct msg_internal {
+@@ -1382,7 +1386,7 @@ struct msg_internal {
@@ -285 +265 @@
-@@ -1394,7 +1398,7 @@ send_msg(int sock, char *request, int *fd)
+@@ -1393,7 +1397,7 @@ send_msg(int sock, char *request, int *fd)
@@ -294 +274 @@
-@@ -1471,8 +1475,8 @@ read_msg(int sock, char *response, struct sockaddr_un *s, int *fd)
+@@ -1470,8 +1474,8 @@ read_msg(int sock, char *response, struct sockaddr_un *s, int *fd)
@@ -305 +285 @@
-@@ -1484,7 +1488,7 @@ make_request_cni(int sock, struct sockaddr_un *server, char *request,
+@@ -1483,7 +1487,7 @@ make_request_cni(int sock, struct sockaddr_un *server, char *request,
@@ -314 +294 @@
-@@ -1508,7 +1512,7 @@ check_response(char *response, char *exp_resp, long size)
+@@ -1507,7 +1511,7 @@ check_response(char *response, char *exp_resp, long size)
@@ -323 +303 @@
-@@ -1521,14 +1525,14 @@ get_cni_fd(char *if_name)
+@@ -1520,14 +1524,14 @@ get_cni_fd(char *if_name)
@@ -341 +321 @@
-@@ -1542,7 +1546,7 @@ get_cni_fd(char *if_name)
+@@ -1541,7 +1545,7 @@ get_cni_fd(char *if_name)
@@ -350 +330 @@
-@@ -1550,7 +1554,7 @@ get_cni_fd(char *if_name)
+@@ -1549,7 +1553,7 @@ get_cni_fd(char *if_name)
@@ -359 +339 @@
-@@ -1572,7 +1576,7 @@ get_cni_fd(char *if_name)
+@@ -1571,7 +1575,7 @@ get_cni_fd(char *if_name)
@@ -368 +348 @@
-@@ -1697,21 +1701,21 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
+@@ -1695,21 +1699,21 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
@@ -398 +378 @@
-@@ -1883,13 +1887,13 @@ static const struct eth_dev_ops ops = {
+@@ -1881,13 +1885,13 @@ static const struct eth_dev_ops ops = {
@@ -418 +398 @@
-@@ -2025,7 +2029,8 @@ xdp_get_channels_info(const char *if_name, int *max_queues,
+@@ -2023,7 +2027,8 @@ xdp_get_channels_info(const char *if_name, int *max_queues,
@@ -428 +408 @@
-@@ -2071,6 +2076,11 @@ parse_parameters(struct rte_kvargs *kvlist, char *if_name, int *start_queue,
+@@ -2069,6 +2074,11 @@ parse_parameters(struct rte_kvargs *kvlist, char *if_name, int *start_queue,
@@ -440 +420 @@
-@@ -2110,7 +2120,7 @@ static struct rte_eth_dev *
+@@ -2108,7 +2118,7 @@ static struct rte_eth_dev *
@@ -449 +429 @@
-@@ -2140,6 +2150,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
+@@ -2138,6 +2148,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
@@ -457 +437 @@
-@@ -2201,7 +2212,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
+@@ -2199,7 +2210,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
@@ -466 +446 @@
-@@ -2330,6 +2341,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
+@@ -2328,6 +2339,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
@@ -474 +454 @@
-@@ -2372,7 +2384,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
+@@ -2370,7 +2382,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
@@ -483 +463 @@
-@@ -2386,7 +2398,19 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
+@@ -2384,7 +2396,19 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
@@ -504 +484 @@
-@@ -2412,7 +2436,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
+@@ -2410,7 +2434,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
@@ -513 +493 @@
-@@ -2473,4 +2497,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_af_xdp,
+@@ -2471,4 +2495,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_af_xdp,

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

* patch 'ethdev: fix strict aliasing in link up' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (16 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/af_xdp: fix multi-interface support for k8s' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/vmxnet3: add missing register command' " Xueming Li
                   ` (61 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Chengwen Feng
  Cc: Dengdui Huang, Morten Brørup, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=598269fd16d996336544f2bd309c7f7ce941b99d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 598269fd16d996336544f2bd309c7f7ce941b99d Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 22 Apr 2024 06:38:13 +0000
Subject: [PATCH] ethdev: fix strict aliasing in link up
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b9a87346b05c562dd6005ee025eca67a1a80bea8 ]

Fix a problem introduced by a compiler upgrade (from gcc10 to gcc12.3),
which will lead the hns3 NIC can't link up. The root cause is strict
aliasing violation in rte_eth_linkstatus_set() with hns3 driver, see
[1] for more details.

This commit use union to avoid such aliasing violation. Also the
impacted components (cxgbe and qos_sched) have been adapted to the
struct change.

[1] https://inbox.dpdk.org/dev/8175c905-e661-b910-7f20-59b6ab605c38@huawei.com/

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/cxgbe/cxgbe_ethdev.c |  3 ++-
 examples/qos_sched/init.c        |  3 ++-
 lib/ethdev/ethdev_driver.h       | 24 +++++++++---------------
 lib/ethdev/rte_ethdev.h          | 17 +++++++++++------
 4 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 8cc3d9f257..781f48cfac 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -211,9 +211,9 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
 	unsigned int i, work_done, budget = 32;
 	struct link_config *lc = &pi->link_cfg;
 	struct adapter *adapter = pi->adapter;
-	struct rte_eth_link new_link = { 0 };
 	u8 old_link = pi->link_cfg.link_ok;
 	struct sge *s = &adapter->sge;
+	struct rte_eth_link new_link;
 
 	for (i = 0; i < CXGBE_LINK_STATUS_POLL_CNT; i++) {
 		if (!s->fw_evtq.desc)
@@ -232,6 +232,7 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
 		rte_delay_ms(CXGBE_LINK_STATUS_POLL_MS);
 	}
 
+	memset(&new_link, 0, sizeof(new_link));
 	new_link.link_status = cxgbe_force_linkup(adapter) ?
 			       RTE_ETH_LINK_UP : pi->link_cfg.link_ok;
 	new_link.link_autoneg = (lc->link_caps & FW_PORT_CAP32_ANEG) ? 1 : 0;
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index d8abae635a..32964fd57e 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -335,7 +335,7 @@ int app_init(void)
 	for(i = 0; i < nb_pfc; i++) {
 		uint32_t socket = rte_lcore_to_socket_id(qos_conf[i].rx_core);
 		struct rte_ring *ring;
-		struct rte_eth_link link = {0};
+		struct rte_eth_link link;
 		int retry_count = 100, retry_delay = 100; /* try every 100ms for 10 sec */
 
 		snprintf(ring_name, MAX_NAME_LEN, "ring-%u-%u", i, qos_conf[i].rx_core);
@@ -367,6 +367,7 @@ int app_init(void)
 		app_init_port(qos_conf[i].rx_port, qos_conf[i].mbuf_pool);
 		app_init_port(qos_conf[i].tx_port, qos_conf[i].mbuf_pool);
 
+		memset(&link, 0, sizeof(link));
 		rte_eth_link_get(qos_conf[i].tx_port, &link);
 		if (link.link_status == 0)
 			printf("Waiting for link on port %u\n", qos_conf[i].tx_port);
diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
index b482cd12bb..ec56925882 100644
--- a/lib/ethdev/ethdev_driver.h
+++ b/lib/ethdev/ethdev_driver.h
@@ -1655,18 +1655,13 @@ static inline int
 rte_eth_linkstatus_set(struct rte_eth_dev *dev,
 		       const struct rte_eth_link *new_link)
 {
-	RTE_ATOMIC(uint64_t) *dev_link = (uint64_t __rte_atomic *)&(dev->data->dev_link);
-	union {
-		uint64_t val64;
-		struct rte_eth_link link;
-	} orig;
-
-	RTE_BUILD_BUG_ON(sizeof(*new_link) != sizeof(uint64_t));
+	struct rte_eth_link old_link;
 
-	orig.val64 = rte_atomic_exchange_explicit(dev_link, *(const uint64_t *)new_link,
-					rte_memory_order_seq_cst);
+	old_link.val64 = rte_atomic_exchange_explicit(&dev->data->dev_link.val64,
+						      new_link->val64,
+						      rte_memory_order_seq_cst);
 
-	return (orig.link.link_status == new_link->link_status) ? -1 : 0;
+	return (old_link.link_status == new_link->link_status) ? -1 : 0;
 }
 
 /**
@@ -1682,12 +1677,11 @@ static inline void
 rte_eth_linkstatus_get(const struct rte_eth_dev *dev,
 		       struct rte_eth_link *link)
 {
-	RTE_ATOMIC(uint64_t) *src = (uint64_t __rte_atomic *)&(dev->data->dev_link);
-	uint64_t *dst = (uint64_t *)link;
-
-	RTE_BUILD_BUG_ON(sizeof(*link) != sizeof(uint64_t));
+	struct rte_eth_link curr_link;
 
-	*dst = rte_atomic_load_explicit(src, rte_memory_order_seq_cst);
+	curr_link.val64 = rte_atomic_load_explicit(&dev->data->dev_link.val64,
+						   rte_memory_order_seq_cst);
+	rte_atomic_store_explicit(&link->val64, curr_link.val64, rte_memory_order_seq_cst);
 }
 
 /**
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 77331ce652..545799c341 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -331,13 +331,18 @@ struct rte_eth_stats {
 /**
  * A structure used to retrieve link-level information of an Ethernet port.
  */
-__extension__
 struct rte_eth_link {
-	uint32_t link_speed;        /**< RTE_ETH_SPEED_NUM_ */
-	uint16_t link_duplex  : 1;  /**< RTE_ETH_LINK_[HALF/FULL]_DUPLEX */
-	uint16_t link_autoneg : 1;  /**< RTE_ETH_LINK_[AUTONEG/FIXED] */
-	uint16_t link_status  : 1;  /**< RTE_ETH_LINK_[DOWN/UP] */
-} __rte_aligned(8);      /**< aligned for atomic64 read/write */
+	union {
+		RTE_ATOMIC(uint64_t) val64; /**< used for atomic64 read/write */
+		__extension__
+		struct {
+			uint32_t link_speed;	    /**< RTE_ETH_SPEED_NUM_ */
+			uint16_t link_duplex  : 1;  /**< RTE_ETH_LINK_[HALF/FULL]_DUPLEX */
+			uint16_t link_autoneg : 1;  /**< RTE_ETH_LINK_[AUTONEG/FIXED] */
+			uint16_t link_status  : 1;  /**< RTE_ETH_LINK_[DOWN/UP] */
+		};
+	};
+};
 
 /**@{@name Link negotiation
  * Constants used in link management.
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.117580306 +0800
+++ 0018-ethdev-fix-strict-aliasing-in-link-up.patch	2024-07-12 18:40:13.956594245 +0800
@@ -1 +1 @@
-From b9a87346b05c562dd6005ee025eca67a1a80bea8 Mon Sep 17 00:00:00 2001
+From 598269fd16d996336544f2bd309c7f7ce941b99d Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b9a87346b05c562dd6005ee025eca67a1a80bea8 ]
@@ -20,2 +22,0 @@
-Cc: stable@dpdk.org
-
@@ -34 +35 @@
-index a27b9b266e..9b6a3651f9 100644
+index 8cc3d9f257..781f48cfac 100644
@@ -78 +79 @@
-index 0dbf2dd6a2..883e59a927 100644
+index b482cd12bb..ec56925882 100644
@@ -81 +82 @@
-@@ -1674,18 +1674,13 @@ static inline int
+@@ -1655,18 +1655,13 @@ static inline int
@@ -105 +106 @@
-@@ -1701,12 +1696,11 @@ static inline void
+@@ -1682,12 +1677,11 @@ static inline void
@@ -123 +124 @@
-index 147257d6a2..548fada1c7 100644
+index 77331ce652..545799c341 100644
@@ -126 +127 @@
-@@ -332,12 +332,17 @@ struct rte_eth_stats {
+@@ -331,13 +331,18 @@ struct rte_eth_stats {
@@ -131 +132 @@
--struct __rte_aligned(8) rte_eth_link { /**< aligned for atomic64 read/write */
+ struct rte_eth_link {
@@ -136 +137 @@
-+struct rte_eth_link {
+-} __rte_aligned(8);      /**< aligned for atomic64 read/write */
@@ -147 +148 @@
- };
++};
@@ -149,0 +151 @@
+  * Constants used in link management.

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

* patch 'net/vmxnet3: add missing register command' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (17 preceding siblings ...)
  2024-07-12 10:44 ` patch 'ethdev: fix strict aliasing in link up' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/af_packet: align Rx/Tx structs to cache line' " Xueming Li
                   ` (60 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Ronak Doshi; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=57d6e27ef584849a3759a26b9b9c891437ebdbda

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 57d6e27ef584849a3759a26b9b9c891437ebdbda Mon Sep 17 00:00:00 2001
From: Ronak Doshi <ronak.doshi@broadcom.com>
Date: Mon, 22 Apr 2024 11:10:50 -0700
Subject: [PATCH] net/vmxnet3: add missing register command
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5296276e4b86db7d3a77ac5788d15fbc8406d501 ]

vmxnet3 uses capability registers to advertise the supported
capabilities of UPT device. It uses DCR0_REG command register for this
purpose.
However, the register command enum misses one command which technically
is not used by dpdk vmxnet3 driver yet.

This can cause issue for commands added later.
For example, DCR0_REG and MAX_CAPABILITIES register commands when issued
will lead to incorrect command being executed in the hypervisor. The
return values can be unexpected and can result in some capabilities
being disabled and affect vnics requesting Uniform Passthroguh (UPT)
mode.

This patch fixes this issue by adding a reserved command in its place.

Fixes: 5241d61bd865 ("net/vmxnet3: support capability registers")

Signed-off-by: Ronak Doshi <ronak.doshi@broadcom.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                                | 2 +-
 drivers/net/vmxnet3/base/vmxnet3_defs.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index c6bf385a59..db6bc47117 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1216,7 +1216,7 @@ Roman Kapl <rka@sysgo.com>
 Roman Korynkevych <romanx.korynkevych@intel.com>
 Roman Storozhenko <roman.storozhenko@intel.com>
 Roman Zhukov <roman.zhukov@arknetworks.am> <roman.zhukov@oktetlabs.ru>
-Ronak Doshi <doshir@vmware.com>
+Ronak Doshi <ronak.doshi@broadcom.com> <doshir@vmware.com>
 Ron Beider <rbeider@amazon.com>
 Ronghua Zhang <rzhang@vmware.com>
 RongQiang Xie <xie.rongqiang@zte.com.cn>
diff --git a/drivers/net/vmxnet3/base/vmxnet3_defs.h b/drivers/net/vmxnet3/base/vmxnet3_defs.h
index 24c235876e..a6bb281d8d 100644
--- a/drivers/net/vmxnet3/base/vmxnet3_defs.h
+++ b/drivers/net/vmxnet3/base/vmxnet3_defs.h
@@ -126,6 +126,7 @@ typedef enum {
    VMXNET3_CMD_RESERVED7,
    VMXNET3_CMD_RESERVED8,
    VMXNET3_CMD_GET_MAX_QUEUES_CONF,
+   VMXNET3_CMD_RESERVED11,
    VMXNET3_CMD_GET_MAX_CAPABILITIES,
    VMXNET3_CMD_GET_DCR0_REG,
 } Vmxnet3_Cmd;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.167873900 +0800
+++ 0019-net-vmxnet3-add-missing-register-command.patch	2024-07-12 18:40:13.966594244 +0800
@@ -1 +1 @@
-From 5296276e4b86db7d3a77ac5788d15fbc8406d501 Mon Sep 17 00:00:00 2001
+From 57d6e27ef584849a3759a26b9b9c891437ebdbda Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5296276e4b86db7d3a77ac5788d15fbc8406d501 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index de326949c4..cb8d65bf0e 100644
+index c6bf385a59..db6bc47117 100644
@@ -35 +37 @@
-@@ -1229,7 +1229,7 @@ Roman Kapl <rka@sysgo.com>
+@@ -1216,7 +1216,7 @@ Roman Kapl <rka@sysgo.com>

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

* patch 'net/af_packet: align Rx/Tx structs to cache line' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (18 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/vmxnet3: add missing register command' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'doc: fix testpmd ring size command' " Xueming Li
                   ` (59 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Mattias Rönnblom
  Cc: Morten Brørup, Stephen Hemminger, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=01c5355b2b130803b4299c783f5157339e88dd24

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 01c5355b2b130803b4299c783f5157339e88dd24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Fri, 26 Apr 2024 11:05:02 +0200
Subject: [PATCH] net/af_packet: align Rx/Tx structs to cache line
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c ]

Cache align Rx and Tx queue struct to avoid false sharing.

The RX struct happens to be 64 bytes on x86_64 already, so cache
alignment has no effect there, but it does on 32-bit ISAs.

The TX struct is 56 bytes on x86_64.

Both structs keep counters, and in the RX case they are updated even
for empty polls.

Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 397a32db58..6b7b16f348 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -6,6 +6,7 @@
  * All rights reserved.
  */
 
+#include <rte_common.h>
 #include <rte_string_fns.h>
 #include <rte_mbuf.h>
 #include <ethdev_driver.h>
@@ -39,7 +40,7 @@
 #define DFLT_FRAME_SIZE		(1 << 11)
 #define DFLT_FRAME_COUNT	(1 << 9)
 
-struct pkt_rx_queue {
+struct __rte_cache_aligned pkt_rx_queue {
 	int sockfd;
 
 	struct iovec *rd;
@@ -55,7 +56,7 @@ struct pkt_rx_queue {
 	volatile unsigned long rx_bytes;
 };
 
-struct pkt_tx_queue {
+struct __rte_cache_aligned pkt_tx_queue {
 	int sockfd;
 	unsigned int frame_data_size;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.213393394 +0800
+++ 0020-net-af_packet-align-Rx-Tx-structs-to-cache-line.patch	2024-07-12 18:40:13.966594244 +0800
@@ -1 +1 @@
-From c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c Mon Sep 17 00:00:00 2001
+From 01c5355b2b130803b4299c783f5157339e88dd24 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org

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

* patch 'doc: fix testpmd ring size command' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (19 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/af_packet: align Rx/Tx structs to cache line' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/af_xdp: fix port ID in Rx mbuf' " Xueming Li
                   ` (58 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c707e03a43faffaf58483bb27ef5a49caf79f145

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c707e03a43faffaf58483bb27ef5a49caf79f145 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 3 May 2024 09:51:29 +0100
Subject: [PATCH] doc: fix testpmd ring size command
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7a30ea42fb6ef979768d39fc4e1dec7e2d9efe0d ]

The documentation is missing the 'config' word.

In app, 'help ports' shows the correct syntax:

port config (port_id) (rxq|txq) (queue_id) ring_size (value)

Fixes: 1a77cffa8143 ("app/testpmd: enable queue ring size configure")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 447e28e694..547b4dc0dc 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2033,7 +2033,7 @@ port config - queue ring size
 
 Configure a rx/tx queue ring size::
 
-   testpmd> port (port_id) (rxq|txq) (queue_id) ring_size (value)
+   testpmd> port config (port_id) (rxq|txq) (queue_id) ring_size (value)
 
 Only take effect after command that (re-)start the port or command that setup specific queue.
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.247844890 +0800
+++ 0021-doc-fix-testpmd-ring-size-command.patch	2024-07-12 18:40:13.966594244 +0800
@@ -1 +1 @@
-From 7a30ea42fb6ef979768d39fc4e1dec7e2d9efe0d Mon Sep 17 00:00:00 2001
+From c707e03a43faffaf58483bb27ef5a49caf79f145 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7a30ea42fb6ef979768d39fc4e1dec7e2d9efe0d ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 2fbf9220d8..ecd040504e 100644
+index 447e28e694..547b4dc0dc 100644
@@ -25 +27 @@
-@@ -2032,7 +2032,7 @@ port config - queue ring size
+@@ -2033,7 +2033,7 @@ port config - queue ring size

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

* patch 'net/af_xdp: fix port ID in Rx mbuf' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (20 preceding siblings ...)
  2024-07-12 10:44 ` patch 'doc: fix testpmd ring size command' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/af_xdp: count mbuf allocation failures' " Xueming Li
                   ` (57 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: Stephen Hemminger, Maryam Tahhan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=19c5590927871df0eb265404d003016fdedf22c5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 19c5590927871df0eb265404d003016fdedf22c5 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Tue, 14 May 2024 08:41:52 +0000
Subject: [PATCH] net/af_xdp: fix port ID in Rx mbuf
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9bab1d2667aec4942ae1d384671e5148960bd88f ]

Record the port id in the af_xdp rx queue structure and use it
to set the port id of the mbuf of a received packed.

Bugzilla ID: 1428
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Maryam Tahhan <mtahhan@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index dea3bab983..539bfd76e1 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -132,6 +132,7 @@ struct pkt_rx_queue {
 	struct xsk_umem_info *umem;
 	struct xsk_socket *xsk;
 	struct rte_mempool *mb_pool;
+	uint16_t port;
 
 	struct rx_stats stats;
 
@@ -364,6 +365,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		bufs[i]->data_off = offset - sizeof(struct rte_mbuf) -
 			rte_pktmbuf_priv_size(umem->mb_pool) -
 			umem->mb_pool->header_size;
+		bufs[i]->port = rxq->port;
 
 		rte_pktmbuf_pkt_len(bufs[i]) = len;
 		rte_pktmbuf_data_len(bufs[i]) = len;
@@ -430,6 +432,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		rte_pktmbuf_data_len(mbufs[i]) = len;
 		rx_bytes += len;
 		bufs[i] = mbufs[i];
+		bufs[i]->port = rxq->port;
 	}
 
 	xsk_ring_cons__release(rx, nb_pkts);
@@ -1783,6 +1786,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
 
 	process_private->rxq_xsk_fds[rx_queue_id] = rxq->fds[0].fd;
 
+	rxq->port = dev->data->port_id;
+
 	dev->data->rx_queues[rx_queue_id] = rxq;
 	return 0;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.283999986 +0800
+++ 0022-net-af_xdp-fix-port-ID-in-Rx-mbuf.patch	2024-07-12 18:40:13.976594243 +0800
@@ -1 +1 @@
-From 9bab1d2667aec4942ae1d384671e5148960bd88f Mon Sep 17 00:00:00 2001
+From 19c5590927871df0eb265404d003016fdedf22c5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9bab1d2667aec4942ae1d384671e5148960bd88f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 2d6f64337e..0997543ee5 100644
+index dea3bab983..539bfd76e1 100644
@@ -25 +27 @@
-@@ -133,6 +133,7 @@ struct pkt_rx_queue {
+@@ -132,6 +132,7 @@ struct pkt_rx_queue {
@@ -33 +35 @@
-@@ -368,6 +369,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -364,6 +365,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -41 +43 @@
-@@ -434,6 +436,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -430,6 +432,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -49 +51 @@
-@@ -1813,6 +1816,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -1783,6 +1786,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,

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

* patch 'net/af_xdp: count mbuf allocation failures' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (21 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/af_xdp: fix port ID in Rx mbuf' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/af_xdp: fix stats reset' " Xueming Li
                   ` (56 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=00d025dc224497dca97616a6fbeda163da05fed8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 00d025dc224497dca97616a6fbeda163da05fed8 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Tue, 14 May 2024 08:41:53 +0000
Subject: [PATCH] net/af_xdp: count mbuf allocation failures
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f294405ab98594aa41269507dde95cc89bb20a61 ]

Failures to allocate mbufs in the receive path were not being
accounted for in the ethdev statistics. Fix this.

Bugzilla ID: 1429
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 539bfd76e1..73fc434ee3 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -316,6 +316,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	unsigned long rx_bytes = 0;
 	int i;
 	struct rte_mbuf *fq_bufs[ETH_AF_XDP_RX_BATCH_SIZE];
+	struct rte_eth_dev *dev = &rte_eth_devices[rxq->port];
 
 	nb_pkts = xsk_ring_cons__peek(rx, nb_pkts, &idx_rx);
 
@@ -343,6 +344,8 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		 * xsk_ring_cons__peek
 		 */
 		rx->cached_cons -= nb_pkts;
+		dev->data->rx_mbuf_alloc_failed += nb_pkts;
+
 		return 0;
 	}
 
@@ -394,6 +397,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	int i;
 	uint32_t free_thresh = fq->size >> 1;
 	struct rte_mbuf *mbufs[ETH_AF_XDP_RX_BATCH_SIZE];
+	struct rte_eth_dev *dev = &rte_eth_devices[rxq->port];
 
 	if (xsk_prod_nb_free(fq, free_thresh) >= free_thresh)
 		(void)reserve_fill_queue(umem, nb_pkts, NULL, fq);
@@ -412,6 +416,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		 * xsk_ring_cons__peek
 		 */
 		rx->cached_cons -= nb_pkts;
+		dev->data->rx_mbuf_alloc_failed += nb_pkts;
 		return 0;
 	}
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.324492881 +0800
+++ 0023-net-af_xdp-count-mbuf-allocation-failures.patch	2024-07-12 18:40:13.976594243 +0800
@@ -1 +1 @@
-From f294405ab98594aa41269507dde95cc89bb20a61 Mon Sep 17 00:00:00 2001
+From 00d025dc224497dca97616a6fbeda163da05fed8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f294405ab98594aa41269507dde95cc89bb20a61 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 0997543ee5..0db761a204 100644
+index 539bfd76e1..73fc434ee3 100644
@@ -24 +26 @@
-@@ -320,6 +320,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -316,6 +316,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -32 +34 @@
-@@ -347,6 +348,8 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -343,6 +344,8 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -41 +43 @@
-@@ -398,6 +401,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -394,6 +397,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -49 +51 @@
-@@ -416,6 +420,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -412,6 +416,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)

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

* patch 'net/af_xdp: fix stats reset' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (22 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/af_xdp: count mbuf allocation failures' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/af_xdp: remove unused local statistic' " Xueming Li
                   ` (55 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: Stephen Hemminger, Maryam Tahhan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f3cafbb257888e72cdc95b777ff2256772bb8e95

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f3cafbb257888e72cdc95b777ff2256772bb8e95 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Tue, 14 May 2024 08:41:54 +0000
Subject: [PATCH] net/af_xdp: fix stats reset
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3577b1ee97dcfe9ff1b9e050bed55f17c435a93d ]

The imissed statistic was not properly reset because it was
read directly from the kernel statistics. To fix this, take note
of the kernel statistic when the stats are reset and deduct this
value from the kernel statistic read during statistics get.

Bugzilla ID: 1430
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Maryam Tahhan <mtahhan@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 73fc434ee3..57759e2301 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -125,6 +125,7 @@ struct rx_stats {
 	uint64_t rx_pkts;
 	uint64_t rx_bytes;
 	uint64_t rx_dropped;
+	uint64_t imissed_offset;
 };
 
 struct pkt_rx_queue {
@@ -888,7 +889,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			AF_XDP_LOG(ERR, "getsockopt() failed for XDP_STATISTICS.\n");
 			return -1;
 		}
-		stats->imissed += xdp_stats.rx_dropped;
+		stats->imissed += xdp_stats.rx_dropped - rxq->stats.imissed_offset;
 
 		stats->opackets += stats->q_opackets[i];
 		stats->obytes += stats->q_obytes[i];
@@ -901,13 +902,25 @@ static int
 eth_stats_reset(struct rte_eth_dev *dev)
 {
 	struct pmd_internals *internals = dev->data->dev_private;
-	int i;
+	struct pmd_process_private *process_private = dev->process_private;
+	struct xdp_statistics xdp_stats;
+	socklen_t optlen;
+	int i, ret, fd;
 
 	for (i = 0; i < internals->queue_cnt; i++) {
 		memset(&internals->rx_queues[i].stats, 0,
 					sizeof(struct rx_stats));
 		memset(&internals->tx_queues[i].stats, 0,
 					sizeof(struct tx_stats));
+		fd = process_private->rxq_xsk_fds[i];
+		optlen = sizeof(struct xdp_statistics);
+		ret = fd >= 0 ? getsockopt(fd, SOL_XDP, XDP_STATISTICS,
+					   &xdp_stats, &optlen) : -1;
+		if (ret != 0) {
+			AF_XDP_LOG(ERR, "getsockopt() failed for XDP_STATISTICS.\n");
+			return -1;
+		}
+		internals->rx_queues[i].stats.imissed_offset = xdp_stats.rx_dropped;
 	}
 
 	return 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.361760376 +0800
+++ 0024-net-af_xdp-fix-stats-reset.patch	2024-07-12 18:40:13.976594243 +0800
@@ -1 +1 @@
-From 3577b1ee97dcfe9ff1b9e050bed55f17c435a93d Mon Sep 17 00:00:00 2001
+From f3cafbb257888e72cdc95b777ff2256772bb8e95 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3577b1ee97dcfe9ff1b9e050bed55f17c435a93d ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 0db761a204..25e67851f6 100644
+index 73fc434ee3..57759e2301 100644
@@ -27 +29 @@
-@@ -126,6 +126,7 @@ struct rx_stats {
+@@ -125,6 +125,7 @@ struct rx_stats {
@@ -35 +37 @@
-@@ -892,7 +893,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -888,7 +889,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -44 +46 @@
-@@ -905,13 +906,25 @@ static int
+@@ -901,13 +902,25 @@ static int

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

* patch 'net/af_xdp: remove unused local statistic' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (23 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/af_xdp: fix stats reset' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/nfp: fix resource leak in secondary process' " Xueming Li
                   ` (54 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a8b99ca72bb63a2a32a524c290cd3e224dddc4b9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a8b99ca72bb63a2a32a524c290cd3e224dddc4b9 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Tue, 14 May 2024 08:41:55 +0000
Subject: [PATCH] net/af_xdp: remove unused local statistic
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit abdabad636a54660f4a260e1e9dc573900582bd4 ]

The rx_dropped statistic is never incremented so its existence
is pointless. Remove it.

Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 57759e2301..74f750dbb3 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -124,7 +124,6 @@ struct xsk_umem_info {
 struct rx_stats {
 	uint64_t rx_pkts;
 	uint64_t rx_bytes;
-	uint64_t rx_dropped;
 	uint64_t imissed_offset;
 };
 
@@ -880,7 +879,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 
 		stats->ipackets += stats->q_ipackets[i];
 		stats->ibytes += stats->q_ibytes[i];
-		stats->imissed += rxq->stats.rx_dropped;
 		stats->oerrors += txq->stats.tx_dropped;
 		fd = process_private->rxq_xsk_fds[i];
 		ret = fd >= 0 ? getsockopt(fd, SOL_XDP, XDP_STATISTICS,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.403713471 +0800
+++ 0025-net-af_xdp-remove-unused-local-statistic.patch	2024-07-12 18:40:13.986594241 +0800
@@ -1 +1 @@
-From abdabad636a54660f4a260e1e9dc573900582bd4 Mon Sep 17 00:00:00 2001
+From a8b99ca72bb63a2a32a524c290cd3e224dddc4b9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit abdabad636a54660f4a260e1e9dc573900582bd4 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 25e67851f6..4b282adb03 100644
+index 57759e2301..74f750dbb3 100644
@@ -23 +25 @@
-@@ -125,7 +125,6 @@ struct xsk_umem_info {
+@@ -124,7 +124,6 @@ struct xsk_umem_info {
@@ -31 +33 @@
-@@ -884,7 +883,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -880,7 +879,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)

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

* patch 'net/nfp: fix resource leak in secondary process' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (24 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/af_xdp: remove unused local statistic' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/nfp: fix configuration BAR' " Xueming Li
                   ` (53 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=57fc3f569eb0478ac4a151fa001798b47d580b24

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 57fc3f569eb0478ac4a151fa001798b47d580b24 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Fri, 19 Apr 2024 13:23:42 +0800
Subject: [PATCH] net/nfp: fix resource leak in secondary process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit db8150de1557ff9abd50de22d63723d7cfe3a297 ]

Fix one resource leak problem in the abnormal logic of secondary process.

Fixes: 016141b18b3a ("net/nfp: refactor secondary process probe")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 7baacd18b0..e632051d42 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -1509,7 +1509,7 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 	if (sym_tbl == NULL) {
 		PMD_INIT_LOG(ERR, "Something is wrong with the firmware symbol table");
 		ret = -EIO;
-		goto pf_cleanup;
+		goto cpp_cleanup;
 	}
 
 	/* Read the app ID of the firmware loaded */
@@ -1556,6 +1556,8 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 
 sym_tbl_cleanup:
 	free(sym_tbl);
+cpp_cleanup:
+	nfp_cpp_free(cpp);
 pf_cleanup:
 	rte_free(pf_dev);
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.435480667 +0800
+++ 0026-net-nfp-fix-resource-leak-in-secondary-process.patch	2024-07-12 18:40:13.986594241 +0800
@@ -1 +1 @@
-From db8150de1557ff9abd50de22d63723d7cfe3a297 Mon Sep 17 00:00:00 2001
+From 57fc3f569eb0478ac4a151fa001798b47d580b24 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit db8150de1557ff9abd50de22d63723d7cfe3a297 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index b711e15b9f..98d8e87028 100644
+index 7baacd18b0..e632051d42 100644
@@ -22 +24 @@
-@@ -2123,7 +2123,7 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
+@@ -1509,7 +1509,7 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
@@ -26 +28 @@
--		goto sync_free;
+-		goto pf_cleanup;
@@ -31 +33 @@
-@@ -2171,6 +2171,8 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
+@@ -1556,6 +1556,8 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
@@ -37,2 +38,0 @@
- sync_free:
- 	nfp_sync_free(sync);
@@ -39,0 +40,2 @@
+ 	rte_free(pf_dev);
+ 

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

* patch 'net/nfp: fix configuration BAR' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (25 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/nfp: fix resource leak in secondary process' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/tap: fix file descriptor check in isolated flow' " Xueming Li
                   ` (52 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a683a82c9836e74b15bbaeca69d72807575b30d0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a683a82c9836e74b15bbaeca69d72807575b30d0 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Fri, 19 Apr 2024 13:23:43 +0800
Subject: [PATCH] net/nfp: fix configuration BAR
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit debb9e735adb1bccb2f75ee1372ea2e6c6b20673 ]

All the configuration bars are sit in an array, and the initial logic
sort all the configuration BAR from small to large based on size and
index, which result all valid bars are behind the invalid bars.
But the BAR alloc logic search this array from the very beginning and
only try limited times (equal to the valid bars number).
It's ok for primary process because which has enough valid bars, and
finally it can find one to use.

But for secondary process and run with igb_uio driver, the valid bars
are very limit, and it can not find one, and the logic will fail.

Fix this by drop the sort logic, and search the bar array from the end
to begin.

Fixes: 1fbe51cd9c3a ("net/nfp: extend usage of BAR from 8 to 24")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfpcore/nfp6000_pcie.c | 34 +++++++++-----------------
 1 file changed, 11 insertions(+), 23 deletions(-)

diff --git a/drivers/net/nfp/nfpcore/nfp6000_pcie.c b/drivers/net/nfp/nfpcore/nfp6000_pcie.c
index a6fd89b6c8..ef1ffd6d01 100644
--- a/drivers/net/nfp/nfpcore/nfp6000_pcie.c
+++ b/drivers/net/nfp/nfpcore/nfp6000_pcie.c
@@ -263,19 +263,6 @@ nfp_bitsize_calc(uint64_t mask)
 	return bit_size;
 }
 
-static int
-nfp_cmp_bars(const void *ptr_a,
-		const void *ptr_b)
-{
-	const struct nfp_bar *a = ptr_a;
-	const struct nfp_bar *b = ptr_b;
-
-	if (a->bitsize == b->bitsize)
-		return a->index - b->index;
-	else
-		return a->bitsize - b->bitsize;
-}
-
 static bool
 nfp_bars_for_secondary(uint32_t index)
 {
@@ -383,9 +370,6 @@ nfp_enable_bars(struct nfp_pcie_user *nfp)
 	if (nfp_bar_write(nfp, bar, barcfg_msix_general) < 0)
 		return -EIO;
 
-	/* Sort bars by bit size - use the smallest possible first. */
-	qsort(&nfp->bar[0], nfp->bars, sizeof(nfp->bar[0]), nfp_cmp_bars);
-
 	return 0;
 }
 
@@ -466,16 +450,18 @@ find_matching_bar(struct nfp_pcie_user *nfp,
 		int width)
 {
 	uint32_t n;
+	uint32_t index;
 
-	for (n = 0; n < nfp->bars; n++) {
-		struct nfp_bar *bar = &nfp->bar[n];
+	for (n = RTE_DIM(nfp->bar) ; n > 0; n--) {
+		index = n - 1;
+		struct nfp_bar *bar = &nfp->bar[index];
 
 		if (bar->lock)
 			continue;
 
 		if (matching_bar_exist(bar, target, action, token,
 				offset, size, width))
-			return n;
+			return index;
 	}
 
 	return -1;
@@ -493,10 +479,12 @@ find_unused_bar_noblock(struct nfp_pcie_user *nfp,
 {
 	int ret;
 	uint32_t n;
+	uint32_t index;
 	const struct nfp_bar *bar;
 
-	for (n = 0; n < nfp->bars; n++) {
-		bar = &nfp->bar[n];
+	for (n = RTE_DIM(nfp->bar); n > 0; n--) {
+		index = n - 1;
+		bar = &nfp->bar[index];
 
 		if (bar->bitsize == 0)
 			continue;
@@ -508,7 +496,7 @@ find_unused_bar_noblock(struct nfp_pcie_user *nfp,
 			continue;
 
 		if (!bar->lock)
-			return n;
+			return index;
 	}
 
 	return -EAGAIN;
@@ -561,7 +549,7 @@ nfp_disable_bars(struct nfp_pcie_user *nfp)
 	uint32_t i;
 	struct nfp_bar *bar;
 
-	for (i = 0; i < nfp->bars; i++) {
+	for (i = 0; i < RTE_DIM(nfp->bar); i++) {
 		bar = &nfp->bar[i];
 		if (bar->iomem != NULL) {
 			bar->iomem = NULL;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.468468363 +0800
+++ 0027-net-nfp-fix-configuration-BAR.patch	2024-07-12 18:40:13.986594241 +0800
@@ -1 +1 @@
-From debb9e735adb1bccb2f75ee1372ea2e6c6b20673 Mon Sep 17 00:00:00 2001
+From a683a82c9836e74b15bbaeca69d72807575b30d0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit debb9e735adb1bccb2f75ee1372ea2e6c6b20673 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/tap: fix file descriptor check in isolated flow' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (26 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/nfp: fix configuration BAR' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' " Xueming Li
                   ` (51 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=92d455764ca76de41a9d148838c6eb2eb1bd6579

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 92d455764ca76de41a9d148838c6eb2eb1bd6579 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 21 May 2024 13:12:46 -0700
Subject: [PATCH] net/tap: fix file descriptor check in isolated flow
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e9e6089a41c275f3dcd7491f4df903a284653bb9 ]

The check for receive queue FD in flow_isolate is incorrect.
If queue has not been setup then FD will be -1 not 0.

Fixes: f503d2694825 ("net/tap: support flow API isolated mode")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/tap/tap_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index fa50fe45d7..79cd6a12ca 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -1595,7 +1595,7 @@ tap_flow_isolate(struct rte_eth_dev *dev,
 	 * If netdevice is there, setup appropriate flow rules immediately.
 	 * Otherwise it will be set when bringing up the netdevice (tun_alloc).
 	 */
-	if (!process_private->rxq_fds[0])
+	if (process_private->rxq_fds[0] == -1)
 		return 0;
 	if (set) {
 		struct rte_flow *remote_flow;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.500910360 +0800
+++ 0028-net-tap-fix-file-descriptor-check-in-isolated-flow.patch	2024-07-12 18:40:13.986594241 +0800
@@ -1 +1 @@
-From e9e6089a41c275f3dcd7491f4df903a284653bb9 Mon Sep 17 00:00:00 2001
+From 92d455764ca76de41a9d148838c6eb2eb1bd6579 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e9e6089a41c275f3dcd7491f4df903a284653bb9 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (27 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/tap: fix file descriptor check in isolated flow' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: reset link when link never comes back' " Xueming Li
                   ` (50 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e04e7fb18d286d57f50ee3a11d14cfceffb99c2e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e04e7fb18d286d57f50ee3a11d14cfceffb99c2e Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:33 +0530
Subject: [PATCH] net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d06394d2641e3fdc0538a23354d9ff7c5aa9b277 ]

The XGBE supports performing MDIO operations using an MDIO command
request. The driver mistakenly uses the mdio port address as the
MDIO command request device address instead of the MDIO command
request port address. Additionally, the driver does not properly check
for and create a clause 45 MDIO command

Without the fix PHY device is not detected and can't be usable.

Check the supplied MDIO register to determine if the request is a clause
45 operation (MII_ADDR_C45). For a clause 45 operation, extract device
address and register number from the supplied MDIO register and use them
to set the MDIO command request device address and register number
fields. For a clause 22 operation, the MDIO request device address is
set to zero and the MDIO command request register number is set to the
supplied MDIO register. In either case, the supplied MDIO port address
is used as the MDIO command request port address.

Fixes: 4ac7516b8b39 ("net/axgbe: add phy init and related APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_common.h |  2 --
 drivers/net/axgbe/axgbe_dev.c    | 22 ++++++++++++++++------
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h
index a5d11c5832..51532fb34a 100644
--- a/drivers/net/axgbe/axgbe_common.h
+++ b/drivers/net/axgbe/axgbe_common.h
@@ -407,8 +407,6 @@
 #define MAC_MDIOSCAR_PA_WIDTH		5
 #define MAC_MDIOSCAR_RA_INDEX		0
 #define MAC_MDIOSCAR_RA_WIDTH		16
-#define MAC_MDIOSCAR_REG_INDEX		0
-#define MAC_MDIOSCAR_REG_WIDTH		21
 #define MAC_MDIOSCCDR_BUSY_INDEX	22
 #define MAC_MDIOSCCDR_BUSY_WIDTH	1
 #define MAC_MDIOSCCDR_CMD_INDEX		16
diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c
index 6a7fddffca..3389954aa6 100644
--- a/drivers/net/axgbe/axgbe_dev.c
+++ b/drivers/net/axgbe/axgbe_dev.c
@@ -63,15 +63,27 @@ static int mdio_complete(struct axgbe_port *pdata)
 	return 0;
 }
 
+static unsigned int axgbe_create_mdio_sca(int port, int reg)
+{
+	unsigned int mdio_sca, da;
+
+	da = (reg & MII_ADDR_C45) ? reg >> 16 : 0;
+
+	mdio_sca = 0;
+	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, RA, reg);
+	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, PA, port);
+	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, DA, da);
+
+	return mdio_sca;
+}
+
 static int axgbe_write_ext_mii_regs(struct axgbe_port *pdata, int addr,
 				    int reg, u16 val)
 {
 	unsigned int mdio_sca, mdio_sccd;
 	uint64_t timeout;
 
-	mdio_sca = 0;
-	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, REG, reg);
-	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, DA, addr);
+	mdio_sca = axgbe_create_mdio_sca(addr, reg);
 	AXGMAC_IOWRITE(pdata, MAC_MDIOSCAR, mdio_sca);
 
 	mdio_sccd = 0;
@@ -97,9 +109,7 @@ static int axgbe_read_ext_mii_regs(struct axgbe_port *pdata, int addr,
 	unsigned int mdio_sca, mdio_sccd;
 	uint64_t timeout;
 
-	mdio_sca = 0;
-	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, REG, reg);
-	AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, DA, addr);
+	mdio_sca = axgbe_create_mdio_sca(addr, reg);
 	AXGMAC_IOWRITE(pdata, MAC_MDIOSCAR, mdio_sca);
 
 	mdio_sccd = 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.536784355 +0800
+++ 0029-net-axgbe-fix-MDIO-access-for-non-zero-ports-and-CL4.patch	2024-07-12 18:40:13.986594241 +0800
@@ -1 +1 @@
-From d06394d2641e3fdc0538a23354d9ff7c5aa9b277 Mon Sep 17 00:00:00 2001
+From e04e7fb18d286d57f50ee3a11d14cfceffb99c2e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d06394d2641e3fdc0538a23354d9ff7c5aa9b277 ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/axgbe: reset link when link never comes back' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (28 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' " Xueming Li
                   ` (49 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=1392a3469283f3e2dc6753d4d02761f1979a5047

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1392a3469283f3e2dc6753d4d02761f1979a5047 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:34 +0530
Subject: [PATCH] net/axgbe: reset link when link never comes back
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit edf463256dd35803aaa11b0da704a0542ad20071 ]

Normally, auto negotiation and reconnect should be automatically done by
the hardware. But there seems to be an issue where auto negotiation has
to be restarted manually. This happens because of link training and so
even though still connected to the partner the link never "comes back".
This needs an auto-negotiation restart.

Without the fix the user will not see the link up status

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_mdio.c     | 2 +-
 drivers/net/axgbe/axgbe_phy_impl.c | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index 913ceada0d..b03bc471cb 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -1051,7 +1051,7 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
 							     &an_restart);
 	if (an_restart) {
 		axgbe_phy_config_aneg(pdata);
-		return;
+		goto adjust_link;
 	}
 
 	if (pdata->phy.link) {
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index d97fbbfddd..87795c63c9 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -1697,6 +1697,13 @@ static int axgbe_phy_link_status(struct axgbe_port *pdata, int *an_restart)
 	if (reg & MDIO_STAT1_LSTATUS)
 		return 1;
 
+	if (pdata->phy.autoneg == AUTONEG_ENABLE &&
+			phy_data->port_mode == AXGBE_PORT_MODE_BACKPLANE) {
+		if (rte_bit_relaxed_get32(AXGBE_LINK_INIT, &pdata->dev_state)) {
+			*an_restart = 1;
+		}
+	}
+
 	/* No link, attempt a receiver reset cycle */
 	if (phy_data->rrc_count++) {
 		phy_data->rrc_count = 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.573039251 +0800
+++ 0030-net-axgbe-reset-link-when-link-never-comes-back.patch	2024-07-12 18:40:13.996594240 +0800
@@ -1 +1 @@
-From edf463256dd35803aaa11b0da704a0542ad20071 Mon Sep 17 00:00:00 2001
+From 1392a3469283f3e2dc6753d4d02761f1979a5047 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit edf463256dd35803aaa11b0da704a0542ad20071 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -38 +40 @@
-index 44ff28517c..54fe9faae0 100644
+index d97fbbfddd..87795c63c9 100644

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

* patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (29 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: reset link when link never comes back' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: update DMA coherency values' " Xueming Li
                   ` (48 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5f0956a06c3afc43c3dc8477ba81d10a25be37f6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5f0956a06c3afc43c3dc8477ba81d10a25be37f6 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:35 +0530
Subject: [PATCH] net/axgbe: fix fluctuations for 1G Bel Fuse SFP
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3abfda0f7d58b2eef20cdf8e102825678b150421 ]

Frequent link up/down events can happen when a Bel Fuse SFP part is
connected to the amd-xgbe device. Try to avoid the frequent link
issues by resetting the PHY as documented in Bel Fuse SFP datasheet.

Without the fix user will see continuous port link up and down.

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 87795c63c9..8f8845a1c5 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -578,6 +578,9 @@ static bool axgbe_phy_belfuse_parse_quirks(struct axgbe_port *pdata)
 		   AXGBE_BEL_FUSE_VENDOR, strlen(AXGBE_BEL_FUSE_VENDOR)))
 		return false;
 
+	/* Reset PHY - wait for self-clearing reset bit to clear */
+	pdata->phy_if.phy_impl.reset(pdata);
+
 	if (!memcmp(&sfp_eeprom->base[AXGBE_SFP_BASE_VENDOR_PN],
 		    AXGBE_BEL_FUSE_PARTNO, strlen(AXGBE_BEL_FUSE_PARTNO))) {
 		phy_data->sfp_base = AXGBE_SFP_BASE_1000_SX;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.625282745 +0800
+++ 0031-net-axgbe-fix-fluctuations-for-1G-Bel-Fuse-SFP.patch	2024-07-12 18:40:13.996594240 +0800
@@ -1 +1 @@
-From 3abfda0f7d58b2eef20cdf8e102825678b150421 Mon Sep 17 00:00:00 2001
+From 5f0956a06c3afc43c3dc8477ba81d10a25be37f6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3abfda0f7d58b2eef20cdf8e102825678b150421 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 54fe9faae0..ee9dcbe3da 100644
+index 87795c63c9..8f8845a1c5 100644

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

* patch 'net/axgbe: update DMA coherency values' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (30 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: disable interrupts during device removal' " Xueming Li
                   ` (47 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6e513a76459b898dbec2fe00c5a455eb05b02bd8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6e513a76459b898dbec2fe00c5a455eb05b02bd8 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:36 +0530
Subject: [PATCH] net/axgbe: update DMA coherency values
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4e6d9f193d4fe5639a856cdb2dd0aa4a8726fe99 ]

Based on the IOMMU configuration, the current cache control settings can
result in possible coherency issues. The hardware team has recommended
new settings for the PCI device path to eliminate the issue.

Without the fix the user will get incorrect data in TSO functionality

Fixes: 7c4158a5b592 ("net/axgbe: add DMA programming and start/stop")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_dev.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c
index 3389954aa6..9b0073eea6 100644
--- a/drivers/net/axgbe/axgbe_dev.c
+++ b/drivers/net/axgbe/axgbe_dev.c
@@ -647,23 +647,21 @@ static void axgbe_config_dma_cache(struct axgbe_port *pdata)
 	unsigned int arcache, awcache, arwcache;
 
 	arcache = 0;
-	AXGMAC_SET_BITS(arcache, DMA_AXIARCR, DRC, 0x3);
+	AXGMAC_SET_BITS(arcache, DMA_AXIARCR, DRC, 0xf);
+	AXGMAC_SET_BITS(arcache, DMA_AXIARCR, TEC, 0xf);
+	AXGMAC_SET_BITS(arcache, DMA_AXIARCR, THC, 0xf);
 	AXGMAC_IOWRITE(pdata, DMA_AXIARCR, arcache);
 
 	awcache = 0;
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, DWC, 0x3);
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RPC, 0x3);
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RPD, 0x1);
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RHC, 0x3);
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RHD, 0x1);
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RDC, 0x3);
-	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RDD, 0x1);
+	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, DWC, 0xf);
+	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RPC, 0xf);
+	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RHC, 0xf);
+	AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RDC, 0xf);
 	AXGMAC_IOWRITE(pdata, DMA_AXIAWCR, awcache);
 
 	arwcache = 0;
-	AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, TDWD, 0x1);
-	AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, TDWC, 0x3);
-	AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, RDRC, 0x3);
+	AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, TDWC, 0xf);
+	AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, RDRC, 0xf);
 	AXGMAC_IOWRITE(pdata, DMA_AXIAWRCR, arwcache);
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.672883139 +0800
+++ 0032-net-axgbe-update-DMA-coherency-values.patch	2024-07-12 18:40:13.996594240 +0800
@@ -1 +1 @@
-From 4e6d9f193d4fe5639a856cdb2dd0aa4a8726fe99 Mon Sep 17 00:00:00 2001
+From 6e513a76459b898dbec2fe00c5a455eb05b02bd8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4e6d9f193d4fe5639a856cdb2dd0aa4a8726fe99 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/axgbe: disable interrupts during device removal' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (31 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: update DMA coherency values' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: disable RRC for yellow carp devices' " Xueming Li
                   ` (46 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b4a353a5e8abbe4b04c177821526a9ee58ebe3b4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b4a353a5e8abbe4b04c177821526a9ee58ebe3b4 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:37 +0530
Subject: [PATCH] net/axgbe: disable interrupts during device removal
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7b7288b08760204139085174ba00a2863dfdbbec ]

Hardware interrupts are enabled during the init, however, they are not
disabled during close.

Disable all hardware interrupts during close operation to avoid any
issues.

Fixes: 9e890103267e ("net/axgbe: add Rx/Tx setup")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index f174d46143..4a37d92699 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -2404,12 +2404,14 @@ static int
 axgbe_dev_close(struct rte_eth_dev *eth_dev)
 {
 	struct rte_pci_device *pci_dev;
+	struct axgbe_port *pdata;
 
 	PMD_INIT_FUNC_TRACE();
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
+	pdata = eth_dev->data->dev_private;
 	pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
 	axgbe_dev_clear_queues(eth_dev);
 
@@ -2419,6 +2421,9 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
 				     axgbe_dev_interrupt_handler,
 				     (void *)eth_dev);
 
+	/* Disable all interrupts in the hardware */
+	XP_IOWRITE(pdata, XP_INT_EN, 0x0);
+
 	return 0;
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.706903735 +0800
+++ 0033-net-axgbe-disable-interrupts-during-device-removal.patch	2024-07-12 18:40:13.996594240 +0800
@@ -1 +1 @@
-From 7b7288b08760204139085174ba00a2863dfdbbec Mon Sep 17 00:00:00 2001
+From b4a353a5e8abbe4b04c177821526a9ee58ebe3b4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7b7288b08760204139085174ba00a2863dfdbbec ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index dd681f15a0..e5d8f7db02 100644
+index f174d46143..4a37d92699 100644
@@ -25 +27 @@
-@@ -2411,12 +2411,14 @@ static int
+@@ -2404,12 +2404,14 @@ static int
@@ -40 +42 @@
-@@ -2426,6 +2428,9 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
+@@ -2419,6 +2421,9 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)

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

* patch 'net/axgbe: disable RRC for yellow carp devices' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (32 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: disable interrupts during device removal' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: enable PLL control for fixed PHY modes only' " Xueming Li
                   ` (45 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a3de80c9a145f97e86a3206e2864962f58ec22c1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a3de80c9a145f97e86a3206e2864962f58ec22c1 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:38 +0530
Subject: [PATCH] net/axgbe: disable RRC for yellow carp devices
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e82b0fe097da02eab8be924a28a0a4ca96bc3c69 ]

Link stability issues are noticed on Yellow carp platforms when Receiver
Reset Cycle is issued. Since the CDR workaround is disabled on these
platforms, the Receiver Reset Cycle is not needed.

So, avoid issuing rrc on Yellow carp platforms.

Without the fix the user will not get the link UP.

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_ethdev.c   | 5 +++++
 drivers/net/axgbe/axgbe_ethdev.h   | 1 +
 drivers/net/axgbe/axgbe_phy_impl.c | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 4a37d92699..6ce87f83f4 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -207,6 +207,7 @@ static struct axgbe_version_data axgbe_v2a = {
 	.ecc_support			= 1,
 	.i2c_support			= 1,
 	.an_cdr_workaround		= 1,
+	.enable_rrc			= 1,
 };
 
 static struct axgbe_version_data axgbe_v2b = {
@@ -219,6 +220,7 @@ static struct axgbe_version_data axgbe_v2b = {
 	.ecc_support			= 1,
 	.i2c_support			= 1,
 	.an_cdr_workaround		= 1,
+	.enable_rrc			= 1,
 };
 
 static const struct rte_eth_desc_lim rx_desc_lim = {
@@ -2267,6 +2269,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
 
 			/* Yellow Carp devices do not need cdr workaround */
 			pdata->vdata->an_cdr_workaround = 0;
+
+			/* Yellow Carp devices do not need rrc */
+			pdata->vdata->enable_rrc = 0;
 		} else {
 			unknown_cpu = 1;
 		}
diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h
index 7f19321d88..ae57aeaa00 100644
--- a/drivers/net/axgbe/axgbe_ethdev.h
+++ b/drivers/net/axgbe/axgbe_ethdev.h
@@ -463,6 +463,7 @@ struct axgbe_version_data {
 	unsigned int ecc_support;
 	unsigned int i2c_support;
 	unsigned int an_cdr_workaround;
+	unsigned int enable_rrc;
 };
 
 struct axgbe_mmc_stats {
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 8f8845a1c5..46ee5f0617 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -1708,7 +1708,7 @@ static int axgbe_phy_link_status(struct axgbe_port *pdata, int *an_restart)
 	}
 
 	/* No link, attempt a receiver reset cycle */
-	if (phy_data->rrc_count++) {
+	if (pdata->vdata->enable_rrc && phy_data->rrc_count++) {
 		phy_data->rrc_count = 0;
 		axgbe_phy_rrc(pdata);
 	}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.739296931 +0800
+++ 0034-net-axgbe-disable-RRC-for-yellow-carp-devices.patch	2024-07-12 18:40:14.006594239 +0800
@@ -1 +1 @@
-From e82b0fe097da02eab8be924a28a0a4ca96bc3c69 Mon Sep 17 00:00:00 2001
+From a3de80c9a145f97e86a3206e2864962f58ec22c1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e82b0fe097da02eab8be924a28a0a4ca96bc3c69 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index e5d8f7db02..86c2ec64e0 100644
+index 4a37d92699..6ce87f83f4 100644
@@ -29 +31 @@
-@@ -208,6 +208,7 @@ static struct axgbe_version_data axgbe_v2a = {
+@@ -207,6 +207,7 @@ static struct axgbe_version_data axgbe_v2a = {
@@ -37 +39 @@
-@@ -220,6 +221,7 @@ static struct axgbe_version_data axgbe_v2b = {
+@@ -219,6 +220,7 @@ static struct axgbe_version_data axgbe_v2b = {
@@ -45 +47 @@
-@@ -2269,6 +2271,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2267,6 +2269,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
@@ -56 +58 @@
-index df5d63c493..f122dfd516 100644
+index 7f19321d88..ae57aeaa00 100644
@@ -68 +70 @@
-index ee9dcbe3da..f51830f800 100644
+index 8f8845a1c5..46ee5f0617 100644

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

* patch 'net/axgbe: enable PLL control for fixed PHY modes only' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (33 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: disable RRC for yellow carp devices' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: fix SFP codes check for DAC cables' " Xueming Li
                   ` (44 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=92bc6bd0717bbb501a36721ade61da430c40c5ad

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 92bc6bd0717bbb501a36721ade61da430c40c5ad Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:39 +0530
Subject: [PATCH] net/axgbe: enable PLL control for fixed PHY modes only
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1c68b393b8ba05b6ddb321e3632d45fc1021ed96 ]

PLL control setting is needed only in fixed PHY configuration to
fix the peer-peer issues. Without the PLL control setting, the link up
takes longer time in a fixed PHY configuration.

Without the fix the user will not get the link come UP.

Driver implements SW RRC for Autoneg On configuration, hence PLL control
setting is not needed for AN On configuration, and can be skipped.

Also, PLL re-initialization is not needed for PHY Power Off and RRC
commands. Otherwise, they lead to mailbox errors. Added the changes
accordingly.

Fixes: 09b0a36cc7ae ("net/axgbe: toggle PLL settings during rate change")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 46ee5f0617..040176b8ef 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -1228,6 +1228,10 @@ static void axgbe_phy_rx_reset(struct axgbe_port *pdata)
 
 static void axgbe_phy_pll_ctrl(struct axgbe_port *pdata, bool enable)
 {
+	/* PLL_CTRL feature needs to be enabled for fixed PHY modes (Non-Autoneg) only */
+	if (pdata->phy.autoneg != AUTONEG_DISABLE)
+		return;
+
 	XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_VEND2_PMA_MISC_CTRL0,
 			XGBE_PMA_PLL_CTRL_MASK,
 			enable ? XGBE_PMA_PLL_CTRL_SET
@@ -1272,8 +1276,9 @@ static void axgbe_phy_perform_ratechange(struct axgbe_port *pdata,
 	axgbe_phy_rx_reset(pdata);
 
 reenable_pll:
-	 /* Re-enable the PLL control */
-	axgbe_phy_pll_ctrl(pdata, true);
+	/* Enable PLL re-initialization, not needed for PHY Power Off and RRC cmds */
+	if (cmd != 0 && cmd != 5)
+		axgbe_phy_pll_ctrl(pdata, true);
 
 	PMD_DRV_LOG(NOTICE, "firmware mailbox command did not complete\n");
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.773762827 +0800
+++ 0035-net-axgbe-enable-PLL-control-for-fixed-PHY-modes-onl.patch	2024-07-12 18:40:14.006594239 +0800
@@ -1 +1 @@
-From 1c68b393b8ba05b6ddb321e3632d45fc1021ed96 Mon Sep 17 00:00:00 2001
+From 92bc6bd0717bbb501a36721ade61da430c40c5ad Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1c68b393b8ba05b6ddb321e3632d45fc1021ed96 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index f51830f800..bcefbf28f2 100644
+index 46ee5f0617..040176b8ef 100644

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

* patch 'net/axgbe: fix SFP codes check for DAC cables' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (34 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: enable PLL control for fixed PHY modes only' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: fix connection for SFP+ active " Xueming Li
                   ` (43 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f8e2f1ea54dbc4020f462170622743c8f7369899

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f8e2f1ea54dbc4020f462170622743c8f7369899 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:40 +0530
Subject: [PATCH] net/axgbe: fix SFP codes check for DAC cables
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4eefb1b16acaa69bd757057e0c54c58f11577ba3 ]

The current axgbe code assumes that offset 6 of EEPROM SFP DAC (passive)
cables is NULL. However, some cables (the 5 meter and 7 meter Molex
passive cables) have non-zero data at offset 6. Fix the logic by moving
the passive cable check above the active checks, so as not to be
improperly identified as an active cable. This will fix the issue for
any passive cable that advertises 1000Base-CX in offset 6.

Without the fix the user will not get link UP for few DAC cables.

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 040176b8ef..9aadbefaba 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -625,7 +625,10 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
 	}
 
 	/* Determine the type of SFP */
-	if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_SR)
+	if (phy_data->sfp_cable == AXGBE_SFP_CABLE_PASSIVE &&
+		 axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000))
+		phy_data->sfp_base = AXGBE_SFP_BASE_10000_CR;
+	else if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_SR)
 		phy_data->sfp_base = AXGBE_SFP_BASE_10000_SR;
 	else if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_LR)
 		phy_data->sfp_base = AXGBE_SFP_BASE_10000_LR;
@@ -642,9 +645,6 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
 		phy_data->sfp_base = AXGBE_SFP_BASE_1000_CX;
 	else if (sfp_base[AXGBE_SFP_BASE_1GBE_CC] & AXGBE_SFP_BASE_1GBE_CC_T)
 		phy_data->sfp_base = AXGBE_SFP_BASE_1000_T;
-	else if ((phy_data->sfp_cable == AXGBE_SFP_CABLE_PASSIVE) &&
-		 axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000))
-		phy_data->sfp_base = AXGBE_SFP_BASE_10000_CR;
 
 	switch (phy_data->sfp_base) {
 	case AXGBE_SFP_BASE_1000_T:
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.809256223 +0800
+++ 0036-net-axgbe-fix-SFP-codes-check-for-DAC-cables.patch	2024-07-12 18:40:14.006594239 +0800
@@ -1 +1 @@
-From 4eefb1b16acaa69bd757057e0c54c58f11577ba3 Mon Sep 17 00:00:00 2001
+From f8e2f1ea54dbc4020f462170622743c8f7369899 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4eefb1b16acaa69bd757057e0c54c58f11577ba3 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index bcefbf28f2..10196cae94 100644
+index 040176b8ef..9aadbefaba 100644

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

* patch 'net/axgbe: fix connection for SFP+ active cables' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (35 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: fix SFP codes check for DAC cables' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: check only minimum speed for " Xueming Li
                   ` (42 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3f5bcab86529a756114e428736e1d7f46e663698

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3f5bcab86529a756114e428736e1d7f46e663698 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:41 +0530
Subject: [PATCH] net/axgbe: fix connection for SFP+ active cables
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4823ccdbbd887bb84339a4d35febd92292d07b97 ]

SFP+ active and passive cables are copper cables with fixed SFP+ end
connectors. Due to a misinterpretation of this, SFP+ active cables could
end up not being recognized, causing the driver to fail to establish a
connection.

Introduce a new enum in SFP+ cable types, XGBE_SFP_CABLE_FIBER, that is
the default cable type, and handle active and passive cables when they
are specifically detected.

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 9aadbefaba..85b01bfa10 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -69,6 +69,7 @@ enum axgbe_sfp_cable {
 	AXGBE_SFP_CABLE_UNKNOWN = 0,
 	AXGBE_SFP_CABLE_ACTIVE,
 	AXGBE_SFP_CABLE_PASSIVE,
+	AXGBE_SFP_CABLE_FIBER,
 };
 
 enum axgbe_sfp_base {
@@ -616,16 +617,18 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
 
 	axgbe_phy_sfp_parse_quirks(pdata);
 
-	/* Assume ACTIVE cable unless told it is PASSIVE */
+	/* Assume FIBER cable unless told otherwise */
 	if (sfp_base[AXGBE_SFP_BASE_CABLE] & AXGBE_SFP_BASE_CABLE_PASSIVE) {
 		phy_data->sfp_cable = AXGBE_SFP_CABLE_PASSIVE;
 		phy_data->sfp_cable_len = sfp_base[AXGBE_SFP_BASE_CU_CABLE_LEN];
-	} else {
+	} else if (sfp_base[AXGBE_SFP_BASE_CABLE] & AXGBE_SFP_BASE_CABLE_ACTIVE) {
 		phy_data->sfp_cable = AXGBE_SFP_CABLE_ACTIVE;
+	} else {
+		phy_data->sfp_cable = AXGBE_SFP_CABLE_FIBER;
 	}
 
 	/* Determine the type of SFP */
-	if (phy_data->sfp_cable == AXGBE_SFP_CABLE_PASSIVE &&
+	if (phy_data->sfp_cable != AXGBE_SFP_CABLE_FIBER &&
 		 axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000))
 		phy_data->sfp_base = AXGBE_SFP_BASE_10000_CR;
 	else if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_SR)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.852245217 +0800
+++ 0037-net-axgbe-fix-connection-for-SFP-active-cables.patch	2024-07-12 18:40:14.016594238 +0800
@@ -1 +1 @@
-From 4823ccdbbd887bb84339a4d35febd92292d07b97 Mon Sep 17 00:00:00 2001
+From 3f5bcab86529a756114e428736e1d7f46e663698 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4823ccdbbd887bb84339a4d35febd92292d07b97 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 10196cae94..d9585a7404 100644
+index 9aadbefaba..85b01bfa10 100644

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

* patch 'net/axgbe: check only minimum speed for cables' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (36 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: fix connection for SFP+ active " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: fix Tx flow on 30H HW' " Xueming Li
                   ` (41 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3a6efdb072a54859906df25ff4dbaae4a353a609

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3a6efdb072a54859906df25ff4dbaae4a353a609 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:42 +0530
Subject: [PATCH] net/axgbe: check only minimum speed for cables
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b5587a39dc94ee0bd055b515cc8c060923ed69b9 ]

There are cables that exist that can support speeds in excess of 10GbE.
The driver, however, restricts the EEPROM advertised nominal bitrate to
a specific range, which can prevent usage of cables that can support,
for example, up to 25GbE.

Rather than checking that an active or passive cable supports a specific
range, only check for a minimum supported speed.

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 85b01bfa10..12908d4e6f 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -117,9 +117,7 @@ enum axgbe_sfp_speed {
 
 #define AXGBE_SFP_BASE_BR			12
 #define AXGBE_SFP_BASE_BR_1GBE_MIN		0x0a
-#define AXGBE_SFP_BASE_BR_1GBE_MAX		0x0d
 #define AXGBE_SFP_BASE_BR_10GBE_MIN		0x64
-#define AXGBE_SFP_BASE_BR_10GBE_MAX		0x68
 
 #define AXGBE_SFP_BASE_CU_CABLE_LEN		18
 
@@ -536,25 +534,22 @@ static void axgbe_phy_sfp_phy_settings(struct axgbe_port *pdata)
 static bool axgbe_phy_sfp_bit_rate(struct axgbe_sfp_eeprom *sfp_eeprom,
 				   enum axgbe_sfp_speed sfp_speed)
 {
-	u8 *sfp_base, min, max;
+	u8 *sfp_base, min;
 
 	sfp_base = sfp_eeprom->base;
 
 	switch (sfp_speed) {
 	case AXGBE_SFP_SPEED_1000:
 		min = AXGBE_SFP_BASE_BR_1GBE_MIN;
-		max = AXGBE_SFP_BASE_BR_1GBE_MAX;
 		break;
 	case AXGBE_SFP_SPEED_10000:
 		min = AXGBE_SFP_BASE_BR_10GBE_MIN;
-		max = AXGBE_SFP_BASE_BR_10GBE_MAX;
 		break;
 	default:
 		return false;
 	}
 
-	return ((sfp_base[AXGBE_SFP_BASE_BR] >= min) &&
-		(sfp_base[AXGBE_SFP_BASE_BR] <= max));
+	return sfp_base[AXGBE_SFP_BASE_BR] >= min;
 }
 
 static void axgbe_phy_sfp_external_phy(struct axgbe_port *pdata)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.889545813 +0800
+++ 0038-net-axgbe-check-only-minimum-speed-for-cables.patch	2024-07-12 18:40:14.016594238 +0800
@@ -1 +1 @@
-From b5587a39dc94ee0bd055b515cc8c060923ed69b9 Mon Sep 17 00:00:00 2001
+From 3a6efdb072a54859906df25ff4dbaae4a353a609 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b5587a39dc94ee0bd055b515cc8c060923ed69b9 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index d9585a7404..b6a2a084aa 100644
+index 85b01bfa10..12908d4e6f 100644

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

* patch 'net/axgbe: fix Tx flow on 30H HW' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (37 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: check only minimum speed for " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: delay AN timeout during KR training' " Xueming Li
                   ` (40 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ce55cf69f25e11b287f188332420481654d02441

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ce55cf69f25e11b287f188332420481654d02441 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:43 +0530
Subject: [PATCH] net/axgbe: fix Tx flow on 30H HW
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b4b24f3e80f9b1bd2c56e1b56b8b8337748e15e6 ]

There is difference in the TX Flow Control registers (TFCR) between the
revisions of the hardware. The older revisions of hardware used to have
single register per queue. Whereas, the newer revision of hardware (from
ver 30H onwards) have one register per priority.

Without the fix the user will face problem in TX operation on new 30H HW

Fixes: 7c4158a5b592 ("net/axgbe: add DMA programming and start/stop")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_dev.c | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c
index 9b0073eea6..5233633a53 100644
--- a/drivers/net/axgbe/axgbe_dev.c
+++ b/drivers/net/axgbe/axgbe_dev.c
@@ -269,20 +269,28 @@ static int axgbe_set_speed(struct axgbe_port *pdata, int speed)
 	return 0;
 }
 
+static unsigned int axgbe_get_fc_queue_count(struct axgbe_port *pdata)
+{
+	unsigned int max_q_count = AXGMAC_MAX_FLOW_CONTROL_QUEUES;
+
+	/* From MAC ver 30H the TFCR is per priority, instead of per queue */
+	if (AXGMAC_GET_BITS(pdata->hw_feat.version, MAC_VR, SNPSVER) >= 0x30)
+		return max_q_count;
+	else
+		return (RTE_MIN(pdata->tx_q_count, max_q_count));
+}
+
 static int axgbe_disable_tx_flow_control(struct axgbe_port *pdata)
 {
-	unsigned int max_q_count, q_count;
 	unsigned int reg, reg_val;
-	unsigned int i;
+	unsigned int i, q_count;
 
 	/* Clear MTL flow control */
 	for (i = 0; i < pdata->rx_q_count; i++)
 		AXGMAC_MTL_IOWRITE_BITS(pdata, i, MTL_Q_RQOMR, EHFC, 0);
 
 	/* Clear MAC flow control */
-	max_q_count = AXGMAC_MAX_FLOW_CONTROL_QUEUES;
-	q_count = RTE_MIN(pdata->tx_q_count,
-			max_q_count);
+	q_count = axgbe_get_fc_queue_count(pdata);
 	reg = MAC_Q0TFCR;
 	for (i = 0; i < q_count; i++) {
 		reg_val = AXGMAC_IOREAD(pdata, reg);
@@ -297,9 +305,8 @@ static int axgbe_disable_tx_flow_control(struct axgbe_port *pdata)
 
 static int axgbe_enable_tx_flow_control(struct axgbe_port *pdata)
 {
-	unsigned int max_q_count, q_count;
 	unsigned int reg, reg_val;
-	unsigned int i;
+	unsigned int i, q_count;
 
 	/* Set MTL flow control */
 	for (i = 0; i < pdata->rx_q_count; i++) {
@@ -316,9 +323,7 @@ static int axgbe_enable_tx_flow_control(struct axgbe_port *pdata)
 	}
 
 	/* Set MAC flow control */
-	max_q_count = AXGMAC_MAX_FLOW_CONTROL_QUEUES;
-	q_count = RTE_MIN(pdata->tx_q_count,
-			max_q_count);
+	q_count = axgbe_get_fc_queue_count(pdata);
 	reg = MAC_Q0TFCR;
 	for (i = 0; i < q_count; i++) {
 		reg_val = AXGMAC_IOREAD(pdata, reg);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.923797209 +0800
+++ 0039-net-axgbe-fix-Tx-flow-on-30H-HW.patch	2024-07-12 18:40:14.016594238 +0800
@@ -1 +1 @@
-From b4b24f3e80f9b1bd2c56e1b56b8b8337748e15e6 Mon Sep 17 00:00:00 2001
+From ce55cf69f25e11b287f188332420481654d02441 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b4b24f3e80f9b1bd2c56e1b56b8b8337748e15e6 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/axgbe: delay AN timeout during KR training' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (38 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: fix Tx flow on 30H HW' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/axgbe: fix linkup in PHY status' " Xueming Li
                   ` (39 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=fb6d056d538f8e72d043b7144e3630535f23798e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fb6d056d538f8e72d043b7144e3630535f23798e Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:44 +0530
Subject: [PATCH] net/axgbe: delay AN timeout during KR training
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 323e8c91a7c434915920fe8668ca5664b65ea198 ]

AN restart triggered during KR training not only aborts the KR training
process but also move the HW to unstable state. Driver has to wait up to
500ms or until the KR training is completed before restarting AN cycle.

Without the fix the user will face KR training failure issues.

Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_ethdev.h |  2 ++
 drivers/net/axgbe/axgbe_mdio.c   | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h
index ae57aeaa00..b4bd56e239 100644
--- a/drivers/net/axgbe/axgbe_ethdev.h
+++ b/drivers/net/axgbe/axgbe_ethdev.h
@@ -111,6 +111,7 @@
 /* Auto-negotiation */
 #define AXGBE_AN_MS_TIMEOUT		500
 #define AXGBE_LINK_TIMEOUT		5
+#define AXGBE_KR_TRAINING_WAIT_ITER	50
 
 #define AXGBE_SGMII_AN_LINK_STATUS	BIT(1)
 #define AXGBE_SGMII_AN_LINK_SPEED	(BIT(2) | BIT(3))
@@ -654,6 +655,7 @@ struct axgbe_port {
 	unsigned int parallel_detect;
 	unsigned int fec_ability;
 	unsigned long an_start;
+	unsigned long kr_start_time;
 	enum axgbe_an_mode an_mode;
 
 	/* I2C support */
diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index b03bc471cb..e1a737cf62 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -357,6 +357,7 @@ static enum axgbe_an axgbe_an73_tx_training(struct axgbe_port *pdata,
 	reg |= AXGBE_KR_TRAINING_ENABLE;
 	reg |= AXGBE_KR_TRAINING_START;
 	XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);
+	pdata->kr_start_time = rte_get_timer_cycles();
 
 	PMD_DRV_LOG(DEBUG, "KR training initiated\n");
 	if (pdata->phy_if.phy_impl.kr_training_post)
@@ -487,6 +488,7 @@ static enum axgbe_an axgbe_an73_incompat_link(struct axgbe_port *pdata)
 
 	axgbe_an_disable(pdata);
 	axgbe_switch_mode(pdata);
+	pdata->an_result = AXGBE_AN_READY;
 	axgbe_an_restart(pdata);
 
 	return AXGBE_AN_INCOMPAT_LINK;
@@ -967,11 +969,34 @@ static void axgbe_check_link_timeout(struct axgbe_port *pdata)
 {
 	unsigned long link_timeout;
 	unsigned long ticks;
+	unsigned long kr_time;
+	int wait;
 
 	link_timeout = pdata->link_check + (AXGBE_LINK_TIMEOUT *
 					    2 *  rte_get_timer_hz());
 	ticks = rte_get_timer_cycles();
 	if (time_after(ticks, link_timeout)) {
+		if ((axgbe_cur_mode(pdata) == AXGBE_MODE_KR) &&
+		    pdata->phy.autoneg == AUTONEG_ENABLE) {
+			/* AN restart should not happen while KR training is in progress.
+			 * The while loop ensures no AN restart during KR training,
+			 * waits up to 500ms and AN restart is triggered only if KR
+			 * training is failed.
+			 */
+			wait = AXGBE_KR_TRAINING_WAIT_ITER;
+			while (wait--) {
+				kr_time = pdata->kr_start_time +
+					  msecs_to_timer_cycles(AXGBE_AN_MS_TIMEOUT);
+				ticks = rte_get_timer_cycles();
+				if (time_after(ticks, kr_time))
+					break;
+				/* AN restart is not required, if AN result is COMPLETE */
+				if (pdata->an_result == AXGBE_AN_COMPLETE)
+					return;
+				rte_delay_us(10500);
+			}
+		}
+
 		PMD_DRV_LOG(NOTICE, "AN link timeout\n");
 		axgbe_phy_config_aneg(pdata);
 	}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.961564604 +0800
+++ 0040-net-axgbe-delay-AN-timeout-during-KR-training.patch	2024-07-12 18:40:14.016594238 +0800
@@ -1 +1 @@
-From 323e8c91a7c434915920fe8668ca5664b65ea198 Mon Sep 17 00:00:00 2001
+From fb6d056d538f8e72d043b7144e3630535f23798e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 323e8c91a7c434915920fe8668ca5664b65ea198 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index f122dfd516..d1fac667c2 100644
+index ae57aeaa00..b4bd56e239 100644
@@ -34 +36 @@
-@@ -661,6 +662,7 @@ struct axgbe_port {
+@@ -654,6 +655,7 @@ struct axgbe_port {

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

* patch 'net/axgbe: fix linkup in PHY status' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (39 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: delay AN timeout during KR training' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/ice: fix check for outer UDP checksum offload' " Xueming Li
                   ` (38 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=4047efd490a76a59d4f803e354eef2a06d33700e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4047efd490a76a59d4f803e354eef2a06d33700e Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:45 +0530
Subject: [PATCH] net/axgbe: fix linkup in PHY status
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 50362d0e1f386563a026b314bd0a7eedcd188910 ]

In the event of a change in axgbe mode, the current auto-negotiation
needs to be reset and the AN cycle needs to be re-triggered. However,
the current code ignores the return value of axgbe_set_mode(), leading
to false information as the link is declared without checking the status
register.

Fix this by propagating the mode switch status information to
axgbe_phy_status().

Fixes: 102b6ec3d5c3 ("net/axgbe: support auto-negotiation for 1Gbps")

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
 drivers/net/axgbe/axgbe_mdio.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index e1a737cf62..d95a52659e 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -200,13 +200,14 @@ static void axgbe_switch_mode(struct axgbe_port *pdata)
 	axgbe_change_mode(pdata, pdata->phy_if.phy_impl.switch_mode(pdata));
 }
 
-static void axgbe_set_mode(struct axgbe_port *pdata,
+static bool axgbe_set_mode(struct axgbe_port *pdata,
 			   enum axgbe_mode mode)
 {
 	if (mode == axgbe_cur_mode(pdata))
-		return;
+		return false;
 
 	axgbe_change_mode(pdata, mode);
+	return true;
 }
 
 static bool axgbe_use_mode(struct axgbe_port *pdata,
@@ -1007,7 +1008,7 @@ static enum axgbe_mode axgbe_phy_status_aneg(struct axgbe_port *pdata)
 	return pdata->phy_if.phy_impl.an_outcome(pdata);
 }
 
-static void axgbe_phy_status_result(struct axgbe_port *pdata)
+static bool axgbe_phy_status_result(struct axgbe_port *pdata)
 {
 	enum axgbe_mode mode;
 
@@ -1041,7 +1042,10 @@ static void axgbe_phy_status_result(struct axgbe_port *pdata)
 
 	pdata->phy.duplex = DUPLEX_FULL;
 
-	axgbe_set_mode(pdata, mode);
+	if (axgbe_set_mode(pdata, mode))
+		return true;
+	else
+		return false;
 }
 
 static int autoneg_time_out(unsigned long autoneg_start_time)
@@ -1108,7 +1112,10 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
 				return;
 			}
 		}
-		axgbe_phy_status_result(pdata);
+
+		if (axgbe_phy_status_result(pdata))
+			return;
+
 		if (rte_bit_relaxed_get32(AXGBE_LINK_INIT, &pdata->dev_state))
 			rte_bit_relaxed_clear32(AXGBE_LINK_INIT,
 						&pdata->dev_state);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.997488400 +0800
+++ 0041-net-axgbe-fix-linkup-in-PHY-status.patch	2024-07-12 18:40:14.016594238 +0800
@@ -1 +1 @@
-From 50362d0e1f386563a026b314bd0a7eedcd188910 Mon Sep 17 00:00:00 2001
+From 4047efd490a76a59d4f803e354eef2a06d33700e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 50362d0e1f386563a026b314bd0a7eedcd188910 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice: fix check for outer UDP checksum offload' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (40 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/axgbe: fix linkup in PHY status' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'app/testpmd: fix outer IP " Xueming Li
                   ` (37 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: David Marchand
  Cc: Bruce Richardson, Morten Brørup, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c669b100ab8b5b83291698aea13e2bf2811bd951

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c669b100ab8b5b83291698aea13e2bf2811bd951 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:15 +0200
Subject: [PATCH] net/ice: fix check for outer UDP checksum offload
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f4eb07f031c4a6a0055f3b2773e031cd8000206e ]

ICE_TX_CTX_EIPT_NONE == 0.
There is a good chance that !(anything & 0) is true :-).

While removing this noop check is doable, let's check that the
descriptor does contain a outer ip type.

Fixes: 2ed011776334 ("net/ice: fix outer UDP Tx checksum offload")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 drivers/net/ice/ice_rxtx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 73e47ae92d..dea6a5b535 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2734,9 +2734,9 @@ ice_parse_tunneling_params(uint64_t ol_flags,
 	 * Calculate the tunneling UDP checksum.
 	 * Shall be set only if L4TUNT = 01b and EIPT is not zero
 	 */
-	if (!(*cd_tunneling & ICE_TX_CTX_EIPT_NONE) &&
-		(*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING) &&
-		(ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
+	if ((*cd_tunneling & ICE_TXD_CTX_QW0_EIPT_M) &&
+			(*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING) &&
+			(ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
 		*cd_tunneling |= ICE_TXD_CTX_QW0_L4T_CS_M;
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.030001596 +0800
+++ 0042-net-ice-fix-check-for-outer-UDP-checksum-offload.patch	2024-07-12 18:40:14.026594237 +0800
@@ -1 +1 @@
-From f4eb07f031c4a6a0055f3b2773e031cd8000206e Mon Sep 17 00:00:00 2001
+From c669b100ab8b5b83291698aea13e2bf2811bd951 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f4eb07f031c4a6a0055f3b2773e031cd8000206e ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 95a2db3432..10babab231 100644
+index 73e47ae92d..dea6a5b535 100644
@@ -30 +32 @@
-@@ -2751,9 +2751,9 @@ ice_parse_tunneling_params(uint64_t ol_flags,
+@@ -2734,9 +2734,9 @@ ice_parse_tunneling_params(uint64_t ol_flags,

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

* patch 'app/testpmd: fix outer IP checksum offload' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (41 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/ice: fix check for outer UDP checksum offload' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net: fix outer UDP checksum in Intel prepare helper' " Xueming Li
                   ` (36 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: David Marchand; +Cc: Ferruh Yigit, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=108a1722d5781c2c5f7ef0ff42251981d96a9ed8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 108a1722d5781c2c5f7ef0ff42251981d96a9ed8 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:17 +0200
Subject: [PATCH] app/testpmd: fix outer IP checksum offload
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b9d859d8a671ec4516face2eba24434b955a9ac1 ]

Resetting the outer IP checksum to 0 is not something mandated by the
mbuf API and is done by rte_eth_tx_prepare(), or per driver if needed.

Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 app/test-pmd/csumonly.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6711dda42e..f5125c2788 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -583,15 +583,17 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
 	uint64_t ol_flags = 0;
 
 	if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4)) {
-		ipv4_hdr->hdr_checksum = 0;
 		ol_flags |= RTE_MBUF_F_TX_OUTER_IPV4;
 
-		if (tx_offloads	& RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM)
+		if (tx_offloads	& RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM) {
 			ol_flags |= RTE_MBUF_F_TX_OUTER_IP_CKSUM;
-		else
+		} else {
+			ipv4_hdr->hdr_checksum = 0;
 			ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
-	} else
+		}
+	} else {
 		ol_flags |= RTE_MBUF_F_TX_OUTER_IPV6;
+	}
 
 	if (info->outer_l4_proto != IPPROTO_UDP)
 		return ol_flags;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.064922892 +0800
+++ 0043-app-testpmd-fix-outer-IP-checksum-offload.patch	2024-07-12 18:40:14.026594237 +0800
@@ -1 +1 @@
-From b9d859d8a671ec4516face2eba24434b955a9ac1 Mon Sep 17 00:00:00 2001
+From 108a1722d5781c2c5f7ef0ff42251981d96a9ed8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b9d859d8a671ec4516face2eba24434b955a9ac1 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net: fix outer UDP checksum in Intel prepare helper' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (42 preceding siblings ...)
  2024-07-12 10:44 ` patch 'app/testpmd: fix outer IP " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/i40e: fix outer UDP checksum offload for X710' " Xueming Li
                   ` (35 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: David Marchand; +Cc: Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=700c66d35f34838806f02dfd1056b7cecfb598c1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 700c66d35f34838806f02dfd1056b7cecfb598c1 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:18 +0200
Subject: [PATCH] net: fix outer UDP checksum in Intel prepare helper
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f876dbef080932dbeb1de075d7ca3cbe2ed6d7eb ]

Setting a pseudo header checksum in the outer UDP checksum is a Intel
(and some other vendors) requirement.
Applications (like OVS) requesting outer UDP checksum without doing this
extra setup have broken outer UDP checksums.

Move this specific setup from testpmd to the "common" helper
rte_net_intel_cksum_flags_prepare().

net/hns3 can then be adjusted.

Bugzilla ID: 1406
Fixes: d8e5e69f3a9b ("app/testpmd: add GTP parsing and Tx checksum offload")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 app/test-pmd/csumonly.c      | 11 +----
 drivers/net/hns3/hns3_rxtx.c | 93 ++++++++++--------------------------
 lib/net/rte_net.h            | 18 ++++++-
 3 files changed, 44 insertions(+), 78 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index f5125c2788..71add6ca47 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -577,8 +577,6 @@ static uint64_t
 process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
 	uint64_t tx_offloads, int tso_enabled, struct rte_mbuf *m)
 {
-	struct rte_ipv4_hdr *ipv4_hdr = outer_l3_hdr;
-	struct rte_ipv6_hdr *ipv6_hdr = outer_l3_hdr;
 	struct rte_udp_hdr *udp_hdr;
 	uint64_t ol_flags = 0;
 
@@ -588,6 +586,8 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
 		if (tx_offloads	& RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM) {
 			ol_flags |= RTE_MBUF_F_TX_OUTER_IP_CKSUM;
 		} else {
+			struct rte_ipv4_hdr *ipv4_hdr = outer_l3_hdr;
+
 			ipv4_hdr->hdr_checksum = 0;
 			ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
 		}
@@ -608,13 +608,6 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
 
 	/* Skip SW outer UDP checksum generation if HW supports it */
 	if (tx_offloads & RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM) {
-		if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4))
-			udp_hdr->dgram_cksum
-				= rte_ipv4_phdr_cksum(ipv4_hdr, ol_flags);
-		else
-			udp_hdr->dgram_cksum
-				= rte_ipv6_phdr_cksum(ipv6_hdr, ol_flags);
-
 		ol_flags |= RTE_MBUF_F_TX_OUTER_UDP_CKSUM;
 		return ol_flags;
 	}
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index d20e03b103..75ea6bdca9 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -3628,58 +3628,6 @@ hns3_pkt_need_linearized(struct rte_mbuf *tx_pkts, uint32_t bd_num,
 	return false;
 }
 
-static bool
-hns3_outer_ipv4_cksum_prepared(struct rte_mbuf *m, uint64_t ol_flags,
-				uint32_t *l4_proto)
-{
-	struct rte_ipv4_hdr *ipv4_hdr;
-	ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv4_hdr *,
-					   m->outer_l2_len);
-	if (ol_flags & RTE_MBUF_F_TX_OUTER_IP_CKSUM)
-		ipv4_hdr->hdr_checksum = 0;
-	if (ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM) {
-		struct rte_udp_hdr *udp_hdr;
-		/*
-		 * If OUTER_UDP_CKSUM is support, HW can calculate the pseudo
-		 * header for TSO packets
-		 */
-		if (ol_flags & RTE_MBUF_F_TX_TCP_SEG)
-			return true;
-		udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *,
-				m->outer_l2_len + m->outer_l3_len);
-		udp_hdr->dgram_cksum = rte_ipv4_phdr_cksum(ipv4_hdr, ol_flags);
-
-		return true;
-	}
-	*l4_proto = ipv4_hdr->next_proto_id;
-	return false;
-}
-
-static bool
-hns3_outer_ipv6_cksum_prepared(struct rte_mbuf *m, uint64_t ol_flags,
-				uint32_t *l4_proto)
-{
-	struct rte_ipv6_hdr *ipv6_hdr;
-	ipv6_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv6_hdr *,
-					   m->outer_l2_len);
-	if (ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM) {
-		struct rte_udp_hdr *udp_hdr;
-		/*
-		 * If OUTER_UDP_CKSUM is support, HW can calculate the pseudo
-		 * header for TSO packets
-		 */
-		if (ol_flags & RTE_MBUF_F_TX_TCP_SEG)
-			return true;
-		udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *,
-				m->outer_l2_len + m->outer_l3_len);
-		udp_hdr->dgram_cksum = rte_ipv6_phdr_cksum(ipv6_hdr, ol_flags);
-
-		return true;
-	}
-	*l4_proto = ipv6_hdr->proto;
-	return false;
-}
-
 static void
 hns3_outer_header_cksum_prepare(struct rte_mbuf *m)
 {
@@ -3687,29 +3635,38 @@ hns3_outer_header_cksum_prepare(struct rte_mbuf *m)
 	uint32_t paylen, hdr_len, l4_proto;
 	struct rte_udp_hdr *udp_hdr;
 
-	if (!(ol_flags & (RTE_MBUF_F_TX_OUTER_IPV4 | RTE_MBUF_F_TX_OUTER_IPV6)))
+	if (!(ol_flags & (RTE_MBUF_F_TX_OUTER_IPV4 | RTE_MBUF_F_TX_OUTER_IPV6)) &&
+			((ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM) ||
+			!(ol_flags & RTE_MBUF_F_TX_TCP_SEG)))
 		return;
 
 	if (ol_flags & RTE_MBUF_F_TX_OUTER_IPV4) {
-		if (hns3_outer_ipv4_cksum_prepared(m, ol_flags, &l4_proto))
-			return;
+		struct rte_ipv4_hdr *ipv4_hdr;
+
+		ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv4_hdr *,
+			m->outer_l2_len);
+		l4_proto = ipv4_hdr->next_proto_id;
 	} else {
-		if (hns3_outer_ipv6_cksum_prepared(m, ol_flags, &l4_proto))
-			return;
+		struct rte_ipv6_hdr *ipv6_hdr;
+
+		ipv6_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv6_hdr *,
+					   m->outer_l2_len);
+		l4_proto = ipv6_hdr->proto;
 	}
 
+	if (l4_proto != IPPROTO_UDP)
+		return;
+
 	/* driver should ensure the outer udp cksum is 0 for TUNNEL TSO */
-	if (l4_proto == IPPROTO_UDP && (ol_flags & RTE_MBUF_F_TX_TCP_SEG)) {
-		hdr_len = m->l2_len + m->l3_len + m->l4_len;
-		hdr_len += m->outer_l2_len + m->outer_l3_len;
-		paylen = m->pkt_len - hdr_len;
-		if (paylen <= m->tso_segsz)
-			return;
-		udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *,
-						  m->outer_l2_len +
-						  m->outer_l3_len);
-		udp_hdr->dgram_cksum = 0;
-	}
+	hdr_len = m->l2_len + m->l3_len + m->l4_len;
+	hdr_len += m->outer_l2_len + m->outer_l3_len;
+	paylen = m->pkt_len - hdr_len;
+	if (paylen <= m->tso_segsz)
+		return;
+	udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *,
+					  m->outer_l2_len +
+					  m->outer_l3_len);
+	udp_hdr->dgram_cksum = 0;
 }
 
 static int
diff --git a/lib/net/rte_net.h b/lib/net/rte_net.h
index ef3ff4c6fd..efd9d5f5ee 100644
--- a/lib/net/rte_net.h
+++ b/lib/net/rte_net.h
@@ -121,7 +121,8 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
 	 * no offloads are requested.
 	 */
 	if (!(ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_L4_MASK | RTE_MBUF_F_TX_TCP_SEG |
-					RTE_MBUF_F_TX_UDP_SEG | RTE_MBUF_F_TX_OUTER_IP_CKSUM)))
+					RTE_MBUF_F_TX_UDP_SEG | RTE_MBUF_F_TX_OUTER_IP_CKSUM |
+					RTE_MBUF_F_TX_OUTER_UDP_CKSUM)))
 		return 0;
 
 	if (ol_flags & (RTE_MBUF_F_TX_OUTER_IPV4 | RTE_MBUF_F_TX_OUTER_IPV6)) {
@@ -135,6 +136,21 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
 					struct rte_ipv4_hdr *, m->outer_l2_len);
 			ipv4_hdr->hdr_checksum = 0;
 		}
+		if (ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM) {
+			if (ol_flags & RTE_MBUF_F_TX_OUTER_IPV4) {
+				ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv4_hdr *,
+					m->outer_l2_len);
+				udp_hdr = (struct rte_udp_hdr *)((char *)ipv4_hdr +
+					m->outer_l3_len);
+				udp_hdr->dgram_cksum = rte_ipv4_phdr_cksum(ipv4_hdr, m->ol_flags);
+			} else {
+				ipv6_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv6_hdr *,
+					m->outer_l2_len);
+				udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *,
+					 m->outer_l2_len + m->outer_l3_len);
+				udp_hdr->dgram_cksum = rte_ipv6_phdr_cksum(ipv6_hdr, m->ol_flags);
+			}
+		}
 	}
 
 	/*
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.097606388 +0800
+++ 0044-net-fix-outer-UDP-checksum-in-Intel-prepare-helper.patch	2024-07-12 18:40:14.036594235 +0800
@@ -1 +1 @@
-From f876dbef080932dbeb1de075d7ca3cbe2ed6d7eb Mon Sep 17 00:00:00 2001
+From 700c66d35f34838806f02dfd1056b7cecfb598c1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f876dbef080932dbeb1de075d7ca3cbe2ed6d7eb ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -65 +67 @@
-index bf10da1928..59a95aba7c 100644
+index d20e03b103..75ea6bdca9 100644
@@ -68 +70 @@
-@@ -3629,58 +3629,6 @@ hns3_pkt_need_linearized(struct rte_mbuf *tx_pkts, uint32_t bd_num,
+@@ -3628,58 +3628,6 @@ hns3_pkt_need_linearized(struct rte_mbuf *tx_pkts, uint32_t bd_num,
@@ -127 +129 @@
-@@ -3688,29 +3636,38 @@ hns3_outer_header_cksum_prepare(struct rte_mbuf *m)
+@@ -3687,29 +3635,38 @@ hns3_outer_header_cksum_prepare(struct rte_mbuf *m)

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

* patch 'net/i40e: fix outer UDP checksum offload for X710' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (43 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net: fix outer UDP checksum in Intel prepare helper' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/iavf: remove outer UDP checksum offload for X710 VF' " Xueming Li
                   ` (34 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: David Marchand; +Cc: Jun Wang, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6cbf97cfe01954c981d8127256e9c23c9657dd9a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6cbf97cfe01954c981d8127256e9c23c9657dd9a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:19 +0200
Subject: [PATCH] net/i40e: fix outer UDP checksum offload for X710
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 ]

According to the X710 datasheet (and confirmed on the field..), X710
devices do not support outer checksum offload.

"""
8.4.4.2 Transmit L3 and L4 Integrity Offload

Tunneling UDP headers and GRE header are not offloaded while the
X710/XXV710/XL710 leaves their checksum field as is.
If a checksum is required, software should provide it as well as the inner
checksum value(s) that are required for the outer checksum.
"""

Fix Tx offload capabilities according to the hardware.

X722 may support such offload by setting I40E_TXD_CTX_QW0_L4T_CS_MASK.

Bugzilla ID: 1406
Fixes: 8cc79a1636cd ("net/i40e: fix forward outer IPv6 VXLAN")

Reported-by: Jun Wang <junwang01@cestc.cn>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 .mailmap                       | 1 +
 drivers/net/i40e/i40e_ethdev.c | 6 +++++-
 drivers/net/i40e/i40e_rxtx.c   | 9 +++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index db6bc47117..79e25426fe 100644
--- a/.mailmap
+++ b/.mailmap
@@ -713,6 +713,7 @@ Junjie Wan <wanjunjie@bytedance.com>
 Jun Qiu <jun.qiu@jaguarmicro.com>
 Jun W Zhou <junx.w.zhou@intel.com>
 Junxiao Shi <git@mail1.yoursunny.com>
+Jun Wang <junwang01@cestc.cn>
 Jun Yang <jun.yang@nxp.com>
 Junyu Jiang <junyux.jiang@intel.com>
 Juraj Linkeš <juraj.linkes@pantheon.tech>
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 3ca226156b..ffc1f6d874 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3724,8 +3724,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
 		RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
-		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
 		dev_info->tx_queue_offload_capa;
+	if (hw->mac.type == I40E_MAC_X722) {
+		dev_info->tx_offload_capa |=
+			RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;
+	}
+
 	dev_info->dev_capa =
 		RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
 		RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 9aa5facb53..5e693cb1ea 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -295,6 +295,15 @@ i40e_parse_tunneling_params(uint64_t ol_flags,
 	 */
 	*cd_tunneling |= (tx_offload.l2_len >> 1) <<
 		I40E_TXD_CTX_QW0_NATLEN_SHIFT;
+
+	/**
+	 * Calculate the tunneling UDP checksum (only supported with X722).
+	 * Shall be set only if L4TUNT = 01b and EIPT is not zero
+	 */
+	if ((*cd_tunneling & I40E_TXD_CTX_QW0_EXT_IP_MASK) &&
+			(*cd_tunneling & I40E_TXD_CTX_UDP_TUNNELING) &&
+			(ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
+		*cd_tunneling |= I40E_TXD_CTX_QW0_L4T_CS_MASK;
 }
 
 static inline void
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.139997183 +0800
+++ 0045-net-i40e-fix-outer-UDP-checksum-offload-for-X710.patch	2024-07-12 18:40:14.056594233 +0800
@@ -1 +1 @@
-From 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 Mon Sep 17 00:00:00 2001
+From 6cbf97cfe01954c981d8127256e9c23c9657dd9a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -36 +38 @@
-index cb8d65bf0e..1aca379558 100644
+index db6bc47117..79e25426fe 100644
@@ -39 +41 @@
-@@ -720,6 +720,7 @@ Junjie Wan <wanjunjie@bytedance.com>
+@@ -713,6 +713,7 @@ Junjie Wan <wanjunjie@bytedance.com>
@@ -48 +50 @@
-index 801cc95607..c38515a758 100644
+index 3ca226156b..ffc1f6d874 100644
@@ -51 +53 @@
-@@ -3862,8 +3862,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -3724,8 +3724,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -66 +68 @@
-index 155f24377b..dc466ae371 100644
+index 9aa5facb53..5e693cb1ea 100644

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

* patch 'net/iavf: remove outer UDP checksum offload for X710 VF' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (44 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/i40e: fix outer UDP checksum offload for X710' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'app/testpmd: fix lcore ID restriction' " Xueming Li
                   ` (33 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: David Marchand; +Cc: Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=039efb0ebef041f2a9c4f082101d8534fde570d6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 039efb0ebef041f2a9c4f082101d8534fde570d6 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:20 +0200
Subject: [PATCH] net/iavf: remove outer UDP checksum offload for X710 VF
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 032ba1580bc36f31e431cf8d14dd3dec0079fa9c ]

According to the X710 datasheet, X710 devices do not support outer
checksum offload.

"""
8.4.4.2 Transmit L3 and L4 Integrity Offload

Tunneling UDP headers and GRE header are not offloaded while the
X710/XXV710/XL710 leaves their checksum field as is.
If a checksum is required, software should provide it as well as the inner
checksum value(s) that are required for the outer checksum.
"""

Fix Tx offload capabilities depending on the VF type.

Bugzilla ID: 1406
Fixes: f7c8c36fdeb7 ("net/iavf: enable inner and outer Tx checksum offload")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 doc/guides/nics/features/iavf.ini | 2 +-
 drivers/net/iavf/iavf_ethdev.c    | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/features/iavf.ini b/doc/guides/nics/features/iavf.ini
index c59115ae15..ce9860e963 100644
--- a/doc/guides/nics/features/iavf.ini
+++ b/doc/guides/nics/features/iavf.ini
@@ -33,7 +33,7 @@ L3 checksum offload  = Y
 L4 checksum offload  = Y
 Timestamp offload    = Y
 Inner L3 checksum    = Y
-Inner L4 checksum    = Y
+Inner L4 checksum    = P
 Packet type parsing  = Y
 Rx descriptor status = Y
 Tx descriptor status = Y
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index c26612c4a1..2d85b947f6 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1163,7 +1163,6 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		RTE_ETH_TX_OFFLOAD_TCP_CKSUM |
 		RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |
 		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |
-		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |
 		RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
 		RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |
@@ -1172,6 +1171,10 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
 		RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
 
+	/* X710 does not support outer udp checksum */
+	if (adapter->hw.mac.type != IAVF_MAC_XL710)
+		dev_info->tx_offload_capa |= RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;
+
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_CRC)
 		dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_KEEP_CRC;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.203197075 +0800
+++ 0046-net-iavf-remove-outer-UDP-checksum-offload-for-X710-.patch	2024-07-12 18:40:14.066594232 +0800
@@ -1 +1 @@
-From 032ba1580bc36f31e431cf8d14dd3dec0079fa9c Mon Sep 17 00:00:00 2001
+From 039efb0ebef041f2a9c4f082101d8534fde570d6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 032ba1580bc36f31e431cf8d14dd3dec0079fa9c ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -45 +47 @@
-index 245b3cd854..bbf915097e 100644
+index c26612c4a1..2d85b947f6 100644
@@ -48 +50 @@
-@@ -1174,7 +1174,6 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1163,7 +1163,6 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -56 +58 @@
-@@ -1183,6 +1182,10 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1172,6 +1171,10 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)

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

* patch 'app/testpmd: fix lcore ID restriction' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (45 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/iavf: remove outer UDP checksum offload for X710 VF' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/nfp: fix xstats for multi PF firmware' " Xueming Li
                   ` (32 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Sivaprasad Tummala; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=df41307515505e5cda18f987b42b9ede9764f15c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From df41307515505e5cda18f987b42b9ede9764f15c Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Thu, 6 Jun 2024 11:27:46 +0000
Subject: [PATCH] app/testpmd: fix lcore ID restriction
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 ]

With modern CPUs, it is possible to have higher
CPU count thus we can have higher RTE_MAX_LCORES.
In testpmd application, the current config forwarding
cores option "--nb-cores" is hard limited to 255.

The patch fixes this constraint and also adjusts the lcore
data structure to 32-bit to align with rte lcore APIs.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/config.c     | 4 ++--
 app/test-pmd/parameters.c | 4 ++--
 app/test-pmd/testpmd.h    | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index c7d3a968c1..a09aa3bb85 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4606,9 +4606,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
 				continue;
 			printf("Shared Rx queue group %u queue %hu can't be scheduled on different cores:\n",
 			       share_group, share_rxq);
-			printf("  lcore %hhu Port %hu queue %hu\n",
+			printf("  lcore %u Port %hu queue %hu\n",
 			       src_lc, src_port, src_rxq);
-			printf("  lcore %hhu Port %hu queue %hu\n",
+			printf("  lcore %u Port %hu queue %hu\n",
 			       lc_id, fs->rx_port, fs->rx_queue);
 			printf("Please use --nb-cores=%hu to limit number of forwarding cores\n",
 			       nb_rxq);
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index a4c09e2a2b..7e23393392 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -877,8 +877,8 @@ launch_args_parse(int argc, char** argv)
 			}
 			if (!strcmp(lgopts[opt_idx].name, "nb-cores")) {
 				n = atoi(optarg);
-				if (n > 0 && n <= nb_lcores)
-					nb_fwd_lcores = (uint8_t) n;
+				if (n > 0 && (lcoreid_t)n <= nb_lcores)
+					nb_fwd_lcores = (lcoreid_t) n;
 				else
 					rte_exit(EXIT_FAILURE,
 						 "nb-cores should be > 0 and <= %d\n",
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 5bb1a79330..db6d0d35f4 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -84,7 +84,7 @@ extern volatile uint8_t f_quit;
 /* Maximum number of pools supported per Rx queue */
 #define MAX_MEMPOOL 8
 
-typedef uint8_t  lcoreid_t;
+typedef uint32_t lcoreid_t;
 typedef uint16_t portid_t;
 typedef uint16_t queueid_t;
 typedef uint16_t streamid_t;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.244674870 +0800
+++ 0047-app-testpmd-fix-lcore-ID-restriction.patch	2024-07-12 18:40:14.076594231 +0800
@@ -1 +1 @@
-From 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 Mon Sep 17 00:00:00 2001
+From df41307515505e5cda18f987b42b9ede9764f15c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index f62ba90c87..66c3a68c1d 100644
+index c7d3a968c1..a09aa3bb85 100644
@@ -29 +31 @@
-@@ -4782,9 +4782,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
+@@ -4606,9 +4606,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
@@ -42 +44 @@
-index c13f7564bf..22364e09ab 100644
+index a4c09e2a2b..7e23393392 100644
@@ -45,11 +47,11 @@
-@@ -1071,8 +1071,8 @@ launch_args_parse(int argc, char** argv)
- 			break;
- 		case TESTPMD_OPT_NB_CORES_NUM:
- 			n = atoi(optarg);
--			if (n > 0 && n <= nb_lcores)
--				nb_fwd_lcores = (uint8_t) n;
-+			if (n > 0 && (lcoreid_t)n <= nb_lcores)
-+				nb_fwd_lcores = (lcoreid_t) n;
- 			else
- 				rte_exit(EXIT_FAILURE,
- 					"nb-cores should be > 0 and <= %d\n",
+@@ -877,8 +877,8 @@ launch_args_parse(int argc, char** argv)
+ 			}
+ 			if (!strcmp(lgopts[opt_idx].name, "nb-cores")) {
+ 				n = atoi(optarg);
+-				if (n > 0 && n <= nb_lcores)
+-					nb_fwd_lcores = (uint8_t) n;
++				if (n > 0 && (lcoreid_t)n <= nb_lcores)
++					nb_fwd_lcores = (lcoreid_t) n;
+ 				else
+ 					rte_exit(EXIT_FAILURE,
+ 						 "nb-cores should be > 0 and <= %d\n",
@@ -57 +59 @@
-index 0afae7d771..9facd7f281 100644
+index 5bb1a79330..db6d0d35f4 100644

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

* patch 'net/nfp: fix xstats for multi PF firmware' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (46 preceding siblings ...)
  2024-07-12 10:44 ` patch 'app/testpmd: fix lcore ID restriction' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'hash: fix return code description in Doxygen' " Xueming Li
                   ` (31 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=28d17414fc241e3e996f1127fc93cd547237875b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 28d17414fc241e3e996f1127fc93cd547237875b Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Thu, 23 May 2024 10:49:15 +0800
Subject: [PATCH] net/nfp: fix xstats for multi PF firmware
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e54d68a0e3b8de418afa4141930b216ae583fcac ]

When using multi PF firmware, the other ports always get the
xstats of the first port.

Fix it by adding the offset for other ports.

Fixes: 8ad2cc8fec37 ("net/nfp: add flag for multiple PFs support")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c     | 50 ++++++++++++++------------------
 drivers/net/nfp/nfp_net_common.h |  5 ++--
 2 files changed, 25 insertions(+), 30 deletions(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index e632051d42..7d86618bc9 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -318,8 +318,6 @@ nfp_net_uninit(struct rte_eth_dev *eth_dev)
 	net_hw = eth_dev->data->dev_private;
 	rte_free(net_hw->eth_xstats_base);
 	nfp_ipsec_uninit(eth_dev);
-	if (net_hw->mac_stats_area != NULL)
-		nfp_cpp_area_release_free(net_hw->mac_stats_area);
 }
 
 static void
@@ -349,6 +347,7 @@ nfp_uninit_app_fw_nic(struct nfp_pf_dev *pf_dev)
 void
 nfp_pf_uninit(struct nfp_pf_dev *pf_dev)
 {
+	nfp_cpp_area_release_free(pf_dev->mac_stats_area);
 	nfp_cpp_area_release_free(pf_dev->qc_area);
 	free(pf_dev->sym_tbl);
 	if (pf_dev->multi_pf.enabled) {
@@ -639,43 +638,31 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 
-	if (port == 0 || pf_dev->multi_pf.enabled) {
-		uint32_t min_size;
-
+	if (pf_dev->multi_pf.enabled)
 		hw->ctrl_bar = pf_dev->ctrl_bar;
-		min_size = NFP_MAC_STATS_SIZE * net_hw->pf_dev->nfp_eth_table->max_index;
-		net_hw->mac_stats_bar = nfp_rtsym_map(net_hw->pf_dev->sym_tbl, "_mac_stats",
-				min_size, &net_hw->mac_stats_area);
-		if (net_hw->mac_stats_bar == NULL) {
-			PMD_INIT_LOG(ERR, "nfp_rtsym_map fails for _mac_stats_bar");
-			return -EIO;
-		}
-
-		net_hw->mac_stats = net_hw->mac_stats_bar;
-	} else {
-		/* Use port offset in pf ctrl_bar for this ports control bar */
+	else
 		hw->ctrl_bar = pf_dev->ctrl_bar + (port * NFP_NET_CFG_BAR_SZ);
-		net_hw->mac_stats = app_fw_nic->ports[0]->mac_stats_bar +
+
+	net_hw->mac_stats = pf_dev->mac_stats_bar +
 				(net_hw->nfp_idx * NFP_MAC_STATS_SIZE);
-	}
 
 	PMD_INIT_LOG(DEBUG, "ctrl bar: %p", hw->ctrl_bar);
 	PMD_INIT_LOG(DEBUG, "MAC stats: %p", net_hw->mac_stats);
 
 	err = nfp_net_common_init(pci_dev, net_hw);
 	if (err != 0)
-		goto free_area;
+		return err;
 
 	err = nfp_net_tlv_caps_parse(eth_dev);
 	if (err != 0) {
 		PMD_INIT_LOG(ERR, "Failed to parser TLV caps");
-		goto free_area;
+		return err;
 	}
 
 	err = nfp_ipsec_init(eth_dev);
 	if (err != 0) {
 		PMD_INIT_LOG(ERR, "Failed to init IPsec module");
-		goto free_area;
+		return err;
 	}
 
 	nfp_net_ethdev_ops_mount(net_hw, eth_dev);
@@ -760,9 +747,6 @@ xstats_free:
 	rte_free(net_hw->eth_xstats_base);
 ipsec_exit:
 	nfp_ipsec_uninit(eth_dev);
-free_area:
-	if (net_hw->mac_stats_area != NULL)
-		nfp_cpp_area_release_free(net_hw->mac_stats_area);
 
 	return err;
 }
@@ -1335,6 +1319,14 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 
 	PMD_INIT_LOG(DEBUG, "qc_bar address: %p", pf_dev->qc_bar);
 
+	pf_dev->mac_stats_bar = nfp_rtsym_map(sym_tbl, "_mac_stats",
+			NFP_MAC_STATS_SIZE * nfp_eth_table->max_index,
+			&pf_dev->mac_stats_area);
+	if (pf_dev->mac_stats_bar == NULL) {
+		PMD_INIT_LOG(ERR, "nfp_rtsym_map fails for _mac_stats");
+		goto hwqueues_cleanup;
+	}
+
 	/*
 	 * PF initialization has been done at this point. Call app specific
 	 * init code now.
@@ -1344,14 +1336,14 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 		if (pf_dev->multi_pf.enabled) {
 			ret = nfp_enable_multi_pf(pf_dev);
 			if (ret != 0)
-				goto hwqueues_cleanup;
+				goto mac_stats_cleanup;
 		}
 
 		PMD_INIT_LOG(INFO, "Initializing coreNIC");
 		ret = nfp_init_app_fw_nic(pf_dev, dev_info);
 		if (ret != 0) {
 			PMD_INIT_LOG(ERR, "Could not initialize coreNIC!");
-			goto hwqueues_cleanup;
+			goto mac_stats_cleanup;
 		}
 		break;
 	case NFP_APP_FW_FLOWER_NIC:
@@ -1359,13 +1351,13 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 		ret = nfp_init_app_fw_flower(pf_dev, dev_info);
 		if (ret != 0) {
 			PMD_INIT_LOG(ERR, "Could not initialize Flower!");
-			goto hwqueues_cleanup;
+			goto mac_stats_cleanup;
 		}
 		break;
 	default:
 		PMD_INIT_LOG(ERR, "Unsupported Firmware loaded");
 		ret = -EINVAL;
-		goto hwqueues_cleanup;
+		goto mac_stats_cleanup;
 	}
 
 	/* Register the CPP bridge service here for primary use */
@@ -1375,6 +1367,8 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 
 	return 0;
 
+mac_stats_cleanup:
+	nfp_cpp_area_release_free(pf_dev->mac_stats_area);
 hwqueues_cleanup:
 	nfp_cpp_area_release_free(pf_dev->qc_area);
 sym_tbl_cleanup:
diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h
index ded491cbdc..c96f55976a 100644
--- a/drivers/net/nfp/nfp_net_common.h
+++ b/drivers/net/nfp/nfp_net_common.h
@@ -98,6 +98,9 @@ struct nfp_pf_dev {
 
 	uint8_t *qc_bar;
 
+	struct nfp_cpp_area *mac_stats_area;
+	uint8_t *mac_stats_bar;
+
 	struct nfp_hwinfo *hwinfo;
 	struct nfp_rtsym_table *sym_tbl;
 
@@ -165,8 +168,6 @@ struct nfp_net_hw {
 
 	struct nfp_cpp *cpp;
 	struct nfp_cpp_area *ctrl_area;
-	struct nfp_cpp_area *mac_stats_area;
-	uint8_t *mac_stats_bar;
 	uint8_t *mac_stats;
 
 	/** Sequential physical port number, only valid for CoreNIC firmware */
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.288797465 +0800
+++ 0048-net-nfp-fix-xstats-for-multi-PF-firmware.patch	2024-07-12 18:40:14.076594231 +0800
@@ -1 +1 @@
-From e54d68a0e3b8de418afa4141930b216ae583fcac Mon Sep 17 00:00:00 2001
+From 28d17414fc241e3e996f1127fc93cd547237875b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e54d68a0e3b8de418afa4141930b216ae583fcac ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index cdc946faff..f98af2044b 100644
+index e632051d42..7d86618bc9 100644
@@ -26,3 +28,3 @@
-@@ -585,8 +585,6 @@ nfp_net_uninit(struct rte_eth_dev *eth_dev)
- 	if ((net_hw->super.cap & NFP_NET_CFG_CTRL_TXRWB) != 0)
- 		nfp_net_txrwb_free(eth_dev);
+@@ -318,8 +318,6 @@ nfp_net_uninit(struct rte_eth_dev *eth_dev)
+ 	net_hw = eth_dev->data->dev_private;
+ 	rte_free(net_hw->eth_xstats_base);
@@ -32,2 +33,0 @@
- 
- 	return 0;
@@ -35,3 +34,0 @@
-@@ -617,6 +615,7 @@ nfp_pf_uninit(struct nfp_net_hw_priv *hw_priv)
- {
- 	struct nfp_pf_dev *pf_dev = hw_priv->pf_dev;
@@ -38,0 +36,5 @@
+ static void
+@@ -349,6 +347,7 @@ nfp_uninit_app_fw_nic(struct nfp_pf_dev *pf_dev)
+ void
+ nfp_pf_uninit(struct nfp_pf_dev *pf_dev)
+ {
@@ -43 +45 @@
-@@ -933,43 +932,31 @@ nfp_net_init(struct rte_eth_dev *eth_dev,
+@@ -639,43 +638,31 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
@@ -52,2 +54,2 @@
--		min_size = NFP_MAC_STATS_SIZE * pf_dev->nfp_eth_table->max_index;
--		net_hw->mac_stats_bar = nfp_rtsym_map(pf_dev->sym_tbl, "_mac_stats",
+-		min_size = NFP_MAC_STATS_SIZE * net_hw->pf_dev->nfp_eth_table->max_index;
+-		net_hw->mac_stats_bar = nfp_rtsym_map(net_hw->pf_dev->sym_tbl, "_mac_stats",
@@ -94 +96 @@
-@@ -1070,9 +1057,6 @@ xstats_free:
+@@ -760,9 +747,6 @@ xstats_free:
@@ -104 +106 @@
-@@ -1931,6 +1915,14 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+@@ -1335,6 +1319,14 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
@@ -116,4 +118,4 @@
- 	hw_priv->pf_dev = pf_dev;
- 	hw_priv->dev_info = dev_info;
- 
-@@ -1943,14 +1935,14 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+ 	/*
+ 	 * PF initialization has been done at this point. Call app specific
+ 	 * init code now.
+@@ -1344,14 +1336,14 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
@@ -128 +130 @@
- 		ret = nfp_init_app_fw_nic(hw_priv);
+ 		ret = nfp_init_app_fw_nic(pf_dev, dev_info);
@@ -136,2 +138,2 @@
-@@ -1958,13 +1950,13 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
- 		ret = nfp_init_app_fw_flower(hw_priv);
+@@ -1359,13 +1351,13 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+ 		ret = nfp_init_app_fw_flower(pf_dev, dev_info);
@@ -152 +154 @@
-@@ -1974,6 +1966,8 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+@@ -1375,6 +1367,8 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
@@ -162 +164 @@
-index a4eaed6433..8d9851f969 100644
+index ded491cbdc..c96f55976a 100644
@@ -165 +167 @@
-@@ -116,6 +116,9 @@ struct nfp_pf_dev {
+@@ -98,6 +98,9 @@ struct nfp_pf_dev {
@@ -175,2 +177 @@
-@@ -199,8 +202,6 @@ struct nfp_net_hw {
- 	struct rte_eth_xstat *eth_xstats_base;
+@@ -165,8 +168,6 @@ struct nfp_net_hw {
@@ -177,0 +179 @@
+ 	struct nfp_cpp *cpp;

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

* patch 'hash: fix return code description in Doxygen' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (47 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/nfp: fix xstats for multi PF firmware' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'hash: check name when creating a hash' " Xueming Li
                   ` (30 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Chenming Chang; +Cc: Stephen Hemminger, Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c9c841d41a1683c79b2a8bcf7c193a25ab32e4e5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c9c841d41a1683c79b2a8bcf7c193a25ab32e4e5 Mon Sep 17 00:00:00 2001
From: Chenming Chang <ccm@ccm.ink>
Date: Mon, 27 Jun 2022 21:11:21 +0800
Subject: [PATCH] hash: fix return code description in Doxygen
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 78a632e6b52c29c5f297001181e870750eee02a7 ]

The rte_hash lookup can return ZERO which is not a positive value.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Chenming Chang <ccm@ccm.ink>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 .mailmap            |  1 +
 lib/hash/rte_hash.h | 16 ++++++++--------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/.mailmap b/.mailmap
index 79e25426fe..cc90b111fd 100644
--- a/.mailmap
+++ b/.mailmap
@@ -226,6 +226,7 @@ Cheng Liu <liucheng11@huawei.com>
 Cheng Peng <cheng.peng5@zte.com.cn>
 Chengwen Feng <fengchengwen@huawei.com>
 Chenmin Sun <chenmin.sun@intel.com>
+Chenming Chang <ccm@ccm.ink>
 Chenxu Di <chenxux.di@intel.com>
 Chenyu Huang <chenyux.huang@intel.com>
 Cheryl Houser <chouser@vmware.com>
diff --git a/lib/hash/rte_hash.h b/lib/hash/rte_hash.h
index 7ecc021111..ba96521529 100644
--- a/lib/hash/rte_hash.h
+++ b/lib/hash/rte_hash.h
@@ -286,7 +286,7 @@ rte_hash_add_key_with_hash_data(const struct rte_hash *h, const void *key,
  * @return
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOSPC if there is no space in the hash for this key.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key. This
  *     unique key id may be larger than the user specified entry count
  *     when RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD flag is set.
@@ -310,7 +310,7 @@ rte_hash_add_key(const struct rte_hash *h, const void *key);
  * @return
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOSPC if there is no space in the hash for this key.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key. This
  *     unique key ID may be larger than the user specified entry count
  *     when RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD flag is set.
@@ -341,7 +341,7 @@ rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key, hash_sig_t
  * @return
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOENT if the key is not found.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key, and is the same
  *     value that was returned when the key was added.
  */
@@ -373,7 +373,7 @@ rte_hash_del_key(const struct rte_hash *h, const void *key);
  * @return
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOENT if the key is not found.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key, and is the same
  *     value that was returned when the key was added.
  */
@@ -440,7 +440,7 @@ rte_hash_free_key_with_position(const struct rte_hash *h,
  * @param data
  *   Output with pointer to data returned from the hash table.
  * @return
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key, and is the same
  *     value that was returned when the key was added.
  *   - -EINVAL if the parameters are invalid.
@@ -465,7 +465,7 @@ rte_hash_lookup_data(const struct rte_hash *h, const void *key, void **data);
  * @param data
  *   Output with pointer to data returned from the hash table.
  * @return
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key, and is the same
  *     value that was returned when the key was added.
  *   - -EINVAL if the parameters are invalid.
@@ -488,7 +488,7 @@ rte_hash_lookup_with_hash_data(const struct rte_hash *h, const void *key,
  * @return
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOENT if the key is not found.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key, and is the same
  *     value that was returned when the key was added.
  */
@@ -510,7 +510,7 @@ rte_hash_lookup(const struct rte_hash *h, const void *key);
  * @return
  *   - -EINVAL if the parameters are invalid.
  *   - -ENOENT if the key is not found.
- *   - A positive value that can be used by the caller as an offset into an
+ *   - A non-negative value that can be used by the caller as an offset into an
  *     array of user data. This value is unique for this key, and is the same
  *     value that was returned when the key was added.
  */
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.332485060 +0800
+++ 0049-hash-fix-return-code-description-in-Doxygen.patch	2024-07-12 18:40:14.076594231 +0800
@@ -1 +1 @@
-From 78a632e6b52c29c5f297001181e870750eee02a7 Mon Sep 17 00:00:00 2001
+From c9c841d41a1683c79b2a8bcf7c193a25ab32e4e5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 78a632e6b52c29c5f297001181e870750eee02a7 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 1aca379558..111dbb0ac3 100644
+index 79e25426fe..cc90b111fd 100644
@@ -23 +25 @@
-@@ -228,6 +228,7 @@ Cheng Liu <liucheng11@huawei.com>
+@@ -226,6 +226,7 @@ Cheng Liu <liucheng11@huawei.com>

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

* patch 'hash: check name when creating a hash' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (48 preceding siblings ...)
  2024-07-12 10:44 ` patch 'hash: fix return code description in Doxygen' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'vhost: fix build with GCC 13' " Xueming Li
                   ` (29 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Conor Fogarty; +Cc: Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=9bc1b9985b462fbee01a42cac0ec204b71629f2c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9bc1b9985b462fbee01a42cac0ec204b71629f2c Mon Sep 17 00:00:00 2001
From: Conor Fogarty <conor.fogarty@intel.com>
Date: Thu, 6 Jul 2023 16:26:26 +0100
Subject: [PATCH] hash: check name when creating a hash
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8f36e53317ecf8384461e4f692e46beaaf6c4d2f ]

Add NULL pointer check to params->name, which is later
copied into the hash datastructure. Without this check
the code segfaults on the strlcpy() of a NULL pointer.

Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation")

Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/hash/rte_cuckoo_hash.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index ccdc3b9894..7871f6e090 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -166,6 +166,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
 	/* Check for valid parameters */
 	if ((params->entries > RTE_HASH_ENTRIES_MAX) ||
 			(params->entries < RTE_HASH_BUCKET_ENTRIES) ||
+			(params->name == NULL) ||
 			(params->key_len == 0)) {
 		rte_errno = EINVAL;
 		RTE_LOG(ERR, HASH, "rte_hash_create has invalid parameters\n");
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.376589554 +0800
+++ 0050-hash-check-name-when-creating-a-hash.patch	2024-07-12 18:40:14.086594229 +0800
@@ -1 +1 @@
-From 8f36e53317ecf8384461e4f692e46beaaf6c4d2f Mon Sep 17 00:00:00 2001
+From 9bc1b9985b462fbee01a42cac0ec204b71629f2c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8f36e53317ecf8384461e4f692e46beaaf6c4d2f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index b31a3d973e..16c9c4c5c4 100644
+index ccdc3b9894..7871f6e090 100644
@@ -23 +25 @@
-@@ -173,6 +173,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
+@@ -166,6 +166,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
@@ -30 +32 @@
- 		HASH_LOG(ERR, "%s has invalid parameters", __func__);
+ 		RTE_LOG(ERR, HASH, "rte_hash_create has invalid parameters\n");

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

* patch 'vhost: fix build with GCC 13' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (49 preceding siblings ...)
  2024-07-12 10:44 ` patch 'hash: check name when creating a hash' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'vhost: cleanup resubmit info before inflight setup' " Xueming Li
                   ` (28 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Luca Vizzarro
  Cc: Paul Szczepanek, Nick Connolly, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=13147e7b044acd718289af6d1b17fe2a3a87ee1c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 13147e7b044acd718289af6d1b17fe2a3a87ee1c Mon Sep 17 00:00:00 2001
From: Luca Vizzarro <luca.vizzarro@arm.com>
Date: Wed, 10 Apr 2024 16:21:01 +0100
Subject: [PATCH] vhost: fix build with GCC 13
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8db1acabeea3fa4b0c673588cfff2b01e0ae9615 ]

This patch resolves a build error with GCC 13 and arm/aarch32 as
targets:

In function ‘mbuf_to_desc’,
    inlined from ‘vhost_enqueue_async_packed’ at
      ../lib/vhost/virtio_net.c:1828:6,
    inlined from ‘virtio_dev_rx_async_packed’ at
      ../lib/vhost/virtio_net.c:1842:6,
    inlined from ‘virtio_dev_rx_async_submit_packed’ at
      ../lib/vhost/virtio_net.c:1900:7:
../lib/vhost/virtio_net.c:1159:18: error: ‘buf_vec[0].buf_addr’ may
    be used uninitialized [-Werror=maybe-uninitialized]
 1159 |         buf_addr = buf_vec[vec_idx].buf_addr;
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
<snip>
../lib/vhost/virtio_net.c:1160:18: error: ‘buf_vec[0].buf_iova’ may
    be used uninitialized [-Werror=maybe-uninitialized]
 1160 |         buf_iova = buf_vec[vec_idx].buf_iova;
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
<snip>
../lib/vhost/virtio_net.c:1161:35: error: ‘buf_vec[0].buf_len’ may
    be used uninitialized [-Werror=maybe-uninitialized]
 1161 |         buf_len = buf_vec[vec_idx].buf_len;
      |                   ~~~~~~~~~~~~~~~~^~~~~~~~

GCC complains about the possible runtime path where the while loop
which fills buf_vec (in vhost_enqueue_async_packed) is not run. As a
consequence it correctly thinks that buf_vec is not initialized while
being accessed anyways.

This scenario is actually very unlikely as the only way this can occur
is if size has overflowed to 0. Meaning that the total packet length
would be close to UINT64_MAX (or actually UINT32_MAX). At first glance,
the code suggests that this may never happen as the type of size has
been changed to 64-bit. For a 32-bit architecture such as arm
(e.g. armv7-a) and aarch32, this still happens because the operand types
(pkt->pkt_len and sizeof) are 32-bit wide, performing 32-bit arithmetic
first (where the overflow can happen) and widening to 64-bit later.

The proposed fix simply guarantees to the compiler that the scope which
fills buf_vec is accessed at least once, while not disrupting the actual
logic. This is based on the assumption that size will always be greater
than 0, as suggested by the sizeof, and the packet length will never be
as big as UINT32_MAX, and causing an overflow.

Fixes: 873e8dad6f49 ("vhost: support packed ring in async datapath")

Signed-off-by: Luca Vizzarro <luca.vizzarro@arm.com>
Reviewed-by: Paul Szczepanek <paul.szczepanek@arm.com>
Reviewed-by: Nick Connolly <nick.connolly@arm.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 .mailmap               | 2 +-
 lib/vhost/virtio_net.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.mailmap b/.mailmap
index cc90b111fd..e1ce4e1b1b 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1021,7 +1021,7 @@ Netanel Belgazal <netanel@amazon.com>
 Netanel Gonen <netanelg@mellanox.com>
 Niall Power <niall.power@intel.com>
 Nicholas Pratte <npratte@iol.unh.edu>
-Nick Connolly <nick.connolly@mayadata.io>
+Nick Connolly <nick.connolly@arm.com> <nick.connolly@mayadata.io>
 Nick Nunley <nicholas.d.nunley@intel.com>
 Niclas Storm <niclas.storm@ericsson.com>
 Nicolas Chautru <nicolas.chautru@intel.com>
diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index 895a79cf51..6d53ff932d 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -1935,7 +1935,7 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
 	else
 		max_tries = 1;
 
-	while (size > 0) {
+	do {
 		/*
 		 * if we tried all available ring items, and still
 		 * can't get enough buf, it means something abnormal
@@ -1962,7 +1962,7 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
 		avail_idx += desc_count;
 		if (avail_idx >= vq->size)
 			avail_idx -= vq->size;
-	}
+	} while (size > 0);
 
 	if (unlikely(mbuf_to_desc(dev, vq, pkt, buf_vec, nr_vec, *nr_buffers, true) < 0))
 		return -1;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.457325645 +0800
+++ 0051-vhost-fix-build-with-GCC-13.patch	2024-07-12 18:40:14.096594228 +0800
@@ -1 +1 @@
-From 8db1acabeea3fa4b0c673588cfff2b01e0ae9615 Mon Sep 17 00:00:00 2001
+From 13147e7b044acd718289af6d1b17fe2a3a87ee1c Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8db1acabeea3fa4b0c673588cfff2b01e0ae9615 ]
@@ -55 +57,0 @@
-Cc: stable@dpdk.org
@@ -67 +69 @@
-index 111dbb0ac3..ed63605a15 100644
+index cc90b111fd..e1ce4e1b1b 100644
@@ -70 +72 @@
-@@ -1030,7 +1030,7 @@ Netanel Belgazal <netanel@amazon.com>
+@@ -1021,7 +1021,7 @@ Netanel Belgazal <netanel@amazon.com>
@@ -80 +82 @@
-index b406b5d7d9..370402d849 100644
+index 895a79cf51..6d53ff932d 100644

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

* patch 'vhost: cleanup resubmit info before inflight setup' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (50 preceding siblings ...)
  2024-07-12 10:44 ` patch 'vhost: fix build with GCC 13' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/virtio-user: fix control queue destruction' " Xueming Li
                   ` (27 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Haoqian He; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d119ad0b29f26b96da7ecefa0ce07c8ed6a14dff

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d119ad0b29f26b96da7ecefa0ce07c8ed6a14dff Mon Sep 17 00:00:00 2001
From: Haoqian He <haoqian.he@smartx.com>
Date: Fri, 26 Apr 2024 07:09:46 -0400
Subject: [PATCH] vhost: cleanup resubmit info before inflight setup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e4a01eea66326c58593906e189b376605a0ec606 ]

This patch fixes a potential VM hang bug when the VM reboots after
vhost live recovery due to missing cleanup virtqueue resubmit info.

Specifically, if inflight IO that should be resubmitted during
the latest vhost reconnection has not been submitted yet while
VM rebooting, so GET_VRING_BASE would not wait for the inflight
IO, at this time the resubmit info has been.  When the VM restarts,
SET_VRING_KICK will resubmit the inflight IO (If resubmit info
is not null, function set_vring_kick will return without updating
resubmit info).

It’s an error, any stale inflight IO should not be resubmitted
after the VM restart.

The solution is to clean up virtqueue resubmit info when function
set_inflight_fd before function set_vring_kick.

Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information")

Signed-off-by: Haoqian He <haoqian.he@smartx.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 .mailmap               | 1 +
 lib/vhost/vhost_user.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/.mailmap b/.mailmap
index e1ce4e1b1b..b0eda8e8af 100644
--- a/.mailmap
+++ b/.mailmap
@@ -489,6 +489,7 @@ Hanoch Haim <hhaim@cisco.com>
 Hanumanth Pothula <hpothula@marvell.com>
 Hao Chen <chenh@yusur.tech> <chenhao164@huawei.com>
 Hao Wu <hao.wu@intel.com>
+Haoqian He <haoqian.he@smartx.com>
 Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
 Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>
 Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index a323ce5fbf..f8e42dd619 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -1799,6 +1799,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
 		if (!vq)
 			continue;
 
+		cleanup_vq_inflight(dev, vq);
 		if (vq_is_packed(dev)) {
 			vq->inflight_packed = addr;
 			vq->inflight_packed->desc_num = queue_size;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.550820633 +0800
+++ 0052-vhost-cleanup-resubmit-info-before-inflight-setup.patch	2024-07-12 18:40:14.096594228 +0800
@@ -1 +1 @@
-From e4a01eea66326c58593906e189b376605a0ec606 Mon Sep 17 00:00:00 2001
+From d119ad0b29f26b96da7ecefa0ce07c8ed6a14dff Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e4a01eea66326c58593906e189b376605a0ec606 ]
@@ -27 +29,0 @@
-Cc: stable@dpdk.org
@@ -37 +39 @@
-index ed63605a15..ff20619bfb 100644
+index e1ce4e1b1b..b0eda8e8af 100644
@@ -40 +42 @@
-@@ -495,6 +495,7 @@ Hanoch Haim <hhaim@cisco.com>
+@@ -489,6 +489,7 @@ Hanoch Haim <hhaim@cisco.com>
@@ -49 +51 @@
-index 414192500e..7c54afc5fb 100644
+index a323ce5fbf..f8e42dd619 100644
@@ -52 +54 @@
-@@ -1871,6 +1871,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
+@@ -1799,6 +1799,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,

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

* patch 'net/virtio-user: fix control queue destruction' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (51 preceding siblings ...)
  2024-07-12 10:44 ` patch 'vhost: cleanup resubmit info before inflight setup' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/virtio-user: fix shadow control queue notification init' " Xueming Li
                   ` (26 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=9f5bb6deb44b1f930706cae2af544fa05a2fe7d3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9f5bb6deb44b1f930706cae2af544fa05a2fe7d3 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 28 Mar 2024 14:08:11 +0100
Subject: [PATCH] net/virtio-user: fix control queue destruction
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bffcdad5ecaf1e1030271357cd9871f87857b1e4 ]

This patch uses the freshly renamed iterator to destroy
queues at stop time. Doing this, we fix the missing
control queue destruction.

Fixes: 90966e8e5b67 ("net/virtio-user: send shadow virtqueue info to the backend")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 .../net/virtio/virtio_user/virtio_user_dev.c  | 43 +++++++++++++++----
 1 file changed, 34 insertions(+), 9 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 4fd89a8e97..ce9e73493d 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -32,6 +32,22 @@ const char * const virtio_user_backend_strings[] = {
 	[VIRTIO_USER_BACKEND_VHOST_VDPA] = "VHOST_VDPA",
 };
 
+static int
+virtio_user_destroy_queue(struct virtio_user_dev *dev, uint32_t queue_sel)
+{
+	struct vhost_vring_state state;
+	int ret;
+
+	state.index = queue_sel;
+	ret = dev->ops->get_vring_base(dev, &state);
+	if (ret < 0) {
+		PMD_DRV_LOG(ERR, "(%s) Failed to destroy queue %u", dev->path, queue_sel);
+		return -1;
+	}
+
+	return 0;
+}
+
 static int
 virtio_user_create_queue(struct virtio_user_dev *dev, uint32_t queue_sel)
 {
@@ -127,6 +143,22 @@ err:
 	return -1;
 }
 
+static int
+virtio_user_foreach_queue(struct virtio_user_dev *dev, int (*fn)(struct virtio_user_dev *, uint32_t))
+{
+	uint32_t i, nr_vq;
+
+	nr_vq = dev->max_queue_pairs * 2;
+	if (dev->hw_cvq)
+		nr_vq++;
+
+	for (i = 0; i < nr_vq; i++)
+		if (fn(dev, i) < 0)
+			return -1;
+
+	return 0;
+}
+
 static int
 virtio_user_queue_setup(struct virtio_user_dev *dev,
 			int (*fn)(struct virtio_user_dev *, uint32_t))
@@ -239,7 +271,6 @@ error:
 
 int virtio_user_stop_device(struct virtio_user_dev *dev)
 {
-	struct vhost_vring_state state;
 	uint32_t i;
 	int ret;
 
@@ -260,14 +291,8 @@ int virtio_user_stop_device(struct virtio_user_dev *dev)
 	}
 
 	/* Stop the backend. */
-	for (i = 0; i < dev->max_queue_pairs * 2; ++i) {
-		state.index = i;
-		ret = dev->ops->get_vring_base(dev, &state);
-		if (ret < 0) {
-			PMD_DRV_LOG(ERR, "(%s) get_vring_base failed, index=%u", dev->path, i);
-			goto err;
-		}
-	}
+	if (virtio_user_foreach_queue(dev, virtio_user_destroy_queue) < 0)
+		goto err;
 
 	dev->started = false;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.623225225 +0800
+++ 0053-net-virtio-user-fix-control-queue-destruction.patch	2024-07-12 18:40:14.096594228 +0800
@@ -1 +1 @@
-From bffcdad5ecaf1e1030271357cd9871f87857b1e4 Mon Sep 17 00:00:00 2001
+From 9f5bb6deb44b1f930706cae2af544fa05a2fe7d3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bffcdad5ecaf1e1030271357cd9871f87857b1e4 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +18,2 @@
- .../net/virtio/virtio_user/virtio_user_dev.c  | 27 ++++++++++++-------
- 1 file changed, 18 insertions(+), 9 deletions(-)
+ .../net/virtio/virtio_user/virtio_user_dev.c  | 43 +++++++++++++++----
+ 1 file changed, 34 insertions(+), 9 deletions(-)
@@ -20 +22 @@
-index 5e998750ae..07f45984fe 100644
+index 4fd89a8e97..ce9e73493d 100644
@@ -23 +25 @@
-@@ -33,6 +33,22 @@ const char * const virtio_user_backend_strings[] = {
+@@ -32,6 +32,22 @@ const char * const virtio_user_backend_strings[] = {
@@ -46 +48,24 @@
-@@ -237,7 +253,6 @@ error:
+@@ -127,6 +143,22 @@ err:
+ 	return -1;
+ }
+ 
++static int
++virtio_user_foreach_queue(struct virtio_user_dev *dev, int (*fn)(struct virtio_user_dev *, uint32_t))
++{
++	uint32_t i, nr_vq;
++
++	nr_vq = dev->max_queue_pairs * 2;
++	if (dev->hw_cvq)
++		nr_vq++;
++
++	for (i = 0; i < nr_vq; i++)
++		if (fn(dev, i) < 0)
++			return -1;
++
++	return 0;
++}
++
+ static int
+ virtio_user_queue_setup(struct virtio_user_dev *dev,
+ 			int (*fn)(struct virtio_user_dev *, uint32_t))
+@@ -239,7 +271,6 @@ error:
@@ -54 +79 @@
-@@ -258,14 +273,8 @@ int virtio_user_stop_device(struct virtio_user_dev *dev)
+@@ -260,14 +291,8 @@ int virtio_user_stop_device(struct virtio_user_dev *dev)

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

* patch 'net/virtio-user: fix shadow control queue notification init' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (52 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/virtio-user: fix control queue destruction' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/virtio-user: fix control queue allocation' " Xueming Li
                   ` (25 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f745eb9e509c326cce0f240319b374d3de9a4a62

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f745eb9e509c326cce0f240319b374d3de9a4a62 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 28 Mar 2024 14:08:12 +0100
Subject: [PATCH] net/virtio-user: fix shadow control queue notification init
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4de6c17a449ef0fafecae637bd73cd4d03c36d92 ]

The Virtio-user control queue kick and call FDs were not
uninitialized at device stop time.

This patch fixes this using the queues iterator helper for
both initialization and uninitialization.

Fixes: 90966e8e5b67 ("net/virtio-user: send shadow virtqueue info to the backend")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 .../net/virtio/virtio_user/virtio_user_dev.c  | 90 +++++++++----------
 1 file changed, 43 insertions(+), 47 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index ce9e73493d..ef320d3395 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -32,6 +32,45 @@ const char * const virtio_user_backend_strings[] = {
 	[VIRTIO_USER_BACKEND_VHOST_VDPA] = "VHOST_VDPA",
 };
 
+static int
+virtio_user_uninit_notify_queue(struct virtio_user_dev *dev, uint32_t queue_sel)
+{
+	if (dev->kickfds[queue_sel] >= 0) {
+		close(dev->kickfds[queue_sel]);
+		dev->kickfds[queue_sel] = -1;
+	}
+
+	if (dev->callfds[queue_sel] >= 0) {
+		close(dev->callfds[queue_sel]);
+		dev->callfds[queue_sel] = -1;
+	}
+
+	return 0;
+}
+
+static int
+virtio_user_init_notify_queue(struct virtio_user_dev *dev, uint32_t queue_sel)
+{
+	/* May use invalid flag, but some backend uses kickfd and
+	 * callfd as criteria to judge if dev is alive. so finally we
+	 * use real event_fd.
+	 */
+	dev->callfds[queue_sel] = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+	if (dev->callfds[queue_sel] < 0) {
+		PMD_DRV_LOG(ERR, "(%s) Failed to setup callfd for queue %u: %s",
+				dev->path, queue_sel, strerror(errno));
+		return -1;
+	}
+	dev->kickfds[queue_sel] = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+	if (dev->kickfds[queue_sel] < 0) {
+		PMD_DRV_LOG(ERR, "(%s) Failed to setup kickfd for queue %u: %s",
+				dev->path, queue_sel, strerror(errno));
+		return -1;
+	}
+
+	return 0;
+}
+
 static int
 virtio_user_destroy_queue(struct virtio_user_dev *dev, uint32_t queue_sel)
 {
@@ -423,46 +462,13 @@ out:
 static int
 virtio_user_dev_init_notify(struct virtio_user_dev *dev)
 {
-	uint32_t i, j, nr_vq;
-	int callfd;
-	int kickfd;
 
-	nr_vq = dev->max_queue_pairs * 2;
-	if (dev->hw_cvq)
-		nr_vq++;
-
-	for (i = 0; i < nr_vq; i++) {
-		/* May use invalid flag, but some backend uses kickfd and
-		 * callfd as criteria to judge if dev is alive. so finally we
-		 * use real event_fd.
-		 */
-		callfd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
-		if (callfd < 0) {
-			PMD_DRV_LOG(ERR, "(%s) callfd error, %s", dev->path, strerror(errno));
-			goto err;
-		}
-		kickfd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
-		if (kickfd < 0) {
-			close(callfd);
-			PMD_DRV_LOG(ERR, "(%s) kickfd error, %s", dev->path, strerror(errno));
-			goto err;
-		}
-		dev->callfds[i] = callfd;
-		dev->kickfds[i] = kickfd;
-	}
+	if (virtio_user_foreach_queue(dev, virtio_user_init_notify_queue) < 0)
+		goto err;
 
 	return 0;
 err:
-	for (j = 0; j < i; j++) {
-		if (dev->kickfds[j] >= 0) {
-			close(dev->kickfds[j]);
-			dev->kickfds[j] = -1;
-		}
-		if (dev->callfds[j] >= 0) {
-			close(dev->callfds[j]);
-			dev->callfds[j] = -1;
-		}
-	}
+	virtio_user_foreach_queue(dev, virtio_user_uninit_notify_queue);
 
 	return -1;
 }
@@ -470,18 +476,8 @@ err:
 static void
 virtio_user_dev_uninit_notify(struct virtio_user_dev *dev)
 {
-	uint32_t i;
+	virtio_user_foreach_queue(dev, virtio_user_uninit_notify_queue);
 
-	for (i = 0; i < dev->max_queue_pairs * 2; ++i) {
-		if (dev->kickfds[i] >= 0) {
-			close(dev->kickfds[i]);
-			dev->kickfds[i] = -1;
-		}
-		if (dev->callfds[i] >= 0) {
-			close(dev->callfds[i]);
-			dev->callfds[i] = -1;
-		}
-	}
 }
 
 static int
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.684180917 +0800
+++ 0054-net-virtio-user-fix-shadow-control-queue-notificatio.patch	2024-07-12 18:40:14.106594227 +0800
@@ -1 +1 @@
-From 4de6c17a449ef0fafecae637bd73cd4d03c36d92 Mon Sep 17 00:00:00 2001
+From f745eb9e509c326cce0f240319b374d3de9a4a62 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4de6c17a449ef0fafecae637bd73cd4d03c36d92 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 07f45984fe..ba067d6d9c 100644
+index ce9e73493d..ef320d3395 100644
@@ -25 +27 @@
-@@ -33,6 +33,45 @@ const char * const virtio_user_backend_strings[] = {
+@@ -32,6 +32,45 @@ const char * const virtio_user_backend_strings[] = {
@@ -71 +73 @@
-@@ -423,33 +462,9 @@ out:
+@@ -423,46 +462,13 @@ out:
@@ -78 +80 @@
--
+ 
@@ -82 +84 @@
- 
+-
@@ -105,4 +106,0 @@
- 	if (dev->device_features & (1ULL << VIRTIO_F_NOTIFICATION_DATA))
- 		if (dev->ops->map_notification_area &&
-@@ -458,16 +473,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev)
- 
@@ -125 +123 @@
-@@ -475,18 +481,8 @@ err:
+@@ -470,18 +476,8 @@ err:
@@ -142,2 +139,0 @@
- 	if (dev->ops->unmap_notification_area && dev->notify_area)
- 		dev->ops->unmap_notification_area(dev);
@@ -144,0 +141,2 @@
+ 
+ static int

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

* patch 'net/virtio-user: fix control queue allocation' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (53 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/virtio-user: fix shadow control queue notification init' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/virtio: fix MAC table update' " Xueming Li
                   ` (24 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=76310fc7c1ccf9296e30baabf7eb13d4e5067623

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 76310fc7c1ccf9296e30baabf7eb13d4e5067623 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 28 Mar 2024 14:08:13 +0100
Subject: [PATCH] net/virtio-user: fix control queue allocation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b80947743f5ebee74e2d03ece9d5a9826edde968 ]

It is possible to have the control queue without the
device advertising VIRTIO_NET_F_MQ.

Rely on the VIRTIO_NET_F_CTRL_VQ feature being advertised
instead.

Fixes: 6fdf32d1e318 ("net/virtio-user: remove max queues limitation")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index ef320d3395..209435a865 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -20,6 +20,7 @@
 #include <rte_malloc.h>
 
 #include "vhost.h"
+#include "virtio.h"
 #include "virtio_user_dev.h"
 #include "../virtio_ethdev.h"
 
@@ -608,7 +609,7 @@ virtio_user_alloc_vrings(struct virtio_user_dev *dev)
 	bool packed_ring = !!(dev->device_features & (1ull << VIRTIO_F_RING_PACKED));
 
 	nr_vrings = dev->max_queue_pairs * 2;
-	if (dev->device_features & (1ull << VIRTIO_NET_F_MQ))
+	if (dev->device_features & (1ull << VIRTIO_NET_F_CTRL_VQ))
 		nr_vrings++;
 
 	dev->callfds = rte_zmalloc("virtio_user_dev", nr_vrings * sizeof(*dev->callfds), 0);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.727094612 +0800
+++ 0055-net-virtio-user-fix-control-queue-allocation.patch	2024-07-12 18:40:14.106594227 +0800
@@ -1 +1 @@
-From b80947743f5ebee74e2d03ece9d5a9826edde968 Mon Sep 17 00:00:00 2001
+From 76310fc7c1ccf9296e30baabf7eb13d4e5067623 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b80947743f5ebee74e2d03ece9d5a9826edde968 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index ba067d6d9c..1365c8a5c8 100644
+index ef320d3395..209435a865 100644
@@ -25,2 +27,2 @@
-@@ -21,6 +21,7 @@
- #include <rte_io.h>
+@@ -20,6 +20,7 @@
+ #include <rte_malloc.h>
@@ -33 +35 @@
-@@ -615,7 +616,7 @@ virtio_user_alloc_vrings(struct virtio_user_dev *dev)
+@@ -608,7 +609,7 @@ virtio_user_alloc_vrings(struct virtio_user_dev *dev)

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

* patch 'net/virtio: fix MAC table update' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (54 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/virtio-user: fix control queue allocation' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'baseband/acc: fix memory barrier' " Xueming Li
                   ` (23 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Satha Rao; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=05704553e64780b308d9e45a12d96bc0b9bcf6f5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 05704553e64780b308d9e45a12d96bc0b9bcf6f5 Mon Sep 17 00:00:00 2001
From: Satha Rao <skoteshwar@marvell.com>
Date: Thu, 30 May 2024 13:40:39 -0400
Subject: [PATCH] net/virtio: fix MAC table update
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7698e655516c54558a43b8aaed1bff69928d96fb ]

Don't send NULL MAC addresses in MAC table update.

Fixes: 1b306359e58c ("virtio: suport multiple MAC addresses")

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 517585740e..70d4839def 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -913,6 +913,8 @@ virtio_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
 		struct virtio_net_ctrl_mac *tbl
 			= rte_is_multicast_ether_addr(addr) ? mc : uc;
 
+		if (rte_is_zero_ether_addr(addr))
+			break;
 		memcpy(&tbl->macs[tbl->entries++], addr, RTE_ETHER_ADDR_LEN);
 	}
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.763942108 +0800
+++ 0056-net-virtio-fix-MAC-table-update.patch	2024-07-12 18:40:14.116594226 +0800
@@ -1 +1 @@
-From 7698e655516c54558a43b8aaed1bff69928d96fb Mon Sep 17 00:00:00 2001
+From 05704553e64780b308d9e45a12d96bc0b9bcf6f5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7698e655516c54558a43b8aaed1bff69928d96fb ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'baseband/acc: fix memory barrier' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (55 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/virtio: fix MAC table update' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'event/sw: fix warning from useless snprintf' " Xueming Li
                   ` (22 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=0ab5bf3a37e66ef3a049a53c27865282a39c8d3c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0ab5bf3a37e66ef3a049a53c27865282a39c8d3c Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Thu, 2 May 2024 13:45:44 -0700
Subject: [PATCH] baseband/acc: fix memory barrier
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0a200a3a29017f6b01a481776a571a75e03a32ce ]

Moving memory barrier so that dequeue thread can be in sync with enqueue
thread.

Fixes: 32e8b7ea35dd ("baseband/acc100: refactor to segregate common code")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/acc_common.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h
index bda2ad2f7a..6752c256d2 100644
--- a/drivers/baseband/acc/acc_common.h
+++ b/drivers/baseband/acc/acc_common.h
@@ -1110,6 +1110,9 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
 				req_elem_addr,
 				(void *)q->mmio_reg_enqueue);
 
+		q->aq_enqueued++;
+		q->sw_ring_head += enq_batch_size;
+
 		rte_wmb();
 
 		/* Start time measurement for enqueue function offload. */
@@ -1120,8 +1123,6 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
 
 		queue_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
 
-		q->aq_enqueued++;
-		q->sw_ring_head += enq_batch_size;
 		n -= enq_batch_size;
 
 	} while (n);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.798500604 +0800
+++ 0057-baseband-acc-fix-memory-barrier.patch	2024-07-12 18:40:14.116594226 +0800
@@ -1 +1 @@
-From 0a200a3a29017f6b01a481776a571a75e03a32ce Mon Sep 17 00:00:00 2001
+From 0ab5bf3a37e66ef3a049a53c27865282a39c8d3c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0a200a3a29017f6b01a481776a571a75e03a32ce ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index fddeb0737b..e249f37e38 100644
+index bda2ad2f7a..6752c256d2 100644
@@ -22 +24 @@
-@@ -1112,6 +1112,9 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
+@@ -1110,6 +1110,9 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
@@ -32 +34 @@
-@@ -1122,8 +1125,6 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
+@@ -1120,8 +1123,6 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,

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

* patch 'event/sw: fix warning from useless snprintf' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (56 preceding siblings ...)
  2024-07-12 10:44 ` patch 'baseband/acc: fix memory barrier' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'eventdev/crypto: fix opaque field handling' " Xueming Li
                   ` (21 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=82ab075745638cc70db6e788e9c4438ac2a0d947

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 82ab075745638cc70db6e788e9c4438ac2a0d947 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 23 Apr 2024 20:45:40 -0700
Subject: [PATCH] event/sw: fix warning from useless snprintf
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 510e2b655b46d91d3cc189882e6392afdc0363ff ]

With GCC-14, this warning is generated:
drivers/event/sw/sw_evdev.c:263:3: warning:
    snprintf' will always be truncated;
    specified size is 12, but format string expands to at least 13
        snprintf(buf, sizeof(buf), "sw%d_iq_%d_rob", dev_id, i);
        ^

Yet the whole printf to the buf is unnecessary. The type string argument
has never been implemented, and should just be NULL.  Removing the
unnecessary snprintf, then means IQ_ROB_NAMESIZE can be removed.

Fixes: 5ffb2f142d95 ("event/sw: support event queues")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 drivers/event/sw/iq_chunk.h | 2 --
 drivers/event/sw/sw_evdev.c | 5 +----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/event/sw/iq_chunk.h b/drivers/event/sw/iq_chunk.h
index 31d013eab7..7820815c38 100644
--- a/drivers/event/sw/iq_chunk.h
+++ b/drivers/event/sw/iq_chunk.h
@@ -9,8 +9,6 @@
 #include <stdbool.h>
 #include <rte_eventdev.h>
 
-#define IQ_ROB_NAMESIZE 12
-
 struct sw_queue_chunk {
 	struct rte_event events[SW_EVS_PER_Q_CHUNK];
 	struct sw_queue_chunk *next;
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 55e7735cb0..2096496917 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -228,9 +228,7 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
 		const struct rte_event_queue_conf *queue_conf)
 {
 	unsigned int i;
-	int dev_id = sw->data->dev_id;
 	int socket_id = sw->data->socket_id;
-	char buf[IQ_ROB_NAMESIZE];
 	struct sw_qid *qid = &sw->qids[idx];
 
 	/* Initialize the FID structures to no pinning (-1), and zero packets */
@@ -260,8 +258,7 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
 			goto cleanup;
 		}
 
-		snprintf(buf, sizeof(buf), "sw%d_iq_%d_rob", dev_id, i);
-		qid->reorder_buffer = rte_zmalloc_socket(buf,
+		qid->reorder_buffer = rte_zmalloc_socket(NULL,
 				window_size * sizeof(qid->reorder_buffer[0]),
 				0, socket_id);
 		if (!qid->reorder_buffer) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.835437499 +0800
+++ 0058-event-sw-fix-warning-from-useless-snprintf.patch	2024-07-12 18:40:14.116594226 +0800
@@ -1 +1 @@
-From 510e2b655b46d91d3cc189882e6392afdc0363ff Mon Sep 17 00:00:00 2001
+From 82ab075745638cc70db6e788e9c4438ac2a0d947 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 510e2b655b46d91d3cc189882e6392afdc0363ff ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 7a7a8782e6..e638142dbc 100644
+index 31d013eab7..7820815c38 100644
@@ -37 +39 @@
- struct __rte_cache_aligned sw_queue_chunk {
+ struct sw_queue_chunk {
@@ -41 +43 @@
-index 1c01b069fe..19a52afc7d 100644
+index 55e7735cb0..2096496917 100644

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

* patch 'eventdev/crypto: fix opaque field handling' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (57 preceding siblings ...)
  2024-07-12 10:44 ` patch 'event/sw: fix warning from useless snprintf' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/iavf: fix VF reset when using DCF' " Xueming Li
                   ` (20 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Ganapati Kundapura; +Cc: Abhinandan Gujjar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=706a8e4cee38fe3664f77ab14febbfbd192a464a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 706a8e4cee38fe3664f77ab14febbfbd192a464a Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Thu, 6 Jun 2024 08:48:00 -0500
Subject: [PATCH] eventdev/crypto: fix opaque field handling
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ad12d08f05db8323ac1fb655b75dcef69e536a04 ]

For session-less crypto operations, event info is contained in
crypto op metadata for each event which is restored in event
from the crypto op metadata response info.

For session based crypto operations, crypto op contains per session
based event info in crypto op metadata. If any PMD passes any
implementation specific data in "struct rte_event::impl_opaque"
on each event, it's not getting restored.

This patch stores "struct rte_event::impl_opaque" in mbuf dynamic
field before enqueueing to cryptodev and restores
"struct rte_event::impl_opaque" from mbuf dynamic field after
dequeueing crypto op from cryptodev for session based crypto operations.

Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
 lib/eventdev/rte_event_crypto_adapter.c | 68 +++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 9903f96695..d11c0d4be8 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -138,6 +138,28 @@ static struct event_crypto_adapter **event_crypto_adapter;
 	} \
 } while (0)
 
+#define ECA_DYNFIELD_NAME "eca_ev_opaque_data"
+/* Device-specific metadata field type */
+typedef uint8_t eca_dynfield_t;
+
+/* mbuf dynamic field offset for device-specific metadata */
+int eca_dynfield_offset = -1;
+
+static int
+eca_dynfield_register(void)
+{
+	static const struct rte_mbuf_dynfield eca_dynfield_desc = {
+		.name = ECA_DYNFIELD_NAME,
+		.size = sizeof(eca_dynfield_t),
+		.align = __alignof__(eca_dynfield_t),
+		.flags = 0,
+	};
+
+	eca_dynfield_offset =
+		rte_mbuf_dynfield_register(&eca_dynfield_desc);
+	return eca_dynfield_offset;
+}
+
 static inline int
 eca_valid_id(uint8_t id)
 {
@@ -491,6 +513,25 @@ eca_enq_to_cryptodev(struct event_crypto_adapter *adapter, struct rte_event *ev,
 		crypto_op = ev[i].event_ptr;
 		if (crypto_op == NULL)
 			continue;
+
+		/** "struct rte_event::impl_opaque" field passed on from
+		 *  eventdev PMD could have different value per event.
+		 *  For session-based crypto operations retain
+		 *  "struct rte_event::impl_opaque" into mbuf dynamic field and
+		 *  restore it back after copying event information from
+		 *  session event metadata.
+		 *  For session-less, each crypto operation carries event
+		 *  metadata and retains "struct rte_event:impl_opaque"
+		 *  information to be passed back to eventdev PMD.
+		 */
+		if (crypto_op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
+			struct rte_mbuf *mbuf = crypto_op->sym->m_src;
+
+			*RTE_MBUF_DYNFIELD(mbuf,
+					eca_dynfield_offset,
+					eca_dynfield_t *) = ev[i].impl_opaque;
+		}
+
 		m_data = rte_cryptodev_session_event_mdata_get(crypto_op);
 		if (m_data == NULL) {
 			rte_pktmbuf_free(crypto_op->sym->m_src);
@@ -657,6 +698,21 @@ eca_ops_enqueue_burst(struct event_crypto_adapter *adapter,
 
 		rte_memcpy(ev, &m_data->response_info, sizeof(*ev));
 		ev->event_ptr = ops[i];
+
+		/** Restore "struct rte_event::impl_opaque" from mbuf
+		 *  dynamic field for session based crypto operation.
+		 *  For session-less, each crypto operations carries event
+		 *  metadata and retains "struct rte_event::impl_opaque"
+		 *  information to be passed back to eventdev PMD.
+		 */
+		if (ops[i]->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
+			struct rte_mbuf *mbuf = ops[i]->sym->m_src;
+
+			ev->impl_opaque = *RTE_MBUF_DYNFIELD(mbuf,
+							eca_dynfield_offset,
+							eca_dynfield_t *);
+		}
+
 		ev->event_type = RTE_EVENT_TYPE_CRYPTODEV;
 		if (adapter->implicit_release_disabled)
 			ev->op = RTE_EVENT_OP_FORWARD;
@@ -895,6 +951,18 @@ eca_init_service(struct event_crypto_adapter *adapter, uint8_t id)
 	}
 
 	adapter->implicit_release_disabled = (uint8_t)impl_rel;
+
+	/** Register for mbuf dyn field to store/restore
+	 *  "struct rte_event::impl_opaque"
+	 */
+	eca_dynfield_offset = eca_dynfield_register();
+	if (eca_dynfield_offset  < 0) {
+		RTE_EDEV_LOG_ERR("Failed to register eca mbuf dyn field");
+		eca_circular_buffer_free(&adapter->ebuf);
+		rte_free(adapter);
+		return -EINVAL;
+	}
+
 	adapter->service_inited = 1;
 
 	return ret;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.867911195 +0800
+++ 0059-eventdev-crypto-fix-opaque-field-handling.patch	2024-07-12 18:40:14.116594226 +0800
@@ -1 +1 @@
-From ad12d08f05db8323ac1fb655b75dcef69e536a04 Mon Sep 17 00:00:00 2001
+From 706a8e4cee38fe3664f77ab14febbfbd192a464a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ad12d08f05db8323ac1fb655b75dcef69e536a04 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index db1c7f3906..939ca1cad9 100644
+index 9903f96695..d11c0d4be8 100644
@@ -50 +52 @@
-+		.align = alignof(eca_dynfield_t),
++		.align = __alignof__(eca_dynfield_t),

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

* patch 'net/iavf: fix VF reset when using DCF' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (58 preceding siblings ...)
  2024-07-12 10:44 ` patch 'eventdev/crypto: fix opaque field handling' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/fm10k: fix cleanup during init failure' " Xueming Li
                   ` (19 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Hongbo Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=fc1912baa712b96bfb0d8cffb722b2d405852632

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fc1912baa712b96bfb0d8cffb722b2d405852632 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Thu, 14 Mar 2024 09:00:49 +0800
Subject: [PATCH] net/iavf: fix VF reset when using DCF
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0f9ec0cbd2a96c2bde3489fbc8f4e254f639905c ]

On the latest ice kernel driver, renegotiating
VIRTCHNL_OP_GET_VF_RESOURCES will fail when using DCF
(Device Config Function) if a hardware reset is not done.

Fix this by sending VIRTCHNL_OP_RESET_VF to PF before DPDK resets VF.

Fixes: e74e1bb6280d ("net/iavf: enable port reset")
Fixes: 7a93cd3575eb ("net/iavf: add VF reset check")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Tested-by: Hongbo Li <hongbox.li@intel.com>
---
 .mailmap                       |  1 +
 drivers/net/iavf/iavf_ethdev.c | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/.mailmap b/.mailmap
index b0eda8e8af..6ac0fa9103 100644
--- a/.mailmap
+++ b/.mailmap
@@ -526,6 +526,7 @@ Hiroki Shirokura <slank.dev@gmail.com>
 Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
 Hiroyuki Mikita <h.mikita89@gmail.com>
 Holly Nichols <hollynichols04@gmail.com>
+Hongbo Li <hongbox.li@intel.com>
 Hongbo Zheng <zhenghongbo3@huawei.com>
 Hongjun Ni <hongjun.ni@intel.com>
 Hongzhi Guo <guohongzhi1@huawei.com>
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 2d85b947f6..54bff05675 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2954,6 +2954,16 @@ iavf_dev_reset(struct rte_eth_dev *dev)
 	struct iavf_adapter *adapter =
 		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+
+	if (!vf->in_reset_recovery) {
+		ret = iavf_aq_send_msg_to_pf(hw, VIRTCHNL_OP_RESET_VF,
+						IAVF_SUCCESS, NULL, 0, NULL);
+		if (ret) {
+			PMD_DRV_LOG(ERR, "fail to send cmd VIRTCHNL_OP_RESET_VF");
+			return ret;
+		}
+	}
 
 	/*
 	 * Check whether the VF reset has been done and inform application,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.904413691 +0800
+++ 0060-net-iavf-fix-VF-reset-when-using-DCF.patch	2024-07-12 18:40:14.136594223 +0800
@@ -1 +1 @@
-From 0f9ec0cbd2a96c2bde3489fbc8f4e254f639905c Mon Sep 17 00:00:00 2001
+From fc1912baa712b96bfb0d8cffb722b2d405852632 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0f9ec0cbd2a96c2bde3489fbc8f4e254f639905c ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index ccd50c7729..075ea40f17 100644
+index b0eda8e8af..6ac0fa9103 100644
@@ -27 +29 @@
-@@ -533,6 +533,7 @@ Hiroki Shirokura <slank.dev@gmail.com>
+@@ -526,6 +526,7 @@ Hiroki Shirokura <slank.dev@gmail.com>
@@ -36 +38 @@
-index bbf915097e..44276dcf38 100644
+index 2d85b947f6..54bff05675 100644
@@ -39 +41 @@
-@@ -3041,6 +3041,16 @@ iavf_dev_reset(struct rte_eth_dev *dev)
+@@ -2954,6 +2954,16 @@ iavf_dev_reset(struct rte_eth_dev *dev)

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

* patch 'net/fm10k: fix cleanup during init failure' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (59 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/iavf: fix VF reset when using DCF' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/ice: fix VLAN stripping in double VLAN mode' " Xueming Li
                   ` (18 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Julien Meunier; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=eaaa1b29af82f97553af84a14190b0b2885ece21

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eaaa1b29af82f97553af84a14190b0b2885ece21 Mon Sep 17 00:00:00 2001
From: Julien Meunier <julien.meunier@nokia.com>
Date: Wed, 3 Apr 2024 13:55:41 +0200
Subject: [PATCH] net/fm10k: fix cleanup during init failure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cd7f5da2e7d647863a3d6552b6787f413bbd05f2 ]

Cleanup was not done on this PMD if a error is seen during the init:
- possible memory leak due to a missing free
- interrupt handler was not disabled: if an IRQ is received after the
  init, a SIGSEGV can be seen (private data stored in
  rte_eth_devices[port_id] is pointing to NULL)

Fixes: a6061d9e7075 ("fm10k: register PF driver")
Fixes: 4c287332c39a ("fm10k: add PF and VF interrupt handling")

Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c | 39 +++++++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 6 deletions(-)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 4d3c4c10cf..cc2012786d 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -3057,7 +3057,7 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct rte_pci_device *pdev = RTE_ETH_DEV_TO_PCI(dev);
 	struct rte_intr_handle *intr_handle = pdev->intr_handle;
-	int diag, i;
+	int diag, i, ret;
 	struct fm10k_macvlan_filter_info *macvlan;
 
 	PMD_INIT_FUNC_TRACE();
@@ -3146,21 +3146,24 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 	diag = fm10k_stats_reset(dev);
 	if (diag != 0) {
 		PMD_INIT_LOG(ERR, "Stats reset failed: %d", diag);
-		return diag;
+		ret = diag;
+		goto err_stat;
 	}
 
 	/* Reset the hw */
 	diag = fm10k_reset_hw(hw);
 	if (diag != FM10K_SUCCESS) {
 		PMD_INIT_LOG(ERR, "Hardware reset failed: %d", diag);
-		return -EIO;
+		ret = -EIO;
+		goto err_reset_hw;
 	}
 
 	/* Setup mailbox service */
 	diag = fm10k_setup_mbx_service(hw);
 	if (diag != FM10K_SUCCESS) {
 		PMD_INIT_LOG(ERR, "Failed to setup mailbox: %d", diag);
-		return -EIO;
+		ret = -EIO;
+		goto err_mbx;
 	}
 
 	/*PF/VF has different interrupt handling mechanism */
@@ -3199,7 +3202,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 
 		if (switch_ready == false) {
 			PMD_INIT_LOG(ERR, "switch is not ready");
-			return -1;
+			ret = -1;
+			goto err_switch_ready;
 		}
 	}
 
@@ -3234,7 +3238,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 
 		if (!hw->mac.default_vid) {
 			PMD_INIT_LOG(ERR, "default VID is not ready");
-			return -1;
+			ret = -1;
+			goto err_vid;
 		}
 	}
 
@@ -3243,6 +3248,28 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 		MAIN_VSI_POOL_NUMBER);
 
 	return 0;
+
+err_vid:
+err_switch_ready:
+	rte_intr_disable(intr_handle);
+
+	if (hw->mac.type == fm10k_mac_pf) {
+		fm10k_dev_disable_intr_pf(dev);
+		rte_intr_callback_unregister(intr_handle,
+			fm10k_dev_interrupt_handler_pf, (void *)dev);
+	} else {
+		fm10k_dev_disable_intr_vf(dev);
+		rte_intr_callback_unregister(intr_handle,
+			fm10k_dev_interrupt_handler_vf, (void *)dev);
+	}
+
+err_mbx:
+err_reset_hw:
+err_stat:
+	rte_free(dev->data->mac_addrs);
+	dev->data->mac_addrs = NULL;
+
+	return ret;
 }
 
 static int
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.949536886 +0800
+++ 0061-net-fm10k-fix-cleanup-during-init-failure.patch	2024-07-12 18:40:14.136594223 +0800
@@ -1 +1 @@
-From cd7f5da2e7d647863a3d6552b6787f413bbd05f2 Mon Sep 17 00:00:00 2001
+From eaaa1b29af82f97553af84a14190b0b2885ece21 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cd7f5da2e7d647863a3d6552b6787f413bbd05f2 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index fa0d16277e..7b490bea17 100644
+index 4d3c4c10cf..cc2012786d 100644
@@ -26 +28 @@
-@@ -3058,7 +3058,7 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3057,7 +3057,7 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -35 +37 @@
-@@ -3147,21 +3147,24 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3146,21 +3146,24 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -63 +65 @@
-@@ -3200,7 +3203,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3199,7 +3202,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -73 +75 @@
-@@ -3235,7 +3239,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3234,7 +3238,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -83 +85 @@
-@@ -3244,6 +3249,28 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3243,6 +3248,28 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)

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

* patch 'net/ice: fix VLAN stripping in double VLAN mode' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (60 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/fm10k: fix cleanup during init failure' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/ixgbe: do not update link status in secondary process' " Xueming Li
                   ` (17 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=91eca591037cf382acca55cbaec9d26d6ea12b76

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 91eca591037cf382acca55cbaec9d26d6ea12b76 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Wed, 27 Mar 2024 18:44:13 +0000
Subject: [PATCH] net/ice: fix VLAN stripping in double VLAN mode
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 882ed13a2a8c3b5cba48c15af710bf09d445094a ]

The ICE hardware can operate in two modes - single VLAN mode or double
VLAN mode. Depending on the operating mode the hardware handles VLAN
header with single VLAN tag differently.  When double VLAN enabled, a
packet with a single VLAN is treated as a packet with outer VLAN only.
Otherwise, a single VLAN in a packet is treated as inner VLAN.

This patch fixes the logic of how VLAN stripping is programmed.

Bugzilla ID: 1402
Fixes: de5da9d16430 ("net/ice: support double VLAN")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 45 +++++++++++++++++++++++++-----------
 1 file changed, 32 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 3c3bc49dc2..c1d2b91ad7 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3750,7 +3750,10 @@ ice_dev_start(struct rte_eth_dev *dev)
 	ice_set_tx_function(dev);
 
 	mask = RTE_ETH_VLAN_STRIP_MASK | RTE_ETH_VLAN_FILTER_MASK |
-			RTE_ETH_VLAN_EXTEND_MASK | RTE_ETH_QINQ_STRIP_MASK;
+			RTE_ETH_VLAN_EXTEND_MASK;
+	if (ice_is_dvm_ena(hw))
+		mask |= RTE_ETH_QINQ_STRIP_MASK;
+
 	ret = ice_vlan_offload_set(dev, mask);
 	if (ret) {
 		PMD_INIT_LOG(ERR, "Unable to set VLAN offload");
@@ -4820,19 +4823,35 @@ ice_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 			ice_vsi_config_vlan_filter(vsi, false);
 	}
 
-	if (mask & RTE_ETH_VLAN_STRIP_MASK) {
-		if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)
-			ice_vsi_config_vlan_stripping(vsi, true);
-		else
-			ice_vsi_config_vlan_stripping(vsi, false);
-	}
+	struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
+	if (!ice_is_dvm_ena(hw)) {
+		if (mask & RTE_ETH_VLAN_STRIP_MASK) {
+			if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)
+				ice_vsi_config_vlan_stripping(vsi, true);
+			else
+				ice_vsi_config_vlan_stripping(vsi, false);
+		}
 
-	if (mask & RTE_ETH_QINQ_STRIP_MASK) {
-		/* Enable or disable outer VLAN stripping */
-		if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_QINQ_STRIP)
-			ice_vsi_config_outer_vlan_stripping(vsi, true);
-		else
-			ice_vsi_config_outer_vlan_stripping(vsi, false);
+		if (mask & RTE_ETH_QINQ_STRIP_MASK) {
+			PMD_DRV_LOG(ERR, "Single VLAN mode (SVM) does not support qinq");
+			return -ENOTSUP;
+		}
+	} else {
+		if ((mask & RTE_ETH_VLAN_STRIP_MASK) |
+				(mask & RTE_ETH_QINQ_STRIP_MASK)) {
+			if (rxmode->offloads & (RTE_ETH_RX_OFFLOAD_VLAN_STRIP |
+						RTE_ETH_RX_OFFLOAD_QINQ_STRIP))
+				ice_vsi_config_outer_vlan_stripping(vsi, true);
+			else
+				ice_vsi_config_outer_vlan_stripping(vsi, false);
+		}
+
+		if (mask & RTE_ETH_QINQ_STRIP_MASK) {
+			if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_QINQ_STRIP)
+				ice_vsi_config_vlan_stripping(vsi, true);
+			else
+				ice_vsi_config_vlan_stripping(vsi, false);
+		}
 	}
 
 	return 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:16.985708781 +0800
+++ 0062-net-ice-fix-VLAN-stripping-in-double-VLAN-mode.patch	2024-07-12 18:40:14.146594222 +0800
@@ -1 +1 @@
-From 882ed13a2a8c3b5cba48c15af710bf09d445094a Mon Sep 17 00:00:00 2001
+From 91eca591037cf382acca55cbaec9d26d6ea12b76 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 882ed13a2a8c3b5cba48c15af710bf09d445094a ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 53a323ab14..194109b0f6 100644
+index 3c3bc49dc2..c1d2b91ad7 100644
@@ -28 +30 @@
-@@ -3840,7 +3840,10 @@ ice_dev_start(struct rte_eth_dev *dev)
+@@ -3750,7 +3750,10 @@ ice_dev_start(struct rte_eth_dev *dev)
@@ -40 +42 @@
-@@ -4910,19 +4913,35 @@ ice_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -4820,19 +4823,35 @@ ice_vlan_offload_set(struct rte_eth_dev *dev, int mask)

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

* patch 'net/ixgbe: do not update link status in secondary process' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (61 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/ice: fix VLAN stripping in double VLAN mode' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/ixgbe: do not create delayed interrupt handler twice' " Xueming Li
                   ` (16 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Jun Wang, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6f3188b1fccc5840cbc8152f5ed5922b1f6a78a6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6f3188b1fccc5840cbc8152f5ed5922b1f6a78a6 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 20 Mar 2024 10:33:04 -0700
Subject: [PATCH] net/ixgbe: do not update link status in secondary process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 ]

The code to update link status is not safe in secondary process.
If called from secondary it will crash, example from dumpcap:
	ixgbe_dev_link_update_share()
	ixgbe_dev_link_update()
	rte_eth_link_get()

Fixes: af75078fece3 ("first public release")

Reported-by: Jun Wang <junwang01@cestc.cn>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index a32d3a6d7c..a54920042b 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4289,6 +4289,9 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	int wait = 1;
 	u32 esdp_reg;
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -1;
+
 	memset(&link, 0, sizeof(link));
 	link.link_status = RTE_ETH_LINK_DOWN;
 	link.link_speed = RTE_ETH_SPEED_NUM_NONE;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.022448777 +0800
+++ 0063-net-ixgbe-do-not-update-link-status-in-secondary-pro.patch	2024-07-12 18:40:14.146594222 +0800
@@ -1 +1 @@
-From 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 Mon Sep 17 00:00:00 2001
+From 6f3188b1fccc5840cbc8152f5ed5922b1f6a78a6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index bbdc996f31..a6916da0c5 100644
+index a32d3a6d7c..a54920042b 100644
@@ -26 +28 @@
-@@ -4293,6 +4293,9 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4289,6 +4289,9 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,

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

* patch 'net/ixgbe: do not create delayed interrupt handler twice' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (62 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/ixgbe: do not update link status in secondary process' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/e1000/base: fix link power down' " Xueming Li
                   ` (15 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Edwin Brossette; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=84946e8d982ab9cec49c94313bf56fae9ce3f100

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 84946e8d982ab9cec49c94313bf56fae9ce3f100 Mon Sep 17 00:00:00 2001
From: Edwin Brossette <edwin.brossette@6wind.com>
Date: Thu, 18 Apr 2024 15:53:07 +0200
Subject: [PATCH] net/ixgbe: do not create delayed interrupt handler twice
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 130ece79670d57760acd18c9671f91a4cd4e07a0 ]

Since link state may need some time to stabilize after a link state
change, we cannot update the link state right after one occurs. So link
state change interrupts (LSC) are handled after a delay. To do this, an
alarm to call a delayed handler is programmed. This delayed handler is
tasked with updating the link after a variable delay of one to four
seconds which should be enough time for the link state to become stable
again.

However, a problem can occur with some models of network cards. For
example, ixgbe_mac_X550EM_x may trigger this interrupt twice because
another interrupt signal is received on the General Purpose Interrupt
pin SPD0, which has the same interrupt handler. In such a case, the
delayed interrupt handler would be programmed to be executed twice.

Since we save the original interrupt mask value to restore it after the
delayed handler is done with its work, we end up overwriting its value
after the second alarm is programmed. Even worse: when restoring it the
first time, the saved original mask variable is reset to 0, so we end up
completely disabling all interrupts when trying to restore this mask
after the second time the delayed handler is executed.

Add a check on the interrupt mask value when programming the alarm for
the delayed handler. If the bit for LSC interrupts is unset, it means an
alarm was already programmed for the delayed handler. In this case, skip
the alarm creation.

Fixes: 9b667210700e ("net/ixgbe: fix blocked interrupts")

Signed-off-by: Edwin Brossette <edwin.brossette@6wind.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index a54920042b..a44497ce51 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4666,14 +4666,20 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
 			timeout = IXGBE_LINK_DOWN_CHECK_TIMEOUT;
 
 		ixgbe_dev_link_status_print(dev);
-		if (rte_eal_alarm_set(timeout * 1000,
-				      ixgbe_dev_interrupt_delayed_handler, (void *)dev) < 0)
-			PMD_DRV_LOG(ERR, "Error setting alarm");
-		else {
-			/* remember original mask */
-			intr->mask_original = intr->mask;
-			/* only disable lsc interrupt */
-			intr->mask &= ~IXGBE_EIMS_LSC;
+
+		/* Don't program delayed handler if LSC interrupt is disabled.
+		 * It means one is already programmed.
+		 */
+		if (intr->mask & IXGBE_EIMS_LSC) {
+			if (rte_eal_alarm_set(timeout * 1000,
+					      ixgbe_dev_interrupt_delayed_handler, (void *)dev) < 0)
+				PMD_DRV_LOG(ERR, "Error setting alarm");
+			else {
+				/* remember original mask */
+				intr->mask_original = intr->mask;
+				/* only disable lsc interrupt */
+				intr->mask &= ~IXGBE_EIMS_LSC;
+			}
 		}
 	}
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.068612771 +0800
+++ 0064-net-ixgbe-do-not-create-delayed-interrupt-handler-tw.patch	2024-07-12 18:40:14.156594221 +0800
@@ -1 +1 @@
-From 130ece79670d57760acd18c9671f91a4cd4e07a0 Mon Sep 17 00:00:00 2001
+From 84946e8d982ab9cec49c94313bf56fae9ce3f100 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 130ece79670d57760acd18c9671f91a4cd4e07a0 ]
@@ -33 +35,0 @@
-Cc: stable@dpdk.org
@@ -42 +44 @@
-index a6916da0c5..1f93be98ca 100644
+index a54920042b..a44497ce51 100644
@@ -45 +47 @@
-@@ -4672,14 +4672,20 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
+@@ -4666,14 +4666,20 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)

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

* patch 'net/e1000/base: fix link power down' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (63 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/ixgbe: do not create delayed interrupt handler twice' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' " Xueming Li
                   ` (14 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e883a2d8438f4bbed1dd3a99ecd32cd7ff5b275d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e883a2d8438f4bbed1dd3a99ecd32cd7ff5b275d Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 14 May 2024 16:17:16 +0100
Subject: [PATCH] net/e1000/base: fix link power down
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a8218d09e3aaae5307325ff4b2f92ed4a3c37a8c ]

Current code is a result of work to reduce duplication between various
device models. However, the logic that was replaced did not exactly
match the new logic, and as a result the link power down was not
working correctly for some NICs, and the link remained up even when
the interface is down.

Fix it to correctly power down the link under all circumstances that
were supported by old logic.

Fixes: 44dddd14059f ("net/e1000/base: remove duplicated codes")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/e1000/base/e1000_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/e1000/base/e1000_base.c b/drivers/net/e1000/base/e1000_base.c
index ab73e1e59e..3ec32e7240 100644
--- a/drivers/net/e1000/base/e1000_base.c
+++ b/drivers/net/e1000/base/e1000_base.c
@@ -107,7 +107,7 @@ void e1000_power_down_phy_copper_base(struct e1000_hw *hw)
 		return;
 
 	/* If the management interface is not enabled, then power down */
-	if (phy->ops.check_reset_block(hw))
+	if (!(e1000_enable_mng_pass_thru(hw) || phy->ops.check_reset_block(hw)))
 		e1000_power_down_phy_copper(hw);
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.115400766 +0800
+++ 0065-net-e1000-base-fix-link-power-down.patch	2024-07-12 18:40:14.156594221 +0800
@@ -1 +1 @@
-From a8218d09e3aaae5307325ff4b2f92ed4a3c37a8c Mon Sep 17 00:00:00 2001
+From e883a2d8438f4bbed1dd3a99ecd32cd7ff5b275d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a8218d09e3aaae5307325ff4b2f92ed4a3c37a8c ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (64 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/e1000/base: fix link power down' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/ixgbe/base: fix 5G link speed reported on VF' " Xueming Li
                   ` (13 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Piotr Pietruszewski
  Cc: Piotr Skajewski, Marek Mical, Jeff Kirsher, Alice Michael, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a215045fcde570004479099286ab4c6ee88a57c5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a215045fcde570004479099286ab4c6ee88a57c5 Mon Sep 17 00:00:00 2001
From: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Date: Thu, 30 May 2024 12:13:34 +0100
Subject: [PATCH] net/ixgbe/base: revert advertising for X550 2.5G/5G
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9ac063a739b00188281ba4ef5c6a0e43cc59a3b8 ]

The commit removing advertising 2.5G and 5G speeds from
ixgbe_get_copper_speeds_supported() was supposed to disable 2.5G and 5G
during the autonegotiation with default settings. However, that change
prevented OS-specific part of the driver from forcing these speeds at
user request.

This change reverts the commit and adds 2.5G and 5G as speeds supported
by the X550.

Fixes: 13de2444449e ("net/ixgbe/base: remove default advertising for x550 2.5G/5G")

Signed-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Marek Mical <marekx.mical@intel.com>
Reviewed-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
---
 .mailmap                           | 1 +
 drivers/net/ixgbe/base/ixgbe_phy.c | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/.mailmap b/.mailmap
index 6ac0fa9103..0cc726ea37 100644
--- a/.mailmap
+++ b/.mailmap
@@ -882,6 +882,7 @@ Marcin Wojtas <mw@semihalf.com>
 Marcin Zapolski <marcinx.a.zapolski@intel.com>
 Marco Varlese <mvarlese@suse.de>
 Marc Sune <marcdevel@gmail.com> <marc.sune@bisdn.de>
+Marek Mical <marekx.mical@intel.com>
 Maria Lingemark <maria.lingemark@ericsson.com>
 Mario Carrillo <mario.alfredo.c.arevalo@intel.com>
 Mário Kuka <kuka@cesnet.cz>
diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 74c5db16fa..3a8e603472 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -915,6 +915,10 @@ static s32 ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw)
 		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_100_FULL;
 
 	switch (hw->mac.type) {
+	case ixgbe_mac_X550:
+		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_2_5GB_FULL;
+		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_5GB_FULL;
+		break;
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
 		hw->phy.speeds_supported &= ~IXGBE_LINK_SPEED_100_FULL;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.157152561 +0800
+++ 0066-net-ixgbe-base-revert-advertising-for-X550-2.5G-5G.patch	2024-07-12 18:40:14.166594220 +0800
@@ -1 +1 @@
-From 9ac063a739b00188281ba4ef5c6a0e43cc59a3b8 Mon Sep 17 00:00:00 2001
+From a215045fcde570004479099286ab4c6ee88a57c5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9ac063a739b00188281ba4ef5c6a0e43cc59a3b8 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index 075ea40f17..508d4eba24 100644
+index 6ac0fa9103..0cc726ea37 100644
@@ -32 +34 @@
-@@ -892,6 +892,7 @@ Marcin Wojtas <mw@semihalf.com>
+@@ -882,6 +882,7 @@ Marcin Wojtas <mw@semihalf.com>

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

* patch 'net/ixgbe/base: fix 5G link speed reported on VF' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (65 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/ixgbe/base: fix PHY ID for X550' " Xueming Li
                   ` (12 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Piotr Skajewski
  Cc: Radoslaw Tyl, Slawomir Mrozowicz, Alice Michael, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=0e1354a6ea9b4abfa16de9912002722cfc577184

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0e1354a6ea9b4abfa16de9912002722cfc577184 Mon Sep 17 00:00:00 2001
From: Piotr Skajewski <piotrx.skajewski@intel.com>
Date: Thu, 30 May 2024 12:13:35 +0100
Subject: [PATCH] net/ixgbe/base: fix 5G link speed reported on VF
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9eb7fdbd47cf02068715a6e8bef767b0deea6f94 ]

When 5000 Base-T was set on PF the VF reported 100 Base-T. This patch
changes ixgbe_check_mac_link_vf function where there was an incorrect
conditional which checks using PF mac types, now it is correctly
using VF mac types.

Fixes: 12e20906905c ("net/ixgbe/base: include new speeds in VFLINK interpretation")

Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
---
 .mailmap                          | 1 +
 drivers/net/ixgbe/base/ixgbe_vf.c | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.mailmap b/.mailmap
index 0cc726ea37..ac2268a1d1 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1158,6 +1158,7 @@ Quentin Armitage <quentin@armitage.org.uk>
 Qun Wan <qun.wan@intel.com>
 Radha Mohan Chintakuntla <radhac@marvell.com>
 Radoslaw Biernacki <rad@semihalf.com> <radoslaw.biernacki@linaro.org>
+Radoslaw Tyl <radoslawx.tyl@intel.com>
 Radu Bulie <radu-andrei.bulie@nxp.com>
 Radu Nicolau <radu.nicolau@intel.com>
 Rafael Ávila de Espíndola <espindola@scylladb.com>
diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c b/drivers/net/ixgbe/base/ixgbe_vf.c
index 5e3ae1b519..11dbbe2a86 100644
--- a/drivers/net/ixgbe/base/ixgbe_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_vf.c
@@ -585,7 +585,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	switch (links_reg & IXGBE_LINKS_SPEED_82599) {
 	case IXGBE_LINKS_SPEED_10G_82599:
 		*speed = IXGBE_LINK_SPEED_10GB_FULL;
-		if (hw->mac.type >= ixgbe_mac_X550) {
+		if (hw->mac.type >= ixgbe_mac_X550_vf) {
 			if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
 				*speed = IXGBE_LINK_SPEED_2_5GB_FULL;
 		}
@@ -595,7 +595,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 		break;
 	case IXGBE_LINKS_SPEED_100_82599:
 		*speed = IXGBE_LINK_SPEED_100_FULL;
-		if (hw->mac.type == ixgbe_mac_X550) {
+		if (hw->mac.type == ixgbe_mac_X550_vf) {
 			if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
 				*speed = IXGBE_LINK_SPEED_5GB_FULL;
 		}
@@ -603,7 +603,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	case IXGBE_LINKS_SPEED_10_X550EM_A:
 		*speed = IXGBE_LINK_SPEED_UNKNOWN;
 		/* Since Reserved in older MAC's */
-		if (hw->mac.type >= ixgbe_mac_X550)
+		if (hw->mac.type >= ixgbe_mac_X550_vf)
 			*speed = IXGBE_LINK_SPEED_10_FULL;
 		break;
 	default:
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.200230955 +0800
+++ 0067-net-ixgbe-base-fix-5G-link-speed-reported-on-VF.patch	2024-07-12 18:40:14.166594220 +0800
@@ -1 +1 @@
-From 9eb7fdbd47cf02068715a6e8bef767b0deea6f94 Mon Sep 17 00:00:00 2001
+From 0e1354a6ea9b4abfa16de9912002722cfc577184 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9eb7fdbd47cf02068715a6e8bef767b0deea6f94 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 508d4eba24..be16cabd07 100644
+index 0cc726ea37..ac2268a1d1 100644
@@ -27 +29 @@
-@@ -1173,6 +1173,7 @@ Quentin Armitage <quentin@armitage.org.uk>
+@@ -1158,6 +1158,7 @@ Quentin Armitage <quentin@armitage.org.uk>

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

* patch 'net/ixgbe/base: fix PHY ID for X550' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (66 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/ixgbe/base: fix 5G link speed reported on VF' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/cnxk: fix RSS config' " Xueming Li
                   ` (11 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Radoslaw Tyl; +Cc: Piotr Skajewski, Alice Michael, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6b47aa312c0d274f8bcb0fd1d7a684354b86bb8b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6b47aa312c0d274f8bcb0fd1d7a684354b86bb8b Mon Sep 17 00:00:00 2001
From: Radoslaw Tyl <radoslawx.tyl@intel.com>
Date: Thu, 30 May 2024 12:13:36 +0100
Subject: [PATCH] net/ixgbe/base: fix PHY ID for X550
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a9f5a3bd4c179e54b5ca95b0ce191bf4f33d2add ]

Function ixgbe_get_phy_type_from_id() for X550_PHY_ID2 and
X550_PHY_ID3 always return ixgbe_phy_unknown instead of ixgbe_phy_aq
because phy ID's last 4 bits are always masked, and should not be
taken into account when selecting phy type.

This patch adds default PHY ID for X550 devices with mask on last 4
bits (0xFFFFFFF0), and fixes the switch statement to use it.

Fixes: 58ddc803e412 ("ixgbe/base: add new X550 PHY ids")

Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_phy.c  | 3 +--
 drivers/net/ixgbe/base/ixgbe_type.h | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 3a8e603472..56267bb00d 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -432,8 +432,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id)
 	case TN1010_PHY_ID:
 		phy_type = ixgbe_phy_tn;
 		break;
-	case X550_PHY_ID2:
-	case X550_PHY_ID3:
+	case X550_PHY_ID:
 	case X540_PHY_ID:
 		phy_type = ixgbe_phy_aq;
 		break;
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index 35212a561b..f709681df2 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -1664,6 +1664,7 @@ struct ixgbe_dmac_config {
 #define TN1010_PHY_ID	0x00A19410
 #define TNX_FW_REV	0xB
 #define X540_PHY_ID	0x01540200
+#define X550_PHY_ID	0x01540220
 #define X550_PHY_ID2	0x01540223
 #define X550_PHY_ID3	0x01540221
 #define X557_PHY_ID	0x01540240
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.236970551 +0800
+++ 0068-net-ixgbe-base-fix-PHY-ID-for-X550.patch	2024-07-12 18:40:14.176594219 +0800
@@ -1 +1 @@
-From a9f5a3bd4c179e54b5ca95b0ce191bf4f33d2add Mon Sep 17 00:00:00 2001
+From 6b47aa312c0d274f8bcb0fd1d7a684354b86bb8b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a9f5a3bd4c179e54b5ca95b0ce191bf4f33d2add ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/cnxk: fix RSS config' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (67 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/ixgbe/base: fix PHY ID for X550' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'common/cnxk: fix flow aging cleanup' " Xueming Li
                   ` (10 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Sunil Kumar Kori; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d73bed774ec937f5ff3a2c267c8cb7c031999ee2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d73bed774ec937f5ff3a2c267c8cb7c031999ee2 Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Thu, 23 May 2024 20:23:21 +0530
Subject: [PATCH] net/cnxk: fix RSS config
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d3654d35176dcc6e5ebb7bab00c7fdd6b61fc1f0 ]

Currently user passed RSS configuration is ignored via
rte_eth_dev_configure() API. Instead default RSS setup
is done by driver.

Adding handling for user passed RSS configuration too
via rte_eth_dev_configure().

Fixes: b75e0aca84b0 ("net/cnxk: add device configuration operation")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 5e11bbb017..c841b31051 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -1384,6 +1384,13 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
 		goto free_nix_lf;
 	}
 
+	/* Overwrite default RSS setup if requested by user */
+	rc = cnxk_nix_rss_hash_update(eth_dev, &conf->rx_adv_conf.rss_conf);
+	if (rc) {
+		plt_err("Failed to configure rss rc=%d", rc);
+		goto free_nix_lf;
+	}
+
 	/* Init the default TM scheduler hierarchy */
 	rc = roc_nix_tm_init(nix);
 	if (rc) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.275793946 +0800
+++ 0069-net-cnxk-fix-RSS-config.patch	2024-07-12 18:40:14.176594219 +0800
@@ -1 +1 @@
-From d3654d35176dcc6e5ebb7bab00c7fdd6b61fc1f0 Mon Sep 17 00:00:00 2001
+From d73bed774ec937f5ff3a2c267c8cb7c031999ee2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d3654d35176dcc6e5ebb7bab00c7fdd6b61fc1f0 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 6b37bd877f..95a3d8aaf9 100644
+index 5e11bbb017..c841b31051 100644

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

* patch 'common/cnxk: fix flow aging cleanup' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (68 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/cnxk: fix RSS config' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'common/cnxk: fix segregation of logs based on module' " Xueming Li
                   ` (9 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2428f9f2e30e1c69ea3ab0d7cd31b3e27d24986b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2428f9f2e30e1c69ea3ab0d7cd31b3e27d24986b Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Wed, 8 May 2024 16:27:13 +0530
Subject: [PATCH] common/cnxk: fix flow aging cleanup
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 85e9542d47009eeea2d4c4eaa703715c1c3bf4f7 ]

The aged flows poll thread is not stopped before NPC cleanup
resulting in a segmentation fault. Fixing this by stopping
aged flows poll thread before proceeding with NPC cleanup.

Fixes: 357f5ebc8a24 ("common/cnxk: support flow aging")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/common/cnxk/roc_npc.c       | 5 +++--
 drivers/common/cnxk/roc_npc_aging.c | 8 +++++---
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index a0d88c0743..fcede1d0b7 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -351,6 +351,8 @@ roc_npc_fini(struct roc_npc *roc_npc)
 	struct npc *npc = roc_npc_to_npc_priv(roc_npc);
 	int rc;
 
+	npc_aging_ctrl_thread_destroy(roc_npc);
+
 	rc = npc_flow_free_all_resources(npc);
 	if (rc) {
 		plt_err("Error when deleting NPC MCAM entries, counters");
@@ -1626,8 +1628,7 @@ roc_npc_flow_destroy(struct roc_npc *roc_npc, struct roc_npc_flow *flow)
 	if (flow->has_age_action)
 		npc_age_flow_list_entry_delete(roc_npc, flow);
 
-	if (roc_npc->flow_age.age_flow_refcnt == 0 &&
-		plt_thread_is_valid(roc_npc->flow_age.aged_flows_poll_thread))
+	if (roc_npc->flow_age.age_flow_refcnt == 0)
 		npc_aging_ctrl_thread_destroy(roc_npc);
 
 done:
diff --git a/drivers/common/cnxk/roc_npc_aging.c b/drivers/common/cnxk/roc_npc_aging.c
index e0f2dc2291..15f6e61d76 100644
--- a/drivers/common/cnxk/roc_npc_aging.c
+++ b/drivers/common/cnxk/roc_npc_aging.c
@@ -303,9 +303,11 @@ npc_aging_ctrl_thread_destroy(struct roc_npc *roc_npc)
 	struct roc_npc_flow_age *flow_age;
 
 	flow_age = &roc_npc->flow_age;
-	flow_age->aged_flows_get_thread_exit = true;
-	plt_thread_join(flow_age->aged_flows_poll_thread, NULL);
-	npc_aged_flows_bitmap_free(roc_npc);
+	if (plt_thread_is_valid(flow_age->aged_flows_poll_thread)) {
+		flow_age->aged_flows_get_thread_exit = true;
+		plt_thread_join(flow_age->aged_flows_poll_thread, NULL);
+		npc_aged_flows_bitmap_free(roc_npc);
+	}
 }
 
 void *
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.311592342 +0800
+++ 0070-common-cnxk-fix-flow-aging-cleanup.patch	2024-07-12 18:40:14.176594219 +0800
@@ -1 +1 @@
-From 85e9542d47009eeea2d4c4eaa703715c1c3bf4f7 Mon Sep 17 00:00:00 2001
+From 2428f9f2e30e1c69ea3ab0d7cd31b3e27d24986b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 85e9542d47009eeea2d4c4eaa703715c1c3bf4f7 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index d6ad3756bb..37e1a6a7ef 100644
+index a0d88c0743..fcede1d0b7 100644
@@ -24 +26 @@
-@@ -389,6 +389,8 @@ roc_npc_fini(struct roc_npc *roc_npc)
+@@ -351,6 +351,8 @@ roc_npc_fini(struct roc_npc *roc_npc)
@@ -33 +35 @@
-@@ -1810,8 +1812,7 @@ roc_npc_flow_destroy(struct roc_npc *roc_npc, struct roc_npc_flow *flow)
+@@ -1626,8 +1628,7 @@ roc_npc_flow_destroy(struct roc_npc *roc_npc, struct roc_npc_flow *flow)

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

* patch 'common/cnxk: fix segregation of logs based on module' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (69 preceding siblings ...)
  2024-07-12 10:44 ` patch 'common/cnxk: fix flow aging cleanup' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/cnxk: fix extbuf handling for multisegment packet' " Xueming Li
                   ` (8 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=bbe6254b24713f0f87a74645febd7adbdcf57d63

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bbe6254b24713f0f87a74645febd7adbdcf57d63 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Tue, 23 Apr 2024 10:44:43 +0000
Subject: [PATCH] common/cnxk: fix segregation of logs based on module
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 455a771fd6f1a9cb6edc8711ff278ad31709cf7c ]

Originally the logs were segregated under various labels which could be
selectively enabled. It was changed to use 'pmd.common.cnxk' while
changing the macro used for registering logging. Address the same by
restoring the segregation.

Current logs:
        ...
        logtype3
        pmd.common.cnxk
        pmd.common.iavf
        ...

Changed to:
        ...
        logtype3
        pmd.common.cnxk.base
        pmd.common.cnxk.crypto
        pmd.common.cnxk.dpi
        pmd.common.cnxk.esw
        pmd.common.cnxk.event
        pmd.common.cnxk.flow
        pmd.common.cnxk.mbox
        pmd.common.cnxk.mempool
        pmd.common.cnxk.ml
        pmd.common.cnxk.nix
        pmd.common.cnxk.ree
        pmd.common.cnxk.rep
        pmd.common.cnxk.timer
        pmd.common.cnxk.tm
        pmd.common.iavf
        ...

Updated documentation also to reflect the same.

Fixes: 233692f550a1 ("dma/cnxk: rework DMA driver")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 doc/guides/cryptodevs/cnxk.rst     |  2 +-
 doc/guides/eventdevs/cnxk.rst      |  4 ++--
 doc/guides/mempool/cnxk.rst        |  2 +-
 doc/guides/mldevs/cnxk.rst         |  2 +-
 doc/guides/nics/cnxk.rst           |  4 ++--
 doc/guides/platform/cnxk.rst       |  4 ++--
 drivers/common/cnxk/roc_platform.c | 24 ++++++++++++------------
 7 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/doc/guides/cryptodevs/cnxk.rst b/doc/guides/cryptodevs/cnxk.rst
index fbe67475be..89a6556c1d 100644
--- a/doc/guides/cryptodevs/cnxk.rst
+++ b/doc/guides/cryptodevs/cnxk.rst
@@ -197,7 +197,7 @@ Debugging Options
     +---+------------+-------------------------------------------------------+
     | # | Component  | EAL log command                                       |
     +===+============+=======================================================+
-    | 1 | CPT        | --log-level='pmd\.crypto\.cnxk,8'                     |
+    | 1 | CPT        | --log-level='pmd\.common\.cnxk\.crypto,8'             |
     +---+------------+-------------------------------------------------------+
 
 Testing
diff --git a/doc/guides/eventdevs/cnxk.rst b/doc/guides/eventdevs/cnxk.rst
index cccb8a0304..c259d37109 100644
--- a/doc/guides/eventdevs/cnxk.rst
+++ b/doc/guides/eventdevs/cnxk.rst
@@ -208,9 +208,9 @@ Debugging Options
    +---+------------+-------------------------------------------------------+
    | # | Component  | EAL log command                                       |
    +===+============+=======================================================+
-   | 1 | SSO        | --log-level='pmd\.event\.cnxk,8'                      |
+   | 1 | SSO        | --log-level='pmd\.common\.cnxk\.event,8'              |
    +---+------------+-------------------------------------------------------+
-   | 2 | TIM        | --log-level='pmd\.event\.cnxk\.timer,8'               |
+   | 2 | TIM        | --log-level='pmd\.common\.cnxk\.timer,8'              |
    +---+------------+-------------------------------------------------------+
 
 Limitations
diff --git a/doc/guides/mempool/cnxk.rst b/doc/guides/mempool/cnxk.rst
index d883b83f7b..ffd9a6de86 100644
--- a/doc/guides/mempool/cnxk.rst
+++ b/doc/guides/mempool/cnxk.rst
@@ -72,7 +72,7 @@ Debugging Options
    +---+------------+-------------------------------------------------------+
    | # | Component  | EAL log command                                       |
    +===+============+=======================================================+
-   | 1 | NPA        | --log-level='pmd\.mempool.cnxk,8'                     |
+   | 1 | NPA        | --log-level='pmd\.common\.cnxk\.mempool,8'            |
    +---+------------+-------------------------------------------------------+
 
 Standalone mempool device
diff --git a/doc/guides/mldevs/cnxk.rst b/doc/guides/mldevs/cnxk.rst
index ae9e1fae5f..fc1bcd9cdb 100644
--- a/doc/guides/mldevs/cnxk.rst
+++ b/doc/guides/mldevs/cnxk.rst
@@ -383,7 +383,7 @@ Debugging Options
    +---+------------+-------------------------------------------------------+
    | # | Component  | EAL log command                                       |
    +===+============+=======================================================+
-   | 1 | ML         | --log-level='pmd\.ml\.cnxk,8'                         |
+   | 1 | ML         | --log-level='pmd\.common\.cnxk\.ml,8'                 |
    +---+------------+-------------------------------------------------------+
 
 
diff --git a/doc/guides/nics/cnxk.rst b/doc/guides/nics/cnxk.rst
index 28d54be16d..501ef1f826 100644
--- a/doc/guides/nics/cnxk.rst
+++ b/doc/guides/nics/cnxk.rst
@@ -623,7 +623,7 @@ Debugging Options
    +---+------------+-------------------------------------------------------+
    | # | Component  | EAL log command                                       |
    +===+============+=======================================================+
-   | 1 | NIX        | --log-level='pmd\.net.cnxk,8'                         |
+   | 1 | NIX        | --log-level='pmd\.common.cnxk\.nix,8'                 |
    +---+------------+-------------------------------------------------------+
-   | 2 | NPC        | --log-level='pmd\.net.cnxk\.flow,8'                   |
+   | 2 | NPC        | --log-level='pmd\.common.cnxk\.flow,8'                |
    +---+------------+-------------------------------------------------------+
diff --git a/doc/guides/platform/cnxk.rst b/doc/guides/platform/cnxk.rst
index 70065e3d96..0e61bc91d9 100644
--- a/doc/guides/platform/cnxk.rst
+++ b/doc/guides/platform/cnxk.rst
@@ -250,9 +250,9 @@ Debugging Options
    +---+------------+-------------------------------------------------------+
    | # | Component  | EAL log command                                       |
    +===+============+=======================================================+
-   | 1 | Common     | --log-level='pmd\.cnxk\.base,8'                       |
+   | 1 | Common     | --log-level='pmd\.common\.cnxk\.base,8'               |
    +---+------------+-------------------------------------------------------+
-   | 2 | Mailbox    | --log-level='pmd\.cnxk\.mbox,8'                       |
+   | 2 | Mailbox    | --log-level='pmd\.common\.cnxk\.mbox,8'               |
    +---+------------+-------------------------------------------------------+
 
 Debugfs support
diff --git a/drivers/common/cnxk/roc_platform.c b/drivers/common/cnxk/roc_platform.c
index 15cbb6d68f..80d81742a2 100644
--- a/drivers/common/cnxk/roc_platform.c
+++ b/drivers/common/cnxk/roc_platform.c
@@ -85,15 +85,15 @@ roc_plt_init(void)
 	return 0;
 }
 
-RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_base, NOTICE);
-RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_mbox, NOTICE);
-RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_cpt, NOTICE);
-RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_ml, NOTICE);
-RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_npa, NOTICE);
-RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_nix, NOTICE);
-RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_npc, NOTICE);
-RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_sso, NOTICE);
-RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_tim, NOTICE);
-RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_tm, NOTICE);
-RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_dpi, NOTICE);
-RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_ree, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_base, base, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_mbox, mbox, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_cpt, crypto, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_ml, ml, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_npa, mempool, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_nix, nix, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_npc, flow, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_sso, event, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_tim, timer, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_tm, tm, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_dpi, dpi, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_ree, ree, NOTICE);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.349371438 +0800
+++ 0071-common-cnxk-fix-segregation-of-logs-based-on-module.patch	2024-07-12 18:40:14.186594217 +0800
@@ -1 +1 @@
-From 455a771fd6f1a9cb6edc8711ff278ad31709cf7c Mon Sep 17 00:00:00 2001
+From bbe6254b24713f0f87a74645febd7adbdcf57d63 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 455a771fd6f1a9cb6edc8711ff278ad31709cf7c ]
@@ -41 +43,0 @@
-Cc: stable@dpdk.org
@@ -49 +51 @@
- doc/guides/nics/cnxk.rst           |  8 ++++----
+ doc/guides/nics/cnxk.rst           |  4 ++--
@@ -51,2 +53,2 @@
- drivers/common/cnxk/roc_platform.c | 28 ++++++++++++++--------------
- 7 files changed, 25 insertions(+), 25 deletions(-)
+ drivers/common/cnxk/roc_platform.c | 24 ++++++++++++------------
+ 7 files changed, 21 insertions(+), 21 deletions(-)
@@ -55 +57 @@
-index cd5a430a4a..ac843ddc53 100644
+index fbe67475be..89a6556c1d 100644
@@ -58 +60 @@
-@@ -209,7 +209,7 @@ Debugging Options
+@@ -197,7 +197,7 @@ Debugging Options
@@ -68 +70 @@
-index 0d41aba452..d038930594 100644
+index cccb8a0304..c259d37109 100644
@@ -71 +73 @@
-@@ -216,9 +216,9 @@ Debugging Options
+@@ -208,9 +208,9 @@ Debugging Options
@@ -110 +112 @@
-index f5f296ee36..287ff79f64 100644
+index 28d54be16d..501ef1f826 100644
@@ -113 +115 @@
-@@ -684,11 +684,11 @@ Debugging Options
+@@ -623,7 +623,7 @@ Debugging Options
@@ -123,6 +124,0 @@
--   | 3 | REP        | --log-level='pmd\.net.cnxk\.rep,8'                    |
-+   | 3 | REP        | --log-level='pmd\.common.cnxk\.rep,8'                 |
-    +---+------------+-------------------------------------------------------+
--   | 4 | ESW        | --log-level='pmd\.net.cnxk\.esw,8'                    |
-+   | 4 | ESW        | --log-level='pmd\.common.cnxk\.esw,8'                 |
-    +---+------------+-------------------------------------------------------+
@@ -146 +142 @@
-index 181902a585..30379c7e5e 100644
+index 15cbb6d68f..80d81742a2 100644
@@ -149 +145 @@
-@@ -85,17 +85,17 @@ roc_plt_init(void)
+@@ -85,15 +85,15 @@ roc_plt_init(void)
@@ -164,2 +159,0 @@
--RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_rep, NOTICE);
--RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_esw, NOTICE);
@@ -178,2 +171,0 @@
-+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_rep, rep, NOTICE);
-+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_esw, esw, NOTICE);

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

* patch 'net/cnxk: fix extbuf handling for multisegment packet' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (70 preceding siblings ...)
  2024-07-12 10:44 ` patch 'common/cnxk: fix segregation of logs based on module' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:44 ` patch 'net/cnxk: update SA userdata and keep original cookie' " Xueming Li
                   ` (7 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Rakesh Kudurumalla; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f20821ca949187f1b17468bfe07b08b1ef9f8eab

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f20821ca949187f1b17468bfe07b08b1ef9f8eab Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Tue, 28 May 2024 12:35:15 +0530
Subject: [PATCH] net/cnxk: fix extbuf handling for multisegment packet
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e6aa5408155471f7a6c8bd5ee9bfb7466a26d165 ]

Avoid double free of extbuf when during TX path in
multisegmented packet with extbuf as one of segment.

Fixes: dd9446991212 ("net/cnxk: add transmit completion handler")

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/net/cnxk/cn9k_tx.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
index 018fae2eb7..636eb1f765 100644
--- a/drivers/net/cnxk/cn9k_tx.h
+++ b/drivers/net/cnxk/cn9k_tx.h
@@ -117,6 +117,7 @@ cn9k_nix_prefree_seg(struct rte_mbuf *m, struct rte_mbuf **extm, struct cn9k_eth
 			send_hdr->w1.sqe_id = sqe_id &
 				txq->tx_compl.nb_desc_mask;
 			txq->tx_compl.ptr[send_hdr->w1.sqe_id] = m;
+			m->next = NULL;
 		}
 		return 1;
 	} else {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.419229329 +0800
+++ 0072-net-cnxk-fix-extbuf-handling-for-multisegment-packet.patch	2024-07-12 18:40:14.186594217 +0800
@@ -1 +1 @@
-From e6aa5408155471f7a6c8bd5ee9bfb7466a26d165 Mon Sep 17 00:00:00 2001
+From f20821ca949187f1b17468bfe07b08b1ef9f8eab Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e6aa5408155471f7a6c8bd5ee9bfb7466a26d165 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/cnxk: update SA userdata and keep original cookie' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (71 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/cnxk: fix extbuf handling for multisegment packet' " Xueming Li
@ 2024-07-12 10:44 ` Xueming Li
  2024-07-12 10:45 ` patch 'net/cnxk: fix outbound security with higher packet burst' " Xueming Li
                   ` (6 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:44 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=49dc3e454e807a9f05c1d7470e6d76a493fc6a0c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 49dc3e454e807a9f05c1d7470e6d76a493fc6a0c Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Tue, 28 May 2024 12:35:17 +0530
Subject: [PATCH] net/cnxk: update SA userdata and keep original cookie
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 590ee5cd95b7161b36608fcfb8c76574f6cd1459 ]

Update SA userdata as part of session_update() and
keep the original cookie that is used to identify
SA.

Fixes: 8efa348e8160 ("net/cnxk: support custom SA index")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/cnxk/cn10k_ethdev_sec.c | 57 ++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_ethdev_sec.c b/drivers/net/cnxk/cn10k_ethdev_sec.c
index 575d0fabd5..4719f6b863 100644
--- a/drivers/net/cnxk/cn10k_ethdev_sec.c
+++ b/drivers/net/cnxk/cn10k_ethdev_sec.c
@@ -1087,8 +1087,8 @@ cn10k_eth_sec_session_update(void *device, struct rte_security_session *sess,
 {
 	struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)device;
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
-	struct roc_ot_ipsec_inb_sa *inb_sa_dptr;
 	struct rte_security_ipsec_xform *ipsec;
+	struct cn10k_sec_sess_priv sess_priv;
 	struct rte_crypto_sym_xform *crypto;
 	struct cnxk_eth_sec_sess *eth_sec;
 	bool inbound;
@@ -1109,6 +1109,11 @@ cn10k_eth_sec_session_update(void *device, struct rte_security_session *sess,
 	eth_sec->spi = conf->ipsec.spi;
 
 	if (inbound) {
+		struct roc_ot_ipsec_inb_sa *inb_sa_dptr, *inb_sa;
+		struct cn10k_inb_priv_data *inb_priv;
+
+		inb_sa = eth_sec->sa;
+		inb_priv = roc_nix_inl_ot_ipsec_inb_sa_sw_rsvd(inb_sa);
 		inb_sa_dptr = (struct roc_ot_ipsec_inb_sa *)dev->inb.sa_dptr;
 		memset(inb_sa_dptr, 0, sizeof(struct roc_ot_ipsec_inb_sa));
 
@@ -1116,26 +1121,74 @@ cn10k_eth_sec_session_update(void *device, struct rte_security_session *sess,
 					       true);
 		if (rc)
 			return -EINVAL;
+		/* Use cookie for original data */
+		inb_sa_dptr->w1.s.cookie = inb_sa->w1.s.cookie;
+
+		if (ipsec->options.stats == 1) {
+			/* Enable mib counters */
+			inb_sa_dptr->w0.s.count_mib_bytes = 1;
+			inb_sa_dptr->w0.s.count_mib_pkts = 1;
+		}
+
+		/* Enable out-of-place processing */
+		if (ipsec->options.ingress_oop)
+			inb_sa_dptr->w0.s.pkt_format = ROC_IE_OT_SA_PKT_FMT_FULL;
 
 		rc = roc_nix_inl_ctx_write(&dev->nix, inb_sa_dptr, eth_sec->sa,
 					   eth_sec->inb,
 					   sizeof(struct roc_ot_ipsec_inb_sa));
 		if (rc)
 			return -EINVAL;
+
+		/* Save userdata in inb private area */
+		inb_priv->userdata = conf->userdata;
 	} else {
-		struct roc_ot_ipsec_outb_sa *outb_sa_dptr;
+		struct roc_ot_ipsec_outb_sa *outb_sa_dptr, *outb_sa;
+		struct cn10k_outb_priv_data *outb_priv;
+		struct cnxk_ipsec_outb_rlens *rlens;
 
+		outb_sa = eth_sec->sa;
+		outb_priv = roc_nix_inl_ot_ipsec_outb_sa_sw_rsvd(outb_sa);
+		rlens = &outb_priv->rlens;
 		outb_sa_dptr = (struct roc_ot_ipsec_outb_sa *)dev->outb.sa_dptr;
 		memset(outb_sa_dptr, 0, sizeof(struct roc_ot_ipsec_outb_sa));
 
 		rc = cnxk_ot_ipsec_outb_sa_fill(outb_sa_dptr, ipsec, crypto);
 		if (rc)
 			return -EINVAL;
+
+		/* Save rlen info */
+		cnxk_ipsec_outb_rlens_get(rlens, ipsec, crypto);
+
+		if (ipsec->options.stats == 1) {
+			/* Enable mib counters */
+			outb_sa_dptr->w0.s.count_mib_bytes = 1;
+			outb_sa_dptr->w0.s.count_mib_pkts = 1;
+		}
+
+		sess_priv.u64 = 0;
+		sess_priv.sa_idx = outb_priv->sa_idx;
+		sess_priv.roundup_byte = rlens->roundup_byte;
+		sess_priv.roundup_len = rlens->roundup_len;
+		sess_priv.partial_len = rlens->partial_len;
+		sess_priv.mode = outb_sa_dptr->w2.s.ipsec_mode;
+		sess_priv.outer_ip_ver = outb_sa_dptr->w2.s.outer_ip_ver;
+		/* Propagate inner checksum enable from SA to fast path */
+		sess_priv.chksum =
+			(!ipsec->options.ip_csum_enable << 1 | !ipsec->options.l4_csum_enable);
+		sess_priv.dec_ttl = ipsec->options.dec_ttl;
+		if (roc_feature_nix_has_inl_ipsec_mseg() && dev->outb.cpt_eng_caps & BIT_ULL(35))
+			sess_priv.nixtx_off = 1;
+
 		rc = roc_nix_inl_ctx_write(&dev->nix, outb_sa_dptr, eth_sec->sa,
 					   eth_sec->inb,
 					   sizeof(struct roc_ot_ipsec_outb_sa));
 		if (rc)
 			return -EINVAL;
+
+		/* Save userdata */
+		outb_priv->userdata = conf->userdata;
+		sess->fast_mdata = sess_priv.u64;
 	}
 
 	return 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.458461024 +0800
+++ 0073-net-cnxk-update-SA-userdata-and-keep-original-cookie.patch	2024-07-12 18:40:14.196594216 +0800
@@ -1 +1 @@
-From 590ee5cd95b7161b36608fcfb8c76574f6cd1459 Mon Sep 17 00:00:00 2001
+From 49dc3e454e807a9f05c1d7470e6d76a493fc6a0c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 590ee5cd95b7161b36608fcfb8c76574f6cd1459 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index af27d3bbc1..eed4c29218 100644
+index 575d0fabd5..4719f6b863 100644
@@ -22 +24 @@
-@@ -1101,8 +1101,8 @@ cn10k_eth_sec_session_update(void *device, struct rte_security_session *sess,
+@@ -1087,8 +1087,8 @@ cn10k_eth_sec_session_update(void *device, struct rte_security_session *sess,
@@ -32 +34 @@
-@@ -1123,6 +1123,11 @@ cn10k_eth_sec_session_update(void *device, struct rte_security_session *sess,
+@@ -1109,6 +1109,11 @@ cn10k_eth_sec_session_update(void *device, struct rte_security_session *sess,
@@ -44 +46 @@
-@@ -1130,26 +1135,74 @@ cn10k_eth_sec_session_update(void *device, struct rte_security_session *sess,
+@@ -1116,26 +1121,74 @@ cn10k_eth_sec_session_update(void *device, struct rte_security_session *sess,

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

* patch 'net/cnxk: fix outbound security with higher packet burst' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (72 preceding siblings ...)
  2024-07-12 10:44 ` patch 'net/cnxk: update SA userdata and keep original cookie' " Xueming Li
@ 2024-07-12 10:45 ` Xueming Li
  2024-07-12 10:45 ` patch 'net/cnxk: fix promiscuous state after MAC change' " Xueming Li
                   ` (5 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:45 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a2577759ebd24f89de2cdedaafa20e5ac1abf4d8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a2577759ebd24f89de2cdedaafa20e5ac1abf4d8 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Tue, 28 May 2024 12:35:19 +0530
Subject: [PATCH] net/cnxk: fix outbound security with higher packet burst
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 062f6f652445a283a186dc6c62c692ba7c91cc3c ]

Fix issue with outbound security path while handling mixed traffic i.e
both plain and inline outbound packets being present as part of burst
and burst size is > 32. The loop needs to be broken when
we don't have space for 4 packets in LMT lines for CPT considering
both the full LMT lines and partial LMT lines used.

Fixes: 55bfac717c72 ("net/cnxk: support Tx security offload on cn10k")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/cnxk/cn10k_tx.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index 5dff578ba4..0a2ad08f1f 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -2319,7 +2319,8 @@ again:
 	}
 
 	for (i = 0; i < burst; i += NIX_DESCS_PER_LOOP) {
-		if (flags & NIX_TX_OFFLOAD_SECURITY_F && c_lnum + 2 > 16) {
+		if (flags & NIX_TX_OFFLOAD_SECURITY_F &&
+		    (((int)((16 - c_lnum) << 1) - c_loff) < 4)) {
 			burst = i;
 			break;
 		}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.494553920 +0800
+++ 0074-net-cnxk-fix-outbound-security-with-higher-packet-bu.patch	2024-07-12 18:40:14.196594216 +0800
@@ -1 +1 @@
-From 062f6f652445a283a186dc6c62c692ba7c91cc3c Mon Sep 17 00:00:00 2001
+From a2577759ebd24f89de2cdedaafa20e5ac1abf4d8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 062f6f652445a283a186dc6c62c692ba7c91cc3c ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 5c4b9e559e..9ce41fe80f 100644
+index 5dff578ba4..0a2ad08f1f 100644
@@ -24 +26 @@
-@@ -2272,7 +2272,8 @@ again:
+@@ -2319,7 +2319,8 @@ again:

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

* patch 'net/cnxk: fix promiscuous state after MAC change' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (73 preceding siblings ...)
  2024-07-12 10:45 ` patch 'net/cnxk: fix outbound security with higher packet burst' " Xueming Li
@ 2024-07-12 10:45 ` Xueming Li
  2024-07-12 10:45 ` patch 'graph: fix ID collisions' " Xueming Li
                   ` (4 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:45 UTC (permalink / raw)
  To: Rahul Bhansali; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=749b2292f059a3051ba1c96009ad408d8fcaa681

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 749b2292f059a3051ba1c96009ad408d8fcaa681 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Tue, 28 May 2024 14:02:46 +0530
Subject: [PATCH] net/cnxk: fix promiscuous state after MAC change
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5f1bce00fddffc63e5634891df2b02859c010944 ]

If promiscuous mode is enabled and default MAC address is set
again then promiscuous mode gets disabled in hardware.

This change will restore promiscuous behavior after configuring
default MAC address.

Fixes: 5fe86db2a0dd ("net/cnxk: support MAC address set")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev_ops.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index 3c77f79fcc..c8f4848f92 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -447,6 +447,13 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)
 			roc_nix_npc_mac_addr_set(nix, dev->mac_addr);
 			goto exit;
 		}
+
+		if (eth_dev->data->promiscuous) {
+			rc = roc_nix_mac_promisc_mode_enable(nix, true);
+			if (rc)
+				plt_err("Failed to setup promisc mode in mac, rc=%d(%s)", rc,
+					roc_error_msg_get(rc));
+		}
 	}
 
 	/* Update mac address to cnxk ethernet device */
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.532596116 +0800
+++ 0075-net-cnxk-fix-promiscuous-state-after-MAC-change.patch	2024-07-12 18:40:14.196594216 +0800
@@ -1 +1 @@
-From 5f1bce00fddffc63e5634891df2b02859c010944 Mon Sep 17 00:00:00 2001
+From 749b2292f059a3051ba1c96009ad408d8fcaa681 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5f1bce00fddffc63e5634891df2b02859c010944 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index c8260fcb9c..b1093dd584 100644
+index 3c77f79fcc..c8f4848f92 100644
@@ -24 +26 @@
-@@ -451,6 +451,13 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)
+@@ -447,6 +447,13 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)

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

* patch 'graph: fix ID collisions' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (74 preceding siblings ...)
  2024-07-12 10:45 ` patch 'net/cnxk: fix promiscuous state after MAC change' " Xueming Li
@ 2024-07-12 10:45 ` Xueming Li
  2024-07-12 10:45 ` patch 'graph: fix stats retrieval while destroying a graph' " Xueming Li
                   ` (3 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:45 UTC (permalink / raw)
  To: Robin Jarry; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=be7644791c005967d23efd75a4df700aee2c7a8e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From be7644791c005967d23efd75a4df700aee2c7a8e Mon Sep 17 00:00:00 2001
From: Robin Jarry <rjarry@redhat.com>
Date: Tue, 18 Jun 2024 11:23:25 +0200
Subject: [PATCH] graph: fix ID collisions
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d5c8b6bb74a06051232cbbd92d25220606b280c0 ]

The graph id is determined based on a global variable that is
incremented every time a graph is created, and decremented every time
a graph is destroyed. This only works if graphs are destroyed in the
reverse order in which they have been created.

The following code produces duplicate graph IDs which can lead to
use-after-free bugs and other undefined behaviours:

  a = rte_graph_create(...); // id=0 graph_id=1
  b = rte_graph_create(...); // id=1 graph_id=2
  rte_graph_destroy(a);      // graph_id=1
  c = rte_graph_create(...); // id=1 graph_id=2 (duplicate with b)
  rte_graph_destroy(c);      // frees memory still used by b

Remove the global counter. Make sure that the graph list is always
ordered by increasing graph ids. When creating a new graph, pick a free
id which is not allocated.

Update unit tests to ensure it works as expected.

Fixes: a91fecc19c5c ("graph: implement create and destroy")

Signed-off-by: Robin Jarry <rjarry@redhat.com>
Acked-by: Kiran Kumar K <kirankumark@marvell.com>
---
 app/test/test_graph.c | 72 ++++++++++++++++++++++++++++++++++++
 lib/graph/graph.c     | 86 ++++++++++++++++++++++++++++++++++---------
 2 files changed, 141 insertions(+), 17 deletions(-)

diff --git a/app/test/test_graph.c b/app/test/test_graph.c
index 3dd017ebfb..eb4f9a61e3 100644
--- a/app/test/test_graph.c
+++ b/app/test/test_graph.c
@@ -695,6 +695,77 @@ test_graph_clone(void)
 	return ret;
 }
 
+static int
+test_graph_id_collisions(void)
+{
+	static const char *node_patterns[] = {"test_node_source1", "test_node00"};
+	struct rte_graph_param gconf = {
+		.socket_id = SOCKET_ID_ANY,
+		.nb_node_patterns = 2,
+		.node_patterns = node_patterns,
+	};
+	rte_graph_t g1, g2, g3, g4;
+
+	g1 = rte_graph_create("worker1", &gconf);
+	if (g1 == RTE_GRAPH_ID_INVALID) {
+		printf("Graph 1 creation failed with error = %d\n", rte_errno);
+		return -1;
+	}
+	g2 = rte_graph_create("worker2", &gconf);
+	if (g2 == RTE_GRAPH_ID_INVALID) {
+		printf("Graph 2 creation failed with error = %d\n", rte_errno);
+		return -1;
+	}
+	g3 = rte_graph_create("worker3", &gconf);
+	if (g3 == RTE_GRAPH_ID_INVALID) {
+		printf("Graph 3 creation failed with error = %d\n", rte_errno);
+		return -1;
+	}
+	if (g1 == g2 || g2 == g3 || g1 == g3) {
+		printf("Graph ids should be different\n");
+		return -1;
+	}
+	if (rte_graph_destroy(g2) < 0) {
+		printf("Graph 2 suppression failed\n");
+		return -1;
+	}
+	g4 = rte_graph_create("worker4", &gconf);
+	if (g4 == RTE_GRAPH_ID_INVALID) {
+		printf("Graph 4 creation failed with error = %d\n", rte_errno);
+		return -1;
+	}
+	if (g1 == g3 || g1 == g4 || g3 == g4) {
+		printf("Graph ids should be different\n");
+		return -1;
+	}
+	g2 = rte_graph_clone(g1, "worker2", &gconf);
+	if (g2 == RTE_GRAPH_ID_INVALID) {
+		printf("Graph 4 creation failed with error = %d\n", rte_errno);
+		return -1;
+	}
+	if (g1 == g2 || g1 == g3 || g1 == g4 || g2 == g3 || g2 == g4 || g3 == g4) {
+		printf("Graph ids should be different\n");
+		return -1;
+	}
+	if (rte_graph_destroy(g1) < 0) {
+		printf("Graph 1 suppression failed\n");
+		return -1;
+	}
+	if (rte_graph_destroy(g2) < 0) {
+		printf("Graph 2 suppression failed\n");
+		return -1;
+	}
+	if (rte_graph_destroy(g3) < 0) {
+		printf("Graph 3 suppression failed\n");
+		return -1;
+	}
+	if (rte_graph_destroy(g4) < 0) {
+		printf("Graph 4 suppression failed\n");
+		return -1;
+	}
+	return 0;
+}
+
 static int
 test_graph_model_mcore_dispatch_node_lcore_affinity_set(void)
 {
@@ -976,6 +1047,7 @@ static struct unit_test_suite graph_testsuite = {
 		TEST_CASE(test_lookup_functions),
 		TEST_CASE(test_create_graph),
 		TEST_CASE(test_graph_clone),
+		TEST_CASE(test_graph_id_collisions),
 		TEST_CASE(test_graph_model_mcore_dispatch_node_lcore_affinity_set),
 		TEST_CASE(test_graph_model_mcore_dispatch_core_bind_unbind),
 		TEST_CASE(test_graph_worker_model_set_get),
diff --git a/lib/graph/graph.c b/lib/graph/graph.c
index 26f0968a97..8ea2109645 100644
--- a/lib/graph/graph.c
+++ b/lib/graph/graph.c
@@ -19,11 +19,54 @@
 
 static struct graph_head graph_list = STAILQ_HEAD_INITIALIZER(graph_list);
 static rte_spinlock_t graph_lock = RTE_SPINLOCK_INITIALIZER;
-static rte_graph_t graph_id;
-
-#define GRAPH_ID_CHECK(id) ID_CHECK(id, graph_id)
 
 /* Private functions */
+static struct graph *
+graph_from_id(rte_graph_t id)
+{
+	struct graph *graph;
+	STAILQ_FOREACH(graph, &graph_list, next) {
+		if (graph->id == id)
+			return graph;
+	}
+	rte_errno = EINVAL;
+	return NULL;
+}
+
+static rte_graph_t
+graph_next_free_id(void)
+{
+	struct graph *graph;
+	rte_graph_t id = 0;
+
+	STAILQ_FOREACH(graph, &graph_list, next) {
+		if (id < graph->id)
+			break;
+		id = graph->id + 1;
+	}
+
+	return id;
+}
+
+static void
+graph_insert_ordered(struct graph *graph)
+{
+	struct graph *after, *g;
+
+	after = NULL;
+	STAILQ_FOREACH(g, &graph_list, next) {
+		if (g->id < graph->id)
+			after = g;
+		else if (g->id > graph->id)
+			break;
+	}
+	if (after == NULL) {
+		STAILQ_INSERT_HEAD(&graph_list, graph, next);
+	} else {
+		STAILQ_INSERT_AFTER(&graph_list, after, graph, next);
+	}
+}
+
 struct graph_head *
 graph_list_head_get(void)
 {
@@ -279,7 +322,8 @@ rte_graph_model_mcore_dispatch_core_bind(rte_graph_t id, int lcore)
 {
 	struct graph *graph;
 
-	GRAPH_ID_CHECK(id);
+	if (graph_from_id(id) == NULL)
+		goto fail;
 	if (!rte_lcore_is_enabled(lcore))
 		SET_ERR_JMP(ENOLINK, fail, "lcore %d not enabled", lcore);
 
@@ -309,7 +353,8 @@ rte_graph_model_mcore_dispatch_core_unbind(rte_graph_t id)
 {
 	struct graph *graph;
 
-	GRAPH_ID_CHECK(id);
+	if (graph_from_id(id) == NULL)
+		goto fail;
 	STAILQ_FOREACH(graph, &graph_list, next)
 		if (graph->id == id)
 			break;
@@ -406,7 +451,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
 	graph->socket = prm->socket_id;
 	graph->src_node_count = src_node_count;
 	graph->node_count = graph_nodes_count(graph);
-	graph->id = graph_id;
+	graph->id = graph_next_free_id();
 	graph->parent_id = RTE_GRAPH_ID_INVALID;
 	graph->lcore_id = RTE_MAX_LCORE;
 	graph->num_pkt_to_capture = prm->num_pkt_to_capture;
@@ -422,8 +467,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
 		goto graph_mem_destroy;
 
 	/* All good, Lets add the graph to the list */
-	graph_id++;
-	STAILQ_INSERT_TAIL(&graph_list, graph, next);
+	graph_insert_ordered(graph);
 
 	graph_spinlock_unlock();
 	return graph->id;
@@ -467,7 +511,6 @@ rte_graph_destroy(rte_graph_t id)
 			graph_cleanup(graph);
 			STAILQ_REMOVE(&graph_list, graph, graph, next);
 			free(graph);
-			graph_id--;
 			goto done;
 		}
 		graph = tmp;
@@ -520,7 +563,7 @@ graph_clone(struct graph *parent_graph, const char *name, struct rte_graph_param
 	graph->parent_id = parent_graph->id;
 	graph->lcore_id = parent_graph->lcore_id;
 	graph->socket = parent_graph->socket;
-	graph->id = graph_id;
+	graph->id = graph_next_free_id();
 
 	/* Allocate the Graph fast path memory and populate the data */
 	if (graph_fp_mem_create(graph))
@@ -539,8 +582,7 @@ graph_clone(struct graph *parent_graph, const char *name, struct rte_graph_param
 		goto graph_mem_destroy;
 
 	/* All good, Lets add the graph to the list */
-	graph_id++;
-	STAILQ_INSERT_TAIL(&graph_list, graph, next);
+	graph_insert_ordered(graph);
 
 	graph_spinlock_unlock();
 	return graph->id;
@@ -561,7 +603,8 @@ rte_graph_clone(rte_graph_t id, const char *name, struct rte_graph_param *prm)
 {
 	struct graph *graph;
 
-	GRAPH_ID_CHECK(id);
+	if (graph_from_id(id) == NULL)
+		goto fail;
 	STAILQ_FOREACH(graph, &graph_list, next)
 		if (graph->id == id)
 			return graph_clone(graph, name, prm);
@@ -587,7 +630,8 @@ rte_graph_id_to_name(rte_graph_t id)
 {
 	struct graph *graph;
 
-	GRAPH_ID_CHECK(id);
+	if (graph_from_id(id) == NULL)
+		goto fail;
 	STAILQ_FOREACH(graph, &graph_list, next)
 		if (graph->id == id)
 			return graph->name;
@@ -604,7 +648,8 @@ rte_graph_node_get(rte_graph_t gid, uint32_t nid)
 	rte_graph_off_t off;
 	rte_node_t count;
 
-	GRAPH_ID_CHECK(gid);
+	if (graph_from_id(gid) == NULL)
+		goto fail;
 	STAILQ_FOREACH(graph, &graph_list, next)
 		if (graph->id == gid) {
 			rte_graph_foreach_node(count, off, graph->graph,
@@ -729,7 +774,8 @@ graph_scan_dump(FILE *f, rte_graph_t id, bool all)
 	struct graph *graph;
 
 	RTE_VERIFY(f);
-	GRAPH_ID_CHECK(id);
+	if (graph_from_id(id) == NULL)
+		goto fail;
 
 	STAILQ_FOREACH(graph, &graph_list, next) {
 		if (all == true) {
@@ -758,7 +804,13 @@ rte_graph_list_dump(FILE *f)
 rte_graph_t
 rte_graph_max_count(void)
 {
-	return graph_id;
+	struct graph *graph;
+	rte_graph_t count = 0;
+
+	STAILQ_FOREACH(graph, &graph_list, next)
+		count++;
+
+	return count;
 }
 
 RTE_LOG_REGISTER_DEFAULT(rte_graph_logtype, INFO);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.566574511 +0800
+++ 0076-graph-fix-ID-collisions.patch	2024-07-12 18:40:14.206594215 +0800
@@ -1 +1 @@
-From d5c8b6bb74a06051232cbbd92d25220606b280c0 Mon Sep 17 00:00:00 2001
+From be7644791c005967d23efd75a4df700aee2c7a8e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d5c8b6bb74a06051232cbbd92d25220606b280c0 ]
@@ -27 +29,0 @@
-Cc: stable@dpdk.org
@@ -37 +39 @@
-index b8409bc604..2840a25b13 100644
+index 3dd017ebfb..eb4f9a61e3 100644
@@ -40 +42 @@
-@@ -696,6 +696,77 @@ test_graph_clone(void)
+@@ -695,6 +695,77 @@ test_graph_clone(void)
@@ -118 +120 @@
-@@ -977,6 +1048,7 @@ static struct unit_test_suite graph_testsuite = {
+@@ -976,6 +1047,7 @@ static struct unit_test_suite graph_testsuite = {

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

* patch 'graph: fix stats retrieval while destroying a graph' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (75 preceding siblings ...)
  2024-07-12 10:45 ` patch 'graph: fix ID collisions' " Xueming Li
@ 2024-07-12 10:45 ` Xueming Li
  2024-07-12 10:45 ` patch 'bpf: disable on 32-bit x86' " Xueming Li
                   ` (2 subsequent siblings)
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:45 UTC (permalink / raw)
  To: Robin Jarry; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=45b177b78fee756ca8f9dbd4dcb9c74ed6edba1e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 45b177b78fee756ca8f9dbd4dcb9c74ed6edba1e Mon Sep 17 00:00:00 2001
From: Robin Jarry <rjarry@redhat.com>
Date: Mon, 1 Apr 2024 22:36:49 +0200
Subject: [PATCH] graph: fix stats retrieval while destroying a graph
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7d18ab565da979642ad92e93def623cfca260fef ]

In rte_graph_cluster_stats_get, the walk model of the first graph is
checked to determine if multi-core dispatch specific counters should be
updated or not. This global list is accessed without any locks.

If the global list is modified by another thread while
rte_graph_cluster_stats_get is called, it can result in undefined
behaviour.

Adding a lock would make it impossible to call
rte_graph_cluster_stats_get in packet processing code paths. Avoid
accessing the global list instead by storing a bool field in the private
rte_graph_cluster_stats structure.

Also update the default callback to avoid accessing the global list and
use a different default callback depending on the graph model.

Fixes: 358ff83fe88c ("graph: add stats for mcore dispatch model")

Signed-off-by: Robin Jarry <rjarry@redhat.com>
Acked-by: Kiran Kumar K <kirankumark@marvell.com>
---
 lib/graph/graph_stats.c | 57 ++++++++++++++++++++++++++---------------
 1 file changed, 36 insertions(+), 21 deletions(-)

diff --git a/lib/graph/graph_stats.c b/lib/graph/graph_stats.c
index cc32245c05..e99e8cf68a 100644
--- a/lib/graph/graph_stats.c
+++ b/lib/graph/graph_stats.c
@@ -34,6 +34,7 @@ struct rte_graph_cluster_stats {
 	uint32_t cluster_node_size; /* Size of struct cluster_node */
 	rte_node_t max_nodes;
 	int socket_id;
+	bool dispatch;
 	void *cookie;
 	size_t sz;
 
@@ -74,17 +75,16 @@ print_banner_dispatch(FILE *f)
 }
 
 static inline void
-print_banner(FILE *f)
+print_banner(FILE *f, bool dispatch)
 {
-	if (rte_graph_worker_model_get(STAILQ_FIRST(graph_list_head_get())->graph) ==
-	    RTE_GRAPH_MODEL_MCORE_DISPATCH)
+	if (dispatch)
 		print_banner_dispatch(f);
 	else
 		print_banner_default(f);
 }
 
 static inline void
-print_node(FILE *f, const struct rte_graph_cluster_node_stats *stat)
+print_node(FILE *f, const struct rte_graph_cluster_node_stats *stat, bool dispatch)
 {
 	double objs_per_call, objs_per_sec, cycles_per_call, ts_per_hz;
 	const uint64_t prev_calls = stat->prev_calls;
@@ -104,8 +104,7 @@ print_node(FILE *f, const struct rte_graph_cluster_node_stats *stat)
 	objs_per_sec = ts_per_hz ? (objs - prev_objs) / ts_per_hz : 0;
 	objs_per_sec /= 1000000;
 
-	if (rte_graph_worker_model_get(STAILQ_FIRST(graph_list_head_get())->graph) ==
-	    RTE_GRAPH_MODEL_MCORE_DISPATCH) {
+	if (dispatch) {
 		fprintf(f,
 			"|%-31s|%-15" PRIu64 "|%-15" PRIu64 "|%-15" PRIu64
 			"|%-15" PRIu64 "|%-15" PRIu64
@@ -123,20 +122,17 @@ print_node(FILE *f, const struct rte_graph_cluster_node_stats *stat)
 }
 
 static int
-graph_cluster_stats_cb(bool is_first, bool is_last, void *cookie,
+graph_cluster_stats_cb(bool dispatch, bool is_first, bool is_last, void *cookie,
 		       const struct rte_graph_cluster_node_stats *stat)
 {
 	FILE *f = cookie;
-	int model;
-
-	model = rte_graph_worker_model_get(STAILQ_FIRST(graph_list_head_get())->graph);
 
 	if (unlikely(is_first))
-		print_banner(f);
+		print_banner(f, dispatch);
 	if (stat->objs)
-		print_node(f, stat);
+		print_node(f, stat, dispatch);
 	if (unlikely(is_last)) {
-		if (model == RTE_GRAPH_MODEL_MCORE_DISPATCH)
+		if (dispatch)
 			boarder_model_dispatch();
 		else
 			boarder();
@@ -145,6 +141,20 @@ graph_cluster_stats_cb(bool is_first, bool is_last, void *cookie,
 	return 0;
 };
 
+static int
+graph_cluster_stats_cb_rtc(bool is_first, bool is_last, void *cookie,
+			   const struct rte_graph_cluster_node_stats *stat)
+{
+	return graph_cluster_stats_cb(false, is_first, is_last, cookie, stat);
+};
+
+static int
+graph_cluster_stats_cb_dispatch(bool is_first, bool is_last, void *cookie,
+				const struct rte_graph_cluster_node_stats *stat)
+{
+	return graph_cluster_stats_cb(true, is_first, is_last, cookie, stat);
+};
+
 static struct rte_graph_cluster_stats *
 stats_mem_init(struct cluster *cluster,
 	       const struct rte_graph_cluster_stats_param *prm)
@@ -157,8 +167,13 @@ stats_mem_init(struct cluster *cluster,
 
 	/* Fix up callback */
 	fn = prm->fn;
-	if (fn == NULL)
-		fn = graph_cluster_stats_cb;
+	if (fn == NULL) {
+		const struct rte_graph *graph = cluster->graphs[0]->graph;
+		if (graph->model == RTE_GRAPH_MODEL_MCORE_DISPATCH)
+			fn = graph_cluster_stats_cb_dispatch;
+		else
+			fn = graph_cluster_stats_cb_rtc;
+	}
 
 	cluster_node_size = sizeof(struct cluster_node);
 	/* For a given cluster, max nodes will be the max number of graphs */
@@ -350,6 +365,8 @@ rte_graph_cluster_stats_create(const struct rte_graph_cluster_stats_param *prm)
 			if (stats_mem_populate(&stats, graph_fp, graph_node))
 				goto realloc_fail;
 		}
+		if (graph->graph->model == RTE_GRAPH_MODEL_MCORE_DISPATCH)
+			stats->dispatch = true;
 	}
 
 	/* Finally copy to hugepage memory to avoid pressure on rte_realloc */
@@ -375,20 +392,18 @@ rte_graph_cluster_stats_destroy(struct rte_graph_cluster_stats *stat)
 }
 
 static inline void
-cluster_node_arregate_stats(struct cluster_node *cluster)
+cluster_node_arregate_stats(struct cluster_node *cluster, bool dispatch)
 {
 	uint64_t calls = 0, cycles = 0, objs = 0, realloc_count = 0;
 	struct rte_graph_cluster_node_stats *stat = &cluster->stat;
 	uint64_t sched_objs = 0, sched_fail = 0;
 	struct rte_node *node;
 	rte_node_t count;
-	int model;
 
-	model = rte_graph_worker_model_get(STAILQ_FIRST(graph_list_head_get())->graph);
 	for (count = 0; count < cluster->nb_nodes; count++) {
 		node = cluster->nodes[count];
 
-		if (model == RTE_GRAPH_MODEL_MCORE_DISPATCH) {
+		if (dispatch) {
 			sched_objs += node->dispatch.total_sched_objs;
 			sched_fail += node->dispatch.total_sched_fail;
 		}
@@ -403,7 +418,7 @@ cluster_node_arregate_stats(struct cluster_node *cluster)
 	stat->objs = objs;
 	stat->cycles = cycles;
 
-	if (model == RTE_GRAPH_MODEL_MCORE_DISPATCH) {
+	if (dispatch) {
 		stat->dispatch.sched_objs = sched_objs;
 		stat->dispatch.sched_fail = sched_fail;
 	}
@@ -433,7 +448,7 @@ rte_graph_cluster_stats_get(struct rte_graph_cluster_stats *stat, bool skip_cb)
 	cluster = stat->clusters;
 
 	for (count = 0; count < stat->max_nodes; count++) {
-		cluster_node_arregate_stats(cluster);
+		cluster_node_arregate_stats(cluster, stat->dispatch);
 		if (!skip_cb)
 			rc = stat->fn(!count, (count == stat->max_nodes - 1),
 				      stat->cookie, &cluster->stat);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.598927208 +0800
+++ 0077-graph-fix-stats-retrieval-while-destroying-a-graph.patch	2024-07-12 18:40:14.206594215 +0800
@@ -1 +1 @@
-From 7d18ab565da979642ad92e93def623cfca260fef Mon Sep 17 00:00:00 2001
+From 45b177b78fee756ca8f9dbd4dcb9c74ed6edba1e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7d18ab565da979642ad92e93def623cfca260fef ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 2fb808b21e..d71451a17b 100644
+index cc32245c05..e99e8cf68a 100644
@@ -35 +37 @@
-@@ -34,6 +34,7 @@ struct __rte_cache_aligned rte_graph_cluster_stats {
+@@ -34,6 +34,7 @@ struct rte_graph_cluster_stats {

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

* patch 'bpf: disable on 32-bit x86' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (76 preceding siblings ...)
  2024-07-12 10:45 ` patch 'graph: fix stats retrieval while destroying a graph' " Xueming Li
@ 2024-07-12 10:45 ` Xueming Li
  2024-07-12 10:45 ` patch 'hash: fix RCU reclamation size' " Xueming Li
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:45 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=22446fbfcd1b8b5ebacc9b406200a81380cf8aa9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 22446fbfcd1b8b5ebacc9b406200a81380cf8aa9 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Thu, 25 Apr 2024 16:05:58 +0100
Subject: [PATCH] bpf: disable on 32-bit x86
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4edbcc7b5313949083f7694847342b1a45659d6b ]

As per Intel, this is not supported, and the librte-bpf test fails on
32bit x86 kernels, so disable the library and the pmd.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/af_xdp/meson.build | 6 ++++++
 lib/bpf/meson.build            | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build
index 280bfa8f80..69d109ff46 100644
--- a/drivers/net/af_xdp/meson.build
+++ b/drivers/net/af_xdp/meson.build
@@ -7,6 +7,12 @@ if is_windows
     subdir_done()
 endif
 
+if arch_subdir == 'x86' and dpdk_conf.get('RTE_ARCH_32')
+    build = false
+    reason = 'not supported on 32-bit x86'
+    subdir_done()
+endif
+
 sources = files('rte_eth_af_xdp.c')
 
 libxdp_ver = '>=1.2.2'
diff --git a/lib/bpf/meson.build b/lib/bpf/meson.build
index cd739bb827..aa258a9061 100644
--- a/lib/bpf/meson.build
+++ b/lib/bpf/meson.build
@@ -7,6 +7,12 @@ if is_windows
     subdir_done()
 endif
 
+if arch_subdir == 'x86' and dpdk_conf.get('RTE_ARCH_32')
+    build = false
+    reason = 'not supported on 32-bit x86'
+    subdir_done()
+endif
+
 sources = files('bpf.c',
         'bpf_dump.c',
         'bpf_exec.c',
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.634063103 +0800
+++ 0078-bpf-disable-on-32-bit-x86.patch	2024-07-12 18:40:14.206594215 +0800
@@ -1 +1 @@
-From 4edbcc7b5313949083f7694847342b1a45659d6b Mon Sep 17 00:00:00 2001
+From 22446fbfcd1b8b5ebacc9b406200a81380cf8aa9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4edbcc7b5313949083f7694847342b1a45659d6b ]
@@ -9,2 +11,0 @@
-Cc: stable@dpdk.org
-
@@ -14,4 +15,3 @@
- doc/guides/rel_notes/release_24_07.rst | 5 +++++
- drivers/net/af_xdp/meson.build         | 6 ++++++
- lib/bpf/meson.build                    | 6 ++++++
- 3 files changed, 17 insertions(+)
+ drivers/net/af_xdp/meson.build | 6 ++++++
+ lib/bpf/meson.build            | 6 ++++++
+ 2 files changed, 12 insertions(+)
@@ -19,16 +18,0 @@
-diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst
-index d4970cf6ec..1af7cb91a1 100644
---- a/doc/guides/rel_notes/release_24_07.rst
-+++ b/doc/guides/rel_notes/release_24_07.rst
-@@ -138,6 +138,11 @@ Removed Items
-    Also, make sure to start the actual text at the margin.
-    =======================================================
- 
-+* **Disabled the BPF library and net/af_xdp for 32-bit x86.**
-+
-+  BPF is not supported and the librte-bpf test fails on 32-bit x86 kernels.
-+  So disable the library and the pmd.
-+
- 
- API Changes
- -----------

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

* patch 'hash: fix RCU reclamation size' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (77 preceding siblings ...)
  2024-07-12 10:45 ` patch 'bpf: disable on 32-bit x86' " Xueming Li
@ 2024-07-12 10:45 ` Xueming Li
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
  79 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 10:45 UTC (permalink / raw)
  To: Abdullah Ömer Yamaç; +Cc: Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=7c1ecb9fef003a1d5db7c9dc43eb3381a87ca119

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7c1ecb9fef003a1d5db7c9dc43eb3381a87ca119 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdullah=20=C3=96mer=20Yama=C3=A7?= <aomeryamac@gmail.com>
Date: Mon, 13 May 2024 16:35:53 +0000
Subject: [PATCH] hash: fix RCU reclamation size
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d45a7eed07d6b024956d10af529fcdcdd798227f ]

Set the maximum reclamation size to user provided value.

Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")

Signed-off-by: Abdullah Ömer Yamaç <aomeryamac@gmail.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 .mailmap                   | 2 +-
 lib/hash/rte_cuckoo_hash.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index ac2268a1d1..15c75499e5 100644
--- a/.mailmap
+++ b/.mailmap
@@ -2,7 +2,7 @@ Aakash Sasidharan <asasidharan@marvell.com>
 Aaro Koskinen <aaro.koskinen@nsn.com>
 Aaron Campbell <aaron@arbor.net>
 Aaron Conole <aconole@redhat.com>
-Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
+Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr> <aomeryamac@gmail.com>
 Abdullah Sevincer <abdullah.sevincer@intel.com>
 Abed Kamaluddin <akamaluddin@marvell.com>
 Abhijit Gangurde <abhijit.gangurde@amd.com>
diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index 7871f6e090..258b6b7f2b 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -1551,6 +1551,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)
 		if (params.size == 0)
 			params.size = total_entries;
 		params.trigger_reclaim_limit = cfg->trigger_reclaim_limit;
+		params.max_reclaim_size = cfg->max_reclaim_size;
 		if (params.max_reclaim_size == 0)
 			params.max_reclaim_size = RTE_HASH_RCU_DQ_RECLAIM_MAX;
 		params.esize = sizeof(struct __rte_hash_rcu_dq_entry);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.671873799 +0800
+++ 0079-hash-fix-RCU-reclamation-size.patch	2024-07-12 18:40:14.216594214 +0800
@@ -1 +1 @@
-From d45a7eed07d6b024956d10af529fcdcdd798227f Mon Sep 17 00:00:00 2001
+From 7c1ecb9fef003a1d5db7c9dc43eb3381a87ca119 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d45a7eed07d6b024956d10af529fcdcdd798227f ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 3e73eec762..9013e15ea9 100644
+index ac2268a1d1..15c75499e5 100644
@@ -35 +37 @@
-index 16c9c4c5c4..265335f845 100644
+index 7871f6e090..258b6b7f2b 100644
@@ -38 +40 @@
-@@ -1558,6 +1558,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)
+@@ -1551,6 +1551,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)

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

* patch 'common/mlx5: fix unsigned/signed mismatch' has been queued to stable release 23.11.2
  2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
                   ` (78 preceding siblings ...)
  2024-07-12 10:45 ` patch 'hash: fix RCU reclamation size' " Xueming Li
@ 2024-07-12 11:01 ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5/hws: decrease log level for creation failure' " Xueming Li
                     ` (21 more replies)
  79 siblings, 22 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b0f9183faf60764555d951f89dc4302902448088

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b0f9183faf60764555d951f89dc4302902448088 Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Mon, 15 Apr 2024 16:09:37 -0700
Subject: [PATCH] common/mlx5: fix unsigned/signed mismatch
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit eec253d0a57d707306e4ac3128bc21f10bb8bc5f ]

Use unsigned int for 2 loop indexes that are being compared against an
unsigned int struct field to avoid signed/unsigned mismatch warning.

Fixes: 718d166e5504 ("net/mlx5: create advanced RxQ table via DevX")
Fixes: e1da60a8a6e9 ("common/mlx5: add DevX command to modify RQT")

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 3eeb27fc3f..52b07367b7 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1806,7 +1806,7 @@ mlx5_devx_cmd_create_rqt(void *ctx,
 	uint32_t out[MLX5_ST_SZ_DW(create_rqt_out)] = {0};
 	void *rqt_ctx;
 	struct mlx5_devx_obj *rqt = NULL;
-	int i;
+	unsigned int i;
 
 	in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);
 	if (!in) {
@@ -1859,7 +1859,7 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
 	uint32_t out[MLX5_ST_SZ_DW(modify_rqt_out)] = {0};
 	uint32_t *in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);
 	void *rqt_ctx;
-	int i;
+	unsigned int i;
 	int ret;
 
 	if (!in) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.715675194 +0800
+++ 0080-common-mlx5-fix-unsigned-signed-mismatch.patch	2024-07-12 18:40:14.216594214 +0800
@@ -1 +1 @@
-From eec253d0a57d707306e4ac3128bc21f10bb8bc5f Mon Sep 17 00:00:00 2001
+From b0f9183faf60764555d951f89dc4302902448088 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit eec253d0a57d707306e4ac3128bc21f10bb8bc5f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 9b7ababae7..9952733c90 100644
+index 3eeb27fc3f..52b07367b7 100644
@@ -23 +25 @@
-@@ -1816,7 +1816,7 @@ mlx5_devx_cmd_create_rqt(void *ctx,
+@@ -1806,7 +1806,7 @@ mlx5_devx_cmd_create_rqt(void *ctx,
@@ -32 +34 @@
-@@ -1869,7 +1869,7 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
+@@ -1859,7 +1859,7 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,

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

* patch 'net/mlx5/hws: decrease log level for creation failure' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'common/mlx5: fix PRM structs' " Xueming Li
                     ` (20 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Erez Shitrit; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6a05d2e85bb2aec3c2ecabfed226c06f6777f292

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6a05d2e85bb2aec3c2ecabfed226c06f6777f292 Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Mon, 6 May 2024 14:44:04 +0300
Subject: [PATCH] net/mlx5/hws: decrease log level for creation failure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e014d5e2e49994fbc504a49814ed480a60c85d63 ]

When the user tries to create a matcher and if failed  with specific
errno (E2BIG) the message will be in debug level and not in warning.
It is a part of a feature when the user re-try to insert a new matching
depends on that errno, no need the annoying message.

Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer")

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 6 +++---
 drivers/net/mlx5/hws/mlx5dr_matcher.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index 3391b3d32a..003b50623c 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -2857,7 +2857,7 @@ mlx5dr_definer_find_best_match_fit(struct mlx5dr_context *ctx,
 		return 0;
 	}
 
-	DR_LOG(ERR, "Unable to find supporting match/jumbo definer combination");
+	DR_LOG(DEBUG, "Unable to find supporting match/jumbo definer combination");
 	rte_errno = ENOTSUP;
 	return rte_errno;
 }
@@ -2990,7 +2990,7 @@ mlx5dr_definer_calc_layout(struct mlx5dr_matcher *matcher,
 	/* Find the match definer layout for header layout match union */
 	ret = mlx5dr_definer_find_best_match_fit(ctx, match_definer, match_hl);
 	if (ret) {
-		DR_LOG(ERR, "Failed to create match definer from header layout");
+		DR_LOG(DEBUG, "Failed to create match definer from header layout");
 		goto free_fc;
 	}
 
@@ -3335,7 +3335,7 @@ int mlx5dr_definer_matcher_init(struct mlx5dr_context *ctx,
 
 	ret = mlx5dr_definer_calc_layout(matcher, &match_layout, &range_layout);
 	if (ret) {
-		DR_LOG(ERR, "Failed to calculate matcher definer layout");
+		DR_LOG(DEBUG, "Failed to calculate matcher definer layout");
 		return ret;
 	}
 
diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c
index 71478dab33..bb171a0340 100644
--- a/drivers/net/mlx5/hws/mlx5dr_matcher.c
+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c
@@ -807,7 +807,7 @@ static int mlx5dr_matcher_bind_mt(struct mlx5dr_matcher *matcher)
 	/* Calculate match, range and hash definers */
 	ret = mlx5dr_definer_matcher_init(ctx, matcher);
 	if (ret) {
-		DR_LOG(ERR, "Failed to set matcher templates with match definers");
+		DR_LOG(DEBUG, "Failed to set matcher templates with match definers");
 		return ret;
 	}
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.758687288 +0800
+++ 0081-net-mlx5-hws-decrease-log-level-for-creation-failure.patch	2024-07-12 18:40:14.226594213 +0800
@@ -1 +1 @@
-From e014d5e2e49994fbc504a49814ed480a60c85d63 Mon Sep 17 00:00:00 2001
+From 6a05d2e85bb2aec3c2ecabfed226c06f6777f292 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e014d5e2e49994fbc504a49814ed480a60c85d63 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index a0f95c6923..88be27dcbb 100644
+index 3391b3d32a..003b50623c 100644
@@ -25 +27 @@
-@@ -3539,7 +3539,7 @@ mlx5dr_definer_find_best_match_fit(struct mlx5dr_context *ctx,
+@@ -2857,7 +2857,7 @@ mlx5dr_definer_find_best_match_fit(struct mlx5dr_context *ctx,
@@ -31 +33 @@
- 	rte_errno = E2BIG;
+ 	rte_errno = ENOTSUP;
@@ -34 +36 @@
-@@ -3694,7 +3694,7 @@ mlx5dr_definer_calc_layout(struct mlx5dr_matcher *matcher,
+@@ -2990,7 +2990,7 @@ mlx5dr_definer_calc_layout(struct mlx5dr_matcher *matcher,
@@ -43 +45 @@
-@@ -4046,7 +4046,7 @@ int mlx5dr_definer_matcher_init(struct mlx5dr_context *ctx,
+@@ -3335,7 +3335,7 @@ int mlx5dr_definer_matcher_init(struct mlx5dr_context *ctx,
@@ -53 +55 @@
-index aeff300467..c9f5e46d24 100644
+index 71478dab33..bb171a0340 100644
@@ -56 +58 @@
-@@ -877,7 +877,7 @@ static int mlx5dr_matcher_bind_mt(struct mlx5dr_matcher *matcher)
+@@ -807,7 +807,7 @@ static int mlx5dr_matcher_bind_mt(struct mlx5dr_matcher *matcher)

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

* patch 'common/mlx5: fix PRM structs' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5/hws: decrease log level for creation failure' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5/hws: fix function comment' " Xueming Li
                     ` (19 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Yevgeny Kliteynik; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=54fef72c6f2d7235e030686dc9f4eb223c771efa

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 54fef72c6f2d7235e030686dc9f4eb223c771efa Mon Sep 17 00:00:00 2001
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
Date: Mon, 6 May 2024 14:44:05 +0300
Subject: [PATCH] common/mlx5: fix PRM structs
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 39b1cce562a4e1fa3137fd91a3b1dfed98f23db4 ]

Fix wrong reserved size and add helpful comment

Fixes: 365cdf5f8ce7 ("net/mlx5/hws: add command layer")

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/mlx5_prm.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 9e22dce6da..3cbb1179c0 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -2334,8 +2334,8 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
 	u8 reserved_at_d0[0x3];
 	u8 log_conn_track_max_alloc[0x5];
 	u8 reserved_at_d8[0x3];
-	u8 log_max_conn_track_offload[0x5];
-	u8 cross_vhca_object_to_object_supported[0x20]; /* End of DW7. */
+	u8 log_max_conn_track_offload[0x5]; /* End of DW7. */
+	u8 cross_vhca_object_to_object_supported[0x20];
 	u8 allowed_object_for_other_vhca_access_high[0x20];
 	u8 allowed_object_for_other_vhca_access[0x20];
 	u8 reserved_at_140[0x20];
@@ -3606,7 +3606,7 @@ struct mlx5_ifc_stc_ste_param_vport_bits {
 	u8 eswitch_owner_vhca_id[0x10];
 	u8 vport_number[0x10];
 	u8 eswitch_owner_vhca_id_valid[0x1];
-	u8 reserved_at_21[0x59];
+	u8 reserved_at_21[0x5f];
 };
 
 union mlx5_ifc_stc_param_bits {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.803119383 +0800
+++ 0082-common-mlx5-fix-PRM-structs.patch	2024-07-12 18:40:14.236594211 +0800
@@ -1 +1 @@
-From 39b1cce562a4e1fa3137fd91a3b1dfed98f23db4 Mon Sep 17 00:00:00 2001
+From 54fef72c6f2d7235e030686dc9f4eb223c771efa Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 39b1cce562a4e1fa3137fd91a3b1dfed98f23db4 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 2bbbc446fc..178a18a978 100644
+index 9e22dce6da..3cbb1179c0 100644
@@ -21 +23 @@
-@@ -2360,8 +2360,8 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
+@@ -2334,8 +2334,8 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
@@ -32 +34 @@
-@@ -3655,7 +3655,7 @@ struct mlx5_ifc_stc_ste_param_vport_bits {
+@@ -3606,7 +3606,7 @@ struct mlx5_ifc_stc_ste_param_vport_bits {

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

* patch 'net/mlx5/hws: fix function comment' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5/hws: decrease log level for creation failure' " Xueming Li
  2024-07-12 11:01   ` patch 'common/mlx5: fix PRM structs' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5/hws: fix spinlock release on context open' " Xueming Li
                     ` (18 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Yevgeny Kliteynik; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=52e5d44eaff820a10d9ba0c0dcd52693a1ac144d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 52e5d44eaff820a10d9ba0c0dcd52693a1ac144d Mon Sep 17 00:00:00 2001
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
Date: Mon, 6 May 2024 14:44:06 +0300
Subject: [PATCH] net/mlx5/hws: fix function comment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 735a47fb4ad305a7cc4a191d69afcc6d12763a5c ]

Remove comment that documents parameter that doesn't exist.

Fixes: 3eb748869d2d ("net/mlx5/hws: add send layer")

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_send.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_send.h b/drivers/net/mlx5/hws/mlx5dr_send.h
index c4eaea52ab..0c89faa8a7 100644
--- a/drivers/net/mlx5/hws/mlx5dr_send.h
+++ b/drivers/net/mlx5/hws/mlx5dr_send.h
@@ -203,8 +203,6 @@ struct mlx5dr_send_ste_attr {
  *   value to write in CPU endian format.
  * @param addr
  *   Address to write to.
- * @param lock
- *   Address of the lock to use for that UAR access.
  */
 static __rte_always_inline void
 mlx5dr_uar_write64_relaxed(uint64_t val, void *addr)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.843002078 +0800
+++ 0083-net-mlx5-hws-fix-function-comment.patch	2024-07-12 18:40:14.236594211 +0800
@@ -1 +1 @@
-From 735a47fb4ad305a7cc4a191d69afcc6d12763a5c Mon Sep 17 00:00:00 2001
+From 52e5d44eaff820a10d9ba0c0dcd52693a1ac144d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 735a47fb4ad305a7cc4a191d69afcc6d12763a5c ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 0c67a9e12d..c4f5a96f9c 100644
+index c4eaea52ab..0c89faa8a7 100644

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

* patch 'net/mlx5/hws: fix spinlock release on context open' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (2 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5/hws: fix function comment' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5/hws: add template match none flag' " Xueming Li
                     ` (17 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Yevgeny Kliteynik; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3dffe32fb5efb36e44122538f04de83a3812b2bd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3dffe32fb5efb36e44122538f04de83a3812b2bd Mon Sep 17 00:00:00 2001
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
Date: Mon, 6 May 2024 14:44:10 +0300
Subject: [PATCH] net/mlx5/hws: fix spinlock release on context open
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 36ae32b64e607c788961ab48adf24ad1cdf38140 ]

Add missing spinlock destruction in error flow.

Fixes: b0290e56dd08 ("net/mlx5/hws: add context object")

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_context.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr_context.c b/drivers/net/mlx5/hws/mlx5dr_context.c
index 15d53c578a..7f120b3b1b 100644
--- a/drivers/net/mlx5/hws/mlx5dr_context.c
+++ b/drivers/net/mlx5/hws/mlx5dr_context.c
@@ -263,6 +263,7 @@ struct mlx5dr_context *mlx5dr_context_open(struct ibv_context *ibv_ctx,
 free_caps:
 	simple_free(ctx->caps);
 free_ctx:
+	pthread_spin_destroy(&ctx->ctrl_lock);
 	simple_free(ctx);
 	return NULL;
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.875912074 +0800
+++ 0084-net-mlx5-hws-fix-spinlock-release-on-context-open.patch	2024-07-12 18:40:14.236594211 +0800
@@ -1 +1 @@
-From 36ae32b64e607c788961ab48adf24ad1cdf38140 Mon Sep 17 00:00:00 2001
+From 3dffe32fb5efb36e44122538f04de83a3812b2bd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 36ae32b64e607c788961ab48adf24ad1cdf38140 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/mlx5/hws: add template match none flag' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (3 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5/hws: fix spinlock release on context open' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5/hws: extend tag saving for match and jumbo' " Xueming Li
                     ` (16 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Yevgeny Kliteynik; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6fe9802a243792e4a43f0ce2ffd12c65442d5e35

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6fe9802a243792e4a43f0ce2ffd12c65442d5e35 Mon Sep 17 00:00:00 2001
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
Date: Mon, 6 May 2024 14:44:11 +0300
Subject: [PATCH] net/mlx5/hws: add template match none flag
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2471994eedab4090cb73173d9986834b15e98aad ]

Instead of passing 0 as an enum parameter, define flag NONE.
This resolves the following code analysis error: "enumerated
type mixed with another type".
This value is currently used in tests only, and will later
be used in backward-compatible steering API.

Fixes: 5cadd74fbc08 ("net/mlx5: add HW steering low-level abstract stub")

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr.h b/drivers/net/mlx5/hws/mlx5dr.h
index d88f73ab57..f003d9f446 100644
--- a/drivers/net/mlx5/hws/mlx5dr.h
+++ b/drivers/net/mlx5/hws/mlx5dr.h
@@ -80,6 +80,7 @@ enum mlx5dr_action_aso_ct_flags {
 };
 
 enum mlx5dr_match_template_flags {
+	MLX5DR_MATCH_TEMPLATE_FLAG_NONE = 0,
 	/* Allow relaxed matching by skipping derived dependent match fields. */
 	MLX5DR_MATCH_TEMPLATE_FLAG_RELAXED_MATCH = 1,
 };
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.910756370 +0800
+++ 0085-net-mlx5-hws-add-template-match-none-flag.patch	2024-07-12 18:40:14.246594210 +0800
@@ -1 +1 @@
-From 2471994eedab4090cb73173d9986834b15e98aad Mon Sep 17 00:00:00 2001
+From 6fe9802a243792e4a43f0ce2ffd12c65442d5e35 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2471994eedab4090cb73173d9986834b15e98aad ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 36ecccf9ac..86cd4f1db5 100644
+index d88f73ab57..f003d9f446 100644
@@ -25 +27 @@
-@@ -81,6 +81,7 @@ enum mlx5dr_action_aso_ct_flags {
+@@ -80,6 +80,7 @@ enum mlx5dr_action_aso_ct_flags {

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

* patch 'net/mlx5/hws: extend tag saving for match and jumbo' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (4 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5/hws: add template match none flag' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5/hws: set default miss when replacing table' " Xueming Li
                     ` (15 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Erez Shitrit; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=74f5047f66841abb7e1133241d3942075901a898

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 74f5047f66841abb7e1133241d3942075901a898 Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Mon, 6 May 2024 14:44:14 +0300
Subject: [PATCH] net/mlx5/hws: extend tag saving for match and jumbo
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8c163b6f9ebbd4d159d2fc875008090ade71f943 ]

Save the exact tag when matching over jumbo masking.

Fixes: 348cdeec6472 ("net/mlx5/hws: add FW WQE rule creation logic")

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_rule.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c
index 02d57409ab..82ceaf0750 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -150,8 +150,13 @@ mlx5dr_rule_save_delete_info(struct mlx5dr_rule *rule,
 		rule->tag_ptr = simple_calloc(2, sizeof(*rule->tag_ptr));
 		assert(rule->tag_ptr);
 
-		src_tag = (uint8_t *)ste_attr->wqe_data->tag;
-		memcpy(rule->tag_ptr[0].match, src_tag, MLX5DR_MATCH_TAG_SZ);
+		if (is_jumbo)
+			memcpy(rule->tag_ptr[0].jumbo, ste_attr->wqe_data->action,
+			       MLX5DR_JUMBO_TAG_SZ);
+		else
+			memcpy(rule->tag_ptr[0].match, ste_attr->wqe_data->tag,
+			       MLX5DR_MATCH_TAG_SZ);
+
 		rule->tag_ptr[1].reserved[0] = ste_attr->send_attr.match_definer_id;
 
 		/* Save range definer id and tag for delete */
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.949282866 +0800
+++ 0086-net-mlx5-hws-extend-tag-saving-for-match-and-jumbo.patch	2024-07-12 18:40:14.246594210 +0800
@@ -1 +1 @@
-From 8c163b6f9ebbd4d159d2fc875008090ade71f943 Mon Sep 17 00:00:00 2001
+From 74f5047f66841abb7e1133241d3942075901a898 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8c163b6f9ebbd4d159d2fc875008090ade71f943 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index ef96c77c2a..171a0bff38 100644
+index 02d57409ab..82ceaf0750 100644
@@ -21 +23 @@
-@@ -195,8 +195,13 @@ mlx5dr_rule_save_delete_info(struct mlx5dr_rule *rule,
+@@ -150,8 +150,13 @@ mlx5dr_rule_save_delete_info(struct mlx5dr_rule *rule,

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

* patch 'net/mlx5/hws: set default miss when replacing table' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (5 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5/hws: extend tag saving for match and jumbo' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5/hws: fix action template dump' " Xueming Li
                     ` (14 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Itamar Gozlan; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2b25e7e741fd0b3a5a928abb542faafab422d6a9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2b25e7e741fd0b3a5a928abb542faafab422d6a9 Mon Sep 17 00:00:00 2001
From: Itamar Gozlan <igozlan@nvidia.com>
Date: Mon, 6 May 2024 14:44:16 +0300
Subject: [PATCH] net/mlx5/hws: set default miss when replacing table
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4711950b04e2124e8d3796853cfd16bf22026ebc ]

Allowing the replacement of a miss table without enforcing
a previous disconnecting. This feature extension allows the
user to change the destination miss table when the system
runs without losing traffic.

Fixes: b81f95ca770d ("net/mlx5/hws: support default miss table")

Signed-off-by: Itamar Gozlan <igozlan@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_table.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_table.c b/drivers/net/mlx5/hws/mlx5dr_table.c
index 55b9b20150..ab73017ade 100644
--- a/drivers/net/mlx5/hws/mlx5dr_table.c
+++ b/drivers/net/mlx5/hws/mlx5dr_table.c
@@ -611,8 +611,7 @@ static int mlx5dr_table_set_default_miss_not_valid(struct mlx5dr_table *tbl,
 
 	if (mlx5dr_table_is_root(tbl) ||
 	    (miss_tbl && mlx5dr_table_is_root(miss_tbl)) ||
-	    (miss_tbl && miss_tbl->type != tbl->type) ||
-	    (miss_tbl && tbl->default_miss.miss_tbl)) {
+	    (miss_tbl && miss_tbl->type != tbl->type)) {
 		DR_LOG(ERR, "Invalid arguments");
 		rte_errno = EINVAL;
 		return -rte_errno;
@@ -625,6 +624,7 @@ int mlx5dr_table_set_default_miss(struct mlx5dr_table *tbl,
 				  struct mlx5dr_table *miss_tbl)
 {
 	struct mlx5dr_context *ctx = tbl->ctx;
+	struct mlx5dr_table *old_miss_tbl;
 	int ret;
 
 	ret = mlx5dr_table_set_default_miss_not_valid(tbl, miss_tbl);
@@ -632,15 +632,16 @@ int mlx5dr_table_set_default_miss(struct mlx5dr_table *tbl,
 		return ret;
 
 	pthread_spin_lock(&ctx->ctrl_lock);
-
+	old_miss_tbl = tbl->default_miss.miss_tbl;
 	ret = mlx5dr_table_connect_to_miss_table(tbl, miss_tbl);
 	if (ret)
 		goto out;
 
+	if (old_miss_tbl)
+		LIST_REMOVE(tbl, default_miss.next);
+
 	if (miss_tbl)
 		LIST_INSERT_HEAD(&miss_tbl->default_miss.head, tbl, default_miss.next);
-	else
-		LIST_REMOVE(tbl, default_miss.next);
 
 	pthread_spin_unlock(&ctx->ctrl_lock);
 	return 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:17.999092060 +0800
+++ 0087-net-mlx5-hws-set-default-miss-when-replacing-table.patch	2024-07-12 18:40:14.246594210 +0800
@@ -1 +1 @@
-From 4711950b04e2124e8d3796853cfd16bf22026ebc Mon Sep 17 00:00:00 2001
+From 2b25e7e741fd0b3a5a928abb542faafab422d6a9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4711950b04e2124e8d3796853cfd16bf22026ebc ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/mlx5/hws: fix action template dump' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (6 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5/hws: set default miss when replacing table' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5: fix indexed pool with invalid index' " Xueming Li
                     ` (13 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Hamdan Igbaria; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2bec7973b347751a6ca6db290cc8e701948c6575

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2bec7973b347751a6ca6db290cc8e701948c6575 Mon Sep 17 00:00:00 2001
From: Hamdan Igbaria <hamdani@nvidia.com>
Date: Mon, 6 May 2024 14:44:19 +0300
Subject: [PATCH] net/mlx5/hws: fix action template dump
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 98638051a93963bde144b85e7621ca30252de384 ]

The debug print of only_term param in the action template
was printed incorrectly.

Fixes: 78580cf4e796 ("net/mlx5/hws: add debug layer")

Signed-off-by: Hamdan Igbaria <hamdani@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_debug.c b/drivers/net/mlx5/hws/mlx5dr_debug.c
index 11557bcab8..f11c81ffee 100644
--- a/drivers/net/mlx5/hws/mlx5dr_debug.c
+++ b/drivers/net/mlx5/hws/mlx5dr_debug.c
@@ -150,7 +150,7 @@ mlx5dr_debug_dump_matcher_action_template(FILE *f, struct mlx5dr_matcher *matche
 			      MLX5DR_DEBUG_RES_TYPE_MATCHER_ACTION_TEMPLATE,
 			      (uint64_t)(uintptr_t)at,
 			      (uint64_t)(uintptr_t)matcher,
-			      at->only_term ? 0 : 1,
+			      at->only_term,
 			      is_root ? 0 : at->num_of_action_stes,
 			      at->num_actions);
 		if (ret < 0) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.039945155 +0800
+++ 0088-net-mlx5-hws-fix-action-template-dump.patch	2024-07-12 18:40:14.246594210 +0800
@@ -1 +1 @@
-From 98638051a93963bde144b85e7621ca30252de384 Mon Sep 17 00:00:00 2001
+From 2bec7973b347751a6ca6db290cc8e701948c6575 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 98638051a93963bde144b85e7621ca30252de384 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 5ad4ca2da5..741a725842 100644
+index 11557bcab8..f11c81ffee 100644
@@ -22 +24 @@
-@@ -153,7 +153,7 @@ mlx5dr_debug_dump_matcher_action_template(FILE *f, struct mlx5dr_matcher *matche
+@@ -150,7 +150,7 @@ mlx5dr_debug_dump_matcher_action_template(FILE *f, struct mlx5dr_matcher *matche

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

* patch 'net/mlx5: fix indexed pool with invalid index' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (7 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5/hws: fix action template dump' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5: fix hash Rx queue release in flow sample' " Xueming Li
                     ` (12 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Haifei Luo; +Cc: Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=1c38fc4e31fe66a79696dfc9781cda403da01062

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1c38fc4e31fe66a79696dfc9781cda403da01062 Mon Sep 17 00:00:00 2001
From: Haifei Luo <haifeil@nvidia.com>
Date: Wed, 15 May 2024 12:36:53 +0300
Subject: [PATCH] net/mlx5: fix indexed pool with invalid index
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 16a7b5d14e3dfb4d3d385375b94bb2f360883cd6 ]

When _mlx5_ipool_get_cache is called, idx may be invalid and
the "trunk" is NULL in this case. Assert is not correct and add
checks that if trunk is NULL or not. Return NULL If trunk is NULL.

Fixes: 42f463395f8f ("net/mlx5: support indexed pool non-lcore operations")

Signed-off-by: Haifei Luo <haifeil@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c
index 4db738785f..b5b6c7c728 100644
--- a/drivers/net/mlx5/mlx5_utils.c
+++ b/drivers/net/mlx5/mlx5_utils.c
@@ -379,7 +379,8 @@ _mlx5_ipool_get_cache(struct mlx5_indexed_pool *pool, int cidx, uint32_t idx)
 	idx -= 1;
 	trunk_idx = mlx5_trunk_idx_get(pool, idx);
 	trunk = lc->trunks[trunk_idx];
-	MLX5_ASSERT(trunk);
+	if (!trunk)
+		return NULL;
 	entry_idx = idx - mlx5_trunk_idx_offset_get(pool, trunk_idx);
 	return &trunk->data[entry_idx * pool->cfg.size];
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.073804051 +0800
+++ 0089-net-mlx5-fix-indexed-pool-with-invalid-index.patch	2024-07-12 18:40:14.256594209 +0800
@@ -1 +1 @@
-From 16a7b5d14e3dfb4d3d385375b94bb2f360883cd6 Mon Sep 17 00:00:00 2001
+From 1c38fc4e31fe66a79696dfc9781cda403da01062 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 16a7b5d14e3dfb4d3d385375b94bb2f360883cd6 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index fc03cc054b..d52119f0be 100644
+index 4db738785f..b5b6c7c728 100644

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

* patch 'net/mlx5: fix hash Rx queue release in flow sample' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (8 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5: fix indexed pool with invalid index' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5: fix flow template indirect action failure' " Xueming Li
                     ` (11 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: Bing Zhao, Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=82668d33e8f0729fc6ec089a5637b62a0207bdde

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 82668d33e8f0729fc6ec089a5637b62a0207bdde Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Mon, 20 May 2024 18:07:09 +0300
Subject: [PATCH] net/mlx5: fix hash Rx queue release in flow sample
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cf3f6ba146abe613c811a281ceadf7b22ef82ab6 ]

While the queue/RSS action was added to sample action lists,
the Rx hash queue resource was allocated in the sample action
translation to create the sample DR action later.

While there's a failure in the flow creation, the Rx hash queue
resource of the sample action list was destroyed in the wrong place.

This patch adds the checking to release the Rx hash queue
resource after the sample action release, to avoid one more
extra release if there's a failure.

Fixes: ca5eb60ecd5b ("net/mlx5: fix resource release for mirror flow")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Reviewed-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index b3ccc2063c..b97e00b287 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -15389,7 +15389,8 @@ error:
 	SILIST_FOREACH(priv->sh->ipool[MLX5_IPOOL_MLX5_FLOW], flow->dev_handles,
 		       handle_idx, dh, next) {
 		/* hrxq is union, don't clear it if the flag is not set. */
-		if (dh->fate_action == MLX5_FLOW_FATE_QUEUE && dh->rix_hrxq) {
+		if (dh->fate_action == MLX5_FLOW_FATE_QUEUE && dh->rix_hrxq &&
+		    !dh->dvh.rix_sample && !dh->dvh.rix_dest_array) {
 			mlx5_hrxq_release(dev, dh->rix_hrxq);
 			dh->rix_hrxq = 0;
 		} else if (dh->fate_action == MLX5_FLOW_FATE_SHARED_RSS) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.107034147 +0800
+++ 0090-net-mlx5-fix-hash-Rx-queue-release-in-flow-sample.patch	2024-07-12 18:40:14.276594207 +0800
@@ -1 +1 @@
-From cf3f6ba146abe613c811a281ceadf7b22ef82ab6 Mon Sep 17 00:00:00 2001
+From 82668d33e8f0729fc6ec089a5637b62a0207bdde Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cf3f6ba146abe613c811a281ceadf7b22ef82ab6 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 04cb9291a8..7330e13787 100644
+index b3ccc2063c..b97e00b287 100644
@@ -31 +33 @@
-@@ -15668,7 +15668,8 @@ error:
+@@ -15389,7 +15389,8 @@ error:

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

* patch 'net/mlx5: fix flow template indirect action failure' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (9 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5: fix hash Rx queue release in flow sample' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5: break flow resource release loop' " Xueming Li
                     ` (10 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Maayan Kashani; +Cc: Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2a32678f150f9beed91f6563d4003f5c158be5dc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2a32678f150f9beed91f6563d4003f5c158be5dc Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Sun, 26 May 2024 16:22:44 +0300
Subject: [PATCH] net/mlx5: fix flow template indirect action failure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b79ac509105a2cf9fce1734a6798632a0414cd1c ]

For indirect action type, on  error case the function jumped to err
but returned zero cause rte_errno was not initialized before the jump.
It caused no error in table creation.

In case reaching an error, if rte_errno is not initialized,
it will be set to EINVAL.
Now table creation should fail if the translate of the action fails.
Added driver log warnings so it can be easy to track failure on shared
actions translate.

Fixes: 7ab3962d2d2b ("net/mlx5: add indirect HW steering action")

Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 2f4b2d774e..39e68b39f7 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -1009,15 +1009,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
 		if (!shared_rss || __flow_hw_act_data_shared_rss_append
 		    (priv, acts,
 		    (enum rte_flow_action_type)MLX5_RTE_FLOW_ACTION_TYPE_RSS,
-		    action_src, action_dst, idx, shared_rss))
+		    action_src, action_dst, idx, shared_rss)) {
+			DRV_LOG(WARNING, "Indirect RSS action index %d translate failed", act_idx);
 			return -1;
+		}
 		break;
 	case MLX5_INDIRECT_ACTION_TYPE_COUNT:
 		if (__flow_hw_act_data_shared_cnt_append(priv, acts,
 			(enum rte_flow_action_type)
 			MLX5_RTE_FLOW_ACTION_TYPE_COUNT,
-			action_src, action_dst, act_idx))
+			action_src, action_dst, act_idx)) {
+			DRV_LOG(WARNING, "Indirect count action translate failed");
 			return -1;
+		}
 		break;
 	case MLX5_INDIRECT_ACTION_TYPE_AGE:
 		/* Not supported, prevent by validate function. */
@@ -1025,15 +1029,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
 		break;
 	case MLX5_INDIRECT_ACTION_TYPE_CT:
 		if (flow_hw_ct_compile(dev, MLX5_HW_INV_QUEUE,
-				       idx, &acts->rule_acts[action_dst]))
+				       idx, &acts->rule_acts[action_dst])) {
+			DRV_LOG(WARNING, "Indirect CT action translate failed");
 			return -1;
+		}
 		break;
 	case MLX5_INDIRECT_ACTION_TYPE_METER_MARK:
 		if (__flow_hw_act_data_shared_mtr_append(priv, acts,
 			(enum rte_flow_action_type)
 			MLX5_RTE_FLOW_ACTION_TYPE_METER_MARK,
-			action_src, action_dst, idx))
+			action_src, action_dst, idx)) {
+			DRV_LOG(WARNING, "Indirect meter mark action translate failed");
 			return -1;
+		}
 		break;
 	case MLX5_INDIRECT_ACTION_TYPE_QUOTA:
 		flow_hw_construct_quota(priv, &acts->rule_acts[action_dst], idx);
@@ -2516,6 +2524,9 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
 	}
 	return 0;
 err:
+	/* If rte_errno was not initialized and reached error state. */
+	if (!rte_errno)
+		rte_errno = EINVAL;
 	err = rte_errno;
 	__flow_hw_action_template_destroy(dev, acts);
 	return rte_flow_error_set(error, err,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.159726240 +0800
+++ 0091-net-mlx5-fix-flow-template-indirect-action-failure.patch	2024-07-12 18:40:14.296594204 +0800
@@ -1 +1 @@
-From b79ac509105a2cf9fce1734a6798632a0414cd1c Mon Sep 17 00:00:00 2001
+From 2a32678f150f9beed91f6563d4003f5c158be5dc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b79ac509105a2cf9fce1734a6798632a0414cd1c ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index d9140dbf23..463f7b87a3 100644
+index 2f4b2d774e..39e68b39f7 100644
@@ -29 +31 @@
-@@ -1106,15 +1106,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
+@@ -1009,15 +1009,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
@@ -51 +53 @@
-@@ -1122,15 +1126,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
+@@ -1025,15 +1029,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
@@ -73 +75 @@
-@@ -2645,6 +2653,9 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
+@@ -2516,6 +2524,9 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,

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

* patch 'net/mlx5: break flow resource release loop' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (10 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5: fix flow template indirect action failure' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5: fix access to flow template operations' " Xueming Li
                     ` (9 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a5a685a9f08f63eec57884f61ea46b058c79fdc7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a5a685a9f08f63eec57884f61ea46b058c79fdc7 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Thu, 30 May 2024 00:46:32 +0300
Subject: [PATCH] net/mlx5: break flow resource release loop
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4fcb7a05e38172aed60f87a6287bb2ee3d9828fd ]

There is a loop inside the flow_hw_resource_release() function
that tries to free all the template patterns and tables until they
are successfully released. But some of the tables may be still in use
in case of the ungraceful application termination. Which causes the
forever loop in the app on the exit. Don't wait for the tables release
and try them to free only once and proceed with the exit.

Fixes: d1559d66ed2d ("net/mlx5: add table management")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 62 +++++++++++++++++++--------------
 1 file changed, 36 insertions(+), 26 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 39e68b39f7..9667bad68e 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -4663,7 +4663,7 @@ flow_hw_table_destroy(struct rte_eth_dev *dev,
 		return rte_flow_error_set(error, EBUSY,
 				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				   NULL,
-				   "table in use");
+				   "table is in use");
 	}
 	LIST_REMOVE(table, next);
 	for (i = 0; i < table->nb_item_templates; i++)
@@ -6706,7 +6706,7 @@ flow_hw_actions_template_destroy(struct rte_eth_dev *dev,
 		return rte_flow_error_set(error, EBUSY,
 				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				   NULL,
-				   "action template in using");
+				   "action template is in use");
 	}
 	if (template->action_flags & flag)
 		mlx5_free_srh_flex_parser(dev);
@@ -7124,7 +7124,7 @@ flow_hw_pattern_template_destroy(struct rte_eth_dev *dev,
 		return rte_flow_error_set(error, EBUSY,
 				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 				   NULL,
-				   "item template in using");
+				   "item template is in use");
 	}
 	if (template->item_flags & (MLX5_FLOW_ITEM_OUTER_IPV6_ROUTING_EXT |
 				    MLX5_FLOW_ITEM_INNER_IPV6_ROUTING_EXT))
@@ -9798,10 +9798,10 @@ void
 flow_hw_resource_release(struct rte_eth_dev *dev)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
-	struct rte_flow_template_table *tbl;
-	struct rte_flow_pattern_template *it;
-	struct rte_flow_actions_template *at;
-	struct mlx5_flow_group *grp;
+	struct rte_flow_template_table *tbl, *temp_tbl;
+	struct rte_flow_pattern_template *it, *temp_it;
+	struct rte_flow_actions_template *at, *temp_at;
+	struct mlx5_flow_group *grp, *temp_grp;
 	uint32_t i;
 
 	if (!priv->dr_ctx)
@@ -9811,25 +9811,35 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
 	flow_hw_cleanup_ctrl_fdb_tables(dev);
 	flow_hw_cleanup_tx_repr_tagging(dev);
 	flow_hw_cleanup_ctrl_rx_tables(dev);
-	while (!LIST_EMPTY(&priv->flow_hw_grp)) {
-		grp = LIST_FIRST(&priv->flow_hw_grp);
-		flow_hw_group_unset_miss_group(dev, grp, NULL);
-	}
-	while (!LIST_EMPTY(&priv->flow_hw_tbl_ongo)) {
-		tbl = LIST_FIRST(&priv->flow_hw_tbl_ongo);
-		flow_hw_table_destroy(dev, tbl, NULL);
-	}
-	while (!LIST_EMPTY(&priv->flow_hw_tbl)) {
-		tbl = LIST_FIRST(&priv->flow_hw_tbl);
-		flow_hw_table_destroy(dev, tbl, NULL);
-	}
-	while (!LIST_EMPTY(&priv->flow_hw_itt)) {
-		it = LIST_FIRST(&priv->flow_hw_itt);
-		flow_hw_pattern_template_destroy(dev, it, NULL);
-	}
-	while (!LIST_EMPTY(&priv->flow_hw_at)) {
-		at = LIST_FIRST(&priv->flow_hw_at);
-		flow_hw_actions_template_destroy(dev, at, NULL);
+	grp = LIST_FIRST(&priv->flow_hw_grp);
+	while (grp) {
+		temp_grp = LIST_NEXT(grp, next);
+		claim_zero(flow_hw_group_unset_miss_group(dev, grp, NULL));
+		grp = temp_grp;
+	}
+	tbl = LIST_FIRST(&priv->flow_hw_tbl_ongo);
+	while (tbl) {
+		temp_tbl = LIST_NEXT(tbl, next);
+		claim_zero(flow_hw_table_destroy(dev, tbl, NULL));
+		tbl = temp_tbl;
+	}
+	tbl = LIST_FIRST(&priv->flow_hw_tbl);
+	while (tbl) {
+		temp_tbl = LIST_NEXT(tbl, next);
+		claim_zero(flow_hw_table_destroy(dev, tbl, NULL));
+		tbl = temp_tbl;
+	}
+	it = LIST_FIRST(&priv->flow_hw_itt);
+	while (it) {
+		temp_it = LIST_NEXT(it, next);
+		claim_zero(flow_hw_pattern_template_destroy(dev, it, NULL));
+		it = temp_it;
+	}
+	at = LIST_FIRST(&priv->flow_hw_at);
+	while (at) {
+		temp_at = LIST_NEXT(at, next);
+		claim_zero(flow_hw_actions_template_destroy(dev, at, NULL));
+		at = temp_at;
 	}
 	for (i = 0; i < MLX5_HW_ACTION_FLAG_MAX; i++) {
 		if (priv->hw_drop[i])
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.206711635 +0800
+++ 0092-net-mlx5-break-flow-resource-release-loop.patch	2024-07-12 18:40:14.306594203 +0800
@@ -1 +1 @@
-From 4fcb7a05e38172aed60f87a6287bb2ee3d9828fd Mon Sep 17 00:00:00 2001
+From a5a685a9f08f63eec57884f61ea46b058c79fdc7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4fcb7a05e38172aed60f87a6287bb2ee3d9828fd ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index e8c06387f8..53c6cc5961 100644
+index 39e68b39f7..9667bad68e 100644
@@ -26 +28 @@
-@@ -5062,7 +5062,7 @@ flow_hw_table_destroy(struct rte_eth_dev *dev,
+@@ -4663,7 +4663,7 @@ flow_hw_table_destroy(struct rte_eth_dev *dev,
@@ -35 +37 @@
-@@ -7362,7 +7362,7 @@ flow_hw_actions_template_destroy(struct rte_eth_dev *dev,
+@@ -6706,7 +6706,7 @@ flow_hw_actions_template_destroy(struct rte_eth_dev *dev,
@@ -44 +46 @@
-@@ -7986,7 +7986,7 @@ flow_hw_pattern_template_destroy(struct rte_eth_dev *dev,
+@@ -7124,7 +7124,7 @@ flow_hw_pattern_template_destroy(struct rte_eth_dev *dev,
@@ -53 +55 @@
-@@ -10787,10 +10787,10 @@ void
+@@ -9798,10 +9798,10 @@ void
@@ -68 +70,2 @@
-@@ -10802,25 +10802,35 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
+@@ -9811,25 +9811,35 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
+ 	flow_hw_cleanup_ctrl_fdb_tables(dev);
@@ -71 +73,0 @@
- 	flow_hw_action_template_drop_release(dev);

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

* patch 'net/mlx5: fix access to flow template operations' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (11 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5: break flow resource release loop' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5: support jump in meter hierarchy' " Xueming Li
                     ` (8 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=aba6289d562f7583deb7654bed08e0e101db8f70

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From aba6289d562f7583deb7654bed08e0e101db8f70 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 2 Jun 2024 09:00:49 +0300
Subject: [PATCH] net/mlx5: fix access to flow template operations
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit acbb57b25d30147d1fd0edf1e8314a0a3d3c38c9 ]

PMD activates HWS template API context during port configuration.

There was no validation that the HWS context was activated before
the PMD tried to process other template function calls.

The patch adds HWS context validation.

Fixes: b401400db24e ("net/mlx5: add port flow configuration")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 9667bad68e..fa6ae623c9 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -124,6 +124,20 @@ mlx5_tbl_multi_pattern_process(struct rte_eth_dev *dev,
 static __rte_always_inline enum mlx5_indirect_list_type
 flow_hw_inlist_type_get(const struct rte_flow_action *actions);
 
+static bool
+mlx5_hw_ctx_validate(const struct rte_eth_dev *dev, struct rte_flow_error *error)
+{
+	const struct mlx5_priv *priv = dev->data->dev_private;
+
+	if (!priv->dr_ctx) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+				   "non-template flow engine was not configured");
+		return false;
+	}
+	return true;
+}
+
 static __rte_always_inline int
 mlx5_multi_pattern_reformat_to_index(enum mlx5dr_action_type type)
 {
@@ -5754,6 +5768,8 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
 	int ret;
 	const struct rte_flow_action_ipv6_ext_remove *remove_data;
 
+	if (!mlx5_hw_ctx_validate(dev, error))
+		return -rte_errno;
 	/* FDB actions are only valid to proxy port. */
 	if (attr->transfer && (!priv->sh->config.dv_esw_en || !priv->master))
 		return rte_flow_error_set(error, EINVAL,
@@ -6766,6 +6782,8 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
 	bool items_end = false;
 	uint32_t tag_bitmap = 0;
 
+	if (!mlx5_hw_ctx_validate(dev, error))
+		return -rte_errno;
 	if (!attr->ingress && !attr->egress && !attr->transfer)
 		return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ATTR, NULL,
 					  "at least one of the direction attributes"
@@ -10269,6 +10287,8 @@ flow_hw_action_handle_create(struct rte_eth_dev *dev, uint32_t queue,
 	bool aso = false;
 	bool force_job = action->type == RTE_FLOW_ACTION_TYPE_METER_MARK;
 
+	if (!mlx5_hw_ctx_validate(dev, error))
+		return NULL;
 	if (attr || force_job) {
 		job = flow_hw_action_job_init(priv, queue, NULL, user_data,
 					      NULL, MLX5_HW_Q_JOB_TYPE_CREATE,
@@ -11540,6 +11560,8 @@ flow_hw_async_action_list_handle_create(struct rte_eth_dev *dev, uint32_t queue,
 		}
 	};
 
+	if (!mlx5_hw_ctx_validate(dev, error))
+		return NULL;
 	if (!actions) {
 		rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
 				   NULL, "No action list");
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.265080128 +0800
+++ 0093-net-mlx5-fix-access-to-flow-template-operations.patch	2024-07-12 18:40:14.316594202 +0800
@@ -1 +1 @@
-From acbb57b25d30147d1fd0edf1e8314a0a3d3c38c9 Mon Sep 17 00:00:00 2001
+From aba6289d562f7583deb7654bed08e0e101db8f70 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit acbb57b25d30147d1fd0edf1e8314a0a3d3c38c9 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 53c6cc5961..e97afb0c86 100644
+index 9667bad68e..fa6ae623c9 100644
@@ -26 +28 @@
-@@ -206,6 +206,20 @@ mlx5_destroy_multi_pattern_segment(struct mlx5_multi_pattern_segment *segment);
+@@ -124,6 +124,20 @@ mlx5_tbl_multi_pattern_process(struct rte_eth_dev *dev,
@@ -47 +49 @@
-@@ -6399,6 +6413,8 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
+@@ -5754,6 +5768,8 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
@@ -56 +58,2 @@
-@@ -7528,6 +7544,8 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
+@@ -6766,6 +6782,8 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
+ 	bool items_end = false;
@@ -58 +60,0 @@
- 	int ret;
@@ -65 +67 @@
-@@ -11259,6 +11277,8 @@ flow_hw_action_handle_create(struct rte_eth_dev *dev, uint32_t queue,
+@@ -10269,6 +10287,8 @@ flow_hw_action_handle_create(struct rte_eth_dev *dev, uint32_t queue,
@@ -74 +76 @@
-@@ -12541,6 +12561,8 @@ flow_hw_async_action_list_handle_create(struct rte_eth_dev *dev, uint32_t queue,
+@@ -11540,6 +11560,8 @@ flow_hw_async_action_list_handle_create(struct rte_eth_dev *dev, uint32_t queue,

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

* patch 'net/mlx5: support jump in meter hierarchy' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (12 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5: fix access to flow template operations' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5: fix crash on counter pool destroy' " Xueming Li
                     ` (7 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Shun Hao; +Cc: Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=eab3879444b1d4e62a3285d56d41d4dab3bc9ebb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eab3879444b1d4e62a3285d56d41d4dab3bc9ebb Mon Sep 17 00:00:00 2001
From: Shun Hao <shunh@nvidia.com>
Date: Tue, 4 Jun 2024 05:51:56 +0300
Subject: [PATCH] net/mlx5: support jump in meter hierarchy
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit dc1d92a4f547f8af6eb9b8824257ab3fd8dfbc77 ]

Currently in meter hierarchy, only meter action is supported for green
and yellow policy flow.
This patch adds support of jump action for green or yellow policy flow.

Fixes: 96ca87da4f46 ("net/mlx5: validate yellow meter action")

Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 36 ++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index b97e00b287..d7eba9a71f 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -17682,7 +17682,7 @@ __flow_dv_create_policy_matcher(struct rte_eth_dev *dev,
 static int
 __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
 		struct mlx5_flow_meter_sub_policy *sub_policy,
-		uint8_t egress, uint8_t transfer, bool match_src_port,
+		uint8_t egress, uint8_t transfer, bool *match_src_port,
 		struct mlx5_meter_policy_acts acts[RTE_COLORS])
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
@@ -17697,6 +17697,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
 		.reserved = 0,
 	};
 	int i;
+	uint16_t priority;
 	int ret = mlx5_flow_get_reg_id(dev, MLX5_MTR_COLOR, 0, &flow_err);
 	struct mlx5_sub_policy_color_rule *color_rule;
 	struct mlx5_sub_policy_color_rule *tmp_rules[RTE_COLORS] = {NULL};
@@ -17731,12 +17732,12 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
 		TAILQ_INSERT_TAIL(&sub_policy->color_rules[i],
 				  color_rule, next_port);
 		color_rule->src_port = priv->representor_id;
-		/* No use. */
-		attr.priority = i;
+		priority = (match_src_port[i] == match_src_port[RTE_COLOR_GREEN]) ?
+			   MLX5_MTR_POLICY_MATCHER_PRIO : (MLX5_MTR_POLICY_MATCHER_PRIO + 1);
 		/* Create matchers for colors. */
 		if (__flow_dv_create_policy_matcher(dev, color_reg_c_idx,
-				MLX5_MTR_POLICY_MATCHER_PRIO, sub_policy,
-				&attr, match_src_port, NULL,
+				priority, sub_policy,
+				&attr, match_src_port[i], NULL,
 				&color_rule->matcher, &flow_err)) {
 			DRV_LOG(ERR, "Failed to create color%u matcher.", i);
 			goto err_exit;
@@ -17746,7 +17747,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
 				color_reg_c_idx, (enum rte_color)i,
 				color_rule->matcher,
 				acts[i].actions_n, acts[i].dv_actions,
-				match_src_port, NULL, &color_rule->rule,
+				match_src_port[i], NULL, &color_rule->rule,
 				&attr)) {
 			DRV_LOG(ERR, "Failed to create color%u rule.", i);
 			goto err_exit;
@@ -17794,7 +17795,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
 	uint8_t egress = (domain == MLX5_MTR_DOMAIN_EGRESS) ? 1 : 0;
 	uint8_t transfer = (domain == MLX5_MTR_DOMAIN_TRANSFER) ? 1 : 0;
 	bool mtr_first = egress || (transfer && priv->representor_id != UINT16_MAX);
-	bool match_src_port = false;
+	bool match_src_port[RTE_COLORS] = {false};
 	int i;
 
 	/* If RSS or Queue, no previous actions / rules is created. */
@@ -17865,7 +17866,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
 				acts[i].dv_actions[acts[i].actions_n] =
 					port_action->action;
 				acts[i].actions_n++;
-				match_src_port = true;
+				match_src_port[i] = true;
 				break;
 			case MLX5_FLOW_FATE_DROP:
 			case MLX5_FLOW_FATE_JUMP:
@@ -17917,7 +17918,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
 				acts[i].dv_actions[acts[i].actions_n++] =
 							tbl_data->jump.action;
 				if (mtr_policy->act_cnt[i].modify_hdr)
-					match_src_port = !!transfer;
+					match_src_port[i] = !!transfer;
 				break;
 			default:
 				/*Queue action do nothing*/
@@ -17931,9 +17932,9 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
 			"Failed to create policy rules per domain.");
 		goto err_exit;
 	}
-	if (match_src_port) {
-		mtr_policy->match_port = match_src_port;
-		mtr_policy->hierarchy_match_port = match_src_port;
+	if (match_src_port[RTE_COLOR_GREEN] || match_src_port[RTE_COLOR_YELLOW]) {
+		mtr_policy->match_port = 1;
+		mtr_policy->hierarchy_match_port = 1;
 	}
 	return 0;
 err_exit:
@@ -17995,6 +17996,7 @@ __flow_dv_create_domain_def_policy(struct rte_eth_dev *dev, uint32_t domain)
 	uint8_t egress, transfer;
 	struct rte_flow_error error;
 	struct mlx5_meter_policy_acts acts[RTE_COLORS];
+	bool match_src_port[RTE_COLORS] = {false};
 	int ret;
 
 	egress = (domain == MLX5_MTR_DOMAIN_EGRESS) ? 1 : 0;
@@ -18070,7 +18072,7 @@ __flow_dv_create_domain_def_policy(struct rte_eth_dev *dev, uint32_t domain)
 		/* Create default policy rules. */
 		ret = __flow_dv_create_domain_policy_rules(dev,
 					&def_policy->sub_policy,
-					egress, transfer, false, acts);
+					egress, transfer, match_src_port, acts);
 		if (ret) {
 			DRV_LOG(ERR, "Failed to create default policy rules.");
 			goto def_policy_error;
@@ -19653,11 +19655,13 @@ flow_dv_validate_mtr_policy_acts(struct rte_eth_dev *dev,
 		}
 	}
 	if (next_mtr && *policy_mode == MLX5_MTR_POLICY_MODE_ALL) {
-		if (!(action_flags[RTE_COLOR_GREEN] & action_flags[RTE_COLOR_YELLOW] &
-		      MLX5_FLOW_ACTION_METER_WITH_TERMINATED_POLICY))
+		uint64_t hierarchy_type_flag =
+			MLX5_FLOW_ACTION_METER_WITH_TERMINATED_POLICY | MLX5_FLOW_ACTION_JUMP;
+		if (!(action_flags[RTE_COLOR_GREEN] & hierarchy_type_flag) ||
+		    !(action_flags[RTE_COLOR_YELLOW] & hierarchy_type_flag))
 			return -rte_mtr_error_set(error, EINVAL, RTE_MTR_ERROR_TYPE_METER_POLICY,
 						  NULL,
-						  "Meter hierarchy supports meter action only.");
+						  "Unsupported action in meter hierarchy.");
 	}
 	/* If both colors have RSS, the attributes should be the same. */
 	if (flow_dv_mtr_policy_rss_compare(rss_color[RTE_COLOR_GREEN],
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.309748322 +0800
+++ 0094-net-mlx5-support-jump-in-meter-hierarchy.patch	2024-07-12 18:40:14.336594199 +0800
@@ -1 +1 @@
-From dc1d92a4f547f8af6eb9b8824257ab3fd8dfbc77 Mon Sep 17 00:00:00 2001
+From eab3879444b1d4e62a3285d56d41d4dab3bc9ebb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dc1d92a4f547f8af6eb9b8824257ab3fd8dfbc77 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 99abb2f2fb..220d92b1a7 100644
+index b97e00b287..d7eba9a71f 100644
@@ -23 +25 @@
-@@ -17963,7 +17963,7 @@ __flow_dv_create_policy_matcher(struct rte_eth_dev *dev,
+@@ -17682,7 +17682,7 @@ __flow_dv_create_policy_matcher(struct rte_eth_dev *dev,
@@ -32 +34 @@
-@@ -17978,6 +17978,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
+@@ -17697,6 +17697,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
@@ -40 +42 @@
-@@ -18012,12 +18013,12 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
+@@ -17731,12 +17732,12 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
@@ -57 +59 @@
-@@ -18027,7 +18028,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
+@@ -17746,7 +17747,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
@@ -66 +68 @@
-@@ -18075,7 +18076,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
+@@ -17794,7 +17795,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
@@ -75 +77 @@
-@@ -18146,7 +18147,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
+@@ -17865,7 +17866,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
@@ -84 +86 @@
-@@ -18198,7 +18199,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
+@@ -17917,7 +17918,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
@@ -93 +95 @@
-@@ -18212,9 +18213,9 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
+@@ -17931,9 +17932,9 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
@@ -106 +108 @@
-@@ -18276,6 +18277,7 @@ __flow_dv_create_domain_def_policy(struct rte_eth_dev *dev, uint32_t domain)
+@@ -17995,6 +17996,7 @@ __flow_dv_create_domain_def_policy(struct rte_eth_dev *dev, uint32_t domain)
@@ -114 +116 @@
-@@ -18351,7 +18353,7 @@ __flow_dv_create_domain_def_policy(struct rte_eth_dev *dev, uint32_t domain)
+@@ -18070,7 +18072,7 @@ __flow_dv_create_domain_def_policy(struct rte_eth_dev *dev, uint32_t domain)
@@ -123 +125 @@
-@@ -19934,11 +19936,13 @@ flow_dv_validate_mtr_policy_acts(struct rte_eth_dev *dev,
+@@ -19653,11 +19655,13 @@ flow_dv_validate_mtr_policy_acts(struct rte_eth_dev *dev,

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

* patch 'net/mlx5: fix crash on counter pool destroy' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (13 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5: support jump in meter hierarchy' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'net/mlx5/hws: fix matcher reconnect' " Xueming Li
                     ` (6 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Maayan Kashani; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=160e8f583bea1ed2de9bc8d5081b98633596b53b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 160e8f583bea1ed2de9bc8d5081b98633596b53b Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Sun, 9 Jun 2024 14:01:02 +0300
Subject: [PATCH] net/mlx5: fix crash on counter pool destroy
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3331d59551cdecd2db3a2064a7d6e4bf9396b849 ]

If the counter pool was not added to list,
and an error state was reached,
on attempt to destroy the counter pool,
segmentation fault was received during list remove action.

Added a check to verify the list is not empty before trying to
remove the cpool from the list.

Invalid state, leading to segfault,
can also be reached in the following scenario:
1.	mlx5_hws_cnt_pool_init() does a zmalloc and initializes most
        of the fields of cpool, but does not initialize the next field.
2.	mlx5_hws_cnt_pool_dcs_alloc() attempts to bulk allocate flow counters.
	If this fails, we skip straight to 4.
	In HW, this can fail simply if FW doesn't support bulk flow
	counter allocation.
3.	Right before the goto error, we insert the cpool to the hws_cpool_list.
	This is where the next field is initialized.
4.	mlx5_hws_cnt_pool_destroy() assumes the cpool's next field
	is initialized and SEGVs if not.

So, added a guard against cases where the entry was uninitialized
(checking le_prev field is not NULL).

Fixes: 6ac2104ac125 ("net/mlx5: fix counter query during port close")

Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_hws_cnt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c
index c31f2f380b..41edd19bb8 100644
--- a/drivers/net/mlx5/mlx5_hws_cnt.c
+++ b/drivers/net/mlx5/mlx5_hws_cnt.c
@@ -719,7 +719,9 @@ mlx5_hws_cnt_pool_destroy(struct mlx5_dev_ctx_shared *sh,
 	 * Maybe blocked for at most 200ms here.
 	 */
 	rte_spinlock_lock(&sh->cpool_lock);
-	LIST_REMOVE(cpool, next);
+	/* Try to remove cpool before it was added to list caused segfault. */
+	if (!LIST_EMPTY(&sh->hws_cpool_list) && cpool->next.le_prev)
+		LIST_REMOVE(cpool, next);
 	rte_spinlock_unlock(&sh->cpool_lock);
 	if (cpool->cfg.host_cpool == NULL) {
 		if (--sh->cnt_svc->refcnt == 0)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.361890816 +0800
+++ 0095-net-mlx5-fix-crash-on-counter-pool-destroy.patch	2024-07-12 18:40:14.336594199 +0800
@@ -1 +1 @@
-From 3331d59551cdecd2db3a2064a7d6e4bf9396b849 Mon Sep 17 00:00:00 2001
+From 160e8f583bea1ed2de9bc8d5081b98633596b53b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3331d59551cdecd2db3a2064a7d6e4bf9396b849 ]
@@ -31 +33,0 @@
-Cc: stable@dpdk.org
@@ -40 +42 @@
-index 36d422bdfa..a46a4bd94e 100644
+index c31f2f380b..41edd19bb8 100644
@@ -43 +45 @@
-@@ -718,7 +718,9 @@ mlx5_hws_cnt_pool_destroy(struct mlx5_dev_ctx_shared *sh,
+@@ -719,7 +719,9 @@ mlx5_hws_cnt_pool_destroy(struct mlx5_dev_ctx_shared *sh,

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

* patch 'net/mlx5/hws: fix matcher reconnect' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (14 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5: fix crash on counter pool destroy' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'test/crypto: fix RSA cases in QAT suite' " Xueming Li
                     ` (5 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Yevgeny Kliteynik; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=82315fbf7fdf3b733c1a7d0df5368664e237ae4f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 82315fbf7fdf3b733c1a7d0df5368664e237ae4f Mon Sep 17 00:00:00 2001
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
Date: Thu, 6 Jun 2024 12:55:09 +0300
Subject: [PATCH] net/mlx5/hws: fix matcher reconnect
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f21215b733abb2c80f1b58750d74de27f9233d62 ]

If error happens during disconnect of the first matcher in the
list, the matcher should be reconnected back as the first matcher.

Fixes: b81f95ca770d ("net/mlx5/hws: support default miss table")

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_matcher.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c
index bb171a0340..89e52d6c28 100644
--- a/drivers/net/mlx5/hws/mlx5dr_matcher.c
+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c
@@ -340,7 +340,7 @@ static int mlx5dr_matcher_disconnect(struct mlx5dr_matcher *matcher)
 	return 0;
 
 matcher_reconnect:
-	if (LIST_EMPTY(&tbl->head))
+	if (LIST_EMPTY(&tbl->head) || prev_matcher == matcher)
 		LIST_INSERT_HEAD(&matcher->tbl->head, matcher, next);
 	else
 		LIST_INSERT_AFTER(prev_matcher, matcher, next);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.397726512 +0800
+++ 0096-net-mlx5-hws-fix-matcher-reconnect.patch	2024-07-12 18:40:14.336594199 +0800
@@ -1 +1 @@
-From f21215b733abb2c80f1b58750d74de27f9233d62 Mon Sep 17 00:00:00 2001
+From 82315fbf7fdf3b733c1a7d0df5368664e237ae4f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f21215b733abb2c80f1b58750d74de27f9233d62 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 79e7401dfd..2a84145566 100644
+index bb171a0340..89e52d6c28 100644

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

* patch 'test/crypto: fix RSA cases in QAT suite' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (15 preceding siblings ...)
  2024-07-12 11:01   ` patch 'net/mlx5/hws: fix matcher reconnect' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'test/crypto: fix enqueue/dequeue callback case' " Xueming Li
                     ` (4 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Arkadiusz Kusztal; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=acf2e69c23da6fffec152a67baa4af7fd6860472

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From acf2e69c23da6fffec152a67baa4af7fd6860472 Mon Sep 17 00:00:00 2001
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thu, 21 Mar 2024 08:35:02 +0000
Subject: [PATCH] test/crypto: fix RSA cases in QAT suite
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 226f1ca0c1d7e16d87b601c380983c2167b4bef7 ]

This commit fixes following issues in the QAT testsuite for
the RSA algorithm:

1) Incorrectly set keys in the internal functions are now
set in the calling function.
2) Camel case functions were changed to the snake case.

Fixes: 9b5465867fb8 ("test/crypto: add RSA none padding cases")

Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev_asym.c             | 102 ++++++++++-----------
 app/test/test_cryptodev_rsa_test_vectors.h |   2 +-
 2 files changed, 52 insertions(+), 52 deletions(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 17daf734e8..2c745a7f7c 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -3292,11 +3292,8 @@ modular_multiplicative_inverse(const void *test_data)
 	arg.qt.coef.data = coef; \
 	arg.qt.coef.length = vector->coef.len
 
-typedef void (*rsa_key_init_t)(struct rte_crypto_asym_xform *,
-	const struct rsa_test_data_2 *);
-
 static int
-RSA_Encrypt(const struct rsa_test_data_2 *vector, uint8_t *cipher_buf)
+rsa_encrypt(const struct rsa_test_data_2 *vector, uint8_t *cipher_buf)
 {
 	self->result_op = NULL;
 	/* Compute encryption on the test vector */
@@ -3314,7 +3311,7 @@ RSA_Encrypt(const struct rsa_test_data_2 *vector, uint8_t *cipher_buf)
 }
 
 static int
-RSA_Decrypt(const struct rsa_test_data_2 *vector, uint8_t *plaintext,
+rsa_decrypt(const struct rsa_test_data_2 *vector, uint8_t *plaintext,
 		const int use_op)
 {
 	uint8_t cipher[TEST_DATA_SIZE] = { 0 };
@@ -3335,41 +3332,14 @@ RSA_Decrypt(const struct rsa_test_data_2 *vector, uint8_t *plaintext,
 	return 0;
 }
 
-static void
-RSA_key_init_Exp(struct rte_crypto_asym_xform *xform,
-		const struct rsa_test_data_2 *vector)
-{
-	SET_RSA_PARAM(xform->rsa, vector, n);
-	SET_RSA_PARAM(xform->rsa, vector, e);
-	SET_RSA_PARAM(xform->rsa, vector, d);
-	xform->rsa.key_type = RTE_RSA_KEY_TYPE_EXP;
-}
-
-static void
-RSA_key_init_CRT(struct rte_crypto_asym_xform *xform,
-		const struct rsa_test_data_2 *vector)
-{
-	SET_RSA_PARAM(xform->rsa, vector, n);
-	SET_RSA_PARAM(xform->rsa, vector, e);
-	SET_RSA_PARAM_QT(xform->rsa, vector, p);
-	SET_RSA_PARAM_QT(xform->rsa, vector, q);
-	SET_RSA_PARAM_QT(xform->rsa, vector, dP);
-	SET_RSA_PARAM_QT(xform->rsa, vector, dQ);
-	SET_RSA_PARAM_QT(xform->rsa, vector, qInv);
-	xform->rsa.key_type = RTE_RSA_KEY_TYPE_QT;
-}
-
 static int
-RSA_Init_Session(const struct rsa_test_data_2 *vector,
-	rsa_key_init_t key_init)
+rsa_init_session(struct rte_crypto_asym_xform *xform)
 {
 	const uint8_t dev_id = params->valid_devs[0];
 	struct rte_cryptodev_info dev_info;
-	struct rte_crypto_asym_xform xform = { };
 	int ret = 0;
 
-	key_init(&xform, vector);
-	xform.xform_type = RTE_CRYPTO_ASYM_XFORM_RSA;
+	xform->xform_type = RTE_CRYPTO_ASYM_XFORM_RSA;
 
 	rte_cryptodev_info_get(dev_id, &dev_info);
 	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT)) {
@@ -3377,7 +3347,7 @@ RSA_Init_Session(const struct rsa_test_data_2 *vector,
 			"Device doesn't support decrypt op with quintuple key type. Test skipped\n");
 		return TEST_SKIPPED;
 	}
-	ret = rte_cryptodev_asym_session_create(dev_id, &xform,
+	ret = rte_cryptodev_asym_session_create(dev_id, xform,
 		params->session_mpool, &self->sess);
 	if (ret < 0) {
 		RTE_LOG(ERR, USER1,
@@ -3388,17 +3358,23 @@ RSA_Init_Session(const struct rsa_test_data_2 *vector,
 }
 
 static int
-KAT_RSA_Encrypt(const void *data)
+kat_rsa_encrypt(const void *data)
 {
 	uint8_t cipher_buf[TEST_DATA_SIZE] = {0};
 	const struct rsa_test_data_2 *vector = data;
-	int ret = RSA_Init_Session(vector, RSA_key_init_Exp);
+	struct rte_crypto_asym_xform xform = { };
+
+	SET_RSA_PARAM(xform.rsa, vector, n);
+	SET_RSA_PARAM(xform.rsa, vector, e);
+	SET_RSA_PARAM(xform.rsa, vector, d);
+	xform.rsa.key_type = RTE_RSA_KEY_TYPE_EXP;
+	int ret = rsa_init_session(&xform);
 
 	if (ret) {
 		RTE_LOG(ERR, USER1, "Failed to init session for RSA\n");
 		return ret;
 	}
-	TEST_ASSERT_SUCCESS(RSA_Encrypt(vector, cipher_buf),
+	TEST_ASSERT_SUCCESS(rsa_encrypt(vector, cipher_buf),
 		"RSA: Failed to encrypt");
 	TEST_ASSERT_BUFFERS_ARE_EQUAL(vector->cipher.data,
 		self->result_op->asym->rsa.cipher.data,
@@ -3408,17 +3384,26 @@ KAT_RSA_Encrypt(const void *data)
 }
 
 static int
-KAT_RSA_Encrypt_CRT(const void *data)
+kat_rsa_encrypt_crt(const void *data)
 {
 	uint8_t cipher_buf[TEST_DATA_SIZE] = {0};
 	const struct rsa_test_data_2 *vector = data;
-	int ret = RSA_Init_Session(vector, RSA_key_init_CRT);
+	struct rte_crypto_asym_xform xform = { };
 
+	SET_RSA_PARAM(xform.rsa, vector, n);
+	SET_RSA_PARAM(xform.rsa, vector, e);
+	SET_RSA_PARAM_QT(xform.rsa, vector, p);
+	SET_RSA_PARAM_QT(xform.rsa, vector, q);
+	SET_RSA_PARAM_QT(xform.rsa, vector, dP);
+	SET_RSA_PARAM_QT(xform.rsa, vector, dQ);
+	SET_RSA_PARAM_QT(xform.rsa, vector, qInv);
+	xform.rsa.key_type = RTE_RSA_KEY_TYPE_QT;
+	int ret = rsa_init_session(&xform);
 	if (ret) {
 		RTE_LOG(ERR, USER1, "Failed to init session for RSA\n");
 		return ret;
 	}
-	TEST_ASSERT_SUCCESS(RSA_Encrypt(vector, cipher_buf),
+	TEST_ASSERT_SUCCESS(rsa_encrypt(vector, cipher_buf),
 		"RSA: Failed to encrypt");
 	TEST_ASSERT_BUFFERS_ARE_EQUAL(vector->cipher.data,
 		self->result_op->asym->rsa.cipher.data,
@@ -3428,17 +3413,23 @@ KAT_RSA_Encrypt_CRT(const void *data)
 }
 
 static int
-KAT_RSA_Decrypt(const void *data)
+kat_rsa_decrypt(const void *data)
 {
 	uint8_t message[TEST_DATA_SIZE] = {0};
 	const struct rsa_test_data_2 *vector = data;
-	int ret = RSA_Init_Session(vector, RSA_key_init_Exp);
+	struct rte_crypto_asym_xform xform = { };
+
+	SET_RSA_PARAM(xform.rsa, vector, n);
+	SET_RSA_PARAM(xform.rsa, vector, e);
+	SET_RSA_PARAM(xform.rsa, vector, d);
+	xform.rsa.key_type = RTE_RSA_KEY_TYPE_EXP;
+	int ret = rsa_init_session(&xform);
 
 	if (ret) {
 		RTE_LOG(ERR, USER1, "Failed to init session for RSA\n");
 		return ret;
 	}
-	TEST_ASSERT_SUCCESS(RSA_Decrypt(vector, message, 0),
+	TEST_ASSERT_SUCCESS(rsa_decrypt(vector, message, 0),
 		"RSA: Failed to encrypt");
 	TEST_ASSERT_BUFFERS_ARE_EQUAL(vector->message.data,
 		self->result_op->asym->rsa.message.data,
@@ -3448,17 +3439,26 @@ KAT_RSA_Decrypt(const void *data)
 }
 
 static int
-KAT_RSA_Decrypt_CRT(const void *data)
+kat_rsa_decrypt_crt(const void *data)
 {
 	uint8_t message[TEST_DATA_SIZE] = {0};
 	const struct rsa_test_data_2 *vector = data;
-	int ret = RSA_Init_Session(vector, RSA_key_init_CRT);
+	struct rte_crypto_asym_xform xform = { };
 
+	SET_RSA_PARAM(xform.rsa, vector, n);
+	SET_RSA_PARAM(xform.rsa, vector, e);
+	SET_RSA_PARAM_QT(xform.rsa, vector, p);
+	SET_RSA_PARAM_QT(xform.rsa, vector, q);
+	SET_RSA_PARAM_QT(xform.rsa, vector, dP);
+	SET_RSA_PARAM_QT(xform.rsa, vector, dQ);
+	SET_RSA_PARAM_QT(xform.rsa, vector, qInv);
+	xform.rsa.key_type = RTE_RSA_KEY_TYPE_QT;
+	int ret = rsa_init_session(&xform);
 	if (ret) {
 		RTE_LOG(ERR, USER1, "Failed to init session for RSA\n");
 		return ret;
 	}
-	TEST_ASSERT_SUCCESS(RSA_Decrypt(vector, message, 0),
+	TEST_ASSERT_SUCCESS(rsa_decrypt(vector, message, 0),
 		"RSA: Failed to encrypt");
 	TEST_ASSERT_BUFFERS_ARE_EQUAL(vector->message.data,
 		self->result_op->asym->rsa.message.data,
@@ -3535,20 +3535,20 @@ static struct unit_test_suite cryptodev_qat_asym_testsuite  = {
 		TEST_CASE_NAMED_WITH_DATA(
 			"RSA Encryption (n=128, pt=20, e=3) EXP, Padding: NONE",
 			ut_setup_asym, ut_teardown_asym,
-			KAT_RSA_Encrypt, &RSA_vector_128_20_3_None),
+			kat_rsa_encrypt, &rsa_vector_128_20_3_none),
 		TEST_CASE_NAMED_WITH_DATA(
 			"RSA Decryption (n=128, pt=20, e=3) EXP, Padding: NONE",
 			ut_setup_asym, ut_teardown_asym,
-			KAT_RSA_Decrypt, &RSA_vector_128_20_3_None),
+			kat_rsa_decrypt, &rsa_vector_128_20_3_none),
 		/* RSA CRT */
 		TEST_CASE_NAMED_WITH_DATA(
 			"RSA Encryption (n=128, pt=20, e=3) CRT, Padding: NONE",
 			ut_setup_asym, ut_teardown_asym,
-			KAT_RSA_Encrypt_CRT, &RSA_vector_128_20_3_None),
+			kat_rsa_encrypt_crt, &rsa_vector_128_20_3_none),
 		TEST_CASE_NAMED_WITH_DATA(
 			"RSA Decryption (n=128, pt=20, e=3) CRT, Padding: NONE",
 			ut_setup_asym, ut_teardown_asym,
-			KAT_RSA_Decrypt_CRT, &RSA_vector_128_20_3_None),
+			kat_rsa_decrypt_crt, &rsa_vector_128_20_3_none),
 		TEST_CASES_END() /**< NULL terminate unit test array */
 	}
 };
diff --git a/app/test/test_cryptodev_rsa_test_vectors.h b/app/test/test_cryptodev_rsa_test_vectors.h
index b4982014a2..89981f13f0 100644
--- a/app/test/test_cryptodev_rsa_test_vectors.h
+++ b/app/test/test_cryptodev_rsa_test_vectors.h
@@ -72,7 +72,7 @@ struct rsa_test_data_2 {
 };
 
 static const struct
-rsa_test_data_2 RSA_vector_128_20_3_None = {
+rsa_test_data_2 rsa_vector_128_20_3_none = {
 	.description =
 		"RSA Encryption Decryption (n=128, pt=20, e=3) EXP, QT",
 	.xform_type = RTE_CRYPTO_ASYM_XFORM_RSA,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.434814907 +0800
+++ 0097-test-crypto-fix-RSA-cases-in-QAT-suite.patch	2024-07-12 18:40:14.346594198 +0800
@@ -1 +1 @@
-From 226f1ca0c1d7e16d87b601c380983c2167b4bef7 Mon Sep 17 00:00:00 2001
+From acf2e69c23da6fffec152a67baa4af7fd6860472 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 226f1ca0c1d7e16d87b601c380983c2167b4bef7 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* patch 'test/crypto: fix enqueue/dequeue callback case' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (16 preceding siblings ...)
  2024-07-12 11:01   ` patch 'test/crypto: fix RSA cases in QAT suite' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'telemetry: lower log level on socket error' " Xueming Li
                     ` (3 subsequent siblings)
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: Ganapati Kundapura, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f484d7d8b59d4d2f9e6f8a0ba4f4d23511ef2bfb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f484d7d8b59d4d2f9e6f8a0ba4f4d23511ef2bfb Mon Sep 17 00:00:00 2001
From: Akhil Goyal <gakhil@marvell.com>
Date: Fri, 24 May 2024 22:43:27 +0530
Subject: [PATCH] test/crypto: fix enqueue/dequeue callback case
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4ad17a1c8fb336a182f2c1b62127d8871d45f804 ]

The enqueue/dequeue callback test cases were using the
test_null_burst_operation() for doing enqueue/dequeue.
But this function is only designed to be run for NULL PMD.
Hence for other PMDs, the callback was not getting called.
Now, separate processing thread is removed, instead NULL crypto
operation is created and processed so that callbacks are called.
Also added a check on a global static variable to verify
that the callback is actually called and fail the case if
it is not getting called.

Fixes: 5523a75af539 ("test/crypto: add case for enqueue/dequeue callbacks")

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
---
 app/test/test_cryptodev.c | 106 ++++++++++++++++++++++++++++++++------
 1 file changed, 89 insertions(+), 17 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 58561ededf..3464df22a1 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -196,6 +196,8 @@ post_process_raw_dp_op(void *user_data,	uint32_t index __rte_unused,
 static struct crypto_testsuite_params testsuite_params = { NULL };
 struct crypto_testsuite_params *p_testsuite_params = &testsuite_params;
 static struct crypto_unittest_params unittest_params;
+static bool enq_cb_called;
+static bool deq_cb_called;
 
 int
 process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
@@ -13540,6 +13542,7 @@ test_enq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
 	RTE_SET_USED(ops);
 	RTE_SET_USED(user_param);
 
+	enq_cb_called = true;
 	printf("crypto enqueue callback called\n");
 	return nb_ops;
 }
@@ -13553,21 +13556,58 @@ test_deq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
 	RTE_SET_USED(ops);
 	RTE_SET_USED(user_param);
 
+	deq_cb_called = true;
 	printf("crypto dequeue callback called\n");
 	return nb_ops;
 }
 
 /*
- * Thread using enqueue/dequeue callback with RCU.
+ * Process enqueue/dequeue NULL crypto request to verify callback with RCU.
  */
 static int
-test_enqdeq_callback_thread(void *arg)
+test_enqdeq_callback_null_cipher(void)
 {
-	RTE_SET_USED(arg);
-	/* DP thread calls rte_cryptodev_enqueue_burst()/
-	 * rte_cryptodev_dequeue_burst() and invokes callback.
-	 */
-	test_null_burst_operation();
+	struct crypto_testsuite_params *ts_params = &testsuite_params;
+	struct crypto_unittest_params *ut_params = &unittest_params;
+
+	/* Setup Cipher Parameters */
+	ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+	ut_params->cipher_xform.next = &ut_params->auth_xform;
+
+	ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+	ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+
+	/* Setup Auth Parameters */
+	ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+	ut_params->auth_xform.next = NULL;
+
+	ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_NULL;
+	ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
+
+	/* Create Crypto session */
+	ut_params->sess = rte_cryptodev_sym_session_create(ts_params->valid_devs[0],
+				&ut_params->auth_xform, ts_params->session_mpool);
+	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
+
+	ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool, RTE_CRYPTO_OP_TYPE_SYMMETRIC);
+	TEST_ASSERT_NOT_NULL(ut_params->op, "Failed to allocate symmetric crypto op");
+
+	/* Allocate mbuf */
+	ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
+	TEST_ASSERT_NOT_NULL(ut_params->ibuf, "Failed to allocate mbuf");
+
+	/* Append some random data */
+	TEST_ASSERT_NOT_NULL(rte_pktmbuf_append(ut_params->ibuf, sizeof(unsigned int)),
+			"no room to append data");
+
+	rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);
+
+	ut_params->op->sym->m_src = ut_params->ibuf;
+
+	/* Process crypto operation */
+	TEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0], ut_params->op),
+			"failed to process sym crypto op");
+
 	return 0;
 }
 
@@ -13575,6 +13615,7 @@ static int
 test_enq_callback_setup(void)
 {
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
+	struct rte_cryptodev_sym_capability_idx cap_idx;
 	struct rte_cryptodev_info dev_info;
 	struct rte_cryptodev_qp_conf qp_conf = {
 		.nb_descriptors = MAX_NUM_OPS_INFLIGHT
@@ -13582,6 +13623,19 @@ test_enq_callback_setup(void)
 
 	struct rte_cryptodev_cb *cb;
 	uint16_t qp_id = 0;
+	int j = 0;
+
+	/* Verify the crypto capabilities for which enqueue/dequeue is done. */
+	cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+	cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL;
+	if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
+			&cap_idx) == NULL)
+		return TEST_SKIPPED;
+	cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+	cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_NULL;
+	if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
+			&cap_idx) == NULL)
+		return TEST_SKIPPED;
 
 	/* Stop the device in case it's started so it can be configured */
 	rte_cryptodev_stop(ts_params->valid_devs[0]);
@@ -13605,6 +13659,7 @@ test_enq_callback_setup(void)
 			qp_conf.nb_descriptors, qp_id,
 			ts_params->valid_devs[0]);
 
+	enq_cb_called = false;
 	/* Test with invalid crypto device */
 	cb = rte_cryptodev_add_enq_callback(RTE_CRYPTO_MAX_DEVS,
 			qp_id, test_enq_callback, NULL);
@@ -13637,12 +13692,11 @@ test_enq_callback_setup(void)
 
 	rte_cryptodev_start(ts_params->valid_devs[0]);
 
-	/* Launch a thread */
-	rte_eal_remote_launch(test_enqdeq_callback_thread, NULL,
-				rte_get_next_lcore(-1, 1, 0));
+	TEST_ASSERT_SUCCESS(test_enqdeq_callback_null_cipher(), "Crypto Processing failed");
 
-	/* Wait until reader exited. */
-	rte_eal_mp_wait_lcore();
+	/* Wait until callback not called. */
+	while (!enq_cb_called && (j++ < 10))
+		rte_delay_ms(10);
 
 	/* Test with invalid crypto device */
 	TEST_ASSERT_FAIL(rte_cryptodev_remove_enq_callback(
@@ -13667,6 +13721,8 @@ test_enq_callback_setup(void)
 			"qp %u on cryptodev %u",
 			qp_id, ts_params->valid_devs[0]);
 
+	TEST_ASSERT(deq_cb_called == true, "Crypto dequeue callback not called");
+
 	return TEST_SUCCESS;
 }
 
@@ -13674,6 +13730,7 @@ static int
 test_deq_callback_setup(void)
 {
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
+	struct rte_cryptodev_sym_capability_idx cap_idx;
 	struct rte_cryptodev_info dev_info;
 	struct rte_cryptodev_qp_conf qp_conf = {
 		.nb_descriptors = MAX_NUM_OPS_INFLIGHT
@@ -13681,6 +13738,19 @@ test_deq_callback_setup(void)
 
 	struct rte_cryptodev_cb *cb;
 	uint16_t qp_id = 0;
+	int j = 0;
+
+	/* Verify the crypto capabilities for which enqueue/dequeue is done. */
+	cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+	cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL;
+	if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
+			&cap_idx) == NULL)
+		return TEST_SKIPPED;
+	cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+	cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_NULL;
+	if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
+			&cap_idx) == NULL)
+		return TEST_SKIPPED;
 
 	/* Stop the device in case it's started so it can be configured */
 	rte_cryptodev_stop(ts_params->valid_devs[0]);
@@ -13704,6 +13774,7 @@ test_deq_callback_setup(void)
 			qp_conf.nb_descriptors, qp_id,
 			ts_params->valid_devs[0]);
 
+	deq_cb_called = false;
 	/* Test with invalid crypto device */
 	cb = rte_cryptodev_add_deq_callback(RTE_CRYPTO_MAX_DEVS,
 			qp_id, test_deq_callback, NULL);
@@ -13736,12 +13807,11 @@ test_deq_callback_setup(void)
 
 	rte_cryptodev_start(ts_params->valid_devs[0]);
 
-	/* Launch a thread */
-	rte_eal_remote_launch(test_enqdeq_callback_thread, NULL,
-				rte_get_next_lcore(-1, 1, 0));
+	TEST_ASSERT_SUCCESS(test_enqdeq_callback_null_cipher(), "Crypto processing failed");
 
-	/* Wait until reader exited. */
-	rte_eal_mp_wait_lcore();
+	/* Wait until callback not called. */
+	while (!deq_cb_called && (j++ < 10))
+		rte_delay_ms(10);
 
 	/* Test with invalid crypto device */
 	TEST_ASSERT_FAIL(rte_cryptodev_remove_deq_callback(
@@ -13766,6 +13836,8 @@ test_deq_callback_setup(void)
 			"qp %u on cryptodev %u",
 			qp_id, ts_params->valid_devs[0]);
 
+	TEST_ASSERT(enq_cb_called == true, "Crypto enqueue callback not called");
+
 	return TEST_SUCCESS;
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.472830403 +0800
+++ 0098-test-crypto-fix-enqueue-dequeue-callback-case.patch	2024-07-12 18:40:14.356594197 +0800
@@ -1 +1 @@
-From 4ad17a1c8fb336a182f2c1b62127d8871d45f804 Mon Sep 17 00:00:00 2001
+From f484d7d8b59d4d2f9e6f8a0ba4f4d23511ef2bfb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4ad17a1c8fb336a182f2c1b62127d8871d45f804 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index f2d249f6b8..94438c587a 100644
+index 58561ededf..3464df22a1 100644
@@ -29 +31 @@
-@@ -199,6 +199,8 @@ post_process_raw_dp_op(void *user_data,	uint32_t index __rte_unused,
+@@ -196,6 +196,8 @@ post_process_raw_dp_op(void *user_data,	uint32_t index __rte_unused,
@@ -38 +40 @@
-@@ -14671,6 +14673,7 @@ test_enq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
+@@ -13540,6 +13542,7 @@ test_enq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
@@ -46 +48 @@
-@@ -14684,21 +14687,58 @@ test_deq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
+@@ -13553,21 +13556,58 @@ test_deq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
@@ -112 +114 @@
-@@ -14706,6 +14746,7 @@ static int
+@@ -13575,6 +13615,7 @@ static int
@@ -120 +122 @@
-@@ -14713,6 +14754,19 @@ test_enq_callback_setup(void)
+@@ -13582,6 +13623,19 @@ test_enq_callback_setup(void)
@@ -140 +142 @@
-@@ -14736,6 +14790,7 @@ test_enq_callback_setup(void)
+@@ -13605,6 +13659,7 @@ test_enq_callback_setup(void)
@@ -148 +150 @@
-@@ -14768,12 +14823,11 @@ test_enq_callback_setup(void)
+@@ -13637,12 +13692,11 @@ test_enq_callback_setup(void)
@@ -165 +167 @@
-@@ -14798,6 +14852,8 @@ test_enq_callback_setup(void)
+@@ -13667,6 +13721,8 @@ test_enq_callback_setup(void)
@@ -169 +171 @@
-+	TEST_ASSERT(enq_cb_called == true, "Crypto enqueue callback not called");
++	TEST_ASSERT(deq_cb_called == true, "Crypto dequeue callback not called");
@@ -174 +176 @@
-@@ -14805,6 +14861,7 @@ static int
+@@ -13674,6 +13730,7 @@ static int
@@ -182 +184 @@
-@@ -14812,6 +14869,19 @@ test_deq_callback_setup(void)
+@@ -13681,6 +13738,19 @@ test_deq_callback_setup(void)
@@ -202 +204 @@
-@@ -14835,6 +14905,7 @@ test_deq_callback_setup(void)
+@@ -13704,6 +13774,7 @@ test_deq_callback_setup(void)
@@ -210 +212 @@
-@@ -14867,12 +14938,11 @@ test_deq_callback_setup(void)
+@@ -13736,12 +13807,11 @@ test_deq_callback_setup(void)
@@ -227 +229 @@
-@@ -14897,6 +14967,8 @@ test_deq_callback_setup(void)
+@@ -13766,6 +13836,8 @@ test_deq_callback_setup(void)
@@ -231 +233 @@
-+	TEST_ASSERT(deq_cb_called == true, "Crypto dequeue callback not called");
++	TEST_ASSERT(enq_cb_called == true, "Crypto enqueue callback not called");

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

* patch 'telemetry: lower log level on socket error' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (17 preceding siblings ...)
  2024-07-12 11:01   ` patch 'test/crypto: fix enqueue/dequeue callback case' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-13 13:38     ` David Marchand
  2024-07-12 11:01   ` patch 'bus/vdev: revert fix devargs in secondary process' " Xueming Li
                     ` (2 subsequent siblings)
  21 siblings, 1 reply; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: David Marchand; +Cc: Christian Ehrhardt, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=51ea612fcbaf60502388f2c4719e383f0314ad13

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 51ea612fcbaf60502388f2c4719e383f0314ad13 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 6 Jun 2024 14:26:54 +0200
Subject: [PATCH] telemetry: lower log level on socket error
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 80b7993ba1b45d8aad7c294a7aaf66f4cdf860a5 ]

When starting two DPDK programs using the same DPDK prefix (like for
example OVS and testpmd, both running as primary processes in
--in-memory mode), the first DPDK process of the two spews some error
log when the second starts:

TELEMETRY: Socket write base info to client failed

This is because telemetry init involves trying to connect on existing
sockets to check if it can take over an existing socket file.

On the other hand, this error log provides no helpful information.
Lower this log to debug level.

Fixes: e14bb5f10509 ("telemetry: fix connected clients count")

Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/telemetry/telemetry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index 88d6410980..551bc92e9d 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -381,7 +381,7 @@ client_handler(void *sock_id)
 			"{\"version\":\"%s\",\"pid\":%d,\"max_output_len\":%d}",
 			telemetry_version, getpid(), MAX_OUTPUT_LEN);
 	if (write(s, info_str, strlen(info_str)) < 0) {
-		TMTY_LOG(ERR, "Socket write base info to client failed\n");
+		TMTY_LOG(DEBUG, "Socket write base info to client failed");
 		goto exit;
 	}
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.520753397 +0800
+++ 0099-telemetry-lower-log-level-on-socket-error.patch	2024-07-12 18:40:14.356594197 +0800
@@ -1 +1 @@
-From 80b7993ba1b45d8aad7c294a7aaf66f4cdf860a5 Mon Sep 17 00:00:00 2001
+From 51ea612fcbaf60502388f2c4719e383f0314ad13 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 80b7993ba1b45d8aad7c294a7aaf66f4cdf860a5 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index 1663bd8c68..509fae76ec 100644
+index 88d6410980..551bc92e9d 100644
@@ -33 +35 @@
-@@ -382,7 +382,7 @@ client_handler(void *sock_id)
+@@ -381,7 +381,7 @@ client_handler(void *sock_id)
@@ -37,2 +39,2 @@
--		TMTY_LOG_LINE(ERR, "Socket write base info to client failed");
-+		TMTY_LOG_LINE(DEBUG, "Socket write base info to client failed");
+-		TMTY_LOG(ERR, "Socket write base info to client failed\n");
++		TMTY_LOG(DEBUG, "Socket write base info to client failed");

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

* patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (18 preceding siblings ...)
  2024-07-12 11:01   ` patch 'telemetry: lower log level on socket error' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-17  2:21     ` Ye, MingjinX
  2024-07-12 11:01   ` patch 'doc: fix link to hugepage mapping from Linux guide' " Xueming Li
  2024-07-12 11:01   ` patch 'v23.11.2-rc1' " Xueming Li
  21 siblings, 1 reply; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Mingjin Ye; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8b75cfb86f90c816bdda28b8696beb18d553fd2b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8b75cfb86f90c816bdda28b8696beb18d553fd2b Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Thu, 14 Mar 2024 09:36:28 +0000
Subject: [PATCH] bus/vdev: revert fix devargs in secondary process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]

The ASan tool detected a memory leak in the vdev driver
alloc_devargs. The previous commit was that when inserting
a vdev device, the primary process alloc devargs and the
secondary process looks for devargs. This causes the
device to not be created if the secondary process does
not initialise the vdev device. And, this is not the
root cause.

Therefore the following commit was reverted accordingly.

After restoring this commit, the memory leak still exists.

Bugzilla ID: 1450
Fixes: 6666628362c9 ("bus/vdev: fix devargs in secondary process")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
---
 drivers/bus/vdev/vdev.c | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 14cf856237..38d05a9fe9 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -263,22 +263,6 @@ alloc_devargs(const char *name, const char *args)
 	return devargs;
 }
 
-static struct rte_devargs *
-vdev_devargs_lookup(const char *name)
-{
-	struct rte_devargs *devargs;
-	char dev_name[32];
-
-	RTE_EAL_DEVARGS_FOREACH("vdev", devargs) {
-		devargs->bus->parse(devargs->name, &dev_name);
-		if (strcmp(dev_name, name) == 0) {
-			VDEV_LOG(INFO, "devargs matched %s", dev_name);
-			return devargs;
-		}
-	}
-	return NULL;
-}
-
 static int
 insert_vdev(const char *name, const char *args,
 		struct rte_vdev_device **p_dev,
@@ -291,10 +275,7 @@ insert_vdev(const char *name, const char *args,
 	if (name == NULL)
 		return -EINVAL;
 
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-		devargs = alloc_devargs(name, args);
-	else
-		devargs = vdev_devargs_lookup(name);
+	devargs = alloc_devargs(name, args);
 
 	if (!devargs)
 		return -ENOMEM;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.570682691 +0800
+++ 0100-bus-vdev-revert-fix-devargs-in-secondary-process.patch	2024-07-12 18:40:14.356594197 +0800
@@ -1 +1 @@
-From 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 Mon Sep 17 00:00:00 2001
+From 8b75cfb86f90c816bdda28b8696beb18d553fd2b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org

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

* patch 'doc: fix link to hugepage mapping from Linux guide' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (19 preceding siblings ...)
  2024-07-12 11:01   ` patch 'bus/vdev: revert fix devargs in secondary process' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-07-12 11:01   ` patch 'v23.11.2-rc1' " Xueming Li
  21 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: David Marchand; +Cc: Alessio Igor Bogani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b8326f2b63a2420b8bc98306028247bf4ae9a82e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b8326f2b63a2420b8bc98306028247bf4ae9a82e Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 17 Jun 2024 16:29:08 +0200
Subject: [PATCH] doc: fix link to hugepage mapping from Linux guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a886540e5ab5b6e342b628180a9d9a5379847087 ]

As reported by Alessio, the link to the hugepage mapping page is broken.

Fixes: 979bb5d493fb ("doc: add more instructions for running as non-root")

Reported-by: Alessio Igor Bogani <alessio.bogani@elettra.eu>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 .mailmap                             | 1 +
 doc/guides/linux_gsg/enable_func.rst | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index 15c75499e5..8827687e19 100644
--- a/.mailmap
+++ b/.mailmap
@@ -44,6 +44,7 @@ Aleksandr Miloshenko <a.miloshenko@f5.com>
 Aleksey Baulin <aleksey.baulin@gmail.com>
 Aleksey Katargin <gureedo@gmail.com>
 Ales Musil <amusil@redhat.com>
+Alessio Igor Bogani <alessio.bogani@elettra.eu>
 Alexander Bechikov <asb.tyum@gmail.com>
 Alexander Belyakov <abelyako@gmail.com>
 Alexander Chernavin <achernavin@netgate.com>
diff --git a/doc/guides/linux_gsg/enable_func.rst b/doc/guides/linux_gsg/enable_func.rst
index 2344d97403..5511640cb8 100644
--- a/doc/guides/linux_gsg/enable_func.rst
+++ b/doc/guides/linux_gsg/enable_func.rst
@@ -85,8 +85,7 @@ need to be adjusted in order to ensure normal DPDK operation:
 The above limits can usually be adjusted by editing
 ``/etc/security/limits.conf`` file, and rebooting.
 
-See `Hugepage Mapping <hugepage_mapping>`_
-section to learn how these limits affect EAL.
+See :ref:`Hugepage Mapping <hugepage_mapping>` section to learn how these limits affect EAL.
 
 Device Control
 ~~~~~~~~~~~~~~
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:18.616763085 +0800
+++ 0101-doc-fix-link-to-hugepage-mapping-from-Linux-guide.patch	2024-07-12 18:40:14.366594196 +0800
@@ -1 +1 @@
-From a886540e5ab5b6e342b628180a9d9a5379847087 Mon Sep 17 00:00:00 2001
+From b8326f2b63a2420b8bc98306028247bf4ae9a82e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a886540e5ab5b6e342b628180a9d9a5379847087 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 3a10392e74..f76037213d 100644
+index 15c75499e5..8827687e19 100644

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

* patch 'v23.11.2-rc1' has been queued to stable release 23.11.2
  2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
                     ` (20 preceding siblings ...)
  2024-07-12 11:01   ` patch 'doc: fix link to hugepage mapping from Linux guide' " Xueming Li
@ 2024-07-12 11:01   ` Xueming Li
  2024-08-12 12:47     ` patch " Xueming Li
  21 siblings, 1 reply; 271+ messages in thread
From: Xueming Li @ 2024-07-12 11:01 UTC (permalink / raw)
  To: Xueming Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3d06f2c35c938a268311c3e0a57d0cd6010c3c1d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3d06f2c35c938a268311c3e0a57d0cd6010c3c1d Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Tue, 2 Jul 2024 16:50:06 +0800
Subject: [PATCH] v23.11.2-rc1
Cc: Xueming Li <xuemingl@nvidia.com>

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
---
 VERSION | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/VERSION b/VERSION
index fc6f56e1fe..a465b6489d 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-23.11.1
+23.11.2-rc1
-- 
2.34.1


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

* Re: patch 'eal/unix: support ZSTD compression for firmware' has been queued to stable release 23.11.2
  2024-07-12 10:43 ` patch 'eal/unix: support ZSTD compression for firmware' " Xueming Li
@ 2024-07-12 11:05   ` David Marchand
  2024-07-13  0:04     ` Xueming Li
  0 siblings, 1 reply; 271+ messages in thread
From: David Marchand @ 2024-07-12 11:05 UTC (permalink / raw)
  To: Xueming Li; +Cc: Bruce Richardson, dpdk stable

Hello Xueming,

On Fri, Jul 12, 2024 at 12:46 PM Xueming Li <xuemingl@nvidia.com> wrote:
> diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c
> index 1a7cf8e7b7..33e989188e 100644
> --- a/lib/eal/unix/eal_firmware.c
> +++ b/lib/eal/unix/eal_firmware.c
> @@ -15,6 +15,8 @@
>
>  #include "eal_firmware.h"
>
> +static const char * const compression_suffixes[] = { "xz", "zst" };
> +
>  #ifdef RTE_HAS_LIBARCHIVE
>
>  struct firmware_read_ctx {
> @@ -36,7 +38,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
>
>         err = archive_read_support_filter_xz(ctx->a);
>         if (err != ARCHIVE_OK && err != ARCHIVE_WARN)
> -               goto error;
> +               RTE_LOG(DEBUG, EAL, "could not initialise libarchive for xz compression");
> +
> +       err = archive_read_support_filter_zstd(ctx->a);
> +       if (err != ARCHIVE_OK && err != ARCHIVE_WARN)
> +               RTE_LOG(DEBUG, EAL, "could not initialise libarchive for zstd compression");

EAL_LOG (in the main branch) appends a \n.
However RTE_LOG() won't do it for you.
So a \n is missing in both calls above.


-- 
David Marchand


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

* Re: patch 'eal/unix: support ZSTD compression for firmware' has been queued to stable release 23.11.2
  2024-07-12 11:05   ` David Marchand
@ 2024-07-13  0:04     ` Xueming Li
  0 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-13  0:04 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]

Hi David,

Thanks for pointing this out, fixed and pushed to 23.11-staging.

Regards,
Xueming

________________________________
From: David Marchand <david.marchand@redhat.com>
Sent: Friday, July 12, 2024 7:05 PM
To: Xueming Li <xuemingl@nvidia.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>; dpdk stable <stable@dpdk.org>
Subject: Re: patch 'eal/unix: support ZSTD compression for firmware' has been queued to stable release 23.11.2

Hello Xueming,

On Fri, Jul 12, 2024 at 12:46 PM Xueming Li <xuemingl@nvidia.com> wrote:
> diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c
> index 1a7cf8e7b7..33e989188e 100644
> --- a/lib/eal/unix/eal_firmware.c
> +++ b/lib/eal/unix/eal_firmware.c
> @@ -15,6 +15,8 @@
>
>  #include "eal_firmware.h"
>
> +static const char * const compression_suffixes[] = { "xz", "zst" };
> +
>  #ifdef RTE_HAS_LIBARCHIVE
>
>  struct firmware_read_ctx {
> @@ -36,7 +38,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
>
>         err = archive_read_support_filter_xz(ctx->a);
>         if (err != ARCHIVE_OK && err != ARCHIVE_WARN)
> -               goto error;
> +               RTE_LOG(DEBUG, EAL, "could not initialise libarchive for xz compression");
> +
> +       err = archive_read_support_filter_zstd(ctx->a);
> +       if (err != ARCHIVE_OK && err != ARCHIVE_WARN)
> +               RTE_LOG(DEBUG, EAL, "could not initialise libarchive for zstd compression");

EAL_LOG (in the main branch) appends a \n.
However RTE_LOG() won't do it for you.
So a \n is missing in both calls above.


--
David Marchand


[-- Attachment #2: Type: text/html, Size: 4132 bytes --]

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

* Re: patch 'telemetry: lower log level on socket error' has been queued to stable release 23.11.2
  2024-07-12 11:01   ` patch 'telemetry: lower log level on socket error' " Xueming Li
@ 2024-07-13 13:38     ` David Marchand
  2024-07-15  6:59       ` Xueming Li
  0 siblings, 1 reply; 271+ messages in thread
From: David Marchand @ 2024-07-13 13:38 UTC (permalink / raw)
  To: Xueming Li, Luca Boccassi, Kevin Traynor
  Cc: Christian Ehrhardt, Bruce Richardson, dpdk stable

Hello LTS maintainers,

On Fri, Jul 12, 2024 at 1:04 PM Xueming Li <xuemingl@nvidia.com> wrote:
> diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
> index 88d6410980..551bc92e9d 100644
> --- a/lib/telemetry/telemetry.c
> +++ b/lib/telemetry/telemetry.c
> @@ -381,7 +381,7 @@ client_handler(void *sock_id)
>                         "{\"version\":\"%s\",\"pid\":%d,\"max_output_len\":%d}",
>                         telemetry_version, getpid(), MAX_OUTPUT_LEN);
>         if (write(s, info_str, strlen(info_str)) < 0) {
> -               TMTY_LOG(ERR, "Socket write base info to client failed\n");
> +               TMTY_LOG(DEBUG, "Socket write base info to client failed");

Xueming:

There is a similar issue to what I reported for EAL, for this backport.

In the main branch, we have TMTY_LOG_LINE() that appends a \n to the
format string.
But TMTY_LOG() in older branches (and as you can see in the context of
this hunk) will not do this.


To all LTS maintainers:

Many libraries have been updated with similar changes (making the \n
added by the log macros) in the main branch.
I introduced new macros every time possible when doing those changes.
The intent was that backports would trigger small conflicts and make
the person backporting raise an eyebrow :-).

For such small conflicts, some simple rules:
- if the commit from main branch uses <MACRO>_LINE(.*, format, args),
then it becomes <MACRO>(.*, format "\n", args) in the LTS branches,
- if the commit from main branch uses another macro that does not
exist in the LTS branch, there is a good chance a "\n" is missing too,
And in doubt, just look at logs in the same file. This gives a quick
hint in general.

Note: backporting those macros could be an option too, but this could
be some work as I suspect there will be a lot of conflicts.

I went and double checked the rest of the 23.11-staging branch and it
seems okay.


-- 
David Marchand


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

* Re: patch 'telemetry: lower log level on socket error' has been queued to stable release 23.11.2
  2024-07-13 13:38     ` David Marchand
@ 2024-07-15  6:59       ` Xueming Li
  0 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-15  6:59 UTC (permalink / raw)
  To: David Marchand, Luca Boccassi, Kevin Traynor
  Cc: Christian Ehrhardt, Bruce Richardson, dpdk stable

[-- Attachment #1: Type: text/plain, Size: 2542 bytes --]

Hi David,

Thanks for pointing this out, fixed both patches.

Regards,
Xueming
________________________________
From: David Marchand <david.marchand@redhat.com>
Sent: Saturday, July 13, 2024 9:38 PM
To: Xueming Li <xuemingl@nvidia.com>; Luca Boccassi <bluca@debian.org>; Kevin Traynor <ktraynor@redhat.com>
Cc: Christian Ehrhardt <christian.ehrhardt@canonical.com>; Bruce Richardson <bruce.richardson@intel.com>; dpdk stable <stable@dpdk.org>
Subject: Re: patch 'telemetry: lower log level on socket error' has been queued to stable release 23.11.2

Hello LTS maintainers,

On Fri, Jul 12, 2024 at 1:04 PM Xueming Li <xuemingl@nvidia.com> wrote:
> diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
> index 88d6410980..551bc92e9d 100644
> --- a/lib/telemetry/telemetry.c
> +++ b/lib/telemetry/telemetry.c
> @@ -381,7 +381,7 @@ client_handler(void *sock_id)
>                         "{\"version\":\"%s\",\"pid\":%d,\"max_output_len\":%d}",
>                         telemetry_version, getpid(), MAX_OUTPUT_LEN);
>         if (write(s, info_str, strlen(info_str)) < 0) {
> -               TMTY_LOG(ERR, "Socket write base info to client failed\n");
> +               TMTY_LOG(DEBUG, "Socket write base info to client failed");

Xueming:

There is a similar issue to what I reported for EAL, for this backport.

In the main branch, we have TMTY_LOG_LINE() that appends a \n to the
format string.
But TMTY_LOG() in older branches (and as you can see in the context of
this hunk) will not do this.


To all LTS maintainers:

Many libraries have been updated with similar changes (making the \n
added by the log macros) in the main branch.
I introduced new macros every time possible when doing those changes.
The intent was that backports would trigger small conflicts and make
the person backporting raise an eyebrow :-).

For such small conflicts, some simple rules:
- if the commit from main branch uses <MACRO>_LINE(.*, format, args),
then it becomes <MACRO>(.*, format "\n", args) in the LTS branches,
- if the commit from main branch uses another macro that does not
exist in the LTS branch, there is a good chance a "\n" is missing too,
And in doubt, just look at logs in the same file. This gives a quick
hint in general.

Note: backporting those macros could be an option too, but this could
be some work as I suspect there will be a lot of conflicts.

I went and double checked the rest of the 23.11-staging branch and it
seems okay.


--
David Marchand


[-- Attachment #2: Type: text/html, Size: 5004 bytes --]

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

* RE: patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2
  2024-07-12 11:01   ` patch 'bus/vdev: revert fix devargs in secondary process' " Xueming Li
@ 2024-07-17  2:21     ` Ye, MingjinX
  2024-07-17  9:17       ` Xueming Li
  2024-08-31 14:51       ` Xueming Li
  0 siblings, 2 replies; 271+ messages in thread
From: Ye, MingjinX @ 2024-07-17  2:21 UTC (permalink / raw)
  To: Xueming Li; +Cc: dpdk stable

Hi,

Please not backport this revert commit. DPDK 23.11.2 does not need to do anything.

Thanks,
Mingjin

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com>
> Sent: Friday, July 12, 2024 7:02 PM
> To: Ye, MingjinX <mingjinx.ye@intel.com>
> Cc: dpdk stable <stable@dpdk.org>
> Subject: patch 'bus/vdev: revert fix devargs in secondary process' has been
> queued to stable release 23.11.2
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 23.11.2
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 07/14/24. So please shout if
> anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Queued patches are on a temporary branch at:
> https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
> 
> This queued commit can be viewed at:
> https://git.dpdk.org/dpdk-stable/commit/?h=23.11-
> staging&id=8b75cfb86f90c816bdda28b8696beb18d553fd2b
> 
> Thanks.
> 
> Xueming Li <xuemingl@nvidia.com>
> 
> ---
> From 8b75cfb86f90c816bdda28b8696beb18d553fd2b Mon Sep 17 00:00:00
> 2001
> From: Mingjin Ye <mingjinx.ye@intel.com>
> Date: Thu, 14 Mar 2024 09:36:28 +0000
> Subject: [PATCH] bus/vdev: revert fix devargs in secondary process
> Cc: Xueming Li <xuemingl@nvidia.com>
> 
> [ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
> 
> The ASan tool detected a memory leak in the vdev driver alloc_devargs. The
> previous commit was that when inserting a vdev device, the primary process
> alloc devargs and the secondary process looks for devargs. This causes the
> device to not be created if the secondary process does not initialise the vdev
> device. And, this is not the root cause.
> 
> Therefore the following commit was reverted accordingly.
> 
> After restoring this commit, the memory leak still exists.
> 
> Bugzilla ID: 1450
> Fixes: 6666628362c9 ("bus/vdev: fix devargs in secondary process")
> 
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
> ---
>  drivers/bus/vdev/vdev.c | 21 +--------------------
>  1 file changed, 1 insertion(+), 20 deletions(-)
> 
> diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index
> 14cf856237..38d05a9fe9 100644
> --- a/drivers/bus/vdev/vdev.c
> +++ b/drivers/bus/vdev/vdev.c
> @@ -263,22 +263,6 @@ alloc_devargs(const char *name, const char *args)
>  	return devargs;
>  }
> 
> -static struct rte_devargs *
> -vdev_devargs_lookup(const char *name)
> -{
> -	struct rte_devargs *devargs;
> -	char dev_name[32];
> -
> -	RTE_EAL_DEVARGS_FOREACH("vdev", devargs) {
> -		devargs->bus->parse(devargs->name, &dev_name);
> -		if (strcmp(dev_name, name) == 0) {
> -			VDEV_LOG(INFO, "devargs matched %s", dev_name);
> -			return devargs;
> -		}
> -	}
> -	return NULL;
> -}
> -
>  static int
>  insert_vdev(const char *name, const char *args,
>  		struct rte_vdev_device **p_dev,
> @@ -291,10 +275,7 @@ insert_vdev(const char *name, const char *args,
>  	if (name == NULL)
>  		return -EINVAL;
> 
> -	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
> -		devargs = alloc_devargs(name, args);
> -	else
> -		devargs = vdev_devargs_lookup(name);
> +	devargs = alloc_devargs(name, args);
> 
>  	if (!devargs)
>  		return -ENOMEM;
> --
> 2.34.1
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- -	2024-07-12 18:40:18.570682691 +0800
> +++ 0100-bus-vdev-revert-fix-devargs-in-secondary-process.patch	2024-
> 07-12 18:40:14.356594197 +0800
> @@ -1 +1 @@
> -From 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 Mon Sep 17 00:00:00
> 2001
> +From 8b75cfb86f90c816bdda28b8696beb18d553fd2b Mon Sep 17 00:00:00
> 2001
> @@ -4,0 +5,3 @@
> +Cc: Xueming Li <xuemingl@nvidia.com>
> +
> +[ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
> @@ -20 +22,0 @@
> -Cc: stable@dpdk.org

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

* Re: patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2
  2024-07-17  2:21     ` Ye, MingjinX
@ 2024-07-17  9:17       ` Xueming Li
  2024-08-31 14:51       ` Xueming Li
  1 sibling, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-07-17  9:17 UTC (permalink / raw)
  To: Ye, MingjinX; +Cc: dpdk stable

[-- Attachment #1: Type: text/plain, Size: 4759 bytes --]

Hi Mingjin,

Thanks for reminding, will remove it.

Best Regards,
Xueming
________________________________
From: Ye, MingjinX <mingjinx.ye@intel.com>
Sent: Wednesday, July 17, 2024 10:21 AM
To: Xueming Li <xuemingl@nvidia.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: RE: patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2

Hi,

Please not backport this revert commit. DPDK 23.11.2 does not need to do anything.

Thanks,
Mingjin

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com>
> Sent: Friday, July 12, 2024 7:02 PM
> To: Ye, MingjinX <mingjinx.ye@intel.com>
> Cc: dpdk stable <stable@dpdk.org>
> Subject: patch 'bus/vdev: revert fix devargs in secondary process' has been
> queued to stable release 23.11.2
>
> Hi,
>
> FYI, your patch has been queued to stable release 23.11.2
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 07/14/24. So please shout if
> anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Queued patches are on a temporary branch at:
> https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
>
> This queued commit can be viewed at:
> https://git.dpdk.org/dpdk-stable/commit/?h=23.11-
> staging&id=8b75cfb86f90c816bdda28b8696beb18d553fd2b
>
> Thanks.
>
> Xueming Li <xuemingl@nvidia.com>
>
> ---
> From 8b75cfb86f90c816bdda28b8696beb18d553fd2b Mon Sep 17 00:00:00
> 2001
> From: Mingjin Ye <mingjinx.ye@intel.com>
> Date: Thu, 14 Mar 2024 09:36:28 +0000
> Subject: [PATCH] bus/vdev: revert fix devargs in secondary process
> Cc: Xueming Li <xuemingl@nvidia.com>
>
> [ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
>
> The ASan tool detected a memory leak in the vdev driver alloc_devargs. The
> previous commit was that when inserting a vdev device, the primary process
> alloc devargs and the secondary process looks for devargs. This causes the
> device to not be created if the secondary process does not initialise the vdev
> device. And, this is not the root cause.
>
> Therefore the following commit was reverted accordingly.
>
> After restoring this commit, the memory leak still exists.
>
> Bugzilla ID: 1450
> Fixes: 6666628362c9 ("bus/vdev: fix devargs in secondary process")
>
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
> ---
>  drivers/bus/vdev/vdev.c | 21 +--------------------
>  1 file changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index
> 14cf856237..38d05a9fe9 100644
> --- a/drivers/bus/vdev/vdev.c
> +++ b/drivers/bus/vdev/vdev.c
> @@ -263,22 +263,6 @@ alloc_devargs(const char *name, const char *args)
>        return devargs;
>  }
>
> -static struct rte_devargs *
> -vdev_devargs_lookup(const char *name)
> -{
> -     struct rte_devargs *devargs;
> -     char dev_name[32];
> -
> -     RTE_EAL_DEVARGS_FOREACH("vdev", devargs) {
> -             devargs->bus->parse(devargs->name, &dev_name);
> -             if (strcmp(dev_name, name) == 0) {
> -                     VDEV_LOG(INFO, "devargs matched %s", dev_name);
> -                     return devargs;
> -             }
> -     }
> -     return NULL;
> -}
> -
>  static int
>  insert_vdev(const char *name, const char *args,
>                struct rte_vdev_device **p_dev,
> @@ -291,10 +275,7 @@ insert_vdev(const char *name, const char *args,
>        if (name == NULL)
>                return -EINVAL;
>
> -     if (rte_eal_process_type() == RTE_PROC_PRIMARY)
> -             devargs = alloc_devargs(name, args);
> -     else
> -             devargs = vdev_devargs_lookup(name);
> +     devargs = alloc_devargs(name, args);
>
>        if (!devargs)
>                return -ENOMEM;
> --
> 2.34.1
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- - 2024-07-12 18:40:18.570682691 +0800
> +++ 0100-bus-vdev-revert-fix-devargs-in-secondary-process.patch       2024-
> 07-12 18:40:14.356594197 +0800
> @@ -1 +1 @@
> -From 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 Mon Sep 17 00:00:00
> 2001
> +From 8b75cfb86f90c816bdda28b8696beb18d553fd2b Mon Sep 17 00:00:00
> 2001
> @@ -4,0 +5,3 @@
> +Cc: Xueming Li <xuemingl@nvidia.com>
> +
> +[ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
> @@ -20 +22,0 @@
> -Cc: stable@dpdk.org

[-- Attachment #2: Type: text/html, Size: 8666 bytes --]

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

* patch has been queued to stable release 23.11.2
  2024-07-12 11:01   ` patch 'v23.11.2-rc1' " Xueming Li
@ 2024-08-12 12:47     ` Xueming Li
  2024-08-12 12:47       ` patch 'config: fix warning for cross build with meson >= 1.3.0' " Xueming Li
                         ` (157 more replies)
  0 siblings, 158 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:47 UTC (permalink / raw)
  To: Xueming Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=729e0848b79b9f119d33066a915e34439d7f8597

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 729e0848b79b9f119d33066a915e34439d7f8597 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Mon, 12 Aug 2024 20:44:01 +0800
Subject: [PATCH] *** SUBJECT HERE ***
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

*** BLURB HERE ***

Alex Vesker (1):
  net/mlx5/hws: fix port ID on root item convert

Alexander Kozyrev (1):
  app/testpmd: add postpone option to async flow destroy

Alexander Skorichenko (1):
  net/netvsc: fix MTU set

Amit Prakash Shukla (1):
  doc: fix DMA performance test invocation

Anatoly Burakov (6):
  fbarray: fix incorrect lookahead behavior
  fbarray: fix incorrect lookbehind behavior
  fbarray: fix lookahead ignore mask handling
  fbarray: fix lookbehind ignore mask handling
  fbarray: fix finding for unaligned length
  malloc: fix multi-process wait condition handling

Andrew Boyer (1):
  net/ionic: fix mbuf double-free when emptying array

Ankur Dwivedi (1):
  common/cnxk: fix integer overflow

Apeksha Gupta (2):
  bus/dpaa: fix memory leak in bus scan
  common/dpaax: fix node array overrun

Arkadiusz Kusztal (1):
  crypto/qat: fix placement of OOP offset

Bing Zhao (3):
  net/mlx5: fix end condition of reading xstats
  net/mlx5: fix uplink port probing in bonding mode
  common/mlx5: remove unneeded field when modify RQ table

Brian Dooley (1):
  crypto/qat: fix GEN4 write

Bruce Richardson (2):
  net/cpfl: fix 32-bit build
  ethdev: fix device init without socket-local memory

Chaoyong He (5):
  app/testpmd: fix help string of BPF load command
  net/nfp: fix IPv6 TTL and DSCP flow action
  net/nfp: fix allocation of switch domain
  net/nfp: fix flow mask table entry
  net/nfp: remove redundant function call

Chengwen Feng (2):
  net/hns3: check Rx DMA address alignmnent
  dma/hisilicon: remove support for HIP09 platform

Chinh Cao (1):
  net/ice/base: fix return type of bitmap hamming weight

Dariusz Sosnowski (2):
  net/mlx5: fix MTU configuration
  net/mlx5: fix disabling E-Switch default flow rules

David Marchand (5):
  config: fix warning for cross build with meson >= 1.3.0
  vdpa/sfc: remove dead code
  eal/linux: lower log level on allocation attempt failure
  buildtools: fix build with clang 17 and ASan
  net/vmxnet3: fix init logs

Dengdui Huang (2):
  devtools: fix symbol listing
  app/testpmd: handle IEEE1588 init failure

Ed Czeck (1):
  net/ark: fix index arithmetic

Erez Shitrit (3):
  net/mlx5/hws: fix memory leak in modify header
  net/mlx5/hws: fix deletion of action vport
  net/mlx5/hws: remove unused variable

Eric Joyner (2):
  net/ice/base: fix memory leak in firmware version check
  net/ice/base: fix GCS descriptor field offsets

Fabio Pricoco (1):
  net/ice/base: fix resource leak

Ferruh Yigit (2):
  app/testpmd: fix build on signed comparison
  doc: add power uncore in API index

Gagandeep Singh (4):
  common/dpaax/caamflib: fix PDCP-SDAP watchdog error
  crypto/dpaa_sec: fix IPsec descriptor
  bus/dpaa: fix bus scan for DMA devices
  common/dpaax: fix IOVA table cleanup

Ganapati Kundapura (2):
  cryptodev: fix build without crypto callbacks
  cryptodev: validate crypto callbacks from next node

Gowrishankar Muthukrishnan (10):
  crypto/cnxk: fix out-of-bound access
  crypto/cnxk: fix ECDH public key verification
  app/crypto-perf: remove redundant local variable
  app/crypto-perf: fix result for asymmetric
  test/crypto: validate modex from first non-zero
  crypto/cnxk: fix minimal input normalization
  examples/fips_validation: fix dereference and out-of-bound
  test/crypto: remove unused stats in setup
  test/crypto: fix asymmetric capability test
  test/crypto: fix modex comparison

Gregory Etelson (1):
  net/mlx5: fix Arm build with GCC 9.1

Hemant Agrawal (1):
  baseband/la12xx: forbid secondary process

Hernan Vargas (3):
  app/bbdev: fix TB logic
  app/bbdev: fix MLD output size computation
  app/bbdev: fix interrupt tests

Itamar Gozlan (1):
  net/mlx5/hws: fix check of range templates

Jack Bond-Preston (4):
  crypto/openssl: fix GCM and CCM thread unsafe contexts
  crypto/openssl: optimize 3DES-CTR context init
  crypto/openssl: make per-QP cipher context clones
  crypto/openssl: set cipher padding once

Jacob Keller (1):
  net/ice/base: fix size when allocating children arrays

Jesse Brandeburg (1):
  net/ice/base: fix sign extension

Jiawei Wang (1):
  net/mlx5: fix shared Rx queue data access race

Jiawen Wu (15):
  net/txgbe: fix tunnel packet parsing
  net/txgbe: fix flow filters in VT mode
  net/txgbe: fix Tx hang on queue disable
  net/txgbe: restrict configuration of VLAN strip offload
  net/txgbe: reconfigure more MAC Rx registers
  net/txgbe: fix VF promiscuous and allmulticast
  net/ngbe: add special config for YT8531SH-CA PHY
  net/ngbe: keep PHY power down while device probing
  net/txgbe: fix hotplug remove
  net/ngbe: fix hotplug remove
  net/txgbe: fix MTU range
  net/ngbe: fix MTU range
  net/txgbe: fix memory leaks
  net/ngbe: fix memory leaks
  net/txgbe: fix Rx interrupt

Jie Hai (1):
  net/hns3: fix uninitialized variable in FEC query

Jingjing Wu (1):
  graph: fix mcore dispatch walk

Joel Kavanagh (4):
  crypto/ipsec_mb: fix function comment
  test/crypto: fix allocation comment
  crypto/qat: fix log message typo
  doc: fix typo in l2fwd-crypto guide

Jun Yang (1):
  crypto/dpaa2_sec: fix event queue user context

Kaiwen Deng (1):
  examples/l3fwd: fix crash on multiple sockets

Karen Kelly (1):
  doc: add baseline mode in l3fwd-power guide

Kiran Kumar K (1):
  common/cnxk: fix flow aging on application exit

Konstantin Ananyev (3):
  bpf: fix MOV instruction evaluation
  bpf: fix load hangs with six IPv6 addresses
  examples/l3fwd: fix crash in ACL mode for mixed traffic

Long Wu (1):
  net/nfp: fix disabling 32-bit build

Luca Boccassi (1):
  build: use builtin helper for python dependencies

Maayan Kashani (2):
  app/testpmd: fix parsing for connection tracking item
  doc: describe mlx5 HWS actions order

Mahmoud Maatuq (1):
  net/mana: fix uninitialized return value

Maryam Tahhan (1):
  doc: update AF_XDP device plugin repository

Mateusz Pacuszka (1):
  net/ice/base: fix check for existing switch rule

Maxime Coquelin (1):
  net/virtio-user: fix control queue allocation for non-vDPA

Michael Baum (1):
  ethdev: fix GENEVE option item conversion

Mingjin Ye (1):
  bus/vdev: fix device reinitialization

Paul Greenwalt (1):
  net/ice/base: fix potential TLV length overflow

Peng Zhang (6):
  net/nfp: disable ctrl VNIC queues on close
  net/nfp: fix dereference of null pointer
  net/nfp: fix repeat disable port
  doc: update metadata description in nfp guide
  net/nfp: remove unneeded logic for VLAN layer
  net/nfp: adapt reverse sequence card

Rohit Raj (2):
  bus/dpaa: remove redundant file descriptor check
  net/dpaa: forbid MTU configuration for shared interface

Rongwei Liu (1):
  net/mlx5: fix start without duplicate flow patterns

Shai Brandes (3):
  net/ena: fix bad checksum handling
  net/ena: fix return value check
  net/ena: fix checksum handling

Shihong Wang (1):
  examples/ipsec-secgw: fix SA salt endianness

Shijith Thotton (1):
  mbuf: fix dynamic fields copy

Shreesh Adiga (1):
  net/gve: fix RSS hash endianness in DQO format

Sivaprasad Tummala (3):
  examples: fix queue ID restriction
  examples: fix lcore ID restriction
  examples: fix port ID restriction

Soumyadeep Hore (3):
  common/idpf: fix flex descriptor mask
  common/idpf: fix PTP message validation
  net/cpfl: add checks on control queue messages

Stefan Wegrzyn (1):
  net/ice/base: fix pointer to variable outside scope

Stephen Hemminger (5):
  net/netvsc: use ethdev API to set VF MTU
  app/dumpcap: handle SIGTERM and SIGHUP
  app/pdump: handle SIGTERM and SIGHUP
  power: fix number of uncore frequencies
  doc: remove reference to mbuf pkt field

Tathagat Priyadarshi (1):
  net/gve: fix Tx queue state on queue start

Thomas Monjalon (1):
  doc: remove empty section from testpmd guide

Varun Sethi (1):
  common/dpaax/caamflib: fix PDCP AES-AES watchdog error

Vladimir Medvedkin (3):
  net/ice: fix memory leaks in raw pattern parsing
  net/ice: fix return value for raw pattern parsing
  examples/ipsec-secgw: revert SA salt endianness

Waldemar Dworakowski (1):
  net/ice/base: fix board type definition

Wenwu Ma (2):
  dmadev: fix structure alignment
  dma/idxd: fix setup with Ubuntu 24.04

Yahui Cao (1):
  net/ice/base: fix masking when reading context

Yingming Mao (1):
  doc: fix mbuf flags

Zerun Fu (3):
  net/nfp: fix getting firmware version
  bus/pci: fix UIO resource mapping in secondary process
  bus/pci: fix FD in secondary process

Zhichao Zeng (2):
  telemetry: fix connection parameter parsing
  net/ice/base: fix temporary failures reading NVM

 .mailmap                                      |   9 +-
 app/dumpcap/main.c                            |  14 +-
 app/pdump/main.c                              |  21 +-
 app/test-bbdev/test_bbdev_perf.c              | 113 ++++---
 app/test-crypto-perf/cperf_ops.c              |   9 +-
 app/test-crypto-perf/cperf_test_common.c      |   6 +-
 app/test-crypto-perf/cperf_test_latency.c     |  14 +-
 app/test-pmd/bpf_cmd.c                        |   2 +-
 app/test-pmd/cmdline_flow.c                   |   5 +-
 app/test-pmd/config.c                         |   2 +-
 app/test-pmd/ieee1588fwd.c                    |  15 +-
 app/test/test_cryptodev.c                     |  18 +-
 app/test/test_cryptodev_asym.c                |  38 ++-
 app/test/test_fbarray.c                       | 207 ++++++++++--
 app/test/test_power_intel_uncore.c            |   4 +-
 buildtools/map-list-symbol.sh                 |   1 +
 buildtools/meson.build                        |  19 +-
 buildtools/pmdinfogen.py                      |  13 +-
 config/arm/arm32_armv8_linux_gcc              |   1 +
 config/arm/arm64_altra_linux_gcc              |   1 +
 config/arm/arm64_ampereone_linux_gcc          |   1 +
 config/arm/arm64_armada_linux_gcc             |   1 +
 config/arm/arm64_armv8_linux_clang_ubuntu     |   1 +
 config/arm/arm64_armv8_linux_gcc              |   1 +
 config/arm/arm64_bluefield3_linux_gcc         |   1 +
 config/arm/arm64_bluefield_linux_gcc          |   1 +
 config/arm/arm64_cdx_linux_gcc                |   1 +
 config/arm/arm64_centriq2400_linux_gcc        |   1 +
 config/arm/arm64_cn10k_linux_gcc              |   1 +
 config/arm/arm64_cn9k_linux_gcc               |   1 +
 config/arm/arm64_dpaa_linux_gcc               |   1 +
 config/arm/arm64_emag_linux_gcc               |   1 +
 config/arm/arm64_ft2000plus_linux_gcc         |   1 +
 config/arm/arm64_graviton2_linux_gcc          |   1 +
 config/arm/arm64_graviton3_linux_gcc          |   1 +
 config/arm/arm64_hip10_linux_gcc              |   1 +
 config/arm/arm64_kunpeng920_linux_gcc         |   1 +
 config/arm/arm64_kunpeng930_linux_gcc         |   1 +
 config/arm/arm64_n1sdp_linux_gcc              |   1 +
 config/arm/arm64_n2_linux_gcc                 |   1 +
 config/arm/arm64_stingray_linux_gcc           |   1 +
 config/arm/arm64_thunderx2_linux_gcc          |   1 +
 config/arm/arm64_thunderxt83_linux_gcc        |   1 +
 config/arm/arm64_thunderxt88_linux_gcc        |   1 +
 config/arm/arm64_tys2500_linux_gcc            |   1 +
 config/x86/cross-mingw                        |   1 +
 doc/api/doxy-api-index.md                     |   1 +
 doc/guides/dmadevs/hisilicon.rst              |   1 -
 doc/guides/howto/af_xdp_dp.rst                |  14 +-
 doc/guides/nics/af_xdp.rst                    |   4 +-
 doc/guides/nics/mlx5.rst                      |  20 ++
 doc/guides/nics/nfp.rst                       |   4 -
 doc/guides/prog_guide/img/mbuf1.svg           |   2 +-
 doc/guides/prog_guide/img/mbuf2.svg           |   6 +-
 doc/guides/prog_guide/mbuf_lib.rst            |   8 +-
 .../sample_app_ug/l2_forward_crypto.rst       |   2 +-
 .../sample_app_ug/l3_forward_power_man.rst    |   3 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst   |  12 -
 doc/guides/tools/dmaperf.rst                  |   2 +-
 drivers/baseband/la12xx/bbdev_la12xx.c        |   3 +
 drivers/bus/dpaa/base/qbman/process.c         |   7 +-
 drivers/bus/dpaa/dpaa_bus.c                   |   5 +-
 drivers/bus/pci/linux/pci_uio.c               |   5 +-
 drivers/bus/pci/pci_common_uio.c              |  48 +--
 drivers/bus/vdev/vdev.c                       |   2 +-
 drivers/common/cnxk/roc_ae.h                  |  16 +-
 drivers/common/cnxk/roc_npc_aging.c           |  17 +-
 drivers/common/dpaax/caamflib/desc/ipsec.h    |  73 ++++
 drivers/common/dpaax/caamflib/desc/pdcp.h     |  10 +
 drivers/common/dpaax/caamflib/desc/sdap.h     |  10 +-
 drivers/common/dpaax/dpaax_iova_table.c       |  13 +-
 drivers/common/idpf/base/virtchnl2.h          |   4 +-
 drivers/common/idpf/base/virtchnl2_lan_desc.h |   2 +-
 drivers/common/mlx5/mlx5_devx_cmds.c          |   1 -
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c     |  23 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |  21 +-
 drivers/crypto/cnxk/cnxk_ae.h                 |  54 ++-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |   2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |   4 +-
 drivers/crypto/ipsec_mb/pmd_aesni_mb.c        |   2 +-
 drivers/crypto/openssl/openssl_pmd_private.h  |  11 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      | 180 +++++++---
 drivers/crypto/openssl/rte_openssl_pmd_ops.c  |  34 +-
 drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c  | 121 ++++++-
 drivers/crypto/qat/dev/qat_crypto_pmd_gens.h  |  24 +-
 drivers/crypto/qat/qat_sym.c                  |   2 +-
 drivers/dma/hisilicon/hisi_dmadev.c           |  40 +--
 drivers/dma/hisilicon/hisi_dmadev.h           |  35 +-
 drivers/dma/idxd/dpdk_idxd_cfg.py             |   4 +-
 drivers/net/ark/ark_ethdev_tx.c               |  24 +-
 drivers/net/cnxk/cn10k_tx.h                   |   2 +-
 drivers/net/cnxk/cn9k_tx.h                    |   2 +-
 drivers/net/cpfl/cpfl_flow_engine_fxp.c       |   2 +-
 drivers/net/cpfl/cpfl_flow_parser.c           |   2 +-
 drivers/net/cpfl/cpfl_fxp_rule.c              |   8 +
 drivers/net/cpfl/cpfl_rules.h                 |  11 +
 drivers/net/dpaa/dpaa_ethdev.c                |  33 +-
 drivers/net/ena/ena_ethdev.c                  |  15 +-
 drivers/net/gve/gve_rx_dqo.c                  |   2 +-
 drivers/net/gve/gve_tx.c                      |   2 +-
 drivers/net/gve/gve_tx_dqo.c                  |   2 +-
 drivers/net/hns3/hns3_ethdev.c                |   4 +-
 drivers/net/hns3/hns3_ethdev.h                |   8 +
 drivers/net/hns3/hns3_ethdev_vf.c             |   2 +
 drivers/net/hns3/hns3_rxtx.c                  |  21 ++
 drivers/net/ice/base/ice_adminq_cmd.h         |   4 +-
 drivers/net/ice/base/ice_bitops.h             |   4 +-
 drivers/net/ice/base/ice_common.c             |  14 +-
 drivers/net/ice/base/ice_flex_pipe.c          |   8 +-
 drivers/net/ice/base/ice_lan_tx_rx.h          |   7 +-
 drivers/net/ice/base/ice_nvm.c                |  51 ++-
 drivers/net/ice/base/ice_sched.c              |   9 +-
 drivers/net/ice/base/ice_switch.c             |   7 +-
 drivers/net/ice/ice_hash.c                    |  24 +-
 drivers/net/ionic/ionic_rxtx.c                |  16 +-
 drivers/net/mana/mana.c                       |   2 +-
 drivers/net/mlx5/hws/mlx5dr_action.c          |   5 +
 drivers/net/mlx5/hws/mlx5dr_cmd.c             |   3 +-
 drivers/net/mlx5/hws/mlx5dr_definer.c         |  11 +-
 drivers/net/mlx5/hws/mlx5dr_matcher.c         |  20 +-
 drivers/net/mlx5/hws/mlx5dr_pat_arg.h         |   1 -
 drivers/net/mlx5/hws/mlx5dr_rule.c            |  21 +-
 drivers/net/mlx5/linux/mlx5_ethdev_os.c       |  23 +-
 drivers/net/mlx5/linux/mlx5_os.c              | 109 +++---
 drivers/net/mlx5/mlx5.c                       |   2 -
 drivers/net/mlx5/mlx5.h                       |   9 +-
 drivers/net/mlx5/mlx5_devx.c                  |   3 +-
 drivers/net/mlx5/mlx5_ethdev.c                |   6 +
 drivers/net/mlx5/mlx5_flow.c                  |  40 +--
 drivers/net/mlx5/mlx5_flow_dv.c               |   4 +-
 drivers/net/mlx5/mlx5_flow_hw.c               | 142 ++++----
 drivers/net/mlx5/mlx5_rx.h                    |   4 +-
 drivers/net/mlx5/mlx5_trigger.c               |   4 +-
 drivers/net/mlx5/mlx5_txq.c                   |  13 +-
 drivers/net/netvsc/hn_ethdev.c                |  16 +-
 drivers/net/netvsc/hn_vf.c                    |   4 +-
 drivers/net/nfp/flower/nfp_flower.c           |   2 +
 drivers/net/nfp/flower/nfp_flower_ctrl.c      |   5 +
 .../net/nfp/flower/nfp_flower_representor.c   |   7 +-
 drivers/net/nfp/meson.build                   |   1 +
 drivers/net/nfp/nfdk/nfp_nfdk_dp.c            |   6 -
 drivers/net/nfp/nfp_ethdev.c                  |  35 +-
 drivers/net/nfp/nfp_ethdev_vf.c               |   2 -
 drivers/net/nfp/nfp_flow.c                    |   8 +-
 drivers/net/nfp/nfp_net_common.c              |  36 +-
 drivers/net/nfp/nfp_net_common.h              |   8 +
 drivers/net/ngbe/base/ngbe_devids.h           |   1 +
 drivers/net/ngbe/base/ngbe_hw.c               |   3 +
 drivers/net/ngbe/base/ngbe_phy_yt.c           |   4 +
 drivers/net/ngbe/base/ngbe_phy_yt.h           |   2 +
 drivers/net/ngbe/ngbe_ethdev.c                |   6 +-
 drivers/net/ngbe/ngbe_ethdev.h                |   1 +
 drivers/net/ngbe/ngbe_rxtx.c                  |   5 +
 drivers/net/ngbe/ngbe_rxtx.h                  |   2 +
 drivers/net/txgbe/base/meson.build            |   2 +-
 drivers/net/txgbe/base/txgbe_hw.c             |  60 +++-
 drivers/net/txgbe/base/txgbe_hw.h             |   1 +
 drivers/net/txgbe/base/txgbe_osdep.h          |   1 +
 drivers/net/txgbe/base/txgbe_regs.h           |   5 +
 drivers/net/txgbe/base/txgbe_type.h           |   1 +
 drivers/net/txgbe/txgbe_ethdev.c              | 124 ++++---
 drivers/net/txgbe/txgbe_ethdev.h              |   2 +-
 drivers/net/txgbe/txgbe_ethdev_vf.c           |  21 +-
 drivers/net/txgbe/txgbe_fdir.c                |   3 +
 drivers/net/txgbe/txgbe_rxtx.c                |  82 +++--
 drivers/net/txgbe/txgbe_rxtx.h                |   2 +
 .../net/virtio/virtio_user/virtio_user_dev.c  |   2 +-
 drivers/net/vmxnet3/vmxnet3_logs.h            |   2 +-
 drivers/vdpa/sfc/sfc_vdpa_hw.c                |   2 -
 .../fips_validation/fips_validation_rsa.c     |   7 +-
 examples/ipsec-secgw/event_helper.h           |   2 +-
 examples/ipsec-secgw/ipsec-secgw.c            |  40 ++-
 examples/ipsec-secgw/ipsec.c                  |   2 +-
 examples/ipsec-secgw/ipsec.h                  |   8 +-
 examples/ipsec-secgw/ipsec_worker.c           |  10 +-
 examples/l3fwd-graph/main.c                   |  33 +-
 examples/l3fwd-power/main.c                   |  65 ++--
 examples/l3fwd-power/main.h                   |   4 +-
 examples/l3fwd-power/perf_core.c              |  19 +-
 examples/l3fwd/l3fwd.h                        |   2 +-
 examples/l3fwd/l3fwd_acl.c                    |  17 +-
 examples/l3fwd/l3fwd_em.c                     |   4 +-
 examples/l3fwd/l3fwd_event.h                  |   2 +-
 examples/l3fwd/l3fwd_fib.c                    |   4 +-
 examples/l3fwd/l3fwd_lpm.c                    |   5 +-
 examples/l3fwd/main.c                         |  42 ++-
 examples/qos_sched/args.c                     |   6 +-
 .../guest_cli/vm_power_cli_guest.c            |   4 +-
 lib/bpf/bpf_validate.c                        | 314 +++++++++++++++---
 lib/cryptodev/rte_cryptodev.c                 |  14 +
 lib/cryptodev/rte_cryptodev.h                 |   4 +-
 lib/dmadev/rte_dmadev.c                       |  17 +-
 lib/eal/common/eal_common_fbarray.c           |  30 +-
 lib/eal/common/malloc_mp.c                    |   3 +-
 lib/eal/linux/eal_memalloc.c                  |   2 +-
 lib/ethdev/ethdev_driver.c                    |  20 +-
 lib/ethdev/ethdev_pci.h                       |  20 +-
 lib/ethdev/rte_flow.c                         |  29 +-
 lib/graph/rte_graph_model_mcore_dispatch.h    |   2 +-
 lib/mbuf/rte_mbuf.h                           |   3 +
 lib/power/power_intel_uncore.c                |   7 +-
 lib/telemetry/telemetry_legacy.c              |   2 +-
 202 files changed, 2273 insertions(+), 1030 deletions(-)

--
2.34.1

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

* patch 'config: fix warning for cross build with meson >= 1.3.0' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
@ 2024-08-12 12:47       ` Xueming Li
  2024-08-12 12:47       ` patch 'build: use builtin helper for python dependencies' " Xueming Li
                         ` (156 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:47 UTC (permalink / raw)
  To: David Marchand; +Cc: xuemingl, Bruce Richardson, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=edfa6a87c8e3d2fad2ab15d40ddbd2f403212576

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From edfa6a87c8e3d2fad2ab15d40ddbd2f403212576 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 17 Jun 2024 17:05:18 +0200
Subject: [PATCH] config: fix warning for cross build with meson >= 1.3.0
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit be4c001bd67864981103fa98c3375c601778852e ]

Starting meson 1.3.0, the pkgconfig variable is deprecated in favor of
pkg-config. Keep both variables as suggested in meson RN.

Link: https://mesonbuild.com/Release-notes-for-1-3-0.html#machine-files-pkgconfig-field-deprecated-and-replaced-by-pkgconfig

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 config/arm/arm32_armv8_linux_gcc          | 1 +
 config/arm/arm64_altra_linux_gcc          | 1 +
 config/arm/arm64_ampereone_linux_gcc      | 1 +
 config/arm/arm64_armada_linux_gcc         | 1 +
 config/arm/arm64_armv8_linux_clang_ubuntu | 1 +
 config/arm/arm64_armv8_linux_gcc          | 1 +
 config/arm/arm64_bluefield3_linux_gcc     | 1 +
 config/arm/arm64_bluefield_linux_gcc      | 1 +
 config/arm/arm64_cdx_linux_gcc            | 1 +
 config/arm/arm64_centriq2400_linux_gcc    | 1 +
 config/arm/arm64_cn10k_linux_gcc          | 1 +
 config/arm/arm64_cn9k_linux_gcc           | 1 +
 config/arm/arm64_dpaa_linux_gcc           | 1 +
 config/arm/arm64_emag_linux_gcc           | 1 +
 config/arm/arm64_ft2000plus_linux_gcc     | 1 +
 config/arm/arm64_graviton2_linux_gcc      | 1 +
 config/arm/arm64_graviton3_linux_gcc      | 1 +
 config/arm/arm64_hip10_linux_gcc          | 1 +
 config/arm/arm64_kunpeng920_linux_gcc     | 1 +
 config/arm/arm64_kunpeng930_linux_gcc     | 1 +
 config/arm/arm64_n1sdp_linux_gcc          | 1 +
 config/arm/arm64_n2_linux_gcc             | 1 +
 config/arm/arm64_stingray_linux_gcc       | 1 +
 config/arm/arm64_thunderx2_linux_gcc      | 1 +
 config/arm/arm64_thunderxt83_linux_gcc    | 1 +
 config/arm/arm64_thunderxt88_linux_gcc    | 1 +
 config/arm/arm64_tys2500_linux_gcc        | 1 +
 config/x86/cross-mingw                    | 1 +
 28 files changed, 28 insertions(+)

diff --git a/config/arm/arm32_armv8_linux_gcc b/config/arm/arm32_armv8_linux_gcc
index 269a60ba19..abcb182b16 100644
--- a/config/arm/arm32_armv8_linux_gcc
+++ b/config/arm/arm32_armv8_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'arm-linux-gnueabihf-g++']
 ar = 'arm-linux-gnueabihf-gcc-ar'
 strip = 'arm-linux-gnueabihf-strip'
 pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pkg-config = 'arm-linux-gnueabihf-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_altra_linux_gcc b/config/arm/arm64_altra_linux_gcc
index ce0667ebe2..769503d936 100644
--- a/config/arm/arm64_altra_linux_gcc
+++ b/config/arm/arm64_altra_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_ampereone_linux_gcc b/config/arm/arm64_ampereone_linux_gcc
index 8964432a74..bb6acfc4cf 100644
--- a/config/arm/arm64_ampereone_linux_gcc
+++ b/config/arm/arm64_ampereone_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_armada_linux_gcc b/config/arm/arm64_armada_linux_gcc
index 635b4946a3..8f36d895da 100644
--- a/config/arm/arm64_armada_linux_gcc
+++ b/config/arm/arm64_armada_linux_gcc
@@ -5,6 +5,7 @@ ar = 'aarch64-linux-gnu-ar'
 as = 'aarch64-linux-gnu-as'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_armv8_linux_clang_ubuntu b/config/arm/arm64_armv8_linux_clang_ubuntu
index 86ae43937b..e34fabebe5 100644
--- a/config/arm/arm64_armv8_linux_clang_ubuntu
+++ b/config/arm/arm64_armv8_linux_clang_ubuntu
@@ -6,6 +6,7 @@ strip = 'llvm-strip'
 llvm-config = 'llvm-config'
 pcap-config = 'llvm-config'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 
 [host_machine]
 system = 'linux'
diff --git a/config/arm/arm64_armv8_linux_gcc b/config/arm/arm64_armv8_linux_gcc
index 529694b49d..a9b136cf48 100644
--- a/config/arm/arm64_armv8_linux_gcc
+++ b/config/arm/arm64_armv8_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_bluefield3_linux_gcc b/config/arm/arm64_bluefield3_linux_gcc
index 775cf5883d..d900e72a6d 100644
--- a/config/arm/arm64_bluefield3_linux_gcc
+++ b/config/arm/arm64_bluefield3_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_bluefield_linux_gcc b/config/arm/arm64_bluefield_linux_gcc
index 1286227915..bcffb6534b 100644
--- a/config/arm/arm64_bluefield_linux_gcc
+++ b/config/arm/arm64_bluefield_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_cdx_linux_gcc b/config/arm/arm64_cdx_linux_gcc
index 8e6d619dae..bf494b776e 100644
--- a/config/arm/arm64_cdx_linux_gcc
+++ b/config/arm/arm64_cdx_linux_gcc
@@ -5,6 +5,7 @@ ar = 'aarch64-linux-gnu-ar'
 as = 'aarch64-linux-gnu-as'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_centriq2400_linux_gcc b/config/arm/arm64_centriq2400_linux_gcc
index bc8737e072..33cb5ef675 100644
--- a/config/arm/arm64_centriq2400_linux_gcc
+++ b/config/arm/arm64_centriq2400_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_cn10k_linux_gcc b/config/arm/arm64_cn10k_linux_gcc
index fa904af5d0..63fcca9cbe 100644
--- a/config/arm/arm64_cn10k_linux_gcc
+++ b/config/arm/arm64_cn10k_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 cmake = 'cmake'
 
diff --git a/config/arm/arm64_cn9k_linux_gcc b/config/arm/arm64_cn9k_linux_gcc
index 646ce4b5d3..fa4618e370 100644
--- a/config/arm/arm64_cn9k_linux_gcc
+++ b/config/arm/arm64_cn9k_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 cmake = 'cmake'
 
diff --git a/config/arm/arm64_dpaa_linux_gcc b/config/arm/arm64_dpaa_linux_gcc
index 8465b5097b..bf0eab18e2 100644
--- a/config/arm/arm64_dpaa_linux_gcc
+++ b/config/arm/arm64_dpaa_linux_gcc
@@ -5,6 +5,7 @@ ar = 'aarch64-linux-gnu-ar'
 as = 'aarch64-linux-gnu-as'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_emag_linux_gcc b/config/arm/arm64_emag_linux_gcc
index 248169ed68..3e8c15f8a4 100644
--- a/config/arm/arm64_emag_linux_gcc
+++ b/config/arm/arm64_emag_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_ft2000plus_linux_gcc b/config/arm/arm64_ft2000plus_linux_gcc
index ae9f779056..4ecb251d3f 100644
--- a/config/arm/arm64_ft2000plus_linux_gcc
+++ b/config/arm/arm64_ft2000plus_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_graviton2_linux_gcc b/config/arm/arm64_graviton2_linux_gcc
index fdb298bb11..b5f681bc27 100644
--- a/config/arm/arm64_graviton2_linux_gcc
+++ b/config/arm/arm64_graviton2_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_graviton3_linux_gcc b/config/arm/arm64_graviton3_linux_gcc
index 19b422075d..77b5168836 100644
--- a/config/arm/arm64_graviton3_linux_gcc
+++ b/config/arm/arm64_graviton3_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_hip10_linux_gcc b/config/arm/arm64_hip10_linux_gcc
index 2943e4abbf..85bcd05887 100644
--- a/config/arm/arm64_hip10_linux_gcc
+++ b/config/arm/arm64_hip10_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_kunpeng920_linux_gcc b/config/arm/arm64_kunpeng920_linux_gcc
index 193fb48a61..6e7d8ac667 100644
--- a/config/arm/arm64_kunpeng920_linux_gcc
+++ b/config/arm/arm64_kunpeng920_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_kunpeng930_linux_gcc b/config/arm/arm64_kunpeng930_linux_gcc
index e4281ceb4f..61fe482a2e 100644
--- a/config/arm/arm64_kunpeng930_linux_gcc
+++ b/config/arm/arm64_kunpeng930_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_n1sdp_linux_gcc b/config/arm/arm64_n1sdp_linux_gcc
index 2806a4241b..c3c12098d8 100644
--- a/config/arm/arm64_n1sdp_linux_gcc
+++ b/config/arm/arm64_n1sdp_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_n2_linux_gcc b/config/arm/arm64_n2_linux_gcc
index 7404bd197b..89200861c4 100644
--- a/config/arm/arm64_n2_linux_gcc
+++ b/config/arm/arm64_n2_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_stingray_linux_gcc b/config/arm/arm64_stingray_linux_gcc
index 08148b5c3d..358f3b43d3 100644
--- a/config/arm/arm64_stingray_linux_gcc
+++ b/config/arm/arm64_stingray_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_thunderx2_linux_gcc b/config/arm/arm64_thunderx2_linux_gcc
index 32ae938e95..124a97da01 100644
--- a/config/arm/arm64_thunderx2_linux_gcc
+++ b/config/arm/arm64_thunderx2_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_thunderxt83_linux_gcc b/config/arm/arm64_thunderxt83_linux_gcc
index e9d9e62d44..433c3cb4e3 100644
--- a/config/arm/arm64_thunderxt83_linux_gcc
+++ b/config/arm/arm64_thunderxt83_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_thunderxt88_linux_gcc b/config/arm/arm64_thunderxt88_linux_gcc
index c6e5a5656a..81975aea14 100644
--- a/config/arm/arm64_thunderxt88_linux_gcc
+++ b/config/arm/arm64_thunderxt88_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/arm/arm64_tys2500_linux_gcc b/config/arm/arm64_tys2500_linux_gcc
index fce85fb0d8..24e6539a15 100644
--- a/config/arm/arm64_tys2500_linux_gcc
+++ b/config/arm/arm64_tys2500_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
 pcap-config = ''
 
 [host_machine]
diff --git a/config/x86/cross-mingw b/config/x86/cross-mingw
index cddebda5b5..11597eaa26 100644
--- a/config/x86/cross-mingw
+++ b/config/x86/cross-mingw
@@ -5,6 +5,7 @@ ld = 'x86_64-w64-mingw32-ld'
 ar = 'x86_64-w64-mingw32-ar'
 strip = 'x86_64-w64-mingw32-strip'
 pkgconfig = 'x86_64-w64-mingw32-pkg-config'
+pkg-config = 'x86_64-w64-mingw32-pkg-config'
 objdump = 'x86_64-w64-mingw32-objdump'
 
 [host_machine]
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:02.695764712 +0800
+++ 0001-config-fix-warning-for-cross-build-with-meson-1.3.0.patch	2024-08-12 20:44:01.875069251 +0800
@@ -1 +1 @@
-From be4c001bd67864981103fa98c3375c601778852e Mon Sep 17 00:00:00 2001
+From edfa6a87c8e3d2fad2ab15d40ddbd2f403212576 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit be4c001bd67864981103fa98c3375c601778852e ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -24 +25,0 @@
- config/arm/arm64_capri_linux_gcc          | 1 +
@@ -30 +30,0 @@
- config/arm/arm64_elba_linux_gcc           | 1 +
@@ -33 +32,0 @@
- config/arm/arm64_grace_linux_gcc          | 1 +
@@ -36 +34,0 @@
- config/arm/arm64_graviton4_linux_gcc      | 1 +
@@ -42 +39,0 @@
- config/arm/arm64_odyssey_linux_gcc        | 1 +
@@ -48 +44,0 @@
- config/arm/arm64_v2_linux_gcc             | 1 +
@@ -50 +46 @@
- 34 files changed, 34 insertions(+)
+ 28 files changed, 28 insertions(+)
@@ -148,12 +143,0 @@
-diff --git a/config/arm/arm64_capri_linux_gcc b/config/arm/arm64_capri_linux_gcc
-index 1a6313e684..5099ec66a5 100644
---- a/config/arm/arm64_capri_linux_gcc
-+++ b/config/arm/arm64_capri_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
- 
- [host_machine]
@@ -220,12 +203,0 @@
-diff --git a/config/arm/arm64_elba_linux_gcc b/config/arm/arm64_elba_linux_gcc
-index 4d891bd5a7..624a821adb 100644
---- a/config/arm/arm64_elba_linux_gcc
-+++ b/config/arm/arm64_elba_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
- 
- [host_machine]
@@ -256,12 +227,0 @@
-diff --git a/config/arm/arm64_grace_linux_gcc b/config/arm/arm64_grace_linux_gcc
-index bde55b17a8..81e56674f6 100644
---- a/config/arm/arm64_grace_linux_gcc
-+++ b/config/arm/arm64_grace_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
- 
- [host_machine]
@@ -292,12 +251,0 @@
-diff --git a/config/arm/arm64_graviton4_linux_gcc b/config/arm/arm64_graviton4_linux_gcc
-index 839224bca7..3b674f7800 100644
---- a/config/arm/arm64_graviton4_linux_gcc
-+++ b/config/arm/arm64_graviton4_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
- 
- [host_machine]
@@ -364,12 +311,0 @@
-diff --git a/config/arm/arm64_odyssey_linux_gcc b/config/arm/arm64_odyssey_linux_gcc
-index 532c708bde..9cd49b5717 100644
---- a/config/arm/arm64_odyssey_linux_gcc
-+++ b/config/arm/arm64_odyssey_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-marvell-linux-gnu-g++']
- ar = 'aarch64-marvell-linux-gnu-gcc-ar'
- strip = 'aarch64-marvell-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- 
- [host_machine]
- system = 'linux'
@@ -428,12 +363,0 @@
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
- 
- [host_machine]
-diff --git a/config/arm/arm64_v2_linux_gcc b/config/arm/arm64_v2_linux_gcc
-index 50d9be3da3..f27eeead66 100644
---- a/config/arm/arm64_v2_linux_gcc
-+++ b/config/arm/arm64_v2_linux_gcc

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

* patch 'build: use builtin helper for python dependencies' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
  2024-08-12 12:47       ` patch 'config: fix warning for cross build with meson >= 1.3.0' " Xueming Li
@ 2024-08-12 12:47       ` Xueming Li
  2024-08-12 12:48       ` patch 'app/bbdev: fix TB logic' " Xueming Li
                         ` (155 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:47 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: xuemingl, Dmitry Kozlyuk, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=acdd88c4f93a048ba306961b39175e8e0ac922cb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From acdd88c4f93a048ba306961b39175e8e0ac922cb Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Sun, 23 Jun 2024 13:30:23 +0100
Subject: [PATCH] build: use builtin helper for python dependencies
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9ab7baa5c14b1ba928c09bda4734827d6d367d6b ]

We now require Meson 0.53 or later, so we can use this feature introduced
in 0.51.
This also fixes a build failure on SUSE Leap 15.6 where the manual check
fails to detect the pyelftools module.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 buildtools/meson.build | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/buildtools/meson.build b/buildtools/meson.build
index 72447b60a0..3adf34e1a8 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -5,7 +5,11 @@ pkgconf = find_program('pkg-config', 'pkgconf', required: false)
 check_symbols = find_program('check-symbols.sh')
 ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
 
-python3 = import('python').find_installation(required: false)
+python3_required_modules = []
+if host_machine.system() != 'windows'
+    python3_required_modules = ['elftools']
+endif
+python3 = import('python').find_installation('python3', required: false, modules: python3_required_modules)
 if python3.found()
     py3 = [python3]
 else
@@ -45,16 +49,3 @@ else
     pmdinfogen += 'elf'
 endif
 
-# TODO: starting from Meson 0.51.0 use
-#     python3 = import('python').find_installation('python',
-#        modules : python3_required_modules)
-python3_required_modules = []
-if host_machine.system() != 'windows'
-    python3_required_modules = ['elftools']
-endif
-foreach module : python3_required_modules
-    script = 'import importlib.util; import sys; exit(importlib.util.find_spec("@0@") is None)'
-    if run_command(py3, '-c', script.format(module), check: false).returncode() != 0
-        error('missing python module: @0@'.format(module))
-    endif
-endforeach
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:02.727146919 +0800
+++ 0002-build-use-builtin-helper-for-python-dependencies.patch	2024-08-12 20:44:01.875069251 +0800
@@ -1 +1 @@
-From 9ab7baa5c14b1ba928c09bda4734827d6d367d6b Mon Sep 17 00:00:00 2001
+From acdd88c4f93a048ba306961b39175e8e0ac922cb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9ab7baa5c14b1ba928c09bda4734827d6d367d6b ]
@@ -10,2 +12,0 @@
-
-Cc: stable@dpdk.org

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

* patch 'app/bbdev: fix TB logic' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
  2024-08-12 12:47       ` patch 'config: fix warning for cross build with meson >= 1.3.0' " Xueming Li
  2024-08-12 12:47       ` patch 'build: use builtin helper for python dependencies' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'app/bbdev: fix MLD output size computation' " Xueming Li
                         ` (154 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Hernan Vargas; +Cc: xuemingl, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=179f1c6e6b3c3a778ad096051156663a896a2f7a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 179f1c6e6b3c3a778ad096051156663a896a2f7a Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Mon, 24 Jun 2024 08:02:29 -0700
Subject: [PATCH] app/bbdev: fix TB logic
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 494d0c9bb17b320582a6a8437181cff8bc152c9d ]

Fix discrepancy in Transport Block logic when using large fake mbuf.

Fixes: fd96ef3787f1 ("test/bbdev: extend support for large TB")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 app/test-bbdev/test_bbdev_perf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index dcce00aa0a..efd046984d 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2131,7 +2131,8 @@ validate_op_chain(struct rte_bbdev_op_data *op,
 		uint16_t data_len = rte_pktmbuf_data_len(m) - offset;
 		total_data_size += orig_op->segments[i].length;
 
-		if (orig_op->segments[i].length > RTE_BBDEV_LDPC_E_MAX_MBUF)
+		if ((orig_op->segments[i].length + RTE_PKTMBUF_HEADROOM)
+				> RTE_BBDEV_LDPC_E_MAX_MBUF)
 			ignore_mbuf = true;
 		if (!ignore_mbuf)
 			TEST_ASSERT(orig_op->segments[i].length == data_len,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:02.756122524 +0800
+++ 0003-app-bbdev-fix-TB-logic.patch	2024-08-12 20:44:01.875069251 +0800
@@ -1 +1 @@
-From 494d0c9bb17b320582a6a8437181cff8bc152c9d Mon Sep 17 00:00:00 2001
+From 179f1c6e6b3c3a778ad096051156663a896a2f7a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 494d0c9bb17b320582a6a8437181cff8bc152c9d ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index a21c9c7bdd..6d9bf3a233 100644
+index dcce00aa0a..efd046984d 100644

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

* patch 'app/bbdev: fix MLD output size computation' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (2 preceding siblings ...)
  2024-08-12 12:48       ` patch 'app/bbdev: fix TB logic' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'app/bbdev: fix interrupt tests' " Xueming Li
                         ` (153 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Hernan Vargas; +Cc: xuemingl, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=0c99a3d922a4aab6e01723253d7011cdaa7f202e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0c99a3d922a4aab6e01723253d7011cdaa7f202e Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Mon, 24 Jun 2024 08:02:30 -0700
Subject: [PATCH] app/bbdev: fix MLD output size computation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0de3cb953a0241854a65aa5cc4269124b932a908 ]

For perf tests, the operation size for the MLD-TS was incorrect.
Fixed so that the performance numbers are correct.
Largely cosmetic only.

Fixes: 95f192a40e35 ("test/bbdev: add MLD cases")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 app/test-bbdev/test_bbdev_perf.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index efd046984d..d9267bb91f 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -94,6 +94,8 @@
 #define K0_2_2 25 /* K0 fraction numerator for rv 2 and BG 2 */
 #define K0_3_1 56 /* K0 fraction numerator for rv 3 and BG 1 */
 #define K0_3_2 43 /* K0 fraction numerator for rv 3 and BG 2 */
+#define NUM_SC_PER_RB (12) /* Number of subcarriers in a RB in 3GPP. */
+#define BITS_PER_LLR  (8)  /* Number of bits in a LLR. */
 
 #define HARQ_MEM_TOLERANCE 256
 static struct test_bbdev_vector test_vector;
@@ -2896,8 +2898,14 @@ calc_fft_size(struct rte_bbdev_fft_op *op)
 static uint32_t
 calc_mldts_size(struct rte_bbdev_mldts_op *op)
 {
-	uint32_t output_size;
-	output_size = op->mldts.num_layers * op->mldts.num_rbs * op->mldts.c_rep;
+	uint32_t output_size = 0;
+	uint16_t i;
+
+	for (i = 0; i < op->mldts.num_layers; i++)
+		output_size += op->mldts.q_m[i];
+
+	output_size *= NUM_SC_PER_RB * BITS_PER_LLR * op->mldts.num_rbs * (op->mldts.c_rep + 1);
+
 	return output_size;
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:02.787435630 +0800
+++ 0004-app-bbdev-fix-MLD-output-size-computation.patch	2024-08-12 20:44:01.885069253 +0800
@@ -1 +1 @@
-From 0de3cb953a0241854a65aa5cc4269124b932a908 Mon Sep 17 00:00:00 2001
+From 0c99a3d922a4aab6e01723253d7011cdaa7f202e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0de3cb953a0241854a65aa5cc4269124b932a908 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 6d9bf3a233..9841464922 100644
+index efd046984d..d9267bb91f 100644

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

* patch 'app/bbdev: fix interrupt tests' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (3 preceding siblings ...)
  2024-08-12 12:48       ` patch 'app/bbdev: fix MLD output size computation' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'common/cnxk: fix flow aging on application exit' " Xueming Li
                         ` (152 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Hernan Vargas; +Cc: xuemingl, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c343cb088f5f741f234eb672f736f31f42df99b2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c343cb088f5f741f234eb672f736f31f42df99b2 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Mon, 24 Jun 2024 08:02:31 -0700
Subject: [PATCH] app/bbdev: fix interrupt tests
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fdcee665c5066cd1300d08b85d159ccabf9f3657 ]

Fix possible error with regards to setting the burst size from the
enqueue thread.

Fixes: b2e2aec3239e ("app/bbdev: enhance interrupt test")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 app/test-bbdev/test_bbdev_perf.c | 98 ++++++++++++++++----------------
 1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index d9267bb91f..5c1755ae0d 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -3408,15 +3408,6 @@ throughput_intr_lcore_ldpc_dec(void *arg)
 			if (unlikely(num_to_process - enqueued < num_to_enq))
 				num_to_enq = num_to_process - enqueued;
 
-			enq = 0;
-			do {
-				enq += rte_bbdev_enqueue_ldpc_dec_ops(
-						tp->dev_id,
-						queue_id, &ops[enqueued],
-						num_to_enq);
-			} while (unlikely(num_to_enq != enq));
-			enqueued += enq;
-
 			/* Write to thread burst_sz current number of enqueued
 			 * descriptors. It ensures that proper number of
 			 * descriptors will be dequeued in callback
@@ -3426,6 +3417,15 @@ throughput_intr_lcore_ldpc_dec(void *arg)
 			 */
 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
 
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_ldpc_dec_ops(
+						tp->dev_id,
+						queue_id, &ops[enqueued],
+						num_to_enq);
+			} while (unlikely(num_to_enq != enq));
+			enqueued += enq;
+
 			/* Wait until processing of previous batch is
 			 * completed
 			 */
@@ -3500,14 +3500,6 @@ throughput_intr_lcore_dec(void *arg)
 			if (unlikely(num_to_process - enqueued < num_to_enq))
 				num_to_enq = num_to_process - enqueued;
 
-			enq = 0;
-			do {
-				enq += rte_bbdev_enqueue_dec_ops(tp->dev_id,
-						queue_id, &ops[enqueued],
-						num_to_enq);
-			} while (unlikely(num_to_enq != enq));
-			enqueued += enq;
-
 			/* Write to thread burst_sz current number of enqueued
 			 * descriptors. It ensures that proper number of
 			 * descriptors will be dequeued in callback
@@ -3517,6 +3509,14 @@ throughput_intr_lcore_dec(void *arg)
 			 */
 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
 
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_dec_ops(tp->dev_id,
+						queue_id, &ops[enqueued],
+						num_to_enq);
+			} while (unlikely(num_to_enq != enq));
+			enqueued += enq;
+
 			/* Wait until processing of previous batch is
 			 * completed
 			 */
@@ -3586,14 +3586,6 @@ throughput_intr_lcore_enc(void *arg)
 			if (unlikely(num_to_process - enqueued < num_to_enq))
 				num_to_enq = num_to_process - enqueued;
 
-			enq = 0;
-			do {
-				enq += rte_bbdev_enqueue_enc_ops(tp->dev_id,
-						queue_id, &ops[enqueued],
-						num_to_enq);
-			} while (unlikely(enq != num_to_enq));
-			enqueued += enq;
-
 			/* Write to thread burst_sz current number of enqueued
 			 * descriptors. It ensures that proper number of
 			 * descriptors will be dequeued in callback
@@ -3603,6 +3595,14 @@ throughput_intr_lcore_enc(void *arg)
 			 */
 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
 
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_enc_ops(tp->dev_id,
+						queue_id, &ops[enqueued],
+						num_to_enq);
+			} while (unlikely(enq != num_to_enq));
+			enqueued += enq;
+
 			/* Wait until processing of previous batch is
 			 * completed
 			 */
@@ -3674,15 +3674,6 @@ throughput_intr_lcore_ldpc_enc(void *arg)
 			if (unlikely(num_to_process - enqueued < num_to_enq))
 				num_to_enq = num_to_process - enqueued;
 
-			enq = 0;
-			do {
-				enq += rte_bbdev_enqueue_ldpc_enc_ops(
-						tp->dev_id,
-						queue_id, &ops[enqueued],
-						num_to_enq);
-			} while (unlikely(enq != num_to_enq));
-			enqueued += enq;
-
 			/* Write to thread burst_sz current number of enqueued
 			 * descriptors. It ensures that proper number of
 			 * descriptors will be dequeued in callback
@@ -3692,6 +3683,15 @@ throughput_intr_lcore_ldpc_enc(void *arg)
 			 */
 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
 
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_ldpc_enc_ops(
+						tp->dev_id,
+						queue_id, &ops[enqueued],
+						num_to_enq);
+			} while (unlikely(enq != num_to_enq));
+			enqueued += enq;
+
 			/* Wait until processing of previous batch is
 			 * completed
 			 */
@@ -3763,14 +3763,6 @@ throughput_intr_lcore_fft(void *arg)
 			if (unlikely(num_to_process - enqueued < num_to_enq))
 				num_to_enq = num_to_process - enqueued;
 
-			enq = 0;
-			do {
-				enq += rte_bbdev_enqueue_fft_ops(tp->dev_id,
-						queue_id, &ops[enqueued],
-						num_to_enq);
-			} while (unlikely(enq != num_to_enq));
-			enqueued += enq;
-
 			/* Write to thread burst_sz current number of enqueued
 			 * descriptors. It ensures that proper number of
 			 * descriptors will be dequeued in callback
@@ -3780,6 +3772,14 @@ throughput_intr_lcore_fft(void *arg)
 			 */
 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
 
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_fft_ops(tp->dev_id,
+						queue_id, &ops[enqueued],
+						num_to_enq);
+			} while (unlikely(enq != num_to_enq));
+			enqueued += enq;
+
 			/* Wait until processing of previous batch is
 			 * completed
 			 */
@@ -3846,13 +3846,6 @@ throughput_intr_lcore_mldts(void *arg)
 			if (unlikely(num_to_process - enqueued < num_to_enq))
 				num_to_enq = num_to_process - enqueued;
 
-			enq = 0;
-			do {
-				enq += rte_bbdev_enqueue_mldts_ops(tp->dev_id,
-						queue_id, &ops[enqueued], num_to_enq);
-			} while (unlikely(enq != num_to_enq));
-			enqueued += enq;
-
 			/* Write to thread burst_sz current number of enqueued
 			 * descriptors. It ensures that proper number of
 			 * descriptors will be dequeued in callback
@@ -3862,6 +3855,13 @@ throughput_intr_lcore_mldts(void *arg)
 			 */
 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
 
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_mldts_ops(tp->dev_id,
+						queue_id, &ops[enqueued], num_to_enq);
+			} while (unlikely(enq != num_to_enq));
+			enqueued += enq;
+
 			/* Wait until processing of previous batch is
 			 * completed
 			 */
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:02.816614136 +0800
+++ 0005-app-bbdev-fix-interrupt-tests.patch	2024-08-12 20:44:01.885069253 +0800
@@ -1 +1 @@
-From fdcee665c5066cd1300d08b85d159ccabf9f3657 Mon Sep 17 00:00:00 2001
+From c343cb088f5f741f234eb672f736f31f42df99b2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fdcee665c5066cd1300d08b85d159ccabf9f3657 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 9841464922..20cd8df19b 100644
+index d9267bb91f..5c1755ae0d 100644
@@ -22 +24 @@
-@@ -3419,15 +3419,6 @@ throughput_intr_lcore_ldpc_dec(void *arg)
+@@ -3408,15 +3408,6 @@ throughput_intr_lcore_ldpc_dec(void *arg)
@@ -38,3 +40,3 @@
-@@ -3438,6 +3429,15 @@ throughput_intr_lcore_ldpc_dec(void *arg)
- 			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
- 					rte_memory_order_relaxed);
+@@ -3426,6 +3417,15 @@ throughput_intr_lcore_ldpc_dec(void *arg)
+ 			 */
+ 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -54 +56 @@
-@@ -3514,14 +3514,6 @@ throughput_intr_lcore_dec(void *arg)
+@@ -3500,14 +3500,6 @@ throughput_intr_lcore_dec(void *arg)
@@ -69,3 +71,3 @@
-@@ -3532,6 +3524,14 @@ throughput_intr_lcore_dec(void *arg)
- 			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
- 					rte_memory_order_relaxed);
+@@ -3517,6 +3509,14 @@ throughput_intr_lcore_dec(void *arg)
+ 			 */
+ 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -84 +86 @@
-@@ -3603,14 +3603,6 @@ throughput_intr_lcore_enc(void *arg)
+@@ -3586,14 +3586,6 @@ throughput_intr_lcore_enc(void *arg)
@@ -99,3 +101,3 @@
-@@ -3621,6 +3613,14 @@ throughput_intr_lcore_enc(void *arg)
- 			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
- 					rte_memory_order_relaxed);
+@@ -3603,6 +3595,14 @@ throughput_intr_lcore_enc(void *arg)
+ 			 */
+ 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -114 +116 @@
-@@ -3694,15 +3694,6 @@ throughput_intr_lcore_ldpc_enc(void *arg)
+@@ -3674,15 +3674,6 @@ throughput_intr_lcore_ldpc_enc(void *arg)
@@ -130,3 +132,3 @@
-@@ -3713,6 +3704,15 @@ throughput_intr_lcore_ldpc_enc(void *arg)
- 			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
- 					rte_memory_order_relaxed);
+@@ -3692,6 +3683,15 @@ throughput_intr_lcore_ldpc_enc(void *arg)
+ 			 */
+ 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -146 +148 @@
-@@ -3786,14 +3786,6 @@ throughput_intr_lcore_fft(void *arg)
+@@ -3763,14 +3763,6 @@ throughput_intr_lcore_fft(void *arg)
@@ -161,3 +163,3 @@
-@@ -3804,6 +3796,14 @@ throughput_intr_lcore_fft(void *arg)
- 			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
- 					rte_memory_order_relaxed);
+@@ -3780,6 +3772,14 @@ throughput_intr_lcore_fft(void *arg)
+ 			 */
+ 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -176 +178 @@
-@@ -3872,13 +3872,6 @@ throughput_intr_lcore_mldts(void *arg)
+@@ -3846,13 +3846,6 @@ throughput_intr_lcore_mldts(void *arg)
@@ -190,3 +192,3 @@
-@@ -3889,6 +3882,13 @@ throughput_intr_lcore_mldts(void *arg)
- 			rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
- 					rte_memory_order_relaxed);
+@@ -3862,6 +3855,13 @@ throughput_intr_lcore_mldts(void *arg)
+ 			 */
+ 			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);

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

* patch 'common/cnxk: fix flow aging on application exit' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (4 preceding siblings ...)
  2024-08-12 12:48       ` patch 'app/bbdev: fix interrupt tests' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'dmadev: fix structure alignment' " Xueming Li
                         ` (151 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Kiran Kumar K; +Cc: xuemingl, Harman Kalra, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d859544e45c512464d85761a7d3a404c2972cd93

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d859544e45c512464d85761a7d3a404c2972cd93 Mon Sep 17 00:00:00 2001
From: Kiran Kumar K <kirankumark@marvell.com>
Date: Mon, 17 Jun 2024 16:57:54 +0530
Subject: [PATCH] common/cnxk: fix flow aging on application exit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a4878294318eda0ea242562419a5797bf5440862 ]

If flow aging is enabled application termination may take time
equivalent to aging timeout. This is because on termination flow
thread uses a sleep call which is uninterruptible.

Fixes: 357f5ebc8a24 ("common/cnxk: support flow aging")

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/common/cnxk/roc_npc_aging.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_npc_aging.c b/drivers/common/cnxk/roc_npc_aging.c
index 15f6e61d76..1e85033e2a 100644
--- a/drivers/common/cnxk/roc_npc_aging.c
+++ b/drivers/common/cnxk/roc_npc_aging.c
@@ -133,6 +133,21 @@ exit:
 	return rc;
 }
 
+static void
+npc_age_wait_until(struct roc_npc_flow_age *flow_age)
+{
+#define NPC_AGE_WAIT_TIMEOUT_MS 1000
+#define NPC_AGE_WAIT_TIMEOUT_US (NPC_AGE_WAIT_TIMEOUT_MS * NPC_AGE_WAIT_TIMEOUT_MS)
+	uint64_t timeout = 0;
+	uint64_t sleep = 10 * NPC_AGE_WAIT_TIMEOUT_MS;
+
+	do {
+		plt_delay_us(sleep);
+		timeout += sleep;
+	} while (!flow_age->aged_flows_get_thread_exit &&
+		 (timeout < (flow_age->aging_poll_freq * NPC_AGE_WAIT_TIMEOUT_US)));
+}
+
 uint32_t
 npc_aged_flows_get(void *args)
 {
@@ -197,7 +212,7 @@ npc_aged_flows_get(void *args)
 		plt_seqcount_write_end(&flow_age->seq_cnt);
 
 lbl_sleep:
-		sleep(flow_age->aging_poll_freq);
+		npc_age_wait_until(flow_age);
 	}
 
 	return 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:02.844139342 +0800
+++ 0006-common-cnxk-fix-flow-aging-on-application-exit.patch	2024-08-12 20:44:01.895069255 +0800
@@ -1 +1 @@
-From a4878294318eda0ea242562419a5797bf5440862 Mon Sep 17 00:00:00 2001
+From d859544e45c512464d85761a7d3a404c2972cd93 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a4878294318eda0ea242562419a5797bf5440862 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'dmadev: fix structure alignment' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (5 preceding siblings ...)
  2024-08-12 12:48       ` patch 'common/cnxk: fix flow aging on application exit' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'vdpa/sfc: remove dead code' " Xueming Li
                         ` (150 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Wenwu Ma; +Cc: xuemingl, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=583796e298412568ee7f2e1d9b13fc891a11b7d3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 583796e298412568ee7f2e1d9b13fc891a11b7d3 Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Wed, 20 Mar 2024 15:23:32 +0800
Subject: [PATCH] dmadev: fix structure alignment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c15902587b538ff02cfb0fbb4dd481f1503d936b ]

The structure rte_dma_dev needs to be aligned to the cache line, but
the return value of malloc may not be aligned to the cache line. When
we use memset to clear the rte_dma_dev object, it may cause a segmentation
fault in clang-x86-platform.

This is because clang uses the "vmovaps" assembly instruction for
memset, which requires that the operands (rte_dma_dev objects) must
aligned on a 16-byte boundary or a general-protection exception (#GP)
is generated.

Therefore, either additional memory is applied for re-alignment, or the
rte_dma_dev object does not require cache line alignment. The patch
chooses the former option to fix the issue.

Fixes: b36970f2e13e ("dmadev: introduce DMA device library")

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/dmadev/rte_dmadev.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c
index 31a268cfdb..5093c6e38b 100644
--- a/lib/dmadev/rte_dmadev.c
+++ b/lib/dmadev/rte_dmadev.c
@@ -158,15 +158,24 @@ static int
 dma_dev_data_prepare(void)
 {
 	size_t size;
+	void *ptr;
 
 	if (rte_dma_devices != NULL)
 		return 0;
 
-	size = dma_devices_max * sizeof(struct rte_dma_dev);
-	rte_dma_devices = malloc(size);
-	if (rte_dma_devices == NULL)
+	/* The DMA device object is expected to align cacheline,
+	 * but the return value of malloc may not be aligned to the cache line.
+	 * Therefore, extra memory is applied for realignment.
+	 * Note: posix_memalign/aligned_alloc are not used
+	 * because not always available, depending on libc.
+	 */
+	size = dma_devices_max * sizeof(struct rte_dma_dev) + RTE_CACHE_LINE_SIZE;
+	ptr = malloc(size);
+	if (ptr == NULL)
 		return -ENOMEM;
-	memset(rte_dma_devices, 0, size);
+	memset(ptr, 0, size);
+
+	rte_dma_devices = RTE_PTR_ALIGN(ptr, RTE_CACHE_LINE_SIZE);
 
 	return 0;
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:02.871464447 +0800
+++ 0007-dmadev-fix-structure-alignment.patch	2024-08-12 20:44:01.895069255 +0800
@@ -1 +1 @@
-From c15902587b538ff02cfb0fbb4dd481f1503d936b Mon Sep 17 00:00:00 2001
+From 583796e298412568ee7f2e1d9b13fc891a11b7d3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c15902587b538ff02cfb0fbb4dd481f1503d936b ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index e64b279bac..845727210f 100644
+index 31a268cfdb..5093c6e38b 100644
@@ -33 +35 @@
-@@ -159,15 +159,24 @@ static int
+@@ -158,15 +158,24 @@ static int

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

* patch 'vdpa/sfc: remove dead code' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (6 preceding siblings ...)
  2024-08-12 12:48       ` patch 'dmadev: fix structure alignment' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'graph: fix mcore dispatch walk' " Xueming Li
                         ` (149 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: David Marchand; +Cc: xuemingl, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=777f0bc1a507de9f51959b7d9dfb42da3499f974

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 777f0bc1a507de9f51959b7d9dfb42da3499f974 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 25 Jun 2024 14:24:09 +0200
Subject: [PATCH] vdpa/sfc: remove dead code
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4ea22410ea9c0235db40313bb810582b25e845b3 ]

This is probably a copy/paste from the net/sfc driver.
sfc_logtype_driver is not a logtype variable from the sfc vDPA driver.
Remove it.

Fixes: 6dad9a7353d4 ("vdpa/sfc: support device initialization")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/vdpa/sfc/sfc_vdpa_hw.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/vdpa/sfc/sfc_vdpa_hw.c b/drivers/vdpa/sfc/sfc_vdpa_hw.c
index edb7e35c2c..7e43719f53 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_hw.c
+++ b/drivers/vdpa/sfc/sfc_vdpa_hw.c
@@ -13,8 +13,6 @@
 #include "sfc_vdpa.h"
 #include "sfc_vdpa_ops.h"
 
-extern uint32_t sfc_logtype_driver;
-
 #ifndef PAGE_SIZE
 #define PAGE_SIZE   (sysconf(_SC_PAGESIZE))
 #endif
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:02.896716452 +0800
+++ 0008-vdpa-sfc-remove-dead-code.patch	2024-08-12 20:44:01.895069255 +0800
@@ -1 +1 @@
-From 4ea22410ea9c0235db40313bb810582b25e845b3 Mon Sep 17 00:00:00 2001
+From 777f0bc1a507de9f51959b7d9dfb42da3499f974 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4ea22410ea9c0235db40313bb810582b25e845b3 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'graph: fix mcore dispatch walk' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (7 preceding siblings ...)
  2024-08-12 12:48       ` patch 'vdpa/sfc: remove dead code' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'mbuf: fix dynamic fields copy' " Xueming Li
                         ` (148 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: xuemingl, Zhirun Yan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c13a819a446733582988f12bda50d35b02f15b62

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c13a819a446733582988f12bda50d35b02f15b62 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Fri, 22 Mar 2024 15:46:37 +0000
Subject: [PATCH] graph: fix mcore dispatch walk
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 19c34a3caee965e60f25fb4de6553607b894ba72 ]

Head move happens before the core id check, which will cause the last
source node be executed even core id is not correct. This patch changes
head check to less than 1 instead of 0 to fix this issue.

Fixes: 35dfd9b9fd85 ("graph: introduce graph walk by cross-core dispatch")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Zhirun Yan <zhirun.yan@intel.com>
---
 lib/graph/rte_graph_model_mcore_dispatch.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/graph/rte_graph_model_mcore_dispatch.h b/lib/graph/rte_graph_model_mcore_dispatch.h
index 75ec388cad..732b89297f 100644
--- a/lib/graph/rte_graph_model_mcore_dispatch.h
+++ b/lib/graph/rte_graph_model_mcore_dispatch.h
@@ -100,7 +100,7 @@ rte_graph_walk_mcore_dispatch(struct rte_graph *graph)
 		node = (struct rte_node *)RTE_PTR_ADD(graph, cir_start[(int32_t)head++]);
 
 		/* skip the src nodes which not bind with current worker */
-		if ((int32_t)head < 0 && node->dispatch.lcore_id != graph->dispatch.lcore_id)
+		if ((int32_t)head < 1 && node->dispatch.lcore_id != graph->dispatch.lcore_id)
 			continue;
 
 		/* Schedule the node until all task/objs are done */
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:02.921460657 +0800
+++ 0009-graph-fix-mcore-dispatch-walk.patch	2024-08-12 20:44:01.895069255 +0800
@@ -1 +1 @@
-From 19c34a3caee965e60f25fb4de6553607b894ba72 Mon Sep 17 00:00:00 2001
+From c13a819a446733582988f12bda50d35b02f15b62 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 19c34a3caee965e60f25fb4de6553607b894ba72 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'mbuf: fix dynamic fields copy' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (8 preceding siblings ...)
  2024-08-12 12:48       ` patch 'graph: fix mcore dispatch walk' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'bpf: fix MOV instruction evaluation' " Xueming Li
                         ` (147 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Shijith Thotton
  Cc: xuemingl, Morten Brørup, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c9071e44b74503d54963e65a91ff9c57d3fc2251

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c9071e44b74503d54963e65a91ff9c57d3fc2251 Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Thu, 27 Jun 2024 13:27:56 +0530
Subject: [PATCH] mbuf: fix dynamic fields copy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 95bea772528d316c969a170e6206f3b05ac39413 ]

Fixed rte_mbuf_dynfield_copy() API to copy dynamic fields from one mbuf
to another. When RTE_IOVA_AS_PA is not defined during the build, an
additional dynamic field (dynfield2) becomes available. This field
should be conditionally copied to ensure the complete duplication of
dynamic fields between mbufs. This patch fixes the same.

Bugzilla ID: 1472
Fixes: 03b57eb7ab9a ("mbuf: add second dynamic field member")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/mbuf/rte_mbuf.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h
index 286b32b788..c266727a13 100644
--- a/lib/mbuf/rte_mbuf.h
+++ b/lib/mbuf/rte_mbuf.h
@@ -1119,6 +1119,9 @@ rte_pktmbuf_attach_extbuf(struct rte_mbuf *m, void *buf_addr,
 static inline void
 rte_mbuf_dynfield_copy(struct rte_mbuf *mdst, const struct rte_mbuf *msrc)
 {
+#if !RTE_IOVA_IN_MBUF
+	mdst->dynfield2 = msrc->dynfield2;
+#endif
 	memcpy(&mdst->dynfield1, msrc->dynfield1, sizeof(mdst->dynfield1));
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:02.944962261 +0800
+++ 0010-mbuf-fix-dynamic-fields-copy.patch	2024-08-12 20:44:01.895069255 +0800
@@ -1 +1 @@
-From 95bea772528d316c969a170e6206f3b05ac39413 Mon Sep 17 00:00:00 2001
+From c9071e44b74503d54963e65a91ff9c57d3fc2251 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 95bea772528d316c969a170e6206f3b05ac39413 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 4c4722e002..babe16c72c 100644
+index 286b32b788..c266727a13 100644

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

* patch 'bpf: fix MOV instruction evaluation' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (9 preceding siblings ...)
  2024-08-12 12:48       ` patch 'mbuf: fix dynamic fields copy' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'bpf: fix load hangs with six IPv6 addresses' " Xueming Li
                         ` (146 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: xuemingl, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=59523f029eaa71f9332420cc4e3706fe6c9312ad

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 59523f029eaa71f9332420cc4e3706fe6c9312ad Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 27 Jun 2024 19:04:40 +0100
Subject: [PATCH] bpf: fix MOV instruction evaluation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3eef64655bfe3602f4e3235e2533932205f24569 ]

Verifier might left some register-state values uninitialized while
evaluating MOV instructions.
Add explicit initialization.

Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/bpf/bpf_validate.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
index 95b9ef99ef..65f9d114bc 100644
--- a/lib/bpf/bpf_validate.c
+++ b/lib/bpf/bpf_validate.c
@@ -636,14 +636,14 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
 {
 	uint64_t msk;
 	uint32_t op;
-	size_t opsz;
+	size_t opsz, sz;
 	const char *err;
 	struct bpf_eval_state *st;
 	struct bpf_reg_val *rd, rs;
 
-	opsz = (BPF_CLASS(ins->code) == BPF_ALU) ?
+	sz = (BPF_CLASS(ins->code) == BPF_ALU) ?
 		sizeof(uint32_t) : sizeof(uint64_t);
-	opsz = opsz * CHAR_BIT;
+	opsz = sz * CHAR_BIT;
 	msk = RTE_LEN2MASK(opsz, uint64_t);
 
 	st = bvf->evst;
@@ -652,8 +652,10 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
 	if (BPF_SRC(ins->code) == BPF_X) {
 		rs = st->rv[ins->src_reg];
 		eval_apply_mask(&rs, msk);
-	} else
+	} else {
+		rs = (struct bpf_reg_val){.v = {.size = sz,},};
 		eval_fill_imm(&rs, msk, ins->imm);
+	}
 
 	eval_apply_mask(rd, msk);
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:02.972122163 +0800
+++ 0011-bpf-fix-MOV-instruction-evaluation.patch	2024-08-12 20:44:01.895069255 +0800
@@ -1 +1 @@
-From 3eef64655bfe3602f4e3235e2533932205f24569 Mon Sep 17 00:00:00 2001
+From 59523f029eaa71f9332420cc4e3706fe6c9312ad Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3eef64655bfe3602f4e3235e2533932205f24569 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 79be5e917d..11344fff4d 100644
+index 95b9ef99ef..65f9d114bc 100644

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

* patch 'bpf: fix load hangs with six IPv6 addresses' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (10 preceding siblings ...)
  2024-08-12 12:48       ` patch 'bpf: fix MOV instruction evaluation' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'telemetry: fix connection parameter parsing' " Xueming Li
                         ` (145 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Konstantin Ananyev
  Cc: xuemingl, Isaac Boukris, Morten Brørup, Stephen Hemminger,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=713520f91da01ec734ffa6f7a57da234f7e2cde5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 713520f91da01ec734ffa6f7a57da234f7e2cde5 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 27 Jun 2024 19:04:41 +0100
Subject: [PATCH] bpf: fix load hangs with six IPv6 addresses
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a258eebdfb22f95a8a44d31b0eab639aed0a0c4b ]

As described in https://bugs.dpdk.org/show_bug.cgi?id=1465, converting
from following cBPF filter:
"host 1::1 or host 1::1 or host 1::1 or host 1::1 or
 host 1::1 or host 1::1"
takes too long for BPF verifier to complete (up to 25 seconds).

Looking at it, I didn't find any actual functional bug.

In fact, it does what is expected: go through each possible path of
BPF program and evaluate register/stack state for each instruction.
The problem is that, for program with a lot of conditional branches,
number of possible paths starts to grow exponentially and such walk
becomes very excessive.

So to minimize number of evaluations, this patch implements heuristic
similar to what Linux kernel does: state pruning.
If from given instruction for given program state, we explore all possible
paths and for each of them reach bpf_exit() without any complaints and a
valid R0 value, then for that instruction this program state can be
marked as 'safe'.
When we later arrive at the same instruction with a state equivalent to
an earlier instruction 'safe' state, we can prune the search.

For now, only states for JCC targets are saved/examined.

Plus add few extra logging for DEBUG level.

Bugzilla ID: 1465
Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")

Reported-by: Isaac Boukris <iboukris@gmail.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/bpf/bpf_validate.c | 304 ++++++++++++++++++++++++++++++++++-------
 1 file changed, 254 insertions(+), 50 deletions(-)

diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
index 65f9d114bc..da8d5f3deb 100644
--- a/lib/bpf/bpf_validate.c
+++ b/lib/bpf/bpf_validate.c
@@ -29,10 +29,13 @@ struct bpf_reg_val {
 };
 
 struct bpf_eval_state {
+	SLIST_ENTRY(bpf_eval_state) next; /* for @safe list traversal */
 	struct bpf_reg_val rv[EBPF_REG_NUM];
 	struct bpf_reg_val sv[MAX_BPF_STACK_SIZE / sizeof(uint64_t)];
 };
 
+SLIST_HEAD(bpf_evst_head, bpf_eval_state);
+
 /* possible instruction node colour */
 enum {
 	WHITE,
@@ -52,6 +55,9 @@ enum {
 
 #define	MAX_EDGES	2
 
+/* max number of 'safe' evaluated states to track per node */
+#define NODE_EVST_MAX	32
+
 struct inst_node {
 	uint8_t colour;
 	uint8_t nb_edge:4;
@@ -59,7 +65,18 @@ struct inst_node {
 	uint8_t edge_type[MAX_EDGES];
 	uint32_t edge_dest[MAX_EDGES];
 	uint32_t prev_node;
-	struct bpf_eval_state *evst;
+	struct {
+		struct bpf_eval_state *cur;   /* save/restore for jcc targets */
+		struct bpf_eval_state *start;
+		struct bpf_evst_head safe;    /* safe states for track/prune */
+		uint32_t nb_safe;
+	} evst;
+};
+
+struct evst_pool {
+	uint32_t num;
+	uint32_t cur;
+	struct bpf_eval_state *ent;
 };
 
 struct bpf_verifier {
@@ -73,11 +90,8 @@ struct bpf_verifier {
 	uint32_t edge_type[MAX_EDGE_TYPE];
 	struct bpf_eval_state *evst;
 	struct inst_node *evin;
-	struct {
-		uint32_t num;
-		uint32_t cur;
-		struct bpf_eval_state *ent;
-	} evst_pool;
+	struct evst_pool evst_sr_pool; /* for evst save/restore */
+	struct evst_pool evst_tp_pool; /* for evst track/prune */
 };
 
 struct bpf_ins_check {
@@ -1085,7 +1099,7 @@ eval_jcc(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
 	struct bpf_reg_val rvf, rvt;
 
 	tst = bvf->evst;
-	fst = bvf->evin->evst;
+	fst = bvf->evin->evst.cur;
 
 	frd = fst->rv + ins->dst_reg;
 	trd = tst->rv + ins->dst_reg;
@@ -1814,8 +1828,8 @@ add_edge(struct bpf_verifier *bvf, struct inst_node *node, uint32_t nidx)
 	uint32_t ne;
 
 	if (nidx > bvf->prm->nb_ins) {
-		RTE_BPF_LOG(ERR, "%s: program boundary violation at pc: %u, "
-			"next pc: %u\n",
+		RTE_BPF_LOG(ERR,
+			"%s: program boundary violation at pc: %u, next pc: %u\n",
 			__func__, get_node_idx(bvf, node), nidx);
 		return -EINVAL;
 	}
@@ -2091,60 +2105,113 @@ validate(struct bpf_verifier *bvf)
  * helper functions get/free eval states.
  */
 static struct bpf_eval_state *
-pull_eval_state(struct bpf_verifier *bvf)
+pull_eval_state(struct evst_pool *pool)
 {
 	uint32_t n;
 
-	n = bvf->evst_pool.cur;
-	if (n == bvf->evst_pool.num)
+	n = pool->cur;
+	if (n == pool->num)
 		return NULL;
 
-	bvf->evst_pool.cur = n + 1;
-	return bvf->evst_pool.ent + n;
+	pool->cur = n + 1;
+	return pool->ent + n;
 }
 
 static void
-push_eval_state(struct bpf_verifier *bvf)
+push_eval_state(struct evst_pool *pool)
 {
-	bvf->evst_pool.cur--;
+	RTE_ASSERT(pool->cur != 0);
+	pool->cur--;
 }
 
 static void
 evst_pool_fini(struct bpf_verifier *bvf)
 {
 	bvf->evst = NULL;
-	free(bvf->evst_pool.ent);
-	memset(&bvf->evst_pool, 0, sizeof(bvf->evst_pool));
+	free(bvf->evst_sr_pool.ent);
+	memset(&bvf->evst_sr_pool, 0, sizeof(bvf->evst_sr_pool));
+	memset(&bvf->evst_tp_pool, 0, sizeof(bvf->evst_tp_pool));
 }
 
 static int
 evst_pool_init(struct bpf_verifier *bvf)
 {
-	uint32_t n;
+	uint32_t k, n;
 
-	n = bvf->nb_jcc_nodes + 1;
+	/*
+	 * We need nb_jcc_nodes + 1 for save_cur/restore_cur
+	 * remaining ones will be used for state tracking/pruning.
+	 */
+	k = bvf->nb_jcc_nodes + 1;
+	n = k * 3;
 
-	bvf->evst_pool.ent = calloc(n, sizeof(bvf->evst_pool.ent[0]));
-	if (bvf->evst_pool.ent == NULL)
+	bvf->evst_sr_pool.ent = calloc(n, sizeof(bvf->evst_sr_pool.ent[0]));
+	if (bvf->evst_sr_pool.ent == NULL)
 		return -ENOMEM;
 
-	bvf->evst_pool.num = n;
-	bvf->evst_pool.cur = 0;
+	bvf->evst_sr_pool.num = k;
+	bvf->evst_sr_pool.cur = 0;
 
-	bvf->evst = pull_eval_state(bvf);
+	bvf->evst_tp_pool.ent = bvf->evst_sr_pool.ent + k;
+	bvf->evst_tp_pool.num = n - k;
+	bvf->evst_tp_pool.cur = 0;
+
+	bvf->evst = pull_eval_state(&bvf->evst_sr_pool);
 	return 0;
 }
 
+/*
+ * try to allocate and initialise new eval state for given node.
+ * later if no errors will be encountered, this state will be accepted as
+ * one of the possible 'safe' states for that node.
+ */
+static void
+save_start_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+{
+	RTE_ASSERT(node->evst.start == NULL);
+
+	/* limit number of states for one node with some reasonable value */
+	if (node->evst.nb_safe >= NODE_EVST_MAX)
+		return;
+
+	/* try to get new eval_state */
+	node->evst.start = pull_eval_state(&bvf->evst_tp_pool);
+
+	/* make a copy of current state */
+	if (node->evst.start != NULL) {
+		memcpy(node->evst.start, bvf->evst, sizeof(*node->evst.start));
+		SLIST_NEXT(node->evst.start, next) = NULL;
+	}
+}
+
+/*
+ * add @start state to the list of @safe states.
+ */
+static void
+save_safe_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+{
+	if (node->evst.start == NULL)
+		return;
+
+	SLIST_INSERT_HEAD(&node->evst.safe, node->evst.start, next);
+	node->evst.nb_safe++;
+
+	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;\n", __func__, bvf, get_node_idx(bvf, node),
+		    node->evst.start, node->evst.nb_safe);
+
+	node->evst.start = NULL;
+}
+
 /*
  * Save current eval state.
  */
 static int
-save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+save_cur_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
 {
 	struct bpf_eval_state *st;
 
 	/* get new eval_state for this node */
-	st = pull_eval_state(bvf);
+	st = pull_eval_state(&bvf->evst_sr_pool);
 	if (st == NULL) {
 		RTE_BPF_LOG(ERR,
 			"%s: internal error (out of space) at pc: %u\n",
@@ -2156,11 +2223,13 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
 	memcpy(st, bvf->evst, sizeof(*st));
 
 	/* swap current state with new one */
-	node->evst = bvf->evst;
+	RTE_ASSERT(node->evst.cur == NULL);
+	node->evst.cur = bvf->evst;
 	bvf->evst = st;
 
 	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
-		__func__, bvf, get_node_idx(bvf, node), node->evst, bvf->evst);
+		__func__, bvf, get_node_idx(bvf, node), node->evst.cur,
+		bvf->evst);
 
 	return 0;
 }
@@ -2169,14 +2238,15 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
  * Restore previous eval state and mark current eval state as free.
  */
 static void
-restore_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+restore_cur_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
 {
 	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
-		__func__, bvf, get_node_idx(bvf, node), bvf->evst, node->evst);
+		__func__, bvf, get_node_idx(bvf, node), bvf->evst,
+		node->evst.cur);
 
-	bvf->evst = node->evst;
-	node->evst = NULL;
-	push_eval_state(bvf);
+	bvf->evst = node->evst.cur;
+	node->evst.cur = NULL;
+	push_eval_state(&bvf->evst_sr_pool);
 }
 
 static void
@@ -2193,26 +2263,124 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
 
 	rte_log(loglvl, rte_bpf_logtype,
 		"r%u={\n"
-		"\tv={type=%u, size=%zu},\n"
+		"\tv={type=%u, size=%zu, buf_size=%zu},\n"
 		"\tmask=0x%" PRIx64 ",\n"
 		"\tu={min=0x%" PRIx64 ", max=0x%" PRIx64 "},\n"
 		"\ts={min=%" PRId64 ", max=%" PRId64 "},\n"
 		"};\n",
 		ins->dst_reg,
-		rv->v.type, rv->v.size,
+		rv->v.type, rv->v.size, rv->v.buf_size,
 		rv->mask,
 		rv->u.min, rv->u.max,
 		rv->s.min, rv->s.max);
 }
 
 /*
- * Do second pass through CFG and try to evaluate instructions
- * via each possible path.
- * Right now evaluation functionality is quite limited.
- * Still need to add extra checks for:
- * - use/return uninitialized registers.
- * - use uninitialized data from the stack.
- * - memory boundaries violation.
+ * compare two evaluation states.
+ * returns zero if @lv is more conservative (safer) then @rv.
+ * returns non-zero value otherwise.
+ */
+static int
+cmp_reg_val_within(const struct bpf_reg_val *lv, const struct bpf_reg_val *rv)
+{
+	/* expect @v and @mask to be identical */
+	if (memcmp(&lv->v, &rv->v, sizeof(lv->v)) != 0 || lv->mask != rv->mask)
+		return -1;
+
+	/* exact match only for mbuf and stack pointers */
+	if (lv->v.type == RTE_BPF_ARG_PTR_MBUF ||
+			lv->v.type == BPF_ARG_PTR_STACK)
+		return -1;
+
+	if (lv->u.min <= rv->u.min && lv->u.max >= rv->u.max &&
+			lv->s.min <= rv->s.min && lv->s.max >= rv->s.max)
+		return 0;
+
+	return -1;
+}
+
+/*
+ * compare two evaluation states.
+ * returns zero if they are identical.
+ * returns positive value if @lv is more conservative (safer) then @rv.
+ * returns negative value otherwise.
+ */
+static int
+cmp_eval_state(const struct bpf_eval_state *lv, const struct bpf_eval_state *rv)
+{
+	int32_t rc;
+	uint32_t i, k;
+
+	/* for stack expect identical values */
+	rc = memcmp(lv->sv, rv->sv, sizeof(lv->sv));
+	if (rc != 0)
+		return -(2 * EBPF_REG_NUM);
+
+	k = 0;
+	/* check register values */
+	for (i = 0; i != RTE_DIM(lv->rv); i++) {
+		rc = memcmp(&lv->rv[i], &rv->rv[i], sizeof(lv->rv[i]));
+		if (rc != 0 && cmp_reg_val_within(&lv->rv[i], &rv->rv[i]) != 0)
+			return -(i + 1);
+		k += (rc != 0);
+	}
+
+	return k;
+}
+
+/*
+ * check did we already evaluated that path and can it be pruned that time.
+ */
+static int
+prune_eval_state(struct bpf_verifier *bvf, const struct inst_node *node,
+	struct inst_node *next)
+{
+	int32_t rc;
+	struct bpf_eval_state *safe;
+
+	rc = INT32_MIN;
+	SLIST_FOREACH(safe, &next->evst.safe, next) {
+		rc = cmp_eval_state(safe, bvf->evst);
+		if (rc >= 0)
+			break;
+	}
+
+	rc = (rc >= 0) ? 0 : -1;
+
+	/*
+	 * current state doesn't match any safe states,
+	 * so no prunning is possible right now,
+	 * track current state for future references.
+	 */
+	if (rc != 0)
+		save_start_eval_state(bvf, next);
+
+	RTE_BPF_LOG(DEBUG,
+		    "%s(bvf=%p,node=%u,next=%u) returns %d, "
+		    "next->evst.start=%p, next->evst.nb_safe=%u\n",
+		    __func__, bvf, get_node_idx(bvf, node), get_node_idx(bvf, next), rc, next->evst.start,
+		    next->evst.nb_safe);
+	return rc;
+}
+
+/* Do second pass through CFG and try to evaluate instructions
+ * via each possible path. The verifier will try all paths, tracking types of
+ * registers used as input to instructions, and updating resulting type via
+ * register state values. Plus for each register and possible stack value it
+ * tries to estimate possible max/min value.
+ * For conditional jumps, a stack is used to save evaluation state, so one
+ * path is explored while the state for the other path is pushed onto the stack.
+ * Then later, we backtrack to the first pushed instruction and repeat the cycle
+ * until the stack is empty and we're done.
+ * For program with many conditional branches walking through all possible path
+ * could be very excessive. So to minimize number of evaluations we use
+ * heuristic similar to what Linux kernel does - state pruning:
+ * If from given instruction for given program state we explore all possible
+ * paths and for each of them reach _exit() without any complaints and a valid
+ * R0 value, then for that instruction, that program state can be marked as
+ * 'safe'. When we later arrive at the same instruction with a state
+ * equivalent to an earlier instruction's 'safe' state, we can prune the search.
+ * For now, only states for JCC  targets are saved/examined.
  */
 static int
 evaluate(struct bpf_verifier *bvf)
@@ -2223,6 +2391,13 @@ evaluate(struct bpf_verifier *bvf)
 	const struct ebpf_insn *ins;
 	struct inst_node *next, *node;
 
+	struct {
+		uint32_t nb_eval;
+		uint32_t nb_prune;
+		uint32_t nb_save;
+		uint32_t nb_restore;
+	} stats;
+
 	/* initial state of frame pointer */
 	static const struct bpf_reg_val rvfp = {
 		.v = {
@@ -2246,6 +2421,8 @@ evaluate(struct bpf_verifier *bvf)
 	next = node;
 	rc = 0;
 
+	memset(&stats, 0, sizeof(stats));
+
 	while (node != NULL && rc == 0) {
 
 		/*
@@ -2259,11 +2436,14 @@ evaluate(struct bpf_verifier *bvf)
 			op = ins[idx].code;
 
 			/* for jcc node make a copy of evaluation state */
-			if (node->nb_edge > 1)
-				rc |= save_eval_state(bvf, node);
+			if (node->nb_edge > 1) {
+				rc |= save_cur_eval_state(bvf, node);
+				stats.nb_save++;
+			}
 
 			if (ins_chk[op].eval != NULL && rc == 0) {
 				err = ins_chk[op].eval(bvf, ins + idx);
+				stats.nb_eval++;
 				if (err != NULL) {
 					RTE_BPF_LOG(ERR, "%s: %s at pc: %u\n",
 						__func__, err, idx);
@@ -2277,21 +2457,37 @@ evaluate(struct bpf_verifier *bvf)
 
 		/* proceed through CFG */
 		next = get_next_node(bvf, node);
+
 		if (next != NULL) {
 
 			/* proceed with next child */
 			if (node->cur_edge == node->nb_edge &&
-					node->evst != NULL)
-				restore_eval_state(bvf, node);
+					node->evst.cur != NULL) {
+				restore_cur_eval_state(bvf, node);
+				stats.nb_restore++;
+			}
 
-			next->prev_node = get_node_idx(bvf, node);
-			node = next;
+			/*
+			 * for jcc targets: check did we already evaluated
+			 * that path and can it's evaluation be skipped that
+			 * time.
+			 */
+			if (node->nb_edge > 1 && prune_eval_state(bvf, node,
+					next) == 0) {
+				next = NULL;
+				stats.nb_prune++;
+			} else {
+				next->prev_node = get_node_idx(bvf, node);
+				node = next;
+			}
 		} else {
 			/*
 			 * finished with current node and all it's kids,
-			 * proceed with parent
+			 * mark it's @start state as safe for future references,
+			 * and proceed with parent.
 			 */
 			node->cur_edge = 0;
+			save_safe_eval_state(bvf, node);
 			node = get_prev_node(bvf, node);
 
 			/* finished */
@@ -2300,6 +2496,14 @@ evaluate(struct bpf_verifier *bvf)
 		}
 	}
 
+	RTE_BPF_LOG(DEBUG,
+		    "%s(%p) returns %d, stats:\n"
+		    "node evaluations=%u;\n"
+		    "state pruned=%u;\n"
+		    "state saves=%u;\n"
+		    "state restores=%u;\n",
+		    __func__, bvf, rc, stats.nb_eval, stats.nb_prune, stats.nb_save, stats.nb_restore);
+
 	return rc;
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:02.998674961 +0800
+++ 0012-bpf-fix-load-hangs-with-six-IPv6-addresses.patch	2024-08-12 20:44:01.905069257 +0800
@@ -1 +1 @@
-From a258eebdfb22f95a8a44d31b0eab639aed0a0c4b Mon Sep 17 00:00:00 2001
+From 713520f91da01ec734ffa6f7a57da234f7e2cde5 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a258eebdfb22f95a8a44d31b0eab639aed0a0c4b ]
@@ -38 +40,0 @@
-Cc: stable@dpdk.org
@@ -45,2 +47,2 @@
- lib/bpf/bpf_validate.c | 305 ++++++++++++++++++++++++++++++++++-------
- 1 file changed, 255 insertions(+), 50 deletions(-)
+ lib/bpf/bpf_validate.c | 304 ++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 254 insertions(+), 50 deletions(-)
@@ -49 +51 @@
-index 11344fff4d..4f47d6dc7b 100644
+index 65f9d114bc..da8d5f3deb 100644
@@ -123,4 +125,4 @@
--		RTE_BPF_LOG_LINE(ERR, "%s: program boundary violation at pc: %u, "
--			"next pc: %u",
-+		RTE_BPF_LOG_LINE(ERR,
-+			"%s: program boundary violation at pc: %u, next pc: %u",
+-		RTE_BPF_LOG(ERR, "%s: program boundary violation at pc: %u, "
+-			"next pc: %u\n",
++		RTE_BPF_LOG(ERR,
++			"%s: program boundary violation at pc: %u, next pc: %u\n",
@@ -130 +132 @@
-@@ -2091,60 +2105,114 @@ validate(struct bpf_verifier *bvf)
+@@ -2091,60 +2105,113 @@ validate(struct bpf_verifier *bvf)
@@ -241,3 +243,2 @@
-+	RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;",
-+		__func__, bvf, get_node_idx(bvf, node), node->evst.start,
-+		node->evst.nb_safe);
++	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;\n", __func__, bvf, get_node_idx(bvf, node),
++		    node->evst.start, node->evst.nb_safe);
@@ -261,3 +262,3 @@
- 		RTE_BPF_LOG_LINE(ERR,
- 			"%s: internal error (out of space) at pc: %u",
-@@ -2156,11 +2224,13 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+ 		RTE_BPF_LOG(ERR,
+ 			"%s: internal error (out of space) at pc: %u\n",
+@@ -2156,11 +2223,13 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
@@ -272 +273 @@
- 	RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;",
+ 	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
@@ -279 +280 @@
-@@ -2169,14 +2239,15 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+@@ -2169,14 +2238,15 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
@@ -286 +287 @@
- 	RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;",
+ 	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
@@ -300 +301 @@
-@@ -2193,26 +2264,124 @@ log_dbg_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
+@@ -2193,26 +2263,124 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
@@ -302 +303 @@
- 	RTE_LOG(DEBUG, BPF,
+ 	rte_log(loglvl, rte_bpf_logtype,
@@ -405,5 +406,5 @@
-+	RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
-+		"next->evst.start=%p, next->evst.nb_safe=%u",
-+		__func__, bvf, get_node_idx(bvf, node),
-+		get_node_idx(bvf, next), rc,
-+		next->evst.start, next->evst.nb_safe);
++	RTE_BPF_LOG(DEBUG,
++		    "%s(bvf=%p,node=%u,next=%u) returns %d, "
++		    "next->evst.start=%p, next->evst.nb_safe=%u\n",
++		    __func__, bvf, get_node_idx(bvf, node), get_node_idx(bvf, next), rc, next->evst.start,
++		    next->evst.nb_safe);
@@ -434 +435 @@
-@@ -2223,6 +2392,13 @@ evaluate(struct bpf_verifier *bvf)
+@@ -2223,6 +2391,13 @@ evaluate(struct bpf_verifier *bvf)
@@ -448 +449 @@
-@@ -2246,6 +2422,8 @@ evaluate(struct bpf_verifier *bvf)
+@@ -2246,6 +2421,8 @@ evaluate(struct bpf_verifier *bvf)
@@ -457 +458 @@
-@@ -2259,11 +2437,14 @@ evaluate(struct bpf_verifier *bvf)
+@@ -2259,11 +2436,14 @@ evaluate(struct bpf_verifier *bvf)
@@ -472 +473 @@
- 					RTE_BPF_LOG_LINE(ERR, "%s: %s at pc: %u",
+ 					RTE_BPF_LOG(ERR, "%s: %s at pc: %u\n",
@@ -474 +475 @@
-@@ -2277,21 +2458,37 @@ evaluate(struct bpf_verifier *bvf)
+@@ -2277,21 +2457,37 @@ evaluate(struct bpf_verifier *bvf)
@@ -517 +518 @@
-@@ -2300,6 +2497,14 @@ evaluate(struct bpf_verifier *bvf)
+@@ -2300,6 +2496,14 @@ evaluate(struct bpf_verifier *bvf)
@@ -521,7 +522,7 @@
-+	RTE_LOG(DEBUG, BPF, "%s(%p) returns %d, stats:\n"
-+		"node evaluations=%u;\n"
-+		"state pruned=%u;\n"
-+		"state saves=%u;\n"
-+		"state restores=%u;\n",
-+		__func__, bvf, rc,
-+		stats.nb_eval, stats.nb_prune, stats.nb_save, stats.nb_restore);
++	RTE_BPF_LOG(DEBUG,
++		    "%s(%p) returns %d, stats:\n"
++		    "node evaluations=%u;\n"
++		    "state pruned=%u;\n"
++		    "state saves=%u;\n"
++		    "state restores=%u;\n",
++		    __func__, bvf, rc, stats.nb_eval, stats.nb_prune, stats.nb_save, stats.nb_restore);

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

* patch 'telemetry: fix connection parameter parsing' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (11 preceding siblings ...)
  2024-08-12 12:48       ` patch 'bpf: fix load hangs with six IPv6 addresses' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'baseband/la12xx: forbid secondary process' " Xueming Li
                         ` (144 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Zhichao Zeng; +Cc: xuemingl, Song Jiale, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f798848548c19b7f7ad896d76c66d7ab678f75b4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f798848548c19b7f7ad896d76c66d7ab678f75b4 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Fri, 21 Jun 2024 10:40:37 +0800
Subject: [PATCH] telemetry: fix connection parameter parsing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit efdf81829076198189ba6ccbb2e5c50270f56992 ]

For calling memcpy when the source and destination addresses are the same,
there is a small probability that there will be a copy error issue in some
environments, resulting in a failure to connect.

This patch uses memmove instead of memcpy to avoid this issue.

Fixes: b80fe1805eee ("telemetry: introduce backward compatibility")

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
---
 lib/telemetry/telemetry_legacy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/telemetry/telemetry_legacy.c b/lib/telemetry/telemetry_legacy.c
index 4c1d1c353a..578230732c 100644
--- a/lib/telemetry/telemetry_legacy.c
+++ b/lib/telemetry/telemetry_legacy.c
@@ -94,7 +94,7 @@ register_client(const char *cmd __rte_unused, const char *params,
 	}
 #ifndef RTE_EXEC_ENV_WINDOWS
 	strlcpy(data, strchr(params, ':'), sizeof(data));
-	memcpy(data, &data[strlen(":\"")], strlen(data));
+	memmove(data, &data[strlen(":\"")], strlen(data));
 	if (!strchr(data, '\"')) {
 		fprintf(stderr, "Invalid client data\n");
 		return -1;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.032890458 +0800
+++ 0013-telemetry-fix-connection-parameter-parsing.patch	2024-08-12 20:44:01.905069257 +0800
@@ -1 +1 @@
-From efdf81829076198189ba6ccbb2e5c50270f56992 Mon Sep 17 00:00:00 2001
+From f798848548c19b7f7ad896d76c66d7ab678f75b4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit efdf81829076198189ba6ccbb2e5c50270f56992 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'baseband/la12xx: forbid secondary process' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (12 preceding siblings ...)
  2024-08-12 12:48       ` patch 'telemetry: fix connection parameter parsing' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/virtio-user: fix control queue allocation for non-vDPA' " Xueming Li
                         ` (143 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: xuemingl, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=15d3dfa07ad629ab800de05c3a825227c59e3081

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 15d3dfa07ad629ab800de05c3a825227c59e3081 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Tue, 2 Jul 2024 11:39:21 +0530
Subject: [PATCH] baseband/la12xx: forbid secondary process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 95547dc69119154c85abfa7e8523e83a7ac05c9e ]

The la12xx driver do not have any checks for secondary process
and it causes the system to try to initialize the driver, causing
segmentation faults.
LA12xx driver do not support multi-processing.
Return when not called from Primary process.

Fixes: f218a1f92017 ("baseband/la12xx: introduce NXP LA12xx driver")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/la12xx/bbdev_la12xx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c
index bb754a5395..1a56e73abd 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx.c
+++ b/drivers/baseband/la12xx/bbdev_la12xx.c
@@ -1084,6 +1084,9 @@ la12xx_bbdev_remove(struct rte_vdev_device *vdev)
 
 	PMD_INIT_FUNC_TRACE();
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
 	if (vdev == NULL)
 		return -EINVAL;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.072655755 +0800
+++ 0014-baseband-la12xx-forbid-secondary-process.patch	2024-08-12 20:44:01.905069257 +0800
@@ -1 +1 @@
-From 95547dc69119154c85abfa7e8523e83a7ac05c9e Mon Sep 17 00:00:00 2001
+From 15d3dfa07ad629ab800de05c3a825227c59e3081 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 95547dc69119154c85abfa7e8523e83a7ac05c9e ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/virtio-user: fix control queue allocation for non-vDPA' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (13 preceding siblings ...)
  2024-08-12 12:48       ` patch 'baseband/la12xx: forbid secondary process' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'crypto/cnxk: fix out-of-bound access' " Xueming Li
                         ` (142 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: xuemingl, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ea90bc49fc49710b0a1eea6f7abd237d677f134b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ea90bc49fc49710b0a1eea6f7abd237d677f134b Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 3 Jul 2024 17:59:29 +0200
Subject: [PATCH] net/virtio-user: fix control queue allocation for non-vDPA
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8b04c3e52344bebf31858066204712d73fd86a75 ]

For non-vDPA backends, where the backend does not support
control queue, it is still emulated in the Virtio-user
layer to handle multiqueue feature. The frontend setups a
control queue, which is hidden to the device. It means the
number of vrings metadata to allocate should be based on
the frontend features and not the device features.

This patch fixes out-of-range access reported by ASan,
which could sometimes be noticed at exit time by a
segmentation fault when disabled:

Fixes: b80947743f5e ("net/virtio-user: fix control queue allocation")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 209435a865..1bfd6aba80 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -609,7 +609,7 @@ virtio_user_alloc_vrings(struct virtio_user_dev *dev)
 	bool packed_ring = !!(dev->device_features & (1ull << VIRTIO_F_RING_PACKED));
 
 	nr_vrings = dev->max_queue_pairs * 2;
-	if (dev->device_features & (1ull << VIRTIO_NET_F_CTRL_VQ))
+	if (dev->frontend_features & (1ull << VIRTIO_NET_F_CTRL_VQ))
 		nr_vrings++;
 
 	dev->callfds = rte_zmalloc("virtio_user_dev", nr_vrings * sizeof(*dev->callfds), 0);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.112658452 +0800
+++ 0015-net-virtio-user-fix-control-queue-allocation-for-non.patch	2024-08-12 20:44:01.905069257 +0800
@@ -1 +1 @@
-From 8b04c3e52344bebf31858066204712d73fd86a75 Mon Sep 17 00:00:00 2001
+From ea90bc49fc49710b0a1eea6f7abd237d677f134b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8b04c3e52344bebf31858066204712d73fd86a75 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index b2c6c2b7df..fed66d2ae9 100644
+index 209435a865..1bfd6aba80 100644
@@ -31 +33 @@
-@@ -624,7 +624,7 @@ virtio_user_alloc_vrings(struct virtio_user_dev *dev)
+@@ -609,7 +609,7 @@ virtio_user_alloc_vrings(struct virtio_user_dev *dev)

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

* patch 'crypto/cnxk: fix out-of-bound access' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (14 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/virtio-user: fix control queue allocation for non-vDPA' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'crypto/cnxk: fix ECDH public key verification' " Xueming Li
                         ` (141 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6034788bd6b026603f12aeafd566adf6bfc4d9ca

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6034788bd6b026603f12aeafd566adf6bfc4d9ca Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Sat, 15 Jun 2024 17:03:01 +0530
Subject: [PATCH] crypto/cnxk: fix out-of-bound access
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 49ad3426882807bbeec22311bdb28fcab8c3ee13 ]

Fix out-of-bound issues reported by coverity scan.

Coverity issue: 403164, 403165, 403166, 403167, 403169, 403170, 403171,
                403172, 403173, 403174, 403176, 403178, 403179, 403180
Fixes: 5686b573e4bb ("crypto/cnxk: support SM2")
Fixes: badc0c6f6d6a ("cryptodev: set private and public keys in EC session")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 drivers/common/cnxk/roc_ae.h  | 16 +++++++++-------
 drivers/crypto/cnxk/cnxk_ae.h | 24 +++++++++++++++++++-----
 2 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/drivers/common/cnxk/roc_ae.h b/drivers/common/cnxk/roc_ae.h
index a9a08d9fb9..7886b9d107 100644
--- a/drivers/common/cnxk/roc_ae.h
+++ b/drivers/common/cnxk/roc_ae.h
@@ -53,29 +53,31 @@ typedef enum {
 	ROC_AE_ERR_ECC_POINT_NOT_ON_CURVE = 0x11
 } roc_ae_error_code;
 
+#define ROC_AE_EC_DATA_MAX 66
+
 /* Prime and order fields of built-in elliptic curves */
 struct roc_ae_ec_group {
 	struct {
 		/* P521 maximum length */
-		uint8_t data[66];
+		uint8_t data[ROC_AE_EC_DATA_MAX];
 		unsigned int length;
 	} prime;
 
 	struct {
 		/* P521 maximum length */
-		uint8_t data[66];
+		uint8_t data[ROC_AE_EC_DATA_MAX];
 		unsigned int length;
 	} order;
 
 	struct {
 		/* P521 maximum length */
-		uint8_t data[66];
+		uint8_t data[ROC_AE_EC_DATA_MAX];
 		unsigned int length;
 	} consta;
 
 	struct {
 		/* P521 maximum length */
-		uint8_t data[66];
+		uint8_t data[ROC_AE_EC_DATA_MAX];
 		unsigned int length;
 	} constb;
 };
@@ -86,18 +88,18 @@ struct roc_ae_ec_ctx {
 
 	/* Private key */
 	struct {
-		uint8_t data[66];
+		uint8_t data[ROC_AE_EC_DATA_MAX];
 		unsigned int length;
 	} pkey;
 
 	/* Public key */
 	struct {
 		struct {
-			uint8_t data[66];
+			uint8_t data[ROC_AE_EC_DATA_MAX];
 			unsigned int length;
 		} x;
 		struct {
-			uint8_t data[66];
+			uint8_t data[ROC_AE_EC_DATA_MAX];
 			unsigned int length;
 		} y;
 	} q;
diff --git a/drivers/crypto/cnxk/cnxk_ae.h b/drivers/crypto/cnxk/cnxk_ae.h
index ea11e093bf..a843d6b5ef 100644
--- a/drivers/crypto/cnxk/cnxk_ae.h
+++ b/drivers/crypto/cnxk/cnxk_ae.h
@@ -205,16 +205,22 @@ cnxk_ae_fill_ec_params(struct cnxk_ae_sess *sess,
 		return 0;
 
 	ec->pkey.length = xform->ec.pkey.length;
-	if (xform->ec.pkey.length)
-		rte_memcpy(ec->pkey.data, xform->ec.pkey.data, xform->ec.pkey.length);
+	if (ec->pkey.length > ROC_AE_EC_DATA_MAX)
+		ec->pkey.length = ROC_AE_EC_DATA_MAX;
+	if (ec->pkey.length)
+		rte_memcpy(ec->pkey.data, xform->ec.pkey.data, ec->pkey.length);
 
 	ec->q.x.length = xform->ec.q.x.length;
-	if (xform->ec.q.x.length)
-		rte_memcpy(ec->q.x.data, xform->ec.q.x.data, xform->ec.q.x.length);
+	if (ec->q.x.length > ROC_AE_EC_DATA_MAX)
+		ec->q.x.length = ROC_AE_EC_DATA_MAX;
+	if (ec->q.x.length)
+		rte_memcpy(ec->q.x.data, xform->ec.q.x.data, ec->q.x.length);
 
 	ec->q.y.length = xform->ec.q.y.length;
+	if (ec->q.y.length > ROC_AE_EC_DATA_MAX)
+		ec->q.y.length = ROC_AE_EC_DATA_MAX;
 	if (xform->ec.q.y.length)
-		rte_memcpy(ec->q.y.data, xform->ec.q.y.data, xform->ec.q.y.length);
+		rte_memcpy(ec->q.y.data, xform->ec.q.y.data, ec->q.y.length);
 
 	return 0;
 }
@@ -735,7 +741,11 @@ cnxk_ae_sm2_sign_prep(struct rte_crypto_sm2_op_param *sm2,
 	uint8_t *dptr;
 
 	prime_len = ec_grp->prime.length;
+	if (prime_len > ROC_AE_EC_DATA_MAX)
+		prime_len = ROC_AE_EC_DATA_MAX;
 	order_len = ec_grp->order.length;
+	if (order_len > ROC_AE_EC_DATA_MAX)
+		order_len = ROC_AE_EC_DATA_MAX;
 
 	/* Truncate input length to curve prime length */
 	if (message_len > prime_len)
@@ -822,7 +832,11 @@ cnxk_ae_sm2_verify_prep(struct rte_crypto_sm2_op_param *sm2,
 	uint8_t *dptr;
 
 	prime_len = ec_grp->prime.length;
+	if (prime_len > ROC_AE_EC_DATA_MAX)
+		prime_len = ROC_AE_EC_DATA_MAX;
 	order_len = ec_grp->order.length;
+	if (order_len > ROC_AE_EC_DATA_MAX)
+		order_len = ROC_AE_EC_DATA_MAX;
 
 	/* Truncate input length to curve prime length */
 	if (message_len > prime_len)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.150609149 +0800
+++ 0016-crypto-cnxk-fix-out-of-bound-access.patch	2024-08-12 20:44:01.905069257 +0800
@@ -1 +1 @@
-From 49ad3426882807bbeec22311bdb28fcab8c3ee13 Mon Sep 17 00:00:00 2001
+From 6034788bd6b026603f12aeafd566adf6bfc4d9ca Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 49ad3426882807bbeec22311bdb28fcab8c3ee13 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'crypto/cnxk: fix ECDH public key verification' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (15 preceding siblings ...)
  2024-08-12 12:48       ` patch 'crypto/cnxk: fix out-of-bound access' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'app/crypto-perf: remove redundant local variable' " Xueming Li
                         ` (140 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: xuemingl, Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e585a0db98dbdbed54addd2cec7db937a4a6377a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e585a0db98dbdbed54addd2cec7db937a4a6377a Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Sat, 15 Jun 2024 17:04:31 +0530
Subject: [PATCH] crypto/cnxk: fix ECDH public key verification
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d29c4e0a4bea2d8aac548371115402579e6dd5f8 ]

Public key verification is applicable only for ECDH.
Incorrect check in current dequeue operation leads to
malfunction on ECDSA verification, hence added an additional check.

Fixes: baae0994fa96 ("crypto/cnxk: support ECDH")
Fixes: 5c9025583167 ("crypto/cnxk: fix CN9K ECDH public key verification")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 23 ++++++++++++++---------
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c  | 21 +++++++++++++--------
 2 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
index 997110e3d3..c96cf2b3a1 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
@@ -861,15 +861,20 @@ cn10k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp,
 
 		return;
 	} else if (cop->type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC &&
-			   cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION &&
-			   cop->asym->ecdh.ke_type == RTE_CRYPTO_ASYM_KE_PUB_KEY_VERIFY) {
-		if (likely(compcode == CPT_COMP_GOOD)) {
-			if (uc_compcode == ROC_AE_ERR_ECC_POINT_NOT_ON_CURVE) {
-				cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
-				return;
-			} else if (uc_compcode == ROC_AE_ERR_ECC_PAI) {
-				cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
-				return;
+		   cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
+		struct cnxk_ae_sess *sess;
+
+		sess = (struct cnxk_ae_sess *)cop->asym->session;
+		if (sess->xfrm_type == RTE_CRYPTO_ASYM_XFORM_ECDH &&
+		    cop->asym->ecdh.ke_type == RTE_CRYPTO_ASYM_KE_PUB_KEY_VERIFY) {
+			if (likely(compcode == CPT_COMP_GOOD)) {
+				if (uc_compcode == ROC_AE_ERR_ECC_POINT_NOT_ON_CURVE) {
+					cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
+					return;
+				} else if (uc_compcode == ROC_AE_ERR_ECC_PAI) {
+					cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
+					return;
+				}
 			}
 		}
 	}
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
index 442cd8e5a9..eb5575b7ec 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
@@ -579,14 +579,19 @@ cn9k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp, struct rte_crypto_op *cop,
 			if (res->uc_compcode == ROC_SE_ERR_GC_ICV_MISCOMPARE)
 				cop->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
 			else if (cop->type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC &&
-				 cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION &&
-				 cop->asym->ecdh.ke_type == RTE_CRYPTO_ASYM_KE_PUB_KEY_VERIFY) {
-				if (res->uc_compcode == ROC_AE_ERR_ECC_POINT_NOT_ON_CURVE) {
-					cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
-					return;
-				} else if (res->uc_compcode == ROC_AE_ERR_ECC_PAI) {
-					cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
-					return;
+				 cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
+				struct cnxk_ae_sess *sess;
+
+				sess = (struct cnxk_ae_sess *)cop->asym->session;
+				if (sess->xfrm_type == RTE_CRYPTO_ASYM_XFORM_ECDH &&
+				    cop->asym->ecdh.ke_type == RTE_CRYPTO_ASYM_KE_PUB_KEY_VERIFY) {
+					if (res->uc_compcode == ROC_AE_ERR_ECC_POINT_NOT_ON_CURVE) {
+						cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
+						return;
+					} else if (res->uc_compcode == ROC_AE_ERR_ECC_PAI) {
+						cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
+						return;
+					}
 				}
 			} else
 				cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.177609747 +0800
+++ 0017-crypto-cnxk-fix-ECDH-public-key-verification.patch	2024-08-12 20:44:01.915069259 +0800
@@ -1 +1 @@
-From d29c4e0a4bea2d8aac548371115402579e6dd5f8 Mon Sep 17 00:00:00 2001
+From e585a0db98dbdbed54addd2cec7db937a4a6377a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d29c4e0a4bea2d8aac548371115402579e6dd5f8 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 720b756001..07bd13b16d 100644
+index 997110e3d3..c96cf2b3a1 100644
@@ -25 +27 @@
-@@ -1186,15 +1186,20 @@ cn10k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp, struct rte_crypto_op *cop
+@@ -861,15 +861,20 @@ cn10k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp,
@@ -56 +58 @@
-index 96a75a7797..f443cb9563 100644
+index 442cd8e5a9..eb5575b7ec 100644
@@ -59 +61 @@
-@@ -523,14 +523,19 @@ cn9k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp, struct rte_crypto_op *cop,
+@@ -579,14 +579,19 @@ cn9k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp, struct rte_crypto_op *cop,

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

* patch 'app/crypto-perf: remove redundant local variable' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (16 preceding siblings ...)
  2024-08-12 12:48       ` patch 'crypto/cnxk: fix ECDH public key verification' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'app/crypto-perf: fix result for asymmetric' " Xueming Li
                         ` (139 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: xuemingl, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=74697625672acd8b1fa108e9e29302348908eef1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 74697625672acd8b1fa108e9e29302348908eef1 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 14:17:41 +0530
Subject: [PATCH] app/crypto-perf: remove redundant local variable
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 766cac609427cc8ef0f6680a73c4dcd3ac4e2a0d ]

Remove redundant local variable used for asym session.

Fixes: a29bb2489886 ("cryptodev: hide asymmetric session structure")
Fixes: 2973dbf93b44 ("security: hide session structure")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test-crypto-perf/cperf_ops.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index 84945d1313..0e79133310 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -21,7 +21,6 @@ cperf_set_ops_asym(struct rte_crypto_op **ops,
 		   uint64_t *tsc_start __rte_unused)
 {
 	uint16_t i;
-	void *asym_sess = (void *)sess;
 
 	for (i = 0; i < nb_ops; i++) {
 		struct rte_crypto_asym_op *asym_op = ops[i]->asym;
@@ -31,7 +30,7 @@ cperf_set_ops_asym(struct rte_crypto_op **ops,
 		asym_op->modex.base.length = options->modex_data->base.len;
 		asym_op->modex.result.data = options->modex_data->result.data;
 		asym_op->modex.result.length = options->modex_data->result.len;
-		rte_crypto_op_attach_asym_session(ops[i], asym_sess);
+		rte_crypto_op_attach_asym_session(ops[i], sess);
 	}
 }
 
@@ -64,7 +63,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
 
 	for (i = 0; i < nb_ops; i++) {
 		struct rte_crypto_sym_op *sym_op = ops[i]->sym;
-		void *sec_sess = (void *)sess;
 		uint32_t buf_sz;
 
 		uint32_t *per_pkt_hfn = rte_crypto_op_ctod_offset(ops[i],
@@ -72,7 +70,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
 		*per_pkt_hfn = options->pdcp_ses_hfn_en ? 0 : PDCP_DEFAULT_HFN;
 
 		ops[i]->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
-		rte_security_attach_session(ops[i], sec_sess);
+		rte_security_attach_session(ops[i], sess);
 		sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] +
 							src_buf_offset);
 
@@ -129,7 +127,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
 		uint16_t iv_offset __rte_unused, uint32_t *imix_idx,
 		uint64_t *tsc_start)
 {
-	void *sec_sess = sess;
 	const uint32_t test_buffer_size = options->test_buffer_size;
 	const uint32_t headroom_sz = options->headroom_sz;
 	const uint32_t segment_sz = options->segment_sz;
@@ -143,7 +140,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
 		struct rte_mbuf *m = sym_op->m_src;
 
 		ops[i]->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
-		rte_security_attach_session(ops[i], sec_sess);
+		rte_security_attach_session(ops[i], sess);
 		sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] +
 							src_buf_offset);
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.205405144 +0800
+++ 0018-app-crypto-perf-remove-redundant-local-variable.patch	2024-08-12 20:44:01.915069259 +0800
@@ -1 +1 @@
-From 766cac609427cc8ef0f6680a73c4dcd3ac4e2a0d Mon Sep 17 00:00:00 2001
+From 74697625672acd8b1fa108e9e29302348908eef1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 766cac609427cc8ef0f6680a73c4dcd3ac4e2a0d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 4ca001b721..a802281a71 100644
+index 84945d1313..0e79133310 100644
@@ -39 +41 @@
-@@ -62,7 +61,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
+@@ -64,7 +63,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
@@ -47 +49 @@
-@@ -70,7 +68,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
+@@ -72,7 +70,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
@@ -56 +58 @@
-@@ -127,7 +125,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
+@@ -129,7 +127,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
@@ -62,4 +64,4 @@
- 	uint64_t tsc_start_temp, tsc_end_temp;
- 	uint16_t i = 0;
-@@ -140,7 +137,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
- 		uint32_t offset = test_buffer_size;
+ 	const uint32_t headroom_sz = options->headroom_sz;
+ 	const uint32_t segment_sz = options->segment_sz;
+@@ -143,7 +140,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
+ 		struct rte_mbuf *m = sym_op->m_src;
@@ -70,2 +72,2 @@
- 		sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] + src_buf_offset);
- 		sym_op->m_src->pkt_len = test_buffer_size;
+ 		sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] +
+ 							src_buf_offset);

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

* patch 'app/crypto-perf: fix result for asymmetric' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (17 preceding siblings ...)
  2024-08-12 12:48       ` patch 'app/crypto-perf: remove redundant local variable' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'test/crypto: validate modex from first non-zero' " Xueming Li
                         ` (138 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: xuemingl, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ede34a435958af20f37984335e148359b80650d9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ede34a435958af20f37984335e148359b80650d9 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 14:17:42 +0530
Subject: [PATCH] app/crypto-perf: fix result for asymmetric
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 022f9bf9d4571092be6bb98cea12efb1aa8fe0af ]

For asymmetric op, private test data should be stored after
rte_crypto_asym_op struct.

Fixes: a538d1d2d01e ("test/crypto-perf: extend asymmetric crypto throughput test")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test-crypto-perf/cperf_test_common.c  |  6 ++++--
 app/test-crypto-perf/cperf_test_latency.c | 14 +++++++++++---
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 94d39fb177..6b8ab65731 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -149,11 +149,11 @@ cperf_alloc_common_memory(const struct cperf_options *options,
 	int ret;
 
 	/* Calculate the object size */
-	uint16_t crypto_op_size = sizeof(struct rte_crypto_op) +
-		sizeof(struct rte_crypto_sym_op);
+	uint16_t crypto_op_size = sizeof(struct rte_crypto_op);
 	uint16_t crypto_op_private_size;
 
 	if (options->op_type == CPERF_ASYM_MODEX) {
+		crypto_op_size += sizeof(struct rte_crypto_asym_op);
 		snprintf(pool_name, RTE_MEMPOOL_NAMESIZE, "perf_asym_op_pool%u",
 			 rte_socket_id());
 		*pool = rte_crypto_op_pool_create(
@@ -170,6 +170,8 @@ cperf_alloc_common_memory(const struct cperf_options *options,
 		return 0;
 	}
 
+	crypto_op_size += sizeof(struct rte_crypto_sym_op);
+
 	/*
 	 * If doing AES-CCM, IV field needs to be 16 bytes long,
 	 * and AAD field needs to be long enough to have 18 bytes,
diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
index 484bc9eb4e..e55d293db3 100644
--- a/app/test-crypto-perf/cperf_test_latency.c
+++ b/app/test-crypto-perf/cperf_test_latency.c
@@ -121,7 +121,11 @@ store_timestamp(struct rte_crypto_op *op, uint64_t timestamp)
 {
 	struct priv_op_data *priv_data;
 
-	priv_data = (struct priv_op_data *) (op->sym + 1);
+	if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+		priv_data = (struct priv_op_data *) (op->sym + 1);
+	else
+		priv_data = (struct priv_op_data *) (op->asym + 1);
+
 	priv_data->result->status = op->status;
 	priv_data->result->tsc_end = timestamp;
 }
@@ -250,9 +254,13 @@ cperf_latency_test_runner(void *arg)
 				ctx->res[tsc_idx].tsc_start = tsc_start;
 				/*
 				 * Private data structure starts after the end of the
-				 * rte_crypto_sym_op structure.
+				 * rte_crypto_sym_op (or rte_crypto_asym_op) structure.
 				 */
-				priv_data = (struct priv_op_data *) (ops[i]->sym + 1);
+				if (ops[i]->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+					priv_data = (struct priv_op_data *) (ops[i]->sym + 1);
+				else
+					priv_data = (struct priv_op_data *) (ops[i]->asym + 1);
+
 				priv_data->result = (void *)&ctx->res[tsc_idx];
 				tsc_idx++;
 			}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.231047242 +0800
+++ 0019-app-crypto-perf-fix-result-for-asymmetric.patch	2024-08-12 20:44:01.915069259 +0800
@@ -1 +1 @@
-From 022f9bf9d4571092be6bb98cea12efb1aa8fe0af Mon Sep 17 00:00:00 2001
+From ede34a435958af20f37984335e148359b80650d9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 022f9bf9d4571092be6bb98cea12efb1aa8fe0af ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -47 +49 @@
-index b8ad6bf4d4..376847e761 100644
+index 484bc9eb4e..e55d293db3 100644
@@ -50 +52 @@
-@@ -122,7 +122,11 @@ store_timestamp(struct rte_crypto_op *op, uint64_t timestamp)
+@@ -121,7 +121,11 @@ store_timestamp(struct rte_crypto_op *op, uint64_t timestamp)
@@ -63 +65 @@
-@@ -251,9 +255,13 @@ cperf_latency_test_runner(void *arg)
+@@ -250,9 +254,13 @@ cperf_latency_test_runner(void *arg)

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

* patch 'test/crypto: validate modex from first non-zero' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (18 preceding siblings ...)
  2024-08-12 12:48       ` patch 'app/crypto-perf: fix result for asymmetric' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'crypto/cnxk: fix minimal input normalization' " Xueming Li
                         ` (137 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=7978b75d1babcaae9b6c9633b6915dfaba2c6138

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7978b75d1babcaae9b6c9633b6915dfaba2c6138 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 15:33:40 +0530
Subject: [PATCH] test/crypto: validate modex from first non-zero
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2162d32c1c3b3495b6f0b053e6e9c61092b5704a ]

At present, there is no specification of whether modex op output
can carry leading zeroes without changing the value. OpenSSL strips
leading zeroes, but other hardware need not be. Hence, when output
is compared against expected result, validation could start from
first non-zero.

Fixes: 1ffefe00f184 ("test/crypto: add modexp and modinv functions")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 app/test/test_cryptodev_asym.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 2c745a7f7c..fec53f87db 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -3200,6 +3200,27 @@ static int send_one(void)
 	return TEST_SUCCESS;
 }
 
+static int
+modular_cmpeq(const uint8_t *a, const uint8_t *b, size_t len)
+{
+	const uint8_t *new_a = a, *new_b = b;
+	size_t i, j;
+
+	/* Strip leading NUL bytes */
+	for (i = 0; i < len; i++)
+		if (a[i] != 0)
+			new_a = &a[i];
+
+	for (j = 0; j < len; j++)
+		if (b[j] != 0)
+			new_b = &b[i];
+
+	if (i != j || memcmp(new_a, new_b, len - i))
+		return 1;
+
+	return 0;
+}
+
 static int
 modular_exponentiation(const void *test_data)
 {
@@ -3234,9 +3255,9 @@ modular_exponentiation(const void *test_data)
 
 	TEST_ASSERT_SUCCESS(send_one(),
 		"Failed to process crypto op");
-	TEST_ASSERT_BUFFERS_ARE_EQUAL(vector->reminder.data,
+	TEST_ASSERT_SUCCESS(modular_cmpeq(vector->reminder.data,
 			self->result_op->asym->modex.result.data,
-			self->result_op->asym->modex.result.length,
+			self->result_op->asym->modex.result.length),
 			"operation verification failed\n");
 
 	return TEST_SUCCESS;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.254848141 +0800
+++ 0020-test-crypto-validate-modex-from-first-non-zero.patch	2024-08-12 20:44:01.925069261 +0800
@@ -1 +1 @@
-From 2162d32c1c3b3495b6f0b053e6e9c61092b5704a Mon Sep 17 00:00:00 2001
+From 7978b75d1babcaae9b6c9633b6915dfaba2c6138 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2162d32c1c3b3495b6f0b053e6e9c61092b5704a ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'crypto/cnxk: fix minimal input normalization' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (19 preceding siblings ...)
  2024-08-12 12:48       ` patch 'test/crypto: validate modex from first non-zero' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'cryptodev: fix build without crypto callbacks' " Xueming Li
                         ` (136 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=fbb350108ffb8cc68c6bf96178f17d33fb7eaa3d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fbb350108ffb8cc68c6bf96178f17d33fb7eaa3d Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 15:48:18 +0530
Subject: [PATCH] crypto/cnxk: fix minimal input normalization
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 42ebfb0380cfc5e7c82555648b2ce064a9f4a3ad ]

Fix modex to nomalize input only when MSW is zero.

Fixes: 5a3513caeb45 ("crypto/cnxk: add asymmetric session")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 drivers/crypto/cnxk/cnxk_ae.h | 30 +++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)

diff --git a/drivers/crypto/cnxk/cnxk_ae.h b/drivers/crypto/cnxk/cnxk_ae.h
index a843d6b5ef..ef9cb5eb91 100644
--- a/drivers/crypto/cnxk/cnxk_ae.h
+++ b/drivers/crypto/cnxk/cnxk_ae.h
@@ -49,13 +49,22 @@ struct cnxk_ae_sess {
 };
 
 static __rte_always_inline void
-cnxk_ae_modex_param_normalize(uint8_t **data, size_t *len)
+cnxk_ae_modex_param_normalize(uint8_t **data, size_t *len, size_t max)
 {
+	uint8_t msw_len = *len % 8;
+	uint64_t msw_val = 0;
 	size_t i;
 
-	/* Strip leading NUL bytes */
-	for (i = 0; i < *len; i++) {
-		if ((*data)[i] != 0)
+	if (*len <= 8)
+		return;
+
+	memcpy(&msw_val, *data, msw_len);
+	if (msw_val != 0)
+		return;
+
+	for (i = msw_len; i < *len && (*len - i) < max; i += 8) {
+		memcpy(&msw_val, &(*data)[i], 8);
+		if (msw_val != 0)
 			break;
 	}
 	*data += i;
@@ -72,8 +81,8 @@ cnxk_ae_fill_modex_params(struct cnxk_ae_sess *sess,
 	uint8_t *exp = xform->modex.exponent.data;
 	uint8_t *mod = xform->modex.modulus.data;
 
-	cnxk_ae_modex_param_normalize(&mod, &mod_len);
-	cnxk_ae_modex_param_normalize(&exp, &exp_len);
+	cnxk_ae_modex_param_normalize(&mod, &mod_len, SIZE_MAX);
+	cnxk_ae_modex_param_normalize(&exp, &exp_len, mod_len);
 
 	if (unlikely(exp_len == 0 || mod_len == 0))
 		return -EINVAL;
@@ -288,7 +297,7 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
 	struct rte_crypto_mod_op_param mod_op;
 	uint64_t total_key_len;
 	union cpt_inst_w4 w4;
-	uint32_t base_len;
+	size_t base_len;
 	uint32_t dlen;
 	uint8_t *dptr;
 
@@ -296,8 +305,11 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
 
 	base_len = mod_op.base.length;
 	if (unlikely(base_len > mod_len)) {
-		op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
-		return -ENOTSUP;
+		cnxk_ae_modex_param_normalize(&mod_op.base.data, &base_len, mod_len);
+		if (base_len > mod_len) {
+			op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
+			return -ENOTSUP;
+		}
 	}
 
 	total_key_len = mod_len + exp_len;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.280194139 +0800
+++ 0021-crypto-cnxk-fix-minimal-input-normalization.patch	2024-08-12 20:44:01.935069263 +0800
@@ -1 +1 @@
-From 42ebfb0380cfc5e7c82555648b2ce064a9f4a3ad Mon Sep 17 00:00:00 2001
+From fbb350108ffb8cc68c6bf96178f17d33fb7eaa3d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 42ebfb0380cfc5e7c82555648b2ce064a9f4a3ad ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'cryptodev: fix build without crypto callbacks' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (20 preceding siblings ...)
  2024-08-12 12:48       ` patch 'crypto/cnxk: fix minimal input normalization' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'cryptodev: validate crypto callbacks from next node' " Xueming Li
                         ` (135 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Ganapati Kundapura; +Cc: xuemingl, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=578ee207209f1b321f12d59104fc9c273374ccee

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 578ee207209f1b321f12d59104fc9c273374ccee Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Thu, 27 Jun 2024 05:06:25 -0500
Subject: [PATCH] cryptodev: fix build without crypto callbacks
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cfa443351ef581b7189467842ca102ab710cb7d2 ]

Crypto callbacks APIs are available in header files but when
the macro RTE_CRYPTO_CALLBACKS unset, test application need to
put #ifdef in its code.

The test application should be able to build and run, regardless
DPDK library is built with RTE_CRYPTO_CALLBACKS defined or not.

Added ENOTSUP from the beginning of the APIs implementation
if RTE_CRYPTO_CALLBACKS macro is unset/undefined.

Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue callbacks")
Fixes: 5523a75af539 ("test/crypto: add case for enqueue/dequeue callbacks")

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_cryptodev.c     | 12 ++++++++++++
 lib/cryptodev/rte_cryptodev.c | 14 ++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 3464df22a1..c3e4737bf9 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -13663,6 +13663,12 @@ test_enq_callback_setup(void)
 	/* Test with invalid crypto device */
 	cb = rte_cryptodev_add_enq_callback(RTE_CRYPTO_MAX_DEVS,
 			qp_id, test_enq_callback, NULL);
+	if (rte_errno == ENOTSUP) {
+		RTE_LOG(ERR, USER1, "%s line %d: "
+			"rte_cryptodev_add_enq_callback() "
+			"Not supported, skipped\n", __func__, __LINE__);
+		return TEST_SKIPPED;
+	}
 	TEST_ASSERT_NULL(cb, "Add callback on qp %u on "
 			"cryptodev %u did not fail",
 			qp_id, RTE_CRYPTO_MAX_DEVS);
@@ -13778,6 +13784,12 @@ test_deq_callback_setup(void)
 	/* Test with invalid crypto device */
 	cb = rte_cryptodev_add_deq_callback(RTE_CRYPTO_MAX_DEVS,
 			qp_id, test_deq_callback, NULL);
+	if (rte_errno == ENOTSUP) {
+		RTE_LOG(ERR, USER1, "%s line %d: "
+			"rte_cryptodev_add_deq_callback() "
+			"Not supported, skipped\n", __func__, __LINE__);
+		return TEST_SKIPPED;
+	}
 	TEST_ASSERT_NULL(cb, "Add callback on qp %u on "
 			"cryptodev %u did not fail",
 			qp_id, RTE_CRYPTO_MAX_DEVS);
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index a3a8fc9c07..c5eb4ecb01 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -1489,6 +1489,10 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
 			       rte_cryptodev_callback_fn cb_fn,
 			       void *cb_arg)
 {
+#ifndef RTE_CRYPTO_CALLBACKS
+	rte_errno = ENOTSUP;
+	return NULL;
+#endif
 	struct rte_cryptodev *dev;
 	struct rte_cryptodev_cb_rcu *list;
 	struct rte_cryptodev_cb *cb, *tail;
@@ -1554,6 +1558,9 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
 				  uint16_t qp_id,
 				  struct rte_cryptodev_cb *cb)
 {
+#ifndef RTE_CRYPTO_CALLBACKS
+	return -ENOTSUP;
+#endif
 	struct rte_cryptodev *dev;
 	RTE_ATOMIC(struct rte_cryptodev_cb *) *prev_cb;
 	struct rte_cryptodev_cb *curr_cb;
@@ -1628,6 +1635,10 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
 			       rte_cryptodev_callback_fn cb_fn,
 			       void *cb_arg)
 {
+#ifndef RTE_CRYPTO_CALLBACKS
+	rte_errno = ENOTSUP;
+	return NULL;
+#endif
 	struct rte_cryptodev *dev;
 	struct rte_cryptodev_cb_rcu *list;
 	struct rte_cryptodev_cb *cb, *tail;
@@ -1694,6 +1705,9 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
 				  uint16_t qp_id,
 				  struct rte_cryptodev_cb *cb)
 {
+#ifndef RTE_CRYPTO_CALLBACKS
+	return -ENOTSUP;
+#endif
 	struct rte_cryptodev *dev;
 	RTE_ATOMIC(struct rte_cryptodev_cb *) *prev_cb;
 	struct rte_cryptodev_cb *curr_cb;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.304583637 +0800
+++ 0022-cryptodev-fix-build-without-crypto-callbacks.patch	2024-08-12 20:44:01.945069265 +0800
@@ -1 +1 @@
-From cfa443351ef581b7189467842ca102ab710cb7d2 Mon Sep 17 00:00:00 2001
+From 578ee207209f1b321f12d59104fc9c273374ccee Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cfa443351ef581b7189467842ca102ab710cb7d2 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 75f98b6744..6042db36a4 100644
+index 3464df22a1..c3e4737bf9 100644
@@ -31 +33 @@
-@@ -14920,6 +14920,12 @@ test_enq_callback_setup(void)
+@@ -13663,6 +13663,12 @@ test_enq_callback_setup(void)
@@ -44 +46 @@
-@@ -15035,6 +15041,12 @@ test_deq_callback_setup(void)
+@@ -13778,6 +13784,12 @@ test_deq_callback_setup(void)
@@ -58 +60 @@
-index 886eb7adc4..682c9f49d0 100644
+index a3a8fc9c07..c5eb4ecb01 100644
@@ -61 +63 @@
-@@ -1491,6 +1491,10 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
+@@ -1489,6 +1489,10 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
@@ -72 +74 @@
-@@ -1556,6 +1560,9 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
+@@ -1554,6 +1558,9 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
@@ -82 +84 @@
-@@ -1630,6 +1637,10 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
+@@ -1628,6 +1635,10 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
@@ -93 +95 @@
-@@ -1696,6 +1707,9 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
+@@ -1694,6 +1705,9 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,

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

* patch 'cryptodev: validate crypto callbacks from next node' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (21 preceding siblings ...)
  2024-08-12 12:48       ` patch 'cryptodev: fix build without crypto callbacks' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'examples/fips_validation: fix dereference and out-of-bound' " Xueming Li
                         ` (134 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Ganapati Kundapura; +Cc: xuemingl, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=9b3e2355812ed4d6fc82b74ceaad30914df0aea2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9b3e2355812ed4d6fc82b74ceaad30914df0aea2 Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Thu, 27 Jun 2024 05:06:26 -0500
Subject: [PATCH] cryptodev: validate crypto callbacks from next node
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e858d0c9612211ba43d6703cb7834697214a3fe1 ]

Crypto callbacks are invoked on checking from head node
which is always valid pointer.

This patch checks next node from the head node if callbacks
registered before invoking callbacks.

Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue callbacks")

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 lib/cryptodev/rte_cryptodev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 59c7d69da5..a42a4fc04e 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1910,7 +1910,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
 	nb_ops = fp_ops->dequeue_burst(qp, ops, nb_ops);
 
 #ifdef RTE_CRYPTO_CALLBACKS
-	if (unlikely(fp_ops->qp.deq_cb != NULL)) {
+	if (unlikely(fp_ops->qp.deq_cb[qp_id].next != NULL)) {
 		struct rte_cryptodev_cb_rcu *list;
 		struct rte_cryptodev_cb *cb;
 
@@ -1977,7 +1977,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
 	fp_ops = &rte_crypto_fp_ops[dev_id];
 	qp = fp_ops->qp.data[qp_id];
 #ifdef RTE_CRYPTO_CALLBACKS
-	if (unlikely(fp_ops->qp.enq_cb != NULL)) {
+	if (unlikely(fp_ops->qp.enq_cb[qp_id].next != NULL)) {
 		struct rte_cryptodev_cb_rcu *list;
 		struct rte_cryptodev_cb *cb;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.341035734 +0800
+++ 0023-cryptodev-validate-crypto-callbacks-from-next-node.patch	2024-08-12 20:44:01.955069267 +0800
@@ -1 +1 @@
-From e858d0c9612211ba43d6703cb7834697214a3fe1 Mon Sep 17 00:00:00 2001
+From 9b3e2355812ed4d6fc82b74ceaad30914df0aea2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e858d0c9612211ba43d6703cb7834697214a3fe1 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index c946f747fc..bec947f6d5 100644
+index 59c7d69da5..a42a4fc04e 100644

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

* patch 'examples/fips_validation: fix dereference and out-of-bound' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (22 preceding siblings ...)
  2024-08-12 12:48       ` patch 'cryptodev: validate crypto callbacks from next node' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'crypto/openssl: fix GCM and CCM thread unsafe contexts' " Xueming Li
                         ` (133 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: xuemingl, Brian Dooley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=cc8ca588a08bc581d8f456794a5a66f584e66c0f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cc8ca588a08bc581d8f456794a5a66f584e66c0f Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 15:56:23 +0530
Subject: [PATCH] examples/fips_validation: fix dereference and out-of-bound
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 57c10aaf3880fac5b2d0e1ddcfd8645e22b9f83c ]

Fix NULL dereference, out-of-bound, bad bit shift issues
reported by coverity scan.

Coverity issue: 384440, 384435, 384433, 384429
Fixes: 36128a67c27e ("examples/fips_validation: add asymmetric validation")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
 examples/fips_validation/fips_validation_rsa.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/examples/fips_validation/fips_validation_rsa.c b/examples/fips_validation/fips_validation_rsa.c
index f675b51051..55f81860a0 100644
--- a/examples/fips_validation/fips_validation_rsa.c
+++ b/examples/fips_validation/fips_validation_rsa.c
@@ -328,6 +328,9 @@ parse_test_rsa_json_interim_writeback(struct fips_val *val)
 		if (prepare_vec_rsa() < 0)
 			return -1;
 
+		if (!vec.rsa.e.val)
+			return -1;
+
 		writeback_hex_str("", info.one_line_text, &vec.rsa.n);
 		obj = json_string(info.one_line_text);
 		json_object_set_new(json_info.json_write_group, "n", obj);
@@ -474,7 +477,7 @@ fips_test_randomize_message(struct fips_val *msg, struct fips_val *rand)
 	uint16_t rv_len;
 
 	if (!msg->val || !rand->val || rand->len > RV_BUF_LEN
-		|| msg->len > FIPS_TEST_JSON_BUF_LEN)
+		|| msg->len > (FIPS_TEST_JSON_BUF_LEN - 1))
 		return -EINVAL;
 
 	memset(rv, 0, sizeof(rv));
@@ -503,7 +506,7 @@ fips_test_randomize_message(struct fips_val *msg, struct fips_val *rand)
 		m[i + j] ^= rv[j];
 
 	m[i + j] = ((uint8_t *)&rv_bitlen)[0];
-	m[i + j + 1] = (((uint8_t *)&rv_bitlen)[1] >> 8) & 0xFF;
+	m[i + j + 1] = ((uint8_t *)&rv_bitlen)[1];
 
 	rte_free(msg->val);
 	msg->len = (rv_bitlen + m_bitlen + 16) / 8;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.368304032 +0800
+++ 0024-examples-fips_validation-fix-dereference-and-out-of-.patch	2024-08-12 20:44:01.955069267 +0800
@@ -1 +1 @@
-From 57c10aaf3880fac5b2d0e1ddcfd8645e22b9f83c Mon Sep 17 00:00:00 2001
+From cc8ca588a08bc581d8f456794a5a66f584e66c0f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 57c10aaf3880fac5b2d0e1ddcfd8645e22b9f83c ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'crypto/openssl: fix GCM and CCM thread unsafe contexts' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (23 preceding siblings ...)
  2024-08-12 12:48       ` patch 'examples/fips_validation: fix dereference and out-of-bound' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'crypto/openssl: optimize 3DES-CTR context init' " Xueming Li
                         ` (132 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Jack Bond-Preston; +Cc: xuemingl, Kai Ji, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=eb6a1a85e6fedeaac5c3aca29db91173e5ebaa92

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eb6a1a85e6fedeaac5c3aca29db91173e5ebaa92 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:47 +0000
Subject: [PATCH] crypto/openssl: fix GCM and CCM thread unsafe contexts
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 78d7765f0acbb23168b7b25e25d775bea22c48ab ]

Commit 67ab783b5d70 ("crypto/openssl: use local copy for session
contexts") introduced a fix for concurrency bugs which could occur when
using one OpenSSL PMD session across multiple cores simultaneously. The
solution was to clone the EVP contexts per-buffer to avoid them being
used concurrently.

However, part of commit 75adf1eae44f ("crypto/openssl: update HMAC
routine with 3.0 EVP API") reverted this fix, only for combined ops
(AES-GCM and AES-CCM).

Fix the concurrency issue by cloning EVP contexts per-buffer. An extra
workaround is required for OpenSSL versions which are >= 3.0.0, and
<= 3.2.0. This is because, prior to OpenSSL 3.2.0, EVP_CIPHER_CTX_copy()
is not implemented for AES-GCM or AES-CCM. When using these OpenSSL
versions, create and initialise the context from scratch, per-buffer.

Throughput performance uplift measurements for AES-GCM-128 encrypt on
Ampere Altra Max platform:
1 worker lcore
|   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|              64 |          2.60 |               1.31 |   -49.5% |
|             256 |          7.69 |               4.45 |   -42.1% |
|            1024 |         15.33 |              11.30 |   -26.3% |
|            2048 |         18.74 |              15.37 |   -18.0% |
|            4096 |         21.11 |              18.80 |   -10.9% |

8 worker lcores
|   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|              64 |         19.94 |               2.83 |   -85.8% |
|             256 |         58.84 |              11.00 |   -81.3% |
|            1024 |        119.71 |              42.46 |   -64.5% |
|            2048 |        147.69 |              80.91 |   -45.2% |
|            4096 |        167.39 |             121.25 |   -27.6% |

Fixes: 75adf1eae44f ("crypto/openssl: update HMAC routine with 3.0 EVP API")

Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 84 ++++++++++++++++++------
 1 file changed, 64 insertions(+), 20 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index e8cb09defc..3e547c2039 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -350,7 +350,8 @@ get_aead_algo(enum rte_crypto_aead_algorithm sess_algo, size_t keylen,
 static int
 openssl_set_sess_aead_enc_param(struct openssl_session *sess,
 		enum rte_crypto_aead_algorithm algo,
-		uint8_t tag_len, const uint8_t *key)
+		uint8_t tag_len, const uint8_t *key,
+		EVP_CIPHER_CTX **ctx)
 {
 	int iv_type = 0;
 	unsigned int do_ccm;
@@ -378,7 +379,7 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
 	}
 
 	sess->cipher.mode = OPENSSL_CIPHER_LIB;
-	sess->cipher.ctx = EVP_CIPHER_CTX_new();
+	*ctx = EVP_CIPHER_CTX_new();
 
 	if (get_aead_algo(algo, sess->cipher.key.length,
 			&sess->cipher.evp_algo) != 0)
@@ -388,19 +389,19 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
 
 	sess->chain_order = OPENSSL_CHAIN_COMBINED;
 
-	if (EVP_EncryptInit_ex(sess->cipher.ctx, sess->cipher.evp_algo,
+	if (EVP_EncryptInit_ex(*ctx, sess->cipher.evp_algo,
 			NULL, NULL, NULL) <= 0)
 		return -EINVAL;
 
-	if (EVP_CIPHER_CTX_ctrl(sess->cipher.ctx, iv_type, sess->iv.length,
+	if (EVP_CIPHER_CTX_ctrl(*ctx, iv_type, sess->iv.length,
 			NULL) <= 0)
 		return -EINVAL;
 
 	if (do_ccm)
-		EVP_CIPHER_CTX_ctrl(sess->cipher.ctx, EVP_CTRL_CCM_SET_TAG,
+		EVP_CIPHER_CTX_ctrl(*ctx, EVP_CTRL_CCM_SET_TAG,
 				tag_len, NULL);
 
-	if (EVP_EncryptInit_ex(sess->cipher.ctx, NULL, NULL, key, NULL) <= 0)
+	if (EVP_EncryptInit_ex(*ctx, NULL, NULL, key, NULL) <= 0)
 		return -EINVAL;
 
 	return 0;
@@ -410,7 +411,8 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
 static int
 openssl_set_sess_aead_dec_param(struct openssl_session *sess,
 		enum rte_crypto_aead_algorithm algo,
-		uint8_t tag_len, const uint8_t *key)
+		uint8_t tag_len, const uint8_t *key,
+		EVP_CIPHER_CTX **ctx)
 {
 	int iv_type = 0;
 	unsigned int do_ccm = 0;
@@ -437,7 +439,7 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
 	}
 
 	sess->cipher.mode = OPENSSL_CIPHER_LIB;
-	sess->cipher.ctx = EVP_CIPHER_CTX_new();
+	*ctx = EVP_CIPHER_CTX_new();
 
 	if (get_aead_algo(algo, sess->cipher.key.length,
 			&sess->cipher.evp_algo) != 0)
@@ -447,24 +449,54 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
 
 	sess->chain_order = OPENSSL_CHAIN_COMBINED;
 
-	if (EVP_DecryptInit_ex(sess->cipher.ctx, sess->cipher.evp_algo,
+	if (EVP_DecryptInit_ex(*ctx, sess->cipher.evp_algo,
 			NULL, NULL, NULL) <= 0)
 		return -EINVAL;
 
-	if (EVP_CIPHER_CTX_ctrl(sess->cipher.ctx, iv_type,
+	if (EVP_CIPHER_CTX_ctrl(*ctx, iv_type,
 			sess->iv.length, NULL) <= 0)
 		return -EINVAL;
 
 	if (do_ccm)
-		EVP_CIPHER_CTX_ctrl(sess->cipher.ctx, EVP_CTRL_CCM_SET_TAG,
+		EVP_CIPHER_CTX_ctrl(*ctx, EVP_CTRL_CCM_SET_TAG,
 				tag_len, NULL);
 
-	if (EVP_DecryptInit_ex(sess->cipher.ctx, NULL, NULL, key, NULL) <= 0)
+	if (EVP_DecryptInit_ex(*ctx, NULL, NULL, key, NULL) <= 0)
 		return -EINVAL;
 
 	return 0;
 }
 
+static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
+		struct openssl_session *sess)
+{
+#if (OPENSSL_VERSION_NUMBER >= 0x30200000L)
+	*dest = EVP_CIPHER_CTX_dup(sess->ctx);
+	return 0;
+#elif (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+	/* OpenSSL versions 3.0.0 <= V < 3.2.0 have no dupctx() implementation
+	 * for AES-GCM and AES-CCM. In this case, we have to create new empty
+	 * contexts and initialise, as we did the original context.
+	 */
+	if (sess->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC)
+		sess->aead_algo = RTE_CRYPTO_AEAD_AES_GCM;
+
+	if (sess->cipher.direction == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
+		return openssl_set_sess_aead_enc_param(sess, sess->aead_algo,
+				sess->auth.digest_length, sess->cipher.key.data,
+				dest);
+	else
+		return openssl_set_sess_aead_dec_param(sess, sess->aead_algo,
+				sess->auth.digest_length, sess->cipher.key.data,
+				dest);
+#else
+	*dest = EVP_CIPHER_CTX_new();
+	if (EVP_CIPHER_CTX_copy(*dest, sess->cipher.ctx) != 1)
+		return -EINVAL;
+	return 0;
+#endif
+}
+
 /** Set session cipher parameters */
 static int
 openssl_set_session_cipher_parameters(struct openssl_session *sess,
@@ -623,12 +655,14 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
 			return openssl_set_sess_aead_enc_param(sess,
 						RTE_CRYPTO_AEAD_AES_GCM,
 						xform->auth.digest_length,
-						xform->auth.key.data);
+						xform->auth.key.data,
+						&sess->cipher.ctx);
 		else
 			return openssl_set_sess_aead_dec_param(sess,
 						RTE_CRYPTO_AEAD_AES_GCM,
 						xform->auth.digest_length,
-						xform->auth.key.data);
+						xform->auth.key.data,
+						&sess->cipher.ctx);
 		break;
 
 	case RTE_CRYPTO_AUTH_MD5:
@@ -770,10 +804,12 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
 	/* Select cipher direction */
 	if (xform->aead.op == RTE_CRYPTO_AEAD_OP_ENCRYPT)
 		return openssl_set_sess_aead_enc_param(sess, xform->aead.algo,
-				xform->aead.digest_length, xform->aead.key.data);
+				xform->aead.digest_length, xform->aead.key.data,
+				&sess->cipher.ctx);
 	else
 		return openssl_set_sess_aead_dec_param(sess, xform->aead.algo,
-				xform->aead.digest_length, xform->aead.key.data);
+				xform->aead.digest_length, xform->aead.key.data,
+				&sess->cipher.ctx);
 }
 
 /** Parse crypto xform chain and set private session parameters */
@@ -1590,6 +1626,12 @@ process_openssl_combined_op
 		return;
 	}
 
+	EVP_CIPHER_CTX *ctx;
+	if (openssl_aesni_ctx_clone(&ctx, sess) != 0) {
+		op->status = RTE_CRYPTO_OP_STATUS_ERROR;
+		return;
+	}
+
 	iv = rte_crypto_op_ctod_offset(op, uint8_t *,
 			sess->iv.offset);
 	if (sess->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC) {
@@ -1623,12 +1665,12 @@ process_openssl_combined_op
 			status = process_openssl_auth_encryption_gcm(
 					mbuf_src, offset, srclen,
 					aad, aadlen, iv,
-					dst, tag, sess->cipher.ctx);
+					dst, tag, ctx);
 		else
 			status = process_openssl_auth_encryption_ccm(
 					mbuf_src, offset, srclen,
 					aad, aadlen, iv,
-					dst, tag, taglen, sess->cipher.ctx);
+					dst, tag, taglen, ctx);
 
 	} else {
 		if (sess->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC ||
@@ -1636,14 +1678,16 @@ process_openssl_combined_op
 			status = process_openssl_auth_decryption_gcm(
 					mbuf_src, offset, srclen,
 					aad, aadlen, iv,
-					dst, tag, sess->cipher.ctx);
+					dst, tag, ctx);
 		else
 			status = process_openssl_auth_decryption_ccm(
 					mbuf_src, offset, srclen,
 					aad, aadlen, iv,
-					dst, tag, taglen, sess->cipher.ctx);
+					dst, tag, taglen, ctx);
 	}
 
+	EVP_CIPHER_CTX_free(ctx);
+
 	if (status != 0) {
 		if (status == (-EFAULT) &&
 				sess->auth.operation ==
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.392082430 +0800
+++ 0025-crypto-openssl-fix-GCM-and-CCM-thread-unsafe-context.patch	2024-08-12 20:44:01.955069267 +0800
@@ -1 +1 @@
-From 78d7765f0acbb23168b7b25e25d775bea22c48ab Mon Sep 17 00:00:00 2001
+From eb6a1a85e6fedeaac5c3aca29db91173e5ebaa92 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 78d7765f0acbb23168b7b25e25d775bea22c48ab ]
@@ -43 +45,0 @@
-Cc: stable@dpdk.org

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

* patch 'crypto/openssl: optimize 3DES-CTR context init' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (24 preceding siblings ...)
  2024-08-12 12:48       ` patch 'crypto/openssl: fix GCM and CCM thread unsafe contexts' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'crypto/openssl: make per-QP cipher context clones' " Xueming Li
                         ` (131 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Jack Bond-Preston; +Cc: xuemingl, Kai Ji, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ee88b9496c9bcbdfc332962d5e10bddd2a9ffed7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ee88b9496c9bcbdfc332962d5e10bddd2a9ffed7 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:48 +0000
Subject: [PATCH] crypto/openssl: optimize 3DES-CTR context init
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 08917edd8b110f9819301ee4f9b152de7c79ddd4 ]

Currently the 3DES-CTR cipher context is initialised for every buffer,
setting the cipher implementation and key - even though for every
buffer in the session these values will be the same.

Change to initialising the cipher context once, before any buffers are
processed, instead.

Throughput performance uplift measurements for 3DES-CTR encrypt on
Ampere Altra Max platform:
1 worker lcore
|   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|              64 |          0.16 |               0.21 |    35.3% |
|             256 |          0.20 |               0.22 |     9.4% |
|            1024 |          0.22 |               0.23 |     2.3% |
|            2048 |          0.22 |               0.23 |     0.9% |
|            4096 |          0.22 |               0.23 |     0.9% |

8 worker lcores
|   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|              64 |          1.01 |               1.34 |    32.9% |
|             256 |          1.51 |               1.66 |     9.9% |
|            1024 |          1.72 |               1.77 |     2.6% |
|            2048 |          1.76 |               1.78 |     1.1% |
|            4096 |          1.79 |               1.80 |     0.6% |

Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 3e547c2039..bd09d58d88 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -553,6 +553,15 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
 				sess->cipher.key.length,
 				sess->cipher.key.data) != 0)
 			return -EINVAL;
+
+
+		/* We use 3DES encryption also for decryption.
+		 * IV is not important for 3DES ECB.
+		 */
+		if (EVP_EncryptInit_ex(sess->cipher.ctx, EVP_des_ede3_ecb(),
+				NULL, sess->cipher.key.data,  NULL) != 1)
+			return -EINVAL;
+
 		break;
 
 	case RTE_CRYPTO_CIPHER_DES_CBC:
@@ -1172,8 +1181,7 @@ process_cipher_decrypt_err:
 /** Process cipher des 3 ctr encryption, decryption algorithm */
 static int
 process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
-		int offset, uint8_t *iv, uint8_t *key, int srclen,
-		EVP_CIPHER_CTX *ctx)
+		int offset, uint8_t *iv, int srclen, EVP_CIPHER_CTX *ctx)
 {
 	uint8_t ebuf[8], ctr[8];
 	int unused, n;
@@ -1191,12 +1199,6 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
 	src = rte_pktmbuf_mtod_offset(m, uint8_t *, offset);
 	l = rte_pktmbuf_data_len(m) - offset;
 
-	/* We use 3DES encryption also for decryption.
-	 * IV is not important for 3DES ecb
-	 */
-	if (EVP_EncryptInit_ex(ctx, EVP_des_ede3_ecb(), NULL, key, NULL) <= 0)
-		goto process_cipher_des3ctr_err;
-
 	memcpy(ctr, iv, 8);
 
 	for (n = 0; n < srclen; n++) {
@@ -1740,8 +1742,7 @@ process_openssl_cipher_op
 					srclen, ctx_copy, inplace);
 	else
 		status = process_openssl_cipher_des3ctr(mbuf_src, dst,
-				op->sym->cipher.data.offset, iv,
-				sess->cipher.key.data, srclen,
+				op->sym->cipher.data.offset, iv, srclen,
 				ctx_copy);
 
 	EVP_CIPHER_CTX_free(ctx_copy);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.419627527 +0800
+++ 0026-crypto-openssl-optimize-3DES-CTR-context-init.patch	2024-08-12 20:44:01.965069269 +0800
@@ -1 +1 @@
-From 08917edd8b110f9819301ee4f9b152de7c79ddd4 Mon Sep 17 00:00:00 2001
+From ee88b9496c9bcbdfc332962d5e10bddd2a9ffed7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 08917edd8b110f9819301ee4f9b152de7c79ddd4 ]
@@ -32,2 +34,0 @@
-
-Cc: stable@dpdk.org

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

* patch 'crypto/openssl: make per-QP cipher context clones' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (25 preceding siblings ...)
  2024-08-12 12:48       ` patch 'crypto/openssl: optimize 3DES-CTR context init' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'crypto/openssl: set cipher padding once' " Xueming Li
                         ` (130 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Jack Bond-Preston; +Cc: xuemingl, Kai Ji, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=4f8c97e94187b19adde37b6b01d42441e10f91da

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4f8c97e94187b19adde37b6b01d42441e10f91da Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:49 +0000
Subject: [PATCH] crypto/openssl: make per-QP cipher context clones
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b1d71126023521fe740ec473abfe5b295035b859 ]

Currently EVP_CIPHER_CTXs are allocated, copied to (from
openssl_session), and then freed for every cipher operation (ie. per
packet). This is very inefficient, and avoidable.

Make each openssl_session hold an array of pointers to per-queue-pair
cipher context copies. These are populated on first use by allocating a
new context and copying from the main context. These copies can then be
used in a thread-safe manner by different worker lcores simultaneously.
Consequently the cipher context allocation and copy only has to happen
once - the first time a given qp uses an openssl_session. This brings
about a large performance boost.

Throughput performance uplift measurements for AES-CBC-128 encrypt on
Ampere Altra Max platform:
1 worker lcore
|   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|              64 |          1.51 |               2.94 |    94.4% |
|             256 |          4.90 |               8.05 |    64.3% |
|            1024 |         11.07 |              14.21 |    28.3% |
|            2048 |         14.03 |              16.28 |    16.0% |
|            4096 |         16.20 |              17.59 |     8.6% |

8 worker lcores
|   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|              64 |          3.05 |              23.74 |   678.8% |
|             256 |         10.46 |              64.86 |   520.3% |
|            1024 |         40.97 |             113.80 |   177.7% |
|            2048 |         73.25 |             130.21 |    77.8% |
|            4096 |        103.89 |             140.62 |    35.4% |

Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/crypto/openssl/openssl_pmd_private.h |  11 +-
 drivers/crypto/openssl/rte_openssl_pmd.c     | 105 ++++++++++++-------
 drivers/crypto/openssl/rte_openssl_pmd_ops.c |  34 +++++-
 3 files changed, 108 insertions(+), 42 deletions(-)

diff --git a/drivers/crypto/openssl/openssl_pmd_private.h b/drivers/crypto/openssl/openssl_pmd_private.h
index 334912d335..370de1d53b 100644
--- a/drivers/crypto/openssl/openssl_pmd_private.h
+++ b/drivers/crypto/openssl/openssl_pmd_private.h
@@ -166,6 +166,14 @@ struct openssl_session {
 		/**< digest length */
 	} auth;
 
+	uint16_t ctx_copies_len;
+	/* < number of entries in ctx_copies */
+	EVP_CIPHER_CTX *qp_ctx[];
+	/**< Flexible array member of per-queue-pair pointers to copies of EVP
+	 * context structure. Cipher contexts are not safe to use from multiple
+	 * cores simultaneously, so maintaining these copies allows avoiding
+	 * per-buffer copying into a temporary context.
+	 */
 } __rte_cache_aligned;
 
 /** OPENSSL crypto private asymmetric session structure */
@@ -217,7 +225,8 @@ struct openssl_asym_session {
 /** Set and validate OPENSSL crypto session parameters */
 extern int
 openssl_set_session_parameters(struct openssl_session *sess,
-		const struct rte_crypto_sym_xform *xform);
+		const struct rte_crypto_sym_xform *xform,
+		uint16_t nb_queue_pairs);
 
 /** Reset OPENSSL crypto session parameters */
 extern void
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index bd09d58d88..df44cc097e 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -467,13 +467,10 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
 	return 0;
 }
 
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && OPENSSL_VERSION_NUMBER < 0x30200000L)
 static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
 		struct openssl_session *sess)
 {
-#if (OPENSSL_VERSION_NUMBER >= 0x30200000L)
-	*dest = EVP_CIPHER_CTX_dup(sess->ctx);
-	return 0;
-#elif (OPENSSL_VERSION_NUMBER >= 0x30000000L)
 	/* OpenSSL versions 3.0.0 <= V < 3.2.0 have no dupctx() implementation
 	 * for AES-GCM and AES-CCM. In this case, we have to create new empty
 	 * contexts and initialise, as we did the original context.
@@ -489,13 +486,8 @@ static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
 		return openssl_set_sess_aead_dec_param(sess, sess->aead_algo,
 				sess->auth.digest_length, sess->cipher.key.data,
 				dest);
-#else
-	*dest = EVP_CIPHER_CTX_new();
-	if (EVP_CIPHER_CTX_copy(*dest, sess->cipher.ctx) != 1)
-		return -EINVAL;
-	return 0;
-#endif
 }
+#endif
 
 /** Set session cipher parameters */
 static int
@@ -824,7 +816,8 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
 /** Parse crypto xform chain and set private session parameters */
 int
 openssl_set_session_parameters(struct openssl_session *sess,
-		const struct rte_crypto_sym_xform *xform)
+		const struct rte_crypto_sym_xform *xform,
+		uint16_t nb_queue_pairs)
 {
 	const struct rte_crypto_sym_xform *cipher_xform = NULL;
 	const struct rte_crypto_sym_xform *auth_xform = NULL;
@@ -886,6 +879,12 @@ openssl_set_session_parameters(struct openssl_session *sess,
 		}
 	}
 
+	/*
+	 * With only one queue pair, the array of copies is not needed.
+	 * Otherwise, one entry per queue pair is required.
+	 */
+	sess->ctx_copies_len = nb_queue_pairs > 1 ? nb_queue_pairs : 0;
+
 	return 0;
 }
 
@@ -893,6 +892,13 @@ openssl_set_session_parameters(struct openssl_session *sess,
 void
 openssl_reset_session(struct openssl_session *sess)
 {
+	for (uint16_t i = 0; i < sess->ctx_copies_len; i++) {
+		if (sess->qp_ctx[i] != NULL) {
+			EVP_CIPHER_CTX_free(sess->qp_ctx[i]);
+			sess->qp_ctx[i] = NULL;
+		}
+	}
+
 	EVP_CIPHER_CTX_free(sess->cipher.ctx);
 
 	if (sess->chain_order == OPENSSL_CHAIN_CIPHER_BPI)
@@ -959,7 +965,7 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
 		sess = (struct openssl_session *)_sess->driver_priv_data;
 
 		if (unlikely(openssl_set_session_parameters(sess,
-				op->sym->xform) != 0)) {
+				op->sym->xform, 1) != 0)) {
 			rte_mempool_put(qp->sess_mp, _sess);
 			sess = NULL;
 		}
@@ -1607,11 +1613,45 @@ process_auth_err:
 # endif
 /*----------------------------------------------------------------------------*/
 
+static inline EVP_CIPHER_CTX *
+get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+{
+	/* If the array is not being used, just return the main context. */
+	if (sess->ctx_copies_len == 0)
+		return sess->cipher.ctx;
+
+	EVP_CIPHER_CTX **lctx = &sess->qp_ctx[qp->id];
+
+	if (unlikely(*lctx == NULL)) {
+#if OPENSSL_VERSION_NUMBER >= 0x30200000L
+		/* EVP_CIPHER_CTX_dup() added in OSSL 3.2 */
+		*lctx = EVP_CIPHER_CTX_dup(sess->cipher.ctx);
+		return *lctx;
+#elif OPENSSL_VERSION_NUMBER >= 0x30000000L
+		if (sess->chain_order == OPENSSL_CHAIN_COMBINED) {
+			/* AESNI special-cased to use openssl_aesni_ctx_clone()
+			 * to allow for working around lack of
+			 * EVP_CIPHER_CTX_copy support for 3.0.0 <= OSSL Version
+			 * < 3.2.0.
+			 */
+			if (openssl_aesni_ctx_clone(lctx, sess) != 0)
+				*lctx = NULL;
+			return *lctx;
+		}
+#endif
+
+		*lctx = EVP_CIPHER_CTX_new();
+		EVP_CIPHER_CTX_copy(*lctx, sess->cipher.ctx);
+	}
+
+	return *lctx;
+}
+
 /** Process auth/cipher combined operation */
 static void
-process_openssl_combined_op
-		(struct rte_crypto_op *op, struct openssl_session *sess,
-		struct rte_mbuf *mbuf_src, struct rte_mbuf *mbuf_dst)
+process_openssl_combined_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+		struct openssl_session *sess, struct rte_mbuf *mbuf_src,
+		struct rte_mbuf *mbuf_dst)
 {
 	/* cipher */
 	uint8_t *dst = NULL, *iv, *tag, *aad;
@@ -1628,11 +1668,7 @@ process_openssl_combined_op
 		return;
 	}
 
-	EVP_CIPHER_CTX *ctx;
-	if (openssl_aesni_ctx_clone(&ctx, sess) != 0) {
-		op->status = RTE_CRYPTO_OP_STATUS_ERROR;
-		return;
-	}
+	EVP_CIPHER_CTX *ctx = get_local_cipher_ctx(sess, qp);
 
 	iv = rte_crypto_op_ctod_offset(op, uint8_t *,
 			sess->iv.offset);
@@ -1688,8 +1724,6 @@ process_openssl_combined_op
 					dst, tag, taglen, ctx);
 	}
 
-	EVP_CIPHER_CTX_free(ctx);
-
 	if (status != 0) {
 		if (status == (-EFAULT) &&
 				sess->auth.operation ==
@@ -1702,14 +1736,13 @@ process_openssl_combined_op
 
 /** Process cipher operation */
 static void
-process_openssl_cipher_op
-		(struct rte_crypto_op *op, struct openssl_session *sess,
-		struct rte_mbuf *mbuf_src, struct rte_mbuf *mbuf_dst)
+process_openssl_cipher_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+		struct openssl_session *sess, struct rte_mbuf *mbuf_src,
+		struct rte_mbuf *mbuf_dst)
 {
 	uint8_t *dst, *iv;
 	int srclen, status;
 	uint8_t inplace = (mbuf_src == mbuf_dst) ? 1 : 0;
-	EVP_CIPHER_CTX *ctx_copy;
 
 	/*
 	 * Segmented OOP destination buffer is not supported for encryption/
@@ -1728,24 +1761,22 @@ process_openssl_cipher_op
 
 	iv = rte_crypto_op_ctod_offset(op, uint8_t *,
 			sess->iv.offset);
-	ctx_copy = EVP_CIPHER_CTX_new();
-	EVP_CIPHER_CTX_copy(ctx_copy, sess->cipher.ctx);
+
+	EVP_CIPHER_CTX *ctx = get_local_cipher_ctx(sess, qp);
 
 	if (sess->cipher.mode == OPENSSL_CIPHER_LIB)
 		if (sess->cipher.direction == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
 			status = process_openssl_cipher_encrypt(mbuf_src, dst,
 					op->sym->cipher.data.offset, iv,
-					srclen, ctx_copy, inplace);
+					srclen, ctx, inplace);
 		else
 			status = process_openssl_cipher_decrypt(mbuf_src, dst,
 					op->sym->cipher.data.offset, iv,
-					srclen, ctx_copy, inplace);
+					srclen, ctx, inplace);
 	else
 		status = process_openssl_cipher_des3ctr(mbuf_src, dst,
-				op->sym->cipher.data.offset, iv, srclen,
-				ctx_copy);
+				op->sym->cipher.data.offset, iv, srclen, ctx);
 
-	EVP_CIPHER_CTX_free(ctx_copy);
 	if (status != 0)
 		op->status = RTE_CRYPTO_OP_STATUS_ERROR;
 }
@@ -3150,13 +3181,13 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
 
 	switch (sess->chain_order) {
 	case OPENSSL_CHAIN_ONLY_CIPHER:
-		process_openssl_cipher_op(op, sess, msrc, mdst);
+		process_openssl_cipher_op(qp, op, sess, msrc, mdst);
 		break;
 	case OPENSSL_CHAIN_ONLY_AUTH:
 		process_openssl_auth_op(qp, op, sess, msrc, mdst);
 		break;
 	case OPENSSL_CHAIN_CIPHER_AUTH:
-		process_openssl_cipher_op(op, sess, msrc, mdst);
+		process_openssl_cipher_op(qp, op, sess, msrc, mdst);
 		/* OOP */
 		if (msrc != mdst)
 			copy_plaintext(msrc, mdst, op);
@@ -3164,10 +3195,10 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
 		break;
 	case OPENSSL_CHAIN_AUTH_CIPHER:
 		process_openssl_auth_op(qp, op, sess, msrc, mdst);
-		process_openssl_cipher_op(op, sess, msrc, mdst);
+		process_openssl_cipher_op(qp, op, sess, msrc, mdst);
 		break;
 	case OPENSSL_CHAIN_COMBINED:
-		process_openssl_combined_op(op, sess, msrc, mdst);
+		process_openssl_combined_op(qp, op, sess, msrc, mdst);
 		break;
 	case OPENSSL_CHAIN_CIPHER_BPI:
 		process_openssl_docsis_bpi_op(op, sess, msrc, mdst);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index b16baaa08f..4209c6ab6f 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -794,9 +794,34 @@ qp_setup_cleanup:
 
 /** Returns the size of the symmetric session structure */
 static unsigned
-openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
+openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
 {
-	return sizeof(struct openssl_session);
+	/*
+	 * For 0 qps, return the max size of the session - this is necessary if
+	 * the user calls into this function to create the session mempool,
+	 * without first configuring the number of qps for the cryptodev.
+	 */
+	if (dev->data->nb_queue_pairs == 0) {
+		unsigned int max_nb_qps = ((struct openssl_private *)
+				dev->data->dev_private)->max_nb_qpairs;
+		return sizeof(struct openssl_session) +
+				(sizeof(void *) * max_nb_qps);
+	}
+
+	/*
+	 * With only one queue pair, the thread safety of multiple context
+	 * copies is not necessary, so don't allocate extra memory for the
+	 * array.
+	 */
+	if (dev->data->nb_queue_pairs == 1)
+		return sizeof(struct openssl_session);
+
+	/*
+	 * Otherwise, the size of the flexible array member should be enough to
+	 * fit pointers to per-qp contexts.
+	 */
+	return sizeof(struct openssl_session) +
+		(sizeof(void *) * dev->data->nb_queue_pairs);
 }
 
 /** Returns the size of the asymmetric session structure */
@@ -808,7 +833,7 @@ openssl_pmd_asym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 
 /** Configure the session from a crypto xform chain */
 static int
-openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
+openssl_pmd_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess)
 {
@@ -820,7 +845,8 @@ openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return -EINVAL;
 	}
 
-	ret = openssl_set_session_parameters(sess_private_data, xform);
+	ret = openssl_set_session_parameters(sess_private_data, xform,
+			dev->data->nb_queue_pairs);
 	if (ret != 0) {
 		OPENSSL_LOG(ERR, "failed configure session parameters");
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.442227826 +0800
+++ 0027-crypto-openssl-make-per-QP-cipher-context-clones.patch	2024-08-12 20:44:01.965069269 +0800
@@ -1 +1 @@
-From b1d71126023521fe740ec473abfe5b295035b859 Mon Sep 17 00:00:00 2001
+From 4f8c97e94187b19adde37b6b01d42441e10f91da Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b1d71126023521fe740ec473abfe5b295035b859 ]
@@ -38,2 +40,0 @@
-Cc: stable@dpdk.org
-
@@ -50 +51 @@
-index 0f038b218c..bad7dcf2f5 100644
+index 334912d335..370de1d53b 100644
@@ -53 +54 @@
-@@ -166,6 +166,14 @@ struct __rte_cache_aligned openssl_session {
+@@ -166,6 +166,14 @@ struct openssl_session {
@@ -65 +66 @@
- };
+ } __rte_cache_aligned;
@@ -68 +69 @@
-@@ -217,7 +225,8 @@ struct __rte_cache_aligned openssl_asym_session {
+@@ -217,7 +225,8 @@ struct openssl_asym_session {

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

* patch 'crypto/openssl: set cipher padding once' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (26 preceding siblings ...)
  2024-08-12 12:48       ` patch 'crypto/openssl: make per-QP cipher context clones' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' " Xueming Li
                         ` (129 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Jack Bond-Preston; +Cc: xuemingl, Kai Ji, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=4af94ab6e2820c5245b8eee5ee8bd8a347888ee1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4af94ab6e2820c5245b8eee5ee8bd8a347888ee1 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:51 +0000
Subject: [PATCH] crypto/openssl: set cipher padding once
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e ]

Setting the cipher padding has a noticeable performance footprint,
and it doesn't need to be done for every call to
process_openssl_cipher_{en,de}crypt(). Setting it causes OpenSSL to set
it on every future context re-init. Thus, for every buffer after the
first one, the padding is being set twice.

Instead, just set the cipher padding once - when configuring the session
parameters - avoiding the unnecessary double setting behaviour. This is
skipped for AEAD ciphers, where disabling padding is not necessary.

Throughput performance uplift measurements for AES-CBC-128 encrypt on
Ampere Altra Max platform:
1 worker lcore
|   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|              64 |          2.97 |               3.72 |    25.2% |
|             256 |          8.10 |               9.42 |    16.3% |
|            1024 |         14.22 |              15.18 |     6.8% |
|            2048 |         16.28 |              16.93 |     4.0% |
|            4096 |         17.58 |              17.97 |     2.2% |

8 worker lcores
|   buffer sz (B) |   prev (Gbps) |   optimised (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|              64 |         21.27 |              29.85 |    40.3% |
|             256 |         60.05 |              75.53 |    25.8% |
|            1024 |        110.11 |             121.56 |    10.4% |
|            2048 |        128.05 |             135.40 |     5.7% |
|            4096 |        139.45 |             143.76 |     3.1% |

Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index df44cc097e..7518ffa3be 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -619,6 +619,8 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
 		return -ENOTSUP;
 	}
 
+	EVP_CIPHER_CTX_set_padding(sess->cipher.ctx, 0);
+
 	return 0;
 }
 
@@ -1119,8 +1121,6 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
 	if (EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv) <= 0)
 		goto process_cipher_encrypt_err;
 
-	EVP_CIPHER_CTX_set_padding(ctx, 0);
-
 	if (process_openssl_encryption_update(mbuf_src, offset, &dst,
 			srclen, ctx, inplace))
 		goto process_cipher_encrypt_err;
@@ -1169,8 +1169,6 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
 	if (EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, iv) <= 0)
 		goto process_cipher_decrypt_err;
 
-	EVP_CIPHER_CTX_set_padding(ctx, 0);
-
 	if (process_openssl_decryption_update(mbuf_src, offset, &dst,
 			srclen, ctx, inplace))
 		goto process_cipher_decrypt_err;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.466541424 +0800
+++ 0028-crypto-openssl-set-cipher-padding-once.patch	2024-08-12 20:44:01.965069269 +0800
@@ -1 +1 @@
-From d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e Mon Sep 17 00:00:00 2001
+From 4af94ab6e2820c5245b8eee5ee8bd8a347888ee1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e ]
@@ -36,2 +38,0 @@
-Cc: stable@dpdk.org
-
@@ -46 +47 @@
-index 7e2e505222..101111e85b 100644
+index df44cc097e..7518ffa3be 100644
@@ -58 +59 @@
-@@ -1124,8 +1126,6 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
+@@ -1119,8 +1121,6 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
@@ -67 +68 @@
-@@ -1174,8 +1174,6 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
+@@ -1169,8 +1169,6 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,

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

* patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (27 preceding siblings ...)
  2024-08-12 12:48       ` patch 'crypto/openssl: set cipher padding once' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'common/dpaax/caamflib: fix PDCP AES-AES " Xueming Li
                         ` (128 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5089ef6c28185cd2b451251e3b749d072ba625fe

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5089ef6c28185cd2b451251e3b749d072ba625fe Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 3 Jul 2024 15:56:39 +0530
Subject: [PATCH] common/dpaax/caamflib: fix PDCP-SDAP watchdog error
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6671e82e5c6b4858573f4dae665e7f2442913d93 ]

Adding a Jump instruction with CALM flag to ensure
previous processing has been completed.

Fixes: 3ba2e519eafa ("common/dpaax/caamflib: support PDCP-SDAP")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/common/dpaax/caamflib/desc/sdap.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/common/dpaax/caamflib/desc/sdap.h b/drivers/common/dpaax/caamflib/desc/sdap.h
index b38c15a24f..d41bacf8f9 100644
--- a/drivers/common/dpaax/caamflib/desc/sdap.h
+++ b/drivers/common/dpaax/caamflib/desc/sdap.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2020-2022 NXP
+ * Copyright 2020-2023 NXP
  */
 
 #ifndef __DESC_SDAP_H__
@@ -628,6 +628,10 @@ static inline int pdcp_sdap_insert_no_snoop_op(
 		/* Save the ICV generated */
 		MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
 
+		/* conditional jump with calm added to ensure that the
+		 * previous processing has been completed
+		 */
+		JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
 		/* The CHA will be reused so we need to clear it */
 		LOAD(p, CLRW_RESET_CLS1_CHA |
 		     CLRW_CLR_C1KEY |
@@ -718,6 +722,10 @@ static inline int pdcp_sdap_insert_no_snoop_op(
 		/* Save the ICV which is stalling in output FIFO to MATH3 */
 		MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
 
+		/* conditional jump with calm added to ensure that the
+		 * previous processing has been completed
+		 */
+		JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
 		/* Reset class 1 CHA */
 		LOAD(p, CLRW_RESET_CLS1_CHA |
 		     CLRW_CLR_C1KEY |
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.491991122 +0800
+++ 0029-common-dpaax-caamflib-fix-PDCP-SDAP-watchdog-error.patch	2024-08-12 20:44:01.975069271 +0800
@@ -1 +1 @@
-From 6671e82e5c6b4858573f4dae665e7f2442913d93 Mon Sep 17 00:00:00 2001
+From 5089ef6c28185cd2b451251e3b749d072ba625fe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6671e82e5c6b4858573f4dae665e7f2442913d93 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'common/dpaax/caamflib: fix PDCP AES-AES watchdog error' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (28 preceding siblings ...)
  2024-08-12 12:48       ` patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'crypto/dpaa_sec: fix IPsec descriptor' " Xueming Li
                         ` (127 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Varun Sethi; +Cc: xuemingl, Gagandeep Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b977583692a9b52073c56141dd8f93c31922b34a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b977583692a9b52073c56141dd8f93c31922b34a Mon Sep 17 00:00:00 2001
From: Varun Sethi <v.sethi@nxp.com>
Date: Wed, 3 Jul 2024 15:56:40 +0530
Subject: [PATCH] common/dpaax/caamflib: fix PDCP AES-AES watchdog error
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ed5ea9e3e7f30cb8d7b45035a40ab75efaa38584 ]

Adding a Jump instruction with CALM flag to ensure
previous processing has been completed.

Fixes: 8827d94398f1 ("crypto/dpaa2_sec/hw: support AES-AES 18-bit PDCP")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Varun Sethi <v.sethi@nxp.com>
---
 .mailmap                                  |  1 +
 drivers/common/dpaax/caamflib/desc/pdcp.h | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/.mailmap b/.mailmap
index 8827687e19..8e5ee34a2f 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1480,6 +1480,7 @@ Vadim Suraev <vadim.suraev@gmail.com>
 Vakul Garg <vakul.garg@nxp.com>
 Vamsi Attunuru <vattunuru@marvell.com>
 Vanshika Shukla <vanshika.shukla@nxp.com>
+Varun Sethi <v.sethi@nxp.com>
 Vasily Philipov <vasilyf@mellanox.com>
 Veerasenareddy Burru <vburru@marvell.com>
 Venkata Suresh Kumar P <venkata.suresh.kumar.p@intel.com>
diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 7d16c66d79..0ed9eec816 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1023,6 +1023,11 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
 		SEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);
 		MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
 
+		/* conditional jump with calm added to ensure that the
+		 * previous processing has been completed
+		 */
+		JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
 		LOAD(p, CLRW_RESET_CLS1_CHA |
 		     CLRW_CLR_C1KEY |
 		     CLRW_CLR_C1CTX |
@@ -1070,6 +1075,11 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
 
 		MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
 
+		/* conditional jump with calm added to ensure that the
+		 * previous processing has been completed
+		 */
+		JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
 		LOAD(p, CLRW_RESET_CLS1_CHA |
 		     CLRW_CLR_C1KEY |
 		     CLRW_CLR_C1CTX |
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.519236419 +0800
+++ 0030-common-dpaax-caamflib-fix-PDCP-AES-AES-watchdog-erro.patch	2024-08-12 20:44:01.975069271 +0800
@@ -1 +1 @@
-From ed5ea9e3e7f30cb8d7b45035a40ab75efaa38584 Mon Sep 17 00:00:00 2001
+From b977583692a9b52073c56141dd8f93c31922b34a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ed5ea9e3e7f30cb8d7b45035a40ab75efaa38584 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 502791e0bc..74739ec9be 100644
+index 8827687e19..8e5ee34a2f 100644
@@ -23 +25,2 @@
-@@ -1503,6 +1503,7 @@ Vakul Garg <vakul.garg@nxp.com>
+@@ -1480,6 +1480,7 @@ Vadim Suraev <vadim.suraev@gmail.com>
+ Vakul Garg <vakul.garg@nxp.com>
@@ -25 +27,0 @@
- Vamsi Krishna Atluri <vamsi.atluri@amd.com>

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

* patch 'crypto/dpaa_sec: fix IPsec descriptor' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (29 preceding siblings ...)
  2024-08-12 12:48       ` patch 'common/dpaax/caamflib: fix PDCP AES-AES " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'crypto/dpaa2_sec: fix event queue user context' " Xueming Li
                         ` (126 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6e2def6ca9a6b1131b9efaf5ce913e7110459883

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6e2def6ca9a6b1131b9efaf5ce913e7110459883 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 3 Jul 2024 15:56:41 +0530
Subject: [PATCH] crypto/dpaa_sec: fix IPsec descriptor
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 046341575bd6e1210d6c12b595405ede41150da7 ]

During IPsec operations, driver code pre-check
whether KEYS can be inlined to limited size descriptor
or not and based on that it decides to copy the complete
KEY in descriptor or just give the memory pointer of
KEY in descriptor.
This pre-check code does not take care of padding required
for security engine to make the KEYs inline which results
in incorrect length descriptor for some algorithms.

This patch fixes this issue by updating the pre-check code
with proper padding size included for each supported
algorithm.

Fixes: 453b9593a3cf ("crypto/dpaax_sec: fix inline query for descriptors")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/common/dpaax/caamflib/desc/ipsec.h | 73 ++++++++++++++++++++++
 drivers/crypto/dpaa_sec/dpaa_sec.c         |  4 +-
 2 files changed, 75 insertions(+), 2 deletions(-)

diff --git a/drivers/common/dpaax/caamflib/desc/ipsec.h b/drivers/common/dpaax/caamflib/desc/ipsec.h
index 95fc3ea5ba..54fca3bc67 100644
--- a/drivers/common/dpaax/caamflib/desc/ipsec.h
+++ b/drivers/common/dpaax/caamflib/desc/ipsec.h
@@ -731,6 +731,79 @@ static inline void __gen_auth_key(struct program *program,
 			     authdata->key, authdata->key_type);
 }
 
+/**
+ * rta_inline_ipsec_query() - Provide indications on which data items can be inlined
+ *                      and which shall be referenced in IPsec shared descriptor.
+ * @sd_base_len: Shared descriptor base length - bytes consumed by the commands,
+ *               excluding the data items to be inlined (or corresponding
+ *               pointer if an item is not inlined). Each cnstr_* function that
+ *               generates descriptors should have a define mentioning
+ *               corresponding length.
+ * @jd_len: Maximum length of the job descriptor(s) that will be used
+ *          together with the shared descriptor.
+ * @data_len: Array of lengths of the data items trying to be inlined
+ * @inl_mask: 32bit mask with bit x = 1 if data item x can be inlined, 0
+ *            otherwise.
+ * @count: Number of data items (size of @data_len array); must be <= 32
+ * @auth_algtype: Authentication algorithm type.
+ * @auth_index: Index value of data_len for authentication key length.
+ *		-1 if authentication key length is not present in data_len.
+ *
+ * Return: 0 if data can be inlined / referenced, negative value if not. If 0,
+ *         check @inl_mask for details.
+ */
+static inline int
+rta_inline_ipsec_query(unsigned int sd_base_len,
+		       unsigned int jd_len,
+		       unsigned int *data_len,
+		       uint32_t *inl_mask,
+		       unsigned int count,
+		       uint32_t auth_algtype,
+		       int32_t auth_index)
+{
+	uint32_t dkp_protid;
+
+	switch (auth_algtype & OP_PCL_IPSEC_AUTH_MASK) {
+	case OP_PCL_IPSEC_HMAC_MD5_96:
+	case OP_PCL_IPSEC_HMAC_MD5_128:
+		dkp_protid = OP_PCLID_DKP_MD5;
+		break;
+	case OP_PCL_IPSEC_HMAC_SHA1_96:
+	case OP_PCL_IPSEC_HMAC_SHA1_160:
+		dkp_protid = OP_PCLID_DKP_SHA1;
+		break;
+	case OP_PCL_IPSEC_HMAC_SHA2_256_128:
+		dkp_protid = OP_PCLID_DKP_SHA256;
+		break;
+	case OP_PCL_IPSEC_HMAC_SHA2_384_192:
+		dkp_protid = OP_PCLID_DKP_SHA384;
+		break;
+	case OP_PCL_IPSEC_HMAC_SHA2_512_256:
+		dkp_protid = OP_PCLID_DKP_SHA512;
+		break;
+	case OP_PCL_IPSEC_HMAC_SHA2_224_96:
+	case OP_PCL_IPSEC_HMAC_SHA2_224_112:
+	case OP_PCL_IPSEC_HMAC_SHA2_224_224:
+		dkp_protid = OP_PCLID_DKP_SHA224;
+		break;
+	default:
+		return rta_inline_query(sd_base_len,
+				       jd_len,
+				       data_len,
+				       inl_mask, count);
+	}
+
+	/* Updating the maximum supported inline key length */
+	if (auth_index != -1) {
+		if (split_key_len(dkp_protid) > data_len[auth_index])
+			data_len[auth_index] = split_key_len(dkp_protid);
+	}
+	return rta_inline_query(sd_base_len,
+			       jd_len,
+			       data_len,
+			       inl_mask, count);
+}
+
 /**
  * cnstr_shdsc_ipsec_encap - IPSec ESP encapsulation protocol-level shared
  *                           descriptor.
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index a301e8edb2..906ea39047 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -395,10 +395,10 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
 
 	cdb->sh_desc[0] = cipherdata.keylen;
 	cdb->sh_desc[1] = authdata.keylen;
-	err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
+	err = rta_inline_ipsec_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
 			       DESC_JOB_IO_LEN,
 			       (unsigned int *)cdb->sh_desc,
-			       &cdb->sh_desc[2], 2);
+			       &cdb->sh_desc[2], 2, authdata.algtype, 1);
 
 	if (err < 0) {
 		DPAA_SEC_ERR("Crypto: Incorrect key lengths");
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.547048517 +0800
+++ 0031-crypto-dpaa_sec-fix-IPsec-descriptor.patch	2024-08-12 20:44:01.985069273 +0800
@@ -1 +1 @@
-From 046341575bd6e1210d6c12b595405ede41150da7 Mon Sep 17 00:00:00 2001
+From 6e2def6ca9a6b1131b9efaf5ce913e7110459883 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 046341575bd6e1210d6c12b595405ede41150da7 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index eff26f6f8b..b902873970 100644
+index 95fc3ea5ba..54fca3bc67 100644
@@ -32 +34 @@
-@@ -728,6 +728,79 @@ static inline void __gen_auth_key(struct program *program,
+@@ -731,6 +731,79 @@ static inline void __gen_auth_key(struct program *program,
@@ -113 +115 @@
-index 7aa163330a..bf2a11a4d4 100644
+index a301e8edb2..906ea39047 100644

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

* patch 'crypto/dpaa2_sec: fix event queue user context' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (30 preceding siblings ...)
  2024-08-12 12:48       ` patch 'crypto/dpaa_sec: fix IPsec descriptor' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'examples/ipsec-secgw: fix SA salt endianness' " Xueming Li
                         ` (125 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Jun Yang; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d0d02993de3251c1c75e57da890be31da5fb7ebf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d0d02993de3251c1c75e57da890be31da5fb7ebf Mon Sep 17 00:00:00 2001
From: Jun Yang <jun.yang@nxp.com>
Date: Wed, 3 Jul 2024 15:56:49 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix event queue user context
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 70d3ba14391a33585a739421c6e7300bb50f53aa ]

Context configured should be aligned with context got in dq process.
Here the rx_vq is just the first element of qp which covers the issue.

Fixes: bffc7d561c81 ("crypto/dpaa2_sec: support event crypto adapter")

Signed-off-by: Jun Yang <jun.yang@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index bb5a2c629e..6ae356ace0 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -4124,7 +4124,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
 	cfg.dest_cfg.priority = priority;
 
 	cfg.options |= DPSECI_QUEUE_OPT_USER_CTX;
-	cfg.user_ctx = (size_t)(qp);
+	cfg.user_ctx = (size_t)(&qp->rx_vq);
 	if (event->sched_type == RTE_SCHED_TYPE_ATOMIC) {
 		cfg.options |= DPSECI_QUEUE_OPT_ORDER_PRESERVATION;
 		cfg.order_preservation_en = 1;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.574172115 +0800
+++ 0032-crypto-dpaa2_sec-fix-event-queue-user-context.patch	2024-08-12 20:44:01.995069275 +0800
@@ -1 +1 @@
-From 70d3ba14391a33585a739421c6e7300bb50f53aa Mon Sep 17 00:00:00 2001
+From d0d02993de3251c1c75e57da890be31da5fb7ebf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 70d3ba14391a33585a739421c6e7300bb50f53aa ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 07369a383f..c1f7181d55 100644
+index bb5a2c629e..6ae356ace0 100644
@@ -21 +23 @@
-@@ -4103,7 +4103,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
+@@ -4124,7 +4124,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,

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

* patch 'examples/ipsec-secgw: fix SA salt endianness' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (31 preceding siblings ...)
  2024-08-12 12:48       ` patch 'crypto/dpaa2_sec: fix event queue user context' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'fbarray: fix incorrect lookahead behavior' " Xueming Li
                         ` (124 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Shihong Wang; +Cc: xuemingl, Chaoyong He, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=427fa0723877511e4cb6c98f70ca5e3689aa5d02

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 427fa0723877511e4cb6c98f70ca5e3689aa5d02 Mon Sep 17 00:00:00 2001
From: Shihong Wang <shihong.wang@corigine.com>
Date: Thu, 14 Mar 2024 10:00:52 +0800
Subject: [PATCH] examples/ipsec-secgw: fix SA salt endianness
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ]

The SA salt of struct ipsec_sa is a CPU-endian u32 variable, but it’s
value is stored in an array of encryption or authentication keys
according to big-endian. So it maybe need to convert the endianness
order to ensure that the value assigned to the SA salt is CPU-endian.

Fixes: 50d75cae2a2c ("examples/ipsec-secgw: initialize SA salt")
Fixes: 9413c3901f31 ("examples/ipsec-secgw: support additional algorithms")
Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")

Signed-off-by: Shihong Wang <shihong.wang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/sa.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 6ae0e49fd7..7a90acaec2 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -374,6 +374,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 	uint32_t ti; /*token index*/
 	uint32_t *ri /*rule index*/;
 	struct ipsec_sa_cnt *sa_cnt;
+	rte_be32_t salt; /*big-endian salt*/
 	uint32_t cipher_algo_p = 0;
 	uint32_t auth_algo_p = 0;
 	uint32_t aead_algo_p = 0;
@@ -508,8 +509,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 			if (algo->algo == RTE_CRYPTO_CIPHER_AES_CTR) {
 				key_len -= 4;
 				rule->cipher_key_len = key_len;
-				memcpy(&rule->salt,
-					&rule->cipher_key[key_len], 4);
+				memcpy(&salt, &rule->cipher_key[key_len], 4);
+				rule->salt = rte_be_to_cpu_32(salt);
 			}
 
 			cipher_algo_p = 1;
@@ -573,8 +574,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 				key_len -= 4;
 				rule->auth_key_len = key_len;
 				rule->iv_len = algo->iv_len;
-				memcpy(&rule->salt,
-					&rule->auth_key[key_len], 4);
+				memcpy(&salt, &rule->auth_key[key_len], 4);
+				rule->salt = rte_be_to_cpu_32(salt);
 			}
 
 			auth_algo_p = 1;
@@ -632,8 +633,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 
 			key_len -= 4;
 			rule->cipher_key_len = key_len;
-			memcpy(&rule->salt,
-				&rule->cipher_key[key_len], 4);
+			memcpy(&salt, &rule->cipher_key[key_len], 4);
+			rule->salt = rte_be_to_cpu_32(salt);
 
 			aead_algo_p = 1;
 			continue;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.599770113 +0800
+++ 0033-examples-ipsec-secgw-fix-SA-salt-endianness.patch	2024-08-12 20:44:01.995069275 +0800
@@ -1 +1 @@
-From e6bfd9676109f904b4f263402e77105fdca8e67c Mon Sep 17 00:00:00 2001
+From 427fa0723877511e4cb6c98f70ca5e3689aa5d02 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index c4bac17cd7..8aa9aca739 100644
+index 6ae0e49fd7..7a90acaec2 100644

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

* patch 'fbarray: fix incorrect lookahead behavior' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (32 preceding siblings ...)
  2024-08-12 12:48       ` patch 'examples/ipsec-secgw: fix SA salt endianness' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'fbarray: fix incorrect lookbehind " Xueming Li
                         ` (123 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: xuemingl, Vipin Padmam Ramesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5e665905758fffbfc8ca37bd8a7eba7cfa7867a8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5e665905758fffbfc8ca37bd8a7eba7cfa7867a8 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:32 +0100
Subject: [PATCH] fbarray: fix incorrect lookahead behavior
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8c03a149ce957b10d7792a2a78339496dd156e9f ]

Currently, whenever last bit of current index mask is set
(meaning, there is potentially a run starting at the end of the mask),
lookahead loop is entered.
In that loop, if the first bit of lookahead mask is not set,
the lookahead is stopped, and the current lookahead mask index is
assigned to current index mask.
However, because at that point we are inside a for-loop that increments
current index mask after each iteration, this results in erroneous mask
index increment.

Fix lookahead to avoid erroneous increment,
and add corresponding unit test.

Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")

Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 .mailmap                            |  1 +
 app/test/test_fbarray.c             | 23 +++++++++++++++++++++++
 lib/eal/common/eal_common_fbarray.c |  3 ++-
 3 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 8e5ee34a2f..12ed3d1e74 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1510,6 +1510,7 @@ Vincent Jardin <vincent.jardin@6wind.com>
 Vincent Li <vincent.mc.li@gmail.com>
 Vincent S. Cojot <vcojot@redhat.com>
 Vinh Tran <vinh.t.tran10@gmail.com>
+Vipin Padmam Ramesh <vipinp@vmware.com>
 Vipin Varghese <vipin.varghese@amd.com> <vipin.varghese@intel.com>
 Vipul Ashri <vipul.ashri@oracle.com>
 Visa Hankala <visa@hankala.org>
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index 26a51e2a3e..bf89b99e5b 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -103,6 +103,14 @@ static int empty_msk_test_setup(void)
 	return 0;
 }
 
+static int lookahead_test_setup(void)
+{
+	/* set index 64 as used */
+	param.start = 64;
+	param.end = 64;
+	return init_array();
+}
+
 static int test_invalid(void)
 {
 	struct rte_fbarray dummy;
@@ -709,6 +717,20 @@ static int test_empty(void)
 	return TEST_SUCCESS;
 }
 
+static int test_lookahead(void)
+{
+	int ret;
+
+	/* run regular test first */
+	ret = test_find();
+	if (ret != TEST_SUCCESS)
+		return ret;
+
+	/* test if we can find free chunk while not starting with 0 */
+	TEST_ASSERT_EQUAL(rte_fbarray_find_next_n_free(&param.arr, 1, param.start),
+			param.start + 1, "Free chunk index is wrong\n");
+	return TEST_SUCCESS;
+}
 
 static struct unit_test_suite fbarray_test_suite = {
 	.suite_name = "fbarray autotest",
@@ -723,6 +745,7 @@ static struct unit_test_suite fbarray_test_suite = {
 		TEST_CASE_ST(last_msk_test_setup, reset_array, test_find),
 		TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),
 		TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
+		TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
 		TEST_CASES_END()
 	}
 };
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 2055bfa57d..8a3e6fd290 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -236,7 +236,8 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 				 * as well, so skip that on next iteration.
 				 */
 				ignore_msk = ~((1ULL << need) - 1);
-				msk_idx = lookahead_idx;
+				/* outer loop will increment msk_idx so add 1 */
+				msk_idx = lookahead_idx - 1;
 				break;
 			}
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.625983911 +0800
+++ 0034-fbarray-fix-incorrect-lookahead-behavior.patch	2024-08-12 20:44:02.005069277 +0800
@@ -1 +1 @@
-From 8c03a149ce957b10d7792a2a78339496dd156e9f Mon Sep 17 00:00:00 2001
+From 5e665905758fffbfc8ca37bd8a7eba7cfa7867a8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8c03a149ce957b10d7792a2a78339496dd156e9f ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index 74739ec9be..085e5f0004 100644
+index 8e5ee34a2f..12ed3d1e74 100644
@@ -34 +36 @@
-@@ -1534,6 +1534,7 @@ Vincent Jardin <vincent.jardin@6wind.com>
+@@ -1510,6 +1510,7 @@ Vincent Jardin <vincent.jardin@6wind.com>
@@ -91 +93 @@
-index 0fe5bcfe06..2680b34823 100644
+index 2055bfa57d..8a3e6fd290 100644

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

* patch 'fbarray: fix incorrect lookbehind behavior' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (33 preceding siblings ...)
  2024-08-12 12:48       ` patch 'fbarray: fix incorrect lookahead behavior' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'fbarray: fix lookahead ignore mask handling' " Xueming Li
                         ` (122 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: xuemingl, Vipin Padmam Ramesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=24869bf93c44350879079bbd8c41d3d6b7bf5acc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 24869bf93c44350879079bbd8c41d3d6b7bf5acc Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:33 +0100
Subject: [PATCH] fbarray: fix incorrect lookbehind behavior
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8e3712928716a1deb8857c971865aa15dc436b04 ]

Currently, whenever first bit of current index mask is set
(meaning, there is potentially a run starting at the start of the mask),
lookbehind loop is entered.
In that loop, if the last bit of lookbehind mask is not set,
the lookbehind is stopped, and the current lookbehind mask index
is assigned to current index mask.
However, because at that point we are inside a while-loop that
decrements current index mask after each iteration,
this results in erroneous mask index decrement.

Fix lookbehind to avoid erroneous decrement, and add corresponding
unit test.

Fixes: e1ca5dc86226 ("fbarray: add reverse finding of chunk")

Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_fbarray.c             | 24 ++++++++++++++++++++++++
 lib/eal/common/eal_common_fbarray.c |  3 ++-
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index bf89b99e5b..147d6e2a07 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -111,6 +111,14 @@ static int lookahead_test_setup(void)
 	return init_array();
 }
 
+static int lookbehind_test_setup(void)
+{
+	/* set index 63 as used */
+	param.start = 63;
+	param.end = 63;
+	return init_array();
+}
+
 static int test_invalid(void)
 {
 	struct rte_fbarray dummy;
@@ -732,6 +740,21 @@ static int test_lookahead(void)
 	return TEST_SUCCESS;
 }
 
+static int test_lookbehind(void)
+{
+	int ret, free_len = 2;
+
+	/* run regular test first */
+	ret = test_find();
+	if (ret != TEST_SUCCESS)
+		return ret;
+
+	/* test if we can find free chunk while crossing mask boundary */
+	TEST_ASSERT_EQUAL(rte_fbarray_find_prev_n_free(&param.arr, param.start + 1, free_len),
+			param.start - free_len, "Free chunk index is wrong\n");
+	return TEST_SUCCESS;
+}
+
 static struct unit_test_suite fbarray_test_suite = {
 	.suite_name = "fbarray autotest",
 	.setup = autotest_setup,
@@ -746,6 +769,7 @@ static struct unit_test_suite fbarray_test_suite = {
 		TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),
 		TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
 		TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
+		TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
 		TEST_CASES_END()
 	}
 };
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 8a3e6fd290..6d9b95006c 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -512,7 +512,8 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 				 * as well, so skip that on next iteration.
 				 */
 				ignore_msk = UINT64_MAX << need;
-				msk_idx = lookbehind_idx;
+				/* outer loop will decrement msk_idx so add 1 */
+				msk_idx = lookbehind_idx + 1;
 				break;
 			}
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.655940709 +0800
+++ 0035-fbarray-fix-incorrect-lookbehind-behavior.patch	2024-08-12 20:44:02.005069277 +0800
@@ -1 +1 @@
-From 8e3712928716a1deb8857c971865aa15dc436b04 Mon Sep 17 00:00:00 2001
+From 24869bf93c44350879079bbd8c41d3d6b7bf5acc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8e3712928716a1deb8857c971865aa15dc436b04 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -79 +81 @@
-index 2680b34823..b4f0b0b0c3 100644
+index 8a3e6fd290..6d9b95006c 100644

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

* patch 'fbarray: fix lookahead ignore mask handling' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (34 preceding siblings ...)
  2024-08-12 12:48       ` patch 'fbarray: fix incorrect lookbehind " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'fbarray: fix lookbehind " Xueming Li
                         ` (121 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: xuemingl, Vipin Padmam Ramesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8baf37903248c80f512d33aa27c039b9a35bc195

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8baf37903248c80f512d33aa27c039b9a35bc195 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:34 +0100
Subject: [PATCH] fbarray: fix lookahead ignore mask handling
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a344719c181aac28cb2ada0d2ddbfee8ad737a1a ]

When lookahead mask does not have its first bit set,
we can infer that we've lost our run.
However, currently, we set ignore mask to ignore `need` number of bits,
which is incorrect because while there is no *current* run
within those bits, we might still be able to start a new run
within those ignored bits later.

This issue is fixed by counting how many shifts it took to lose the run,
and this is the number of bits we should ignore
(+1 to skip one we stopped on).
Also, add unit tests to reproduce the problem.

Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")

Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_fbarray.c             | 28 ++++++++++++++++++++++++++++
 lib/eal/common/eal_common_fbarray.c | 13 ++++++++++---
 2 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index 147d6e2a07..4b17ef6be3 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -755,6 +755,32 @@ static int test_lookbehind(void)
 	return TEST_SUCCESS;
 }
 
+static int test_lookahead_mask(void)
+{
+	/*
+	 * There is a certain type of lookahead behavior we want to test here,
+	 * namely masking of bits that were scanned with lookahead but that we
+	 * know do not match our criteria. This is achieved in following steps:
+	 *
+	 *   0. Look for a big enough chunk of free space (say, 62 elements)
+	 *   1. Trigger lookahead by breaking a run somewhere inside mask 0
+	 *      (indices 0-63)
+	 *   2. Fail lookahead by breaking the run somewhere inside mask 1
+	 *      (indices 64-127)
+	 *   3. Ensure that we can still find free space in mask 1 afterwards
+	 */
+
+	/* break run on first mask */
+	rte_fbarray_set_used(&param.arr, 61);
+	/* break run on second mask */
+	rte_fbarray_set_used(&param.arr, 70);
+
+	/* we expect to find free space at 71 */
+	TEST_ASSERT_EQUAL(rte_fbarray_find_next_n_free(&param.arr, 0, 62),
+			71, "Free chunk index is wrong\n");
+	return TEST_SUCCESS;
+}
+
 static struct unit_test_suite fbarray_test_suite = {
 	.suite_name = "fbarray autotest",
 	.setup = autotest_setup,
@@ -770,6 +796,8 @@ static struct unit_test_suite fbarray_test_suite = {
 		TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
 		TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
 		TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
+		/* setup for these tests is more complex so do it in test func */
+		TEST_CASE_ST(NULL, reset_array, test_lookahead_mask),
 		TEST_CASES_END()
 	}
 };
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 6d9b95006c..13dc68207f 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -216,6 +216,8 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 		for (lookahead_idx = msk_idx + 1; lookahead_idx < msk->n_masks;
 				lookahead_idx++) {
 			unsigned int s_idx, need;
+			uint64_t first_bit = 1;
+
 			lookahead_msk = msk->data[lookahead_idx];
 
 			/* if we're looking for free space, invert the mask */
@@ -225,17 +227,22 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 			/* figure out how many consecutive bits we need here */
 			need = RTE_MIN(left, MASK_ALIGN);
 
-			for (s_idx = 0; s_idx < need - 1; s_idx++)
+			/* count number of shifts we performed */
+			for (s_idx = 0; s_idx < need - 1; s_idx++) {
 				lookahead_msk &= lookahead_msk >> 1ULL;
+				/* did we lose the run yet? */
+				if ((lookahead_msk & first_bit) == 0)
+					break;
+			}
 
 			/* if first bit is not set, we've lost the run */
-			if ((lookahead_msk & 1) == 0) {
+			if ((lookahead_msk & first_bit) == 0) {
 				/*
 				 * we've scanned this far, so we know there are
 				 * no runs in the space we've lookahead-scanned
 				 * as well, so skip that on next iteration.
 				 */
-				ignore_msk = ~((1ULL << need) - 1);
+				ignore_msk = ~((1ULL << (s_idx + 1)) - 1);
 				/* outer loop will increment msk_idx so add 1 */
 				msk_idx = lookahead_idx - 1;
 				break;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.693501606 +0800
+++ 0036-fbarray-fix-lookahead-ignore-mask-handling.patch	2024-08-12 20:44:02.005069277 +0800
@@ -1 +1 @@
-From a344719c181aac28cb2ada0d2ddbfee8ad737a1a Mon Sep 17 00:00:00 2001
+From 8baf37903248c80f512d33aa27c039b9a35bc195 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a344719c181aac28cb2ada0d2ddbfee8ad737a1a ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -75 +77 @@
-index b4f0b0b0c3..195f8394be 100644
+index 6d9b95006c..13dc68207f 100644

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

* patch 'fbarray: fix lookbehind ignore mask handling' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (35 preceding siblings ...)
  2024-08-12 12:48       ` patch 'fbarray: fix lookahead ignore mask handling' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'devtools: fix symbol listing' " Xueming Li
                         ` (120 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: xuemingl, Vipin Padmam Ramesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=997166395e73d419c33172abc09d8eb279bee09b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 997166395e73d419c33172abc09d8eb279bee09b Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:35 +0100
Subject: [PATCH] fbarray: fix lookbehind ignore mask handling
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0c6e2781578f37d0497c225acf68ce5ffe31bd8e ]

When lookahead mask does not have its last bit set,
we can infer that we've lost our run.
However, currently, we set ignore mask to ignore first `need` bits,
which is incorrect for two reasons: first, using `need` bits as
ignore bit count means we might miss opportunities to start a new run
within those bits, and more importantly when doing lookbehind,
we start looking from the top, so we should be ignoring *last* N bits,
not *first* N bits of the mask.

This issue is fixed by counting how many shifts it took to lose the run,
and this is the number of bits we should ignore from the top
(+1 to skip one we stopped on).
Also, add unit tests to reproduce the problem.

Fixes: e1ca5dc86226 ("fbarray: add reverse finding of chunk")

Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_fbarray.c             | 27 +++++++++++++++++++++++++++
 lib/eal/common/eal_common_fbarray.c |  9 +++++++--
 2 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index 4b17ef6be3..13c6691e50 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -781,6 +781,32 @@ static int test_lookahead_mask(void)
 	return TEST_SUCCESS;
 }
 
+static int test_lookbehind_mask(void)
+{
+	/*
+	 * There is a certain type of lookbehind behavior we want to test here,
+	 * namely masking of bits that were scanned with lookbehind but that we
+	 * know do not match our criteria. This is achieved in two steps:
+	 *
+	 *   0. Look for a big enough chunk of free space (say, 62 elements)
+	 *   1. Trigger lookbehind by breaking a run somewhere inside mask 2
+	 *      (indices 128-191)
+	 *   2. Fail lookbehind by breaking the run somewhere inside mask 1
+	 *      (indices 64-127)
+	 *   3. Ensure that we can still find free space in mask 1 afterwards
+	 */
+
+	/* break run on mask 2 */
+	rte_fbarray_set_used(&param.arr, 130);
+	/* break run on mask 1 */
+	rte_fbarray_set_used(&param.arr, 70);
+
+	/* start from 190, we expect to find free space at 8 */
+	TEST_ASSERT_EQUAL(rte_fbarray_find_prev_n_free(&param.arr, 190, 62),
+			8, "Free chunk index is wrong\n");
+	return TEST_SUCCESS;
+}
+
 static struct unit_test_suite fbarray_test_suite = {
 	.suite_name = "fbarray autotest",
 	.setup = autotest_setup,
@@ -798,6 +824,7 @@ static struct unit_test_suite fbarray_test_suite = {
 		TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
 		/* setup for these tests is more complex so do it in test func */
 		TEST_CASE_ST(NULL, reset_array, test_lookahead_mask),
+		TEST_CASE_ST(NULL, reset_array, test_lookbehind_mask),
 		TEST_CASES_END()
 	}
 };
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 13dc68207f..fb8d32ce31 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -508,8 +508,13 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 			/* figure out how many consecutive bits we need here */
 			need = RTE_MIN(left, MASK_ALIGN);
 
-			for (s_idx = 0; s_idx < need - 1; s_idx++)
+			/* count number of shifts we performed */
+			for (s_idx = 0; s_idx < need - 1; s_idx++) {
 				lookbehind_msk &= lookbehind_msk << 1ULL;
+				/* did we lose the run yet? */
+				if ((lookbehind_msk & last_bit) == 0)
+					break;
+			}
 
 			/* if last bit is not set, we've lost the run */
 			if ((lookbehind_msk & last_bit) == 0) {
@@ -518,7 +523,7 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 				 * no runs in the space we've lookbehind-scanned
 				 * as well, so skip that on next iteration.
 				 */
-				ignore_msk = UINT64_MAX << need;
+				ignore_msk = ~(UINT64_MAX << (MASK_ALIGN - s_idx - 1));
 				/* outer loop will decrement msk_idx so add 1 */
 				msk_idx = lookbehind_idx + 1;
 				break;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.733235102 +0800
+++ 0037-fbarray-fix-lookbehind-ignore-mask-handling.patch	2024-08-12 20:44:02.015069279 +0800
@@ -1 +1 @@
-From 0c6e2781578f37d0497c225acf68ce5ffe31bd8e Mon Sep 17 00:00:00 2001
+From 997166395e73d419c33172abc09d8eb279bee09b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0c6e2781578f37d0497c225acf68ce5ffe31bd8e ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -76 +78 @@
-index 195f8394be..63d8b731f5 100644
+index 13dc68207f..fb8d32ce31 100644

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

* patch 'devtools: fix symbol listing' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (36 preceding siblings ...)
  2024-08-12 12:48       ` patch 'fbarray: fix lookbehind " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'eal/linux: lower log level on allocation attempt failure' " Xueming Li
                         ` (119 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: xuemingl, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8ccf607fad95485c05a09617c7a9900ff0129e2f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8ccf607fad95485c05a09617c7a9900ff0129e2f Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 17 Apr 2024 17:32:36 +0800
Subject: [PATCH] devtools: fix symbol listing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 33af003eb13fe0c661f638797bacc50b0cc6f412 ]

The version variable is not initialized. Therefore, if the -V option
is not specified, the value of $version is obtained from the context,
which may cause the version map parsing failure.

Fixes: 6edec7f202ac ("devtools: list symbols by version")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 buildtools/map-list-symbol.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/buildtools/map-list-symbol.sh b/buildtools/map-list-symbol.sh
index a834399816..878c5880df 100755
--- a/buildtools/map-list-symbol.sh
+++ b/buildtools/map-list-symbol.sh
@@ -5,6 +5,7 @@
 section=all
 symbol=all
 quiet=
+version=
 
 while getopts 'S:s:qV:' name; do
 	case $name in
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.758753500 +0800
+++ 0038-devtools-fix-symbol-listing.patch	2024-08-12 20:44:02.015069279 +0800
@@ -1 +1 @@
-From 33af003eb13fe0c661f638797bacc50b0cc6f412 Mon Sep 17 00:00:00 2001
+From 8ccf607fad95485c05a09617c7a9900ff0129e2f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 33af003eb13fe0c661f638797bacc50b0cc6f412 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index bc3b8d766f..43f276c05f 100755
+index a834399816..878c5880df 100755

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

* patch 'eal/linux: lower log level on allocation attempt failure' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (37 preceding siblings ...)
  2024-08-12 12:48       ` patch 'devtools: fix symbol listing' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'dma/idxd: fix setup with Ubuntu 24.04' " Xueming Li
                         ` (118 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: David Marchand; +Cc: xuemingl, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f563086258ad779c923da91ddfe8a918ac8ca3a5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f563086258ad779c923da91ddfe8a918ac8ca3a5 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 26 Jun 2024 16:51:42 +0200
Subject: [PATCH] eal/linux: lower log level on allocation attempt failure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8f4611d893b4eeffb942fffdadc4cde394e4c309 ]

On a ARM system with only 2MB hugepages configured, EAL emits an error
log with allocations larger than 512MB.

Example with testpmd:
$ dpdk-testpmd --in-memory --no-pci --log-level=*:debug -- -i
...
EAL: In-memory mode enabled, hugepages of size 33554432 bytes will be
	allocated anonymously
EAL: No free 32768 kB hugepages reported on node 0
EAL: In-memory mode enabled, hugepages of size 65536 bytes will be
	allocated anonymously
EAL: No free 64 kB hugepages reported on node 0
EAL: In-memory mode enabled, hugepages of size 1073741824 bytes will be
	allocated anonymously
EAL: No free 1048576 kB hugepages reported on node 0
...
EAL: Detected memory type: socket_id:0 hugepage_sz:1073741824
EAL: Detected memory type: socket_id:0 hugepage_sz:33554432
EAL: Detected memory type: socket_id:0 hugepage_sz:2097152
EAL: Detected memory type: socket_id:0 hugepage_sz:65536
EAL: Creating 2 segment lists: n_segs:32 socket_id:0
	hugepage_sz:1073741824
...
EAL: Creating 2 segment lists: n_segs:1024 socket_id:0
	hugepage_sz:33554432
...
EAL: Creating 4 segment lists: n_segs:8192 socket_id:0
	hugepage_sz:2097152
...
EAL: Creating 4 segment lists: n_segs:8192 socket_id:0
	hugepage_sz:65536
...
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: alloc_seg(): mmap() failed: Cannot allocate memory
EAL: Ask a virtual area of 0x40000000 bytes
EAL: Virtual area found at 0x140000000 (size = 0x40000000)
EAL: attempted to allocate 2 segments, but only 0 were allocated
EAL: Restoring previous memory policy: 4
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: eal_memalloc_alloc_seg_bulk(): couldn't find suitable memseg_list
EAL: Restoring previous memory policy: 4
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: Restoring previous memory policy: 4
EAL: request: mp_malloc_sync
EAL: No shared files mode enabled, IPC is disabled
EAL: Heap on socket 0 was expanded by 1064MB
...

The reason is that the memzone allocation (~1GB large) would require
17017 (32kB) segments. However, as displayed in the early logs, a 32kB
memory segment list can only host 8192 segments (controlled by the build
option RTE_MAX_MEMSEG_PER_LIST).

This log message is misleading as there is no issue in the end: the
allocation succeeded with 2MB hugepages.

Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/eal/linux/eal_memalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c
index 9853ec78a2..b9fc83fe6a 100644
--- a/lib/eal/linux/eal_memalloc.c
+++ b/lib/eal/linux/eal_memalloc.c
@@ -1061,7 +1061,7 @@ eal_memalloc_alloc_seg_bulk(struct rte_memseg **ms, int n_segs, size_t page_sz,
 	/* memalloc is locked, so it's safe to use thread-unsafe version */
 	ret = rte_memseg_list_walk_thread_unsafe(alloc_seg_walk, &wa);
 	if (ret == 0) {
-		RTE_LOG(ERR, EAL, "%s(): couldn't find suitable memseg_list\n",
+		RTE_LOG(DEBUG, EAL, "%s(): couldn't find suitable memseg_list\n",
 			__func__);
 		ret = -1;
 	} else if (ret > 0) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.785595698 +0800
+++ 0039-eal-linux-lower-log-level-on-allocation-attempt-fail.patch	2024-08-12 20:44:02.015069279 +0800
@@ -1 +1 @@
-From 8f4611d893b4eeffb942fffdadc4cde394e4c309 Mon Sep 17 00:00:00 2001
+From f563086258ad779c923da91ddfe8a918ac8ca3a5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8f4611d893b4eeffb942fffdadc4cde394e4c309 ]
@@ -66 +68,0 @@
-Cc: stable@dpdk.org
@@ -75 +77 @@
-index 0cc3295994..e354efc95d 100644
+index 9853ec78a2..b9fc83fe6a 100644
@@ -82,2 +84,2 @@
--		EAL_LOG(ERR, "%s(): couldn't find suitable memseg_list",
-+		EAL_LOG(DEBUG, "%s(): couldn't find suitable memseg_list",
+-		RTE_LOG(ERR, EAL, "%s(): couldn't find suitable memseg_list\n",
++		RTE_LOG(DEBUG, EAL, "%s(): couldn't find suitable memseg_list\n",

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

* patch 'dma/idxd: fix setup with Ubuntu 24.04' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (38 preceding siblings ...)
  2024-08-12 12:48       ` patch 'eal/linux: lower log level on allocation attempt failure' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'app/testpmd: fix help string of BPF load command' " Xueming Li
                         ` (117 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Wenwu Ma; +Cc: xuemingl, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=7353cb767ff6f074df4f24d308ab0f544b663618

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7353cb767ff6f074df4f24d308ab0f544b663618 Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Fri, 28 Jun 2024 17:54:00 +0800
Subject: [PATCH] dma/idxd: fix setup with Ubuntu 24.04
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d569af3d4e8ef896591f4e50f7bd1c1274c86e15 ]

In Ubuntu 24.04 and with Linux kernel >= v6.7, DSA's workqueue has a
driver_name file in sysfs.
DPDK needs to write a correct value to this file when configuring a device
instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be
configured, this patch fixes the issue.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7af1e0aceeb3
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/dma/idxd/dpdk_idxd_cfg.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py
index c0c833ade9..5c9572b49d 100755
--- a/drivers/dma/idxd/dpdk_idxd_cfg.py
+++ b/drivers/dma/idxd/dpdk_idxd_cfg.py
@@ -104,8 +104,10 @@ def configure_dsa(dsa_id, args):
                  "priority": 1,
                  "max_batch_size": 1024,
                  "size": int(max_work_queues_size / nb_queues)}
-        wqcfg.update(parse_wq_opts(args.wq_option))
         wq_dir = SysfsDir(os.path.join(dsa_dir.path, f"wq{dsa_id}.{q}"))
+        if os.path.exists(os.path.join(wq_dir.path, f"driver_name")):
+            wqcfg.update({"driver_name": "user"})
+        wqcfg.update(parse_wq_opts(args.wq_option))
         wq_dir.write_values(wqcfg)
 
     # enable device and then queues
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.809765696 +0800
+++ 0040-dma-idxd-fix-setup-with-Ubuntu-24.04.patch	2024-08-12 20:44:02.015069279 +0800
@@ -1 +1 @@
-From d569af3d4e8ef896591f4e50f7bd1c1274c86e15 Mon Sep 17 00:00:00 2001
+From 7353cb767ff6f074df4f24d308ab0f544b663618 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d569af3d4e8ef896591f4e50f7bd1c1274c86e15 ]
@@ -11,2 +13,0 @@
-
-Cc: stable@dpdk.org

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

* patch 'app/testpmd: fix help string of BPF load command' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (39 preceding siblings ...)
  2024-08-12 12:48       ` patch 'dma/idxd: fix setup with Ubuntu 24.04' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'bus/dpaa: fix bus scan for DMA devices' " Xueming Li
                         ` (116 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Chaoyong He
  Cc: xuemingl, Long Wu, Peng Zhang, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=daa0d9edd112d30e2184ca1e5fc81c737e27248a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From daa0d9edd112d30e2184ca1e5fc81c737e27248a Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 24 Jun 2024 09:58:52 +0800
Subject: [PATCH] app/testpmd: fix help string of BPF load command
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 34890bfa6e11bae143064825c22755d842531e40 ]

Based on the logic of 'bpf_parse_flags()' and the 'bpf-load' section of
'testpmd_funcs.rst' document, the 'B' flag in the help string of
bpf-load command should be '-'.

Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
 app/test-pmd/bpf_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c
index 46f6b7d6d2..24d34f983e 100644
--- a/app/test-pmd/bpf_cmd.c
+++ b/app/test-pmd/bpf_cmd.c
@@ -139,7 +139,7 @@ static cmdline_parse_token_string_t cmd_load_bpf_prm =
 cmdline_parse_inst_t cmd_operate_bpf_ld_parse = {
 	.f = cmd_operate_bpf_ld_parsed,
 	.data = NULL,
-	.help_str = "bpf-load rx|tx <port> <queue> <J|M|B> <file_name>",
+	.help_str = "bpf-load rx|tx <port> <queue> <J|M|-> <file_name>",
 	.tokens = {
 		(void *)&cmd_load_bpf_start,
 		(void *)&cmd_load_bpf_dir,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.832947695 +0800
+++ 0041-app-testpmd-fix-help-string-of-BPF-load-command.patch	2024-08-12 20:44:02.015069279 +0800
@@ -1 +1 @@
-From 34890bfa6e11bae143064825c22755d842531e40 Mon Sep 17 00:00:00 2001
+From daa0d9edd112d30e2184ca1e5fc81c737e27248a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 34890bfa6e11bae143064825c22755d842531e40 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'bus/dpaa: fix bus scan for DMA devices' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (40 preceding siblings ...)
  2024-08-12 12:48       ` patch 'app/testpmd: fix help string of BPF load command' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'bus/dpaa: fix memory leak in bus scan' " Xueming Li
                         ` (115 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: xuemingl, Vanshika Shukla, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d36efdb2cd7f25c2a9c9ffc472df1708f59d0952

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d36efdb2cd7f25c2a9c9ffc472df1708f59d0952 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 10 Jul 2024 14:25:27 +0530
Subject: [PATCH] bus/dpaa: fix bus scan for DMA devices
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bf62ec7f0c99e861b65f550191b98377ac9dd2f9 ]

If there is no sec device available, code is not scanning QDMA dev.
This patch fixes this problem by adding a goto statement instead
of return in case no sec device available.

Fixes: 583f3732974f ("dma/dpaa: introduce DPAA DMA driver skeleton")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index a67f5c9ab5..0823553398 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -220,7 +220,7 @@ dpaa_create_device_list(void)
 
 	if (dpaa_sec_available()) {
 		DPAA_BUS_LOG(INFO, "DPAA SEC devices are not available");
-		return 0;
+		goto qdma_dpaa;
 	}
 
 	/* Creating SEC Devices */
@@ -259,6 +259,7 @@ dpaa_create_device_list(void)
 
 	rte_dpaa_bus.device_count += i;
 
+qdma_dpaa:
 	/* Creating QDMA Device */
 	for (i = 0; i < RTE_DPAA_QDMA_DEVICES; i++) {
 		dev = calloc(1, sizeof(struct rte_dpaa_device));
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.856421293 +0800
+++ 0042-bus-dpaa-fix-bus-scan-for-DMA-devices.patch	2024-08-12 20:44:02.015069279 +0800
@@ -1 +1 @@
-From bf62ec7f0c99e861b65f550191b98377ac9dd2f9 Mon Sep 17 00:00:00 2001
+From d36efdb2cd7f25c2a9c9ffc472df1708f59d0952 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bf62ec7f0c99e861b65f550191b98377ac9dd2f9 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 64b748626b..b8f41ec069 100644
+index a67f5c9ab5..0823553398 100644
@@ -23 +25 @@
-@@ -221,7 +221,7 @@ dpaa_create_device_list(void)
+@@ -220,7 +220,7 @@ dpaa_create_device_list(void)
@@ -32 +34 @@
-@@ -260,6 +260,7 @@ dpaa_create_device_list(void)
+@@ -259,6 +259,7 @@ dpaa_create_device_list(void)

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

* patch 'bus/dpaa: fix memory leak in bus scan' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (41 preceding siblings ...)
  2024-08-12 12:48       ` patch 'bus/dpaa: fix bus scan for DMA devices' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'common/dpaax: fix IOVA table cleanup' " Xueming Li
                         ` (114 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Apeksha Gupta; +Cc: xuemingl, Vanshika Shukla, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=0b4bc3a5d1d1c981a2fb2a7de19f05e434036566

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0b4bc3a5d1d1c981a2fb2a7de19f05e434036566 Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Wed, 10 Jul 2024 14:25:28 +0530
Subject: [PATCH] bus/dpaa: fix memory leak in bus scan
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit de0833ffe31739fd40789b1580025bc849d8871f ]

Resource leak:
variable dev is going out of scope leaks the storage.

Coverity issue: 373703
Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 0823553398..aaf2a5f43e 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -187,6 +187,7 @@ dpaa_create_device_list(void)
 		if (dev->intr_handle == NULL) {
 			DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");
 			ret = -ENOMEM;
+			free(dev);
 			goto cleanup;
 		}
 
@@ -238,6 +239,7 @@ dpaa_create_device_list(void)
 		if (dev->intr_handle == NULL) {
 			DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");
 			ret = -ENOMEM;
+			free(dev);
 			goto cleanup;
 		}
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.880520291 +0800
+++ 0043-bus-dpaa-fix-memory-leak-in-bus-scan.patch	2024-08-12 20:44:02.025069281 +0800
@@ -1 +1 @@
-From de0833ffe31739fd40789b1580025bc849d8871f Mon Sep 17 00:00:00 2001
+From 0b4bc3a5d1d1c981a2fb2a7de19f05e434036566 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit de0833ffe31739fd40789b1580025bc849d8871f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index b8f41ec069..1f6997c77e 100644
+index 0823553398..aaf2a5f43e 100644
@@ -23 +25 @@
-@@ -188,6 +188,7 @@ dpaa_create_device_list(void)
+@@ -187,6 +187,7 @@ dpaa_create_device_list(void)
@@ -31 +33 @@
-@@ -239,6 +240,7 @@ dpaa_create_device_list(void)
+@@ -238,6 +239,7 @@ dpaa_create_device_list(void)

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

* patch 'common/dpaax: fix IOVA table cleanup' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (42 preceding siblings ...)
  2024-08-12 12:48       ` patch 'bus/dpaa: fix memory leak in bus scan' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'common/dpaax: fix node array overrun' " Xueming Li
                         ` (113 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: xuemingl, Vanshika Shukla, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=90c9f938e50a5c79c92b039ab5d238233509a833

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 90c9f938e50a5c79c92b039ab5d238233509a833 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 10 Jul 2024 14:25:29 +0530
Subject: [PATCH] common/dpaax: fix IOVA table cleanup
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3a3cdff440fe6b98b95f798caf7a4583a49ebe08 ]

Fixes incorrect structure free.

Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/common/dpaax/dpaax_iova_table.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 9daac4bc03..d2a78f4c19 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018 NXP
+ * Copyright 2018-2023 NXP
  */
 
 #include <rte_memory.h>
@@ -255,10 +255,7 @@ dpaax_iova_table_populate(void)
 void
 dpaax_iova_table_depopulate(void)
 {
-	if (dpaax_iova_table_p == NULL)
-		return;
-
-	rte_free(dpaax_iova_table_p->entries);
+	rte_free(dpaax_iova_table_p);
 	dpaax_iova_table_p = NULL;
 
 	DPAAX_DEBUG("IOVA Table cleaned");
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.916591188 +0800
+++ 0044-common-dpaax-fix-IOVA-table-cleanup.patch	2024-08-12 20:44:02.025069281 +0800
@@ -1 +1 @@
-From 3a3cdff440fe6b98b95f798caf7a4583a49ebe08 Mon Sep 17 00:00:00 2001
+From 90c9f938e50a5c79c92b039ab5d238233509a833 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3a3cdff440fe6b98b95f798caf7a4583a49ebe08 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'common/dpaax: fix node array overrun' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (43 preceding siblings ...)
  2024-08-12 12:48       ` patch 'common/dpaax: fix IOVA table cleanup' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'bus/dpaa: remove redundant file descriptor check' " Xueming Li
                         ` (112 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Apeksha Gupta; +Cc: xuemingl, Vanshika Shukla, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=bb85c1fd729590c418ad221cef24f83a01bc82cb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bb85c1fd729590c418ad221cef24f83a01bc82cb Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Wed, 10 Jul 2024 14:25:30 +0530
Subject: [PATCH] common/dpaax: fix node array overrun
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fae5c5cf59b13efa1fe40d9dd75e0c8731dc46b1 ]

Out-of-bounds read, overrunning dynamic array nodes at offset
corresponding to index variable j.

Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/common/dpaax/dpaax_iova_table.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index d2a78f4c19..860e702333 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -139,10 +139,12 @@ read_memory_node(unsigned int *count)
 	}
 
 	DPAAX_DEBUG("Device-tree memory node data:");
-	do {
+
+	while (j > 0) {
+		--j;
 		DPAAX_DEBUG("    %08" PRIx64 " %08zu",
 			    nodes[j].addr, nodes[j].len);
-	} while (--j);
+	}
 
 cleanup:
 	close(fd);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.989637082 +0800
+++ 0045-common-dpaax-fix-node-array-overrun.patch	2024-08-12 20:44:02.025069281 +0800
@@ -1 +1 @@
-From fae5c5cf59b13efa1fe40d9dd75e0c8731dc46b1 Mon Sep 17 00:00:00 2001
+From bb85c1fd729590c418ad221cef24f83a01bc82cb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fae5c5cf59b13efa1fe40d9dd75e0c8731dc46b1 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'bus/dpaa: remove redundant file descriptor check' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (44 preceding siblings ...)
  2024-08-12 12:48       ` patch 'common/dpaax: fix node array overrun' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/dpaa: forbid MTU configuration for shared interface' " Xueming Li
                         ` (111 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Rohit Raj; +Cc: xuemingl, Vanshika Shukla, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d21248db895951d5efbbb77c5ca0d936fed30675

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d21248db895951d5efbbb77c5ca0d936fed30675 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Wed, 10 Jul 2024 14:25:31 +0530
Subject: [PATCH] bus/dpaa: remove redundant file descriptor check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0ca2093f6b3608467bebe9caf27ce98671fb3381 ]

This patch removes the redundant file descriptor check.

Coverity issue: 425715
Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/bus/dpaa/base/qbman/process.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/process.c b/drivers/bus/dpaa/base/qbman/process.c
index 3504ec97db..3e4622f606 100644
--- a/drivers/bus/dpaa/base/qbman/process.c
+++ b/drivers/bus/dpaa/base/qbman/process.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
  *
  * Copyright 2011-2016 Freescale Semiconductor Inc.
- * Copyright 2017,2020 NXP
+ * Copyright 2017,2020,2022,2024 NXP
  *
  */
 #include <assert.h>
@@ -27,15 +27,16 @@ static int check_fd(void)
 {
 	int ret;
 
-	if (fd >= 0)
-		return 0;
 	ret = pthread_mutex_lock(&fd_init_lock);
 	assert(!ret);
+
 	/* check again with the lock held */
 	if (fd < 0)
 		fd = open(PROCESS_PATH, O_RDWR);
+
 	ret = pthread_mutex_unlock(&fd_init_lock);
 	assert(!ret);
+
 	return (fd >= 0) ? 0 : -ENODEV;
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.043643478 +0800
+++ 0046-bus-dpaa-remove-redundant-file-descriptor-check.patch	2024-08-12 20:44:02.025069281 +0800
@@ -1 +1 @@
-From 0ca2093f6b3608467bebe9caf27ce98671fb3381 Mon Sep 17 00:00:00 2001
+From d21248db895951d5efbbb77c5ca0d936fed30675 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0ca2093f6b3608467bebe9caf27ce98671fb3381 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 59e0d641ce..2d805c5bd9 100644
+index 3504ec97db..3e4622f606 100644
@@ -31 +33 @@
-@@ -28,15 +28,16 @@ static int check_fd(void)
+@@ -27,15 +27,16 @@ static int check_fd(void)

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

* patch 'net/dpaa: forbid MTU configuration for shared interface' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (45 preceding siblings ...)
  2024-08-12 12:48       ` patch 'bus/dpaa: remove redundant file descriptor check' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/mlx5: fix start without duplicate flow patterns' " Xueming Li
                         ` (110 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Rohit Raj; +Cc: xuemingl, Vanshika Shukla, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=77231b25980ef996ed140b6651826fbeff283104

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 77231b25980ef996ed140b6651826fbeff283104 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Wed, 10 Jul 2024 14:25:33 +0530
Subject: [PATCH] net/dpaa: forbid MTU configuration for shared interface
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ee0fa7552a0af02e2151414aeec2ce4e12a2e806 ]

Since DPDK was able to configure mtu in VSP/Shared interface mode,
it was causing misconfiguration of the hw which further caused crashes.

This patch allows only kernel to config MTU in such cases.

Fixes: e4abd4ff183c ("net/dpaa: support virtual storage profile")

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 779bdc5860..bcb28f33ee 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -14,6 +14,7 @@
 #include <pthread.h>
 #include <sys/types.h>
 #include <sys/syscall.h>
+#include <sys/ioctl.h>
 
 #include <rte_string_fns.h>
 #include <rte_byteorder.h>
@@ -165,9 +166,15 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	uint32_t frame_size = mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN
 				+ VLAN_TAG_SIZE;
 	uint32_t buffsz = dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM;
+	struct fman_if *fif = dev->process_private;
 
 	PMD_INIT_FUNC_TRACE();
 
+	if (fif->is_shared_mac) {
+		DPAA_PMD_ERR("Cannot configure mtu from DPDK in VSP mode.");
+		return -ENOTSUP;
+	}
+
 	/*
 	 * Refuse mtu that requires the support of scattered packets
 	 * when this feature has not been enabled before.
@@ -206,7 +213,8 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 	struct rte_intr_handle *intr_handle;
 	uint32_t max_rx_pktlen;
 	int speed, duplex;
-	int ret, rx_status;
+	int ret, rx_status, socket_fd;
+	struct ifreq ifr;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -222,6 +230,26 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 				     dpaa_intf->name);
 			return -EHOSTDOWN;
 		}
+
+		socket_fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
+		if (socket_fd == -1) {
+			DPAA_PMD_ERR("Cannot open IF socket");
+			return -errno;
+		}
+
+		strncpy(ifr.ifr_name, dpaa_intf->name, IFNAMSIZ - 1);
+
+		if (ioctl(socket_fd, SIOCGIFMTU, &ifr) < 0) {
+			DPAA_PMD_ERR("Cannot get interface mtu");
+			close(socket_fd);
+			return -errno;
+		}
+
+		close(socket_fd);
+		DPAA_PMD_INFO("Using kernel configured mtu size(%u)",
+			     ifr.ifr_mtu);
+
+		eth_conf->rxmode.mtu = ifr.ifr_mtu;
 	}
 
 	/* Rx offloads which are enabled by default */
@@ -249,7 +277,8 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 		max_rx_pktlen = DPAA_MAX_RX_PKT_LEN;
 	}
 
-	fman_if_set_maxfrm(dev->process_private, max_rx_pktlen);
+	if (!fif->is_shared_mac)
+		fman_if_set_maxfrm(dev->process_private, max_rx_pktlen);
 
 	if (rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER) {
 		DPAA_PMD_DEBUG("enabling scatter mode");
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.095906474 +0800
+++ 0047-net-dpaa-forbid-MTU-configuration-for-shared-interfa.patch	2024-08-12 20:44:02.025069281 +0800
@@ -1 +1 @@
-From ee0fa7552a0af02e2151414aeec2ce4e12a2e806 Mon Sep 17 00:00:00 2001
+From 77231b25980ef996ed140b6651826fbeff283104 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ee0fa7552a0af02e2151414aeec2ce4e12a2e806 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 44bac67803..060b8c678f 100644
+index 779bdc5860..bcb28f33ee 100644

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

* patch 'net/mlx5: fix start without duplicate flow patterns' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (46 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/dpaa: forbid MTU configuration for shared interface' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'fbarray: fix finding for unaligned length' " Xueming Li
                         ` (109 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Rongwei Liu; +Cc: xuemingl, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d88beb497f74e9180ab15b7036923952de84bd07

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d88beb497f74e9180ab15b7036923952de84bd07 Mon Sep 17 00:00:00 2001
From: Rongwei Liu <rongweil@nvidia.com>
Date: Thu, 13 Jun 2024 15:45:28 +0300
Subject: [PATCH] net/mlx5: fix start without duplicate flow patterns
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 13b5713a627d313d4717923df4c37158b1cb4019 ]

When devargs "allow_duplicate_pattern=0" is specified, PMD won't
allow duplicated flows to be inserted and return EEXIST as rte_errno.

The queue/RSS split table is shared globally by all representors and
PMD didn't prepend port information into it, so all the following ports
tries to insert the same flows and cause PMD insertion failure.

Using the hash list to manage it can solve the issue.

Fixes: ddb68e47331e ("net/mlx5: add extended metadata mode for HWS")

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 106 +++++++++++++++++--------------
 drivers/net/mlx5/mlx5.c          |   2 -
 drivers/net/mlx5/mlx5.h          |   4 +-
 drivers/net/mlx5/mlx5_flow.c     |  16 ++---
 4 files changed, 67 insertions(+), 61 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index fd104dabb2..2cf609873a 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -455,15 +455,16 @@ __mlx5_discovery_misc5_cap(struct mlx5_priv *priv)
  * Routine checks the reference counter and does actual
  * resources creation/initialization only if counter is zero.
  *
- * @param[in] priv
- *   Pointer to the private device data structure.
+ * @param[in] eth_dev
+ *   Pointer to the device.
  *
  * @return
  *   Zero on success, positive error code otherwise.
  */
 static int
-mlx5_alloc_shared_dr(struct mlx5_priv *priv)
+mlx5_alloc_shared_dr(struct rte_eth_dev *eth_dev)
 {
+	struct mlx5_priv *priv = eth_dev->data->dev_private;
 	struct mlx5_dev_ctx_shared *sh = priv->sh;
 	char s[MLX5_NAME_SIZE] __rte_unused;
 	int err;
@@ -578,6 +579,44 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
 		err = errno;
 		goto error;
 	}
+
+	if (sh->config.dv_flow_en == 1) {
+		/* Query availability of metadata reg_c's. */
+		if (!priv->sh->metadata_regc_check_flag) {
+			err = mlx5_flow_discover_mreg_c(eth_dev);
+			if (err < 0) {
+				err = -err;
+				goto error;
+			}
+		}
+		if (!mlx5_flow_ext_mreg_supported(eth_dev)) {
+			DRV_LOG(DEBUG,
+				"port %u extensive metadata register is not supported",
+				eth_dev->data->port_id);
+			if (sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) {
+				DRV_LOG(ERR, "metadata mode %u is not supported "
+					     "(no metadata registers available)",
+					     sh->config.dv_xmeta_en);
+				err = ENOTSUP;
+				goto error;
+			}
+		}
+		if (sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY &&
+		    mlx5_flow_ext_mreg_supported(eth_dev) && sh->dv_regc0_mask) {
+			sh->mreg_cp_tbl = mlx5_hlist_create(MLX5_FLOW_MREG_HNAME,
+							    MLX5_FLOW_MREG_HTABLE_SZ,
+							    false, true, eth_dev,
+							    flow_dv_mreg_create_cb,
+							    flow_dv_mreg_match_cb,
+							    flow_dv_mreg_remove_cb,
+							    flow_dv_mreg_clone_cb,
+							    flow_dv_mreg_clone_free_cb);
+			if (!sh->mreg_cp_tbl) {
+				err = ENOMEM;
+				goto error;
+			}
+		}
+	}
 #endif
 	if (!sh->tunnel_hub && sh->config.dv_miss_info)
 		err = mlx5_alloc_tunnel_hub(sh);
@@ -662,6 +701,10 @@ error:
 		mlx5_list_destroy(sh->dest_array_list);
 		sh->dest_array_list = NULL;
 	}
+	if (sh->mreg_cp_tbl) {
+		mlx5_hlist_destroy(sh->mreg_cp_tbl);
+		sh->mreg_cp_tbl = NULL;
+	}
 	return err;
 }
 
@@ -759,6 +802,10 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)
 		mlx5_list_destroy(sh->dest_array_list);
 		sh->dest_array_list = NULL;
 	}
+	if (sh->mreg_cp_tbl) {
+		mlx5_hlist_destroy(sh->mreg_cp_tbl);
+		sh->mreg_cp_tbl = NULL;
+	}
 }
 
 /**
@@ -1545,13 +1592,6 @@ err_secondary:
 	}
 	/* Create context for virtual machine VLAN workaround. */
 	priv->vmwa_context = mlx5_vlan_vmwa_init(eth_dev, spawn->ifindex);
-	if (sh->config.dv_flow_en) {
-		err = mlx5_alloc_shared_dr(priv);
-		if (err)
-			goto error;
-		if (mlx5_flex_item_port_init(eth_dev) < 0)
-			goto error;
-	}
 	if (mlx5_devx_obj_ops_en(sh)) {
 		priv->obj_ops = devx_obj_ops;
 		mlx5_queue_counter_id_prepare(eth_dev);
@@ -1602,6 +1642,13 @@ err_secondary:
 			goto error;
 	}
 	rte_rwlock_init(&priv->ind_tbls_lock);
+	if (sh->config.dv_flow_en) {
+		err = mlx5_alloc_shared_dr(eth_dev);
+		if (err)
+			goto error;
+		if (mlx5_flex_item_port_init(eth_dev) < 0)
+			goto error;
+	}
 	if (priv->sh->config.dv_flow_en == 2) {
 #ifdef HAVE_MLX5_HWS_SUPPORT
 		if (priv->sh->config.dv_esw_en) {
@@ -1682,43 +1729,6 @@ err_secondary:
 		err = -err;
 		goto error;
 	}
-	/* Query availability of metadata reg_c's. */
-	if (!priv->sh->metadata_regc_check_flag) {
-		err = mlx5_flow_discover_mreg_c(eth_dev);
-		if (err < 0) {
-			err = -err;
-			goto error;
-		}
-	}
-	if (!mlx5_flow_ext_mreg_supported(eth_dev)) {
-		DRV_LOG(DEBUG,
-			"port %u extensive metadata register is not supported",
-			eth_dev->data->port_id);
-		if (sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) {
-			DRV_LOG(ERR, "metadata mode %u is not supported "
-				     "(no metadata registers available)",
-				     sh->config.dv_xmeta_en);
-			err = ENOTSUP;
-			goto error;
-		}
-	}
-	if (sh->config.dv_flow_en &&
-	    sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY &&
-	    mlx5_flow_ext_mreg_supported(eth_dev) &&
-	    priv->sh->dv_regc0_mask) {
-		priv->mreg_cp_tbl = mlx5_hlist_create(MLX5_FLOW_MREG_HNAME,
-						      MLX5_FLOW_MREG_HTABLE_SZ,
-						      false, true, eth_dev,
-						      flow_dv_mreg_create_cb,
-						      flow_dv_mreg_match_cb,
-						      flow_dv_mreg_remove_cb,
-						      flow_dv_mreg_clone_cb,
-						    flow_dv_mreg_clone_free_cb);
-		if (!priv->mreg_cp_tbl) {
-			err = ENOMEM;
-			goto error;
-		}
-	}
 	rte_spinlock_init(&priv->shared_act_sl);
 	mlx5_flow_counter_mode_config(eth_dev);
 	mlx5_flow_drop_action_config(eth_dev);
@@ -1737,8 +1747,6 @@ error:
 		    priv->sh->config.dv_esw_en)
 			flow_hw_destroy_vport_action(eth_dev);
 #endif
-		if (priv->mreg_cp_tbl)
-			mlx5_hlist_destroy(priv->mreg_cp_tbl);
 		if (priv->sh)
 			mlx5_os_free_shared_dr(priv);
 		if (priv->nl_socket_route >= 0)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 417e88e848..8d4a0a3dda 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2296,8 +2296,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 		mlx5_devx_cmd_destroy(priv->q_counters);
 		priv->q_counters = NULL;
 	}
-	if (priv->mreg_cp_tbl)
-		mlx5_hlist_destroy(priv->mreg_cp_tbl);
 	mlx5_mprq_free_mp(dev);
 	mlx5_os_free_shared_dr(priv);
 #ifdef HAVE_MLX5_HWS_SUPPORT
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 33401d96e4..1ac8e07d07 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1481,6 +1481,8 @@ struct mlx5_dev_ctx_shared {
 		struct mlx5_hlist *flow_tbls; /* SWS flow table. */
 		struct mlx5_hlist *groups; /* HWS flow group. */
 	};
+	struct mlx5_hlist *mreg_cp_tbl;
+	/* Hash table of Rx metadata register copy table. */
 	struct mlx5_flow_tunnel_hub *tunnel_hub;
 	/* Direct Rules tables for FDB, NIC TX+RX */
 	void *dr_drop_action; /* Pointer to DR drop action, any domain. */
@@ -1904,8 +1906,6 @@ struct mlx5_priv {
 	int nl_socket_rdma; /* Netlink socket (NETLINK_RDMA). */
 	int nl_socket_route; /* Netlink socket (NETLINK_ROUTE). */
 	struct mlx5_nl_vlan_vmwa_context *vmwa_context; /* VLAN WA context. */
-	struct mlx5_hlist *mreg_cp_tbl;
-	/* Hash table of Rx metadata register copy table. */
 	struct mlx5_mtr_config mtr_config; /* Meter configuration */
 	uint8_t mtr_sfx_reg; /* Meter prefix-suffix flow match REG_C. */
 	struct mlx5_legacy_flow_meters flow_meters; /* MTR list. */
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index ccfd189c1f..85b9ae3901 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -5228,8 +5228,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
 	};
 
 	/* Check if already registered. */
-	MLX5_ASSERT(priv->mreg_cp_tbl);
-	entry = mlx5_hlist_register(priv->mreg_cp_tbl, mark_id, &ctx);
+	MLX5_ASSERT(priv->sh->mreg_cp_tbl);
+	entry = mlx5_hlist_register(priv->sh->mreg_cp_tbl, mark_id, &ctx);
 	if (!entry)
 		return NULL;
 	return container_of(entry, struct mlx5_flow_mreg_copy_resource,
@@ -5268,10 +5268,10 @@ flow_mreg_del_copy_action(struct rte_eth_dev *dev,
 		return;
 	mcp_res = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_MCP],
 				 flow->rix_mreg_copy);
-	if (!mcp_res || !priv->mreg_cp_tbl)
+	if (!mcp_res || !priv->sh->mreg_cp_tbl)
 		return;
 	MLX5_ASSERT(mcp_res->rix_flow);
-	mlx5_hlist_unregister(priv->mreg_cp_tbl, &mcp_res->hlist_ent);
+	mlx5_hlist_unregister(priv->sh->mreg_cp_tbl, &mcp_res->hlist_ent);
 	flow->rix_mreg_copy = 0;
 }
 
@@ -5293,14 +5293,14 @@ flow_mreg_del_default_copy_action(struct rte_eth_dev *dev)
 	uint32_t mark_id;
 
 	/* Check if default flow is registered. */
-	if (!priv->mreg_cp_tbl)
+	if (!priv->sh->mreg_cp_tbl)
 		return;
 	mark_id = MLX5_DEFAULT_COPY_ID;
 	ctx.data = &mark_id;
-	entry = mlx5_hlist_lookup(priv->mreg_cp_tbl, mark_id, &ctx);
+	entry = mlx5_hlist_lookup(priv->sh->mreg_cp_tbl, mark_id, &ctx);
 	if (!entry)
 		return;
-	mlx5_hlist_unregister(priv->mreg_cp_tbl, entry);
+	mlx5_hlist_unregister(priv->sh->mreg_cp_tbl, entry);
 }
 
 /**
@@ -5338,7 +5338,7 @@ flow_mreg_add_default_copy_action(struct rte_eth_dev *dev,
 	 */
 	mark_id = MLX5_DEFAULT_COPY_ID;
 	ctx.data = &mark_id;
-	if (mlx5_hlist_lookup(priv->mreg_cp_tbl, mark_id, &ctx))
+	if (mlx5_hlist_lookup(priv->sh->mreg_cp_tbl, mark_id, &ctx))
 		return 0;
 	mcp_res = flow_mreg_add_copy_action(dev, mark_id, error);
 	if (!mcp_res)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.128429571 +0800
+++ 0048-net-mlx5-fix-start-without-duplicate-flow-patterns.patch	2024-08-12 20:44:02.045069285 +0800
@@ -1 +1 @@
-From 13b5713a627d313d4717923df4c37158b1cb4019 Mon Sep 17 00:00:00 2001
+From d88beb497f74e9180ab15b7036923952de84bd07 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 13b5713a627d313d4717923df4c37158b1cb4019 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 1753acd050..50f4810bff 100644
+index fd104dabb2..2cf609873a 100644
@@ -31 +33 @@
-@@ -467,15 +467,16 @@ __mlx5_discovery_misc5_cap(struct mlx5_priv *priv)
+@@ -455,15 +455,16 @@ __mlx5_discovery_misc5_cap(struct mlx5_priv *priv)
@@ -51 +53 @@
-@@ -590,6 +591,44 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
+@@ -578,6 +579,44 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
@@ -96 +98 @@
-@@ -674,6 +713,10 @@ error:
+@@ -662,6 +701,10 @@ error:
@@ -107 +109 @@
-@@ -771,6 +814,10 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)
+@@ -759,6 +802,10 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)
@@ -118 +120 @@
-@@ -1572,13 +1619,6 @@ err_secondary:
+@@ -1545,13 +1592,6 @@ err_secondary:
@@ -132 +134 @@
-@@ -1629,6 +1669,13 @@ err_secondary:
+@@ -1602,6 +1642,13 @@ err_secondary:
@@ -143,4 +145,4 @@
- 	if (sh->phdev->config.ipv6_tc_fallback == MLX5_IPV6_TC_UNKNOWN) {
- 		sh->phdev->config.ipv6_tc_fallback = MLX5_IPV6_TC_OK;
- 		if (!sh->cdev->config.hca_attr.modify_outer_ipv6_traffic_class ||
-@@ -1715,43 +1762,6 @@ err_secondary:
+ 	if (priv->sh->config.dv_flow_en == 2) {
+ #ifdef HAVE_MLX5_HWS_SUPPORT
+ 		if (priv->sh->config.dv_esw_en) {
+@@ -1682,43 +1729,6 @@ err_secondary:
@@ -190 +192 @@
-@@ -1770,8 +1780,6 @@ error:
+@@ -1737,8 +1747,6 @@ error:
@@ -200 +202 @@
-index 997b02c571..e482f7f0e5 100644
+index 417e88e848..8d4a0a3dda 100644
@@ -203 +205 @@
-@@ -2394,8 +2394,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+@@ -2296,8 +2296,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
@@ -213 +215 @@
-index c9a3837bd2..bd149b43e5 100644
+index 33401d96e4..1ac8e07d07 100644
@@ -216 +218 @@
-@@ -1542,6 +1542,8 @@ struct mlx5_dev_ctx_shared {
+@@ -1481,6 +1481,8 @@ struct mlx5_dev_ctx_shared {
@@ -225 +227 @@
-@@ -1968,8 +1970,6 @@ struct mlx5_priv {
+@@ -1904,8 +1906,6 @@ struct mlx5_priv {
@@ -235 +237 @@
-index daf0e41c6f..833db1f320 100644
+index ccfd189c1f..85b9ae3901 100644
@@ -238 +240 @@
-@@ -5201,8 +5201,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
+@@ -5228,8 +5228,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
@@ -249 +251 @@
-@@ -5241,10 +5241,10 @@ flow_mreg_del_copy_action(struct rte_eth_dev *dev,
+@@ -5268,10 +5268,10 @@ flow_mreg_del_copy_action(struct rte_eth_dev *dev,
@@ -262 +264 @@
-@@ -5266,14 +5266,14 @@ flow_mreg_del_default_copy_action(struct rte_eth_dev *dev)
+@@ -5293,14 +5293,14 @@ flow_mreg_del_default_copy_action(struct rte_eth_dev *dev)
@@ -280 +282 @@
-@@ -5311,7 +5311,7 @@ flow_mreg_add_default_copy_action(struct rte_eth_dev *dev,
+@@ -5338,7 +5338,7 @@ flow_mreg_add_default_copy_action(struct rte_eth_dev *dev,

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

* patch 'fbarray: fix finding for unaligned length' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (47 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/mlx5: fix start without duplicate flow patterns' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'buildtools: fix build with clang 17 and ASan' " Xueming Li
                         ` (108 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a4e8a4f48899e1e120bcc4f1e5256889935e8cfe

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a4e8a4f48899e1e120bcc4f1e5256889935e8cfe Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 10 Jul 2024 12:49:26 +0100
Subject: [PATCH] fbarray: fix finding for unaligned length
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a744665d2149ba8707621c1214c798f807ec398e ]

When array length is not aligned on a power of 2, we need to mask out the
unaligned bits from the mask whenever we reach the last mask.
However, when both ignore mask (e.g. due to starting at unaligned bit) and
last index ignore mask are specified, we combine them with an OR,
which is incorrect.
Fix it to combine them with AND instead,
and add a unit test covering this case.

The reverse function does not suffer from this issue
because it does not have to deal with array end,
and array beginning is always aligned.

Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_fbarray.c             | 123 +++++++++++++++++++++-------
 lib/eal/common/eal_common_fbarray.c |   2 +-
 2 files changed, 94 insertions(+), 31 deletions(-)

diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index 13c6691e50..09f6907fb1 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -21,23 +21,41 @@ struct fbarray_testsuite_params {
 };
 
 static struct fbarray_testsuite_params param;
+static struct fbarray_testsuite_params unaligned;
 
 #define FBARRAY_TEST_ARR_NAME "fbarray_autotest"
 #define FBARRAY_TEST_LEN 256
+#define FBARRAY_UNALIGNED_TEST_ARR_NAME "fbarray_unaligned_autotest"
+#define FBARRAY_UNALIGNED_TEST_LEN 60
 #define FBARRAY_TEST_ELT_SZ (sizeof(int))
 
 static int autotest_setup(void)
 {
-	return rte_fbarray_init(&param.arr, FBARRAY_TEST_ARR_NAME,
+	int ret;
+
+	ret = rte_fbarray_init(&param.arr, FBARRAY_TEST_ARR_NAME,
 			FBARRAY_TEST_LEN, FBARRAY_TEST_ELT_SZ);
+	if (ret) {
+		printf("Failed to initialize test array\n");
+		return -1;
+	}
+	ret = rte_fbarray_init(&unaligned.arr, FBARRAY_UNALIGNED_TEST_ARR_NAME,
+			FBARRAY_UNALIGNED_TEST_LEN, FBARRAY_TEST_ELT_SZ);
+	if (ret) {
+		printf("Failed to initialize unaligned test array\n");
+		rte_fbarray_destroy(&param.arr);
+		return -1;
+	}
+	return 0;
 }
 
 static void autotest_teardown(void)
 {
 	rte_fbarray_destroy(&param.arr);
+	rte_fbarray_destroy(&unaligned.arr);
 }
 
-static int init_array(void)
+static int init_aligned(void)
 {
 	int i;
 	for (i = param.start; i <= param.end; i++) {
@@ -47,11 +65,35 @@ static int init_array(void)
 	return 0;
 }
 
-static void reset_array(void)
+static int init_unaligned(void)
+{
+	int i;
+	for (i = unaligned.start; i <= unaligned.end; i++) {
+		if (rte_fbarray_set_used(&unaligned.arr, i))
+			return -1;
+	}
+	return 0;
+}
+
+static void reset_aligned(void)
 {
 	int i;
 	for (i = 0; i < FBARRAY_TEST_LEN; i++)
 		rte_fbarray_set_free(&param.arr, i);
+	/* reset param as well */
+	param.start = -1;
+	param.end = -1;
+}
+
+static void reset_unaligned(void)
+{
+	int i;
+	for (i = 0; i < FBARRAY_UNALIGNED_TEST_LEN; i++)
+		rte_fbarray_set_free(&unaligned.arr, i);
+	/* reset param as well */
+	unaligned.start = -1;
+	unaligned.end = -1;
+
 }
 
 static int first_msk_test_setup(void)
@@ -59,7 +101,7 @@ static int first_msk_test_setup(void)
 	/* put all within first mask */
 	param.start = 3;
 	param.end = 10;
-	return init_array();
+	return init_aligned();
 }
 
 static int cross_msk_test_setup(void)
@@ -67,7 +109,7 @@ static int cross_msk_test_setup(void)
 	/* put all within second and third mask */
 	param.start = 70;
 	param.end = 160;
-	return init_array();
+	return init_aligned();
 }
 
 static int multi_msk_test_setup(void)
@@ -75,7 +117,7 @@ static int multi_msk_test_setup(void)
 	/* put all within first and last mask */
 	param.start = 3;
 	param.end = FBARRAY_TEST_LEN - 20;
-	return init_array();
+	return init_aligned();
 }
 
 static int last_msk_test_setup(void)
@@ -83,7 +125,7 @@ static int last_msk_test_setup(void)
 	/* put all within last mask */
 	param.start = FBARRAY_TEST_LEN - 20;
 	param.end = FBARRAY_TEST_LEN - 1;
-	return init_array();
+	return init_aligned();
 }
 
 static int full_msk_test_setup(void)
@@ -91,16 +133,7 @@ static int full_msk_test_setup(void)
 	/* fill entire mask */
 	param.start = 0;
 	param.end = FBARRAY_TEST_LEN - 1;
-	return init_array();
-}
-
-static int empty_msk_test_setup(void)
-{
-	/* do not fill anything in */
-	reset_array();
-	param.start = -1;
-	param.end = -1;
-	return 0;
+	return init_aligned();
 }
 
 static int lookahead_test_setup(void)
@@ -108,7 +141,7 @@ static int lookahead_test_setup(void)
 	/* set index 64 as used */
 	param.start = 64;
 	param.end = 64;
-	return init_array();
+	return init_aligned();
 }
 
 static int lookbehind_test_setup(void)
@@ -116,7 +149,15 @@ static int lookbehind_test_setup(void)
 	/* set index 63 as used */
 	param.start = 63;
 	param.end = 63;
-	return init_array();
+	return init_aligned();
+}
+
+static int unaligned_test_setup(void)
+{
+	unaligned.start = 0;
+	/* leave one free bit at the end */
+	unaligned.end = FBARRAY_UNALIGNED_TEST_LEN - 2;
+	return init_unaligned();
 }
 
 static int test_invalid(void)
@@ -470,7 +511,7 @@ static int test_basic(void)
 	if (check_free())
 		return TEST_FAILED;
 
-	reset_array();
+	reset_aligned();
 
 	return TEST_SUCCESS;
 }
@@ -713,6 +754,26 @@ static int test_find(void)
 	return TEST_SUCCESS;
 }
 
+static int test_find_unaligned(void)
+{
+	TEST_ASSERT_EQUAL((int)unaligned.arr.count, unaligned.end - unaligned.start + 1,
+			"Wrong element count\n");
+	/* ensure space is free before start */
+	if (ensure_correct(&unaligned.arr, 0, unaligned.start - 1, false))
+		return TEST_FAILED;
+	/* ensure space is occupied where it's supposed to be */
+	if (ensure_correct(&unaligned.arr, unaligned.start, unaligned.end, true))
+		return TEST_FAILED;
+	/* ensure space after end is free as well */
+	if (ensure_correct(&unaligned.arr, unaligned.end + 1, FBARRAY_UNALIGNED_TEST_LEN - 1,
+			false))
+		return TEST_FAILED;
+	/* test if find_biggest API's work correctly */
+	if (test_biggest(&unaligned.arr, unaligned.start, unaligned.end))
+		return TEST_FAILED;
+	return TEST_SUCCESS;
+}
+
 static int test_empty(void)
 {
 	TEST_ASSERT_EQUAL((int)param.arr.count, 0, "Wrong element count\n");
@@ -814,17 +875,19 @@ static struct unit_test_suite fbarray_test_suite = {
 	.unit_test_cases = {
 		TEST_CASE(test_invalid),
 		TEST_CASE(test_basic),
-		TEST_CASE_ST(first_msk_test_setup, reset_array, test_find),
-		TEST_CASE_ST(cross_msk_test_setup, reset_array, test_find),
-		TEST_CASE_ST(multi_msk_test_setup, reset_array, test_find),
-		TEST_CASE_ST(last_msk_test_setup, reset_array, test_find),
-		TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),
-		TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
-		TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
-		TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
+		TEST_CASE_ST(first_msk_test_setup, reset_aligned, test_find),
+		TEST_CASE_ST(cross_msk_test_setup, reset_aligned, test_find),
+		TEST_CASE_ST(multi_msk_test_setup, reset_aligned, test_find),
+		TEST_CASE_ST(last_msk_test_setup, reset_aligned, test_find),
+		TEST_CASE_ST(full_msk_test_setup, reset_aligned, test_find),
+		/* empty test does not need setup */
+		TEST_CASE_ST(NULL, reset_aligned, test_empty),
+		TEST_CASE_ST(lookahead_test_setup, reset_aligned, test_lookahead),
+		TEST_CASE_ST(lookbehind_test_setup, reset_aligned, test_lookbehind),
 		/* setup for these tests is more complex so do it in test func */
-		TEST_CASE_ST(NULL, reset_array, test_lookahead_mask),
-		TEST_CASE_ST(NULL, reset_array, test_lookbehind_mask),
+		TEST_CASE_ST(NULL, reset_aligned, test_lookahead_mask),
+		TEST_CASE_ST(NULL, reset_aligned, test_lookbehind_mask),
+		TEST_CASE_ST(unaligned_test_setup, reset_unaligned, test_find_unaligned),
 		TEST_CASES_END()
 	}
 };
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index fb8d32ce31..253110360e 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -173,7 +173,7 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
 
 		/* combine current ignore mask with last index ignore mask */
 		if (msk_idx == last)
-			ignore_msk |= last_msk;
+			ignore_msk &= last_msk;
 
 		/* if we have an ignore mask, ignore once */
 		if (ignore_msk) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.166057468 +0800
+++ 0049-fbarray-fix-finding-for-unaligned-length.patch	2024-08-12 20:44:02.045069285 +0800
@@ -1 +1 @@
-From a744665d2149ba8707621c1214c798f807ec398e Mon Sep 17 00:00:00 2001
+From a4e8a4f48899e1e120bcc4f1e5256889935e8cfe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a744665d2149ba8707621c1214c798f807ec398e ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -259 +261 @@
-index 63d8b731f5..22b43073c6 100644
+index fb8d32ce31..253110360e 100644

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

* patch 'buildtools: fix build with clang 17 and ASan' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (48 preceding siblings ...)
  2024-08-12 12:48       ` patch 'fbarray: fix finding for unaligned length' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/ice/base: fix pointer to variable outside scope' " Xueming Li
                         ` (107 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: David Marchand; +Cc: xuemingl, Ali Alnubani, Song Jiale, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=aafeb830bc49268349189d0b0b6d76559e8358ca

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From aafeb830bc49268349189d0b0b6d76559e8358ca Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 11 Jul 2024 11:35:36 +0200
Subject: [PATCH] buildtools: fix build with clang 17 and ASan
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e1d8a879abac499a66801bb8238d59ba52f4fc6b ]

ASan included in clang 17 and later suffixes symbols.
$ nm build/drivers/libtmp_rte_net_null.a | grep this_pmd
0000000000000000 r this_pmd_name3
0000000000000000 n this_pmd_name3.f2cd16678ab09dba8fd23405d8d11fce

This breaks the detection of driver symbols in pmdinfogen which then
creates duplicate symbols "_pmd_info" in many drivers. Such duplicate
symbols trigger a link error.

$ grep -w _pmd_info build/drivers/rte_net_*.pmd.c
build/drivers/rte_net_af_packet.pmd.c:const char _pmd_info[]
	__attribute__((used)) =
	"PMD_INFO_STRING= {\"name\": \"\", \"pci_ids\": []}";
build/drivers/rte_net_null.pmd.c:const char _pmd_info[]
	__attribute__((used)) =
	"PMD_INFO_STRING= {\"name\": \"\", \"pci_ids\": []}";

A simple reproducer:
$ CC=clang meson setup build -Denable_apps=test-pmd -Ddisable_libs=* \
  -Denable_drivers=net/null,net/af_packet -Dtests=false \
  -Db_lundef=false -Db_sanitize=address

$ ninja -C build

Before this patch, the pmdinfogen script was relying on a symbol name
starting with this_pmd_name.
On the other hand, what this script needs is symbols whose names are
this_pmd_name ## __COUNTER__, see below an example for PCI driver
symbols (the same applies to other buses).

$ git grep -w RTE_PMD_EXPORT_NAME drivers/bus/pci/bus_pci_driver.h
drivers/bus/pci/bus_pci_driver.h:RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
$ git grep -B1 this_pmd_name lib/eal/
lib/eal/include/rte_dev.h-#define RTE_PMD_EXPORT_NAME(name, idx) \
lib/eal/include/rte_dev.h:static const char
	RTE_PMD_EXPORT_NAME_ARRAY(this_pmd_name, idx) \
$ git grep define.RTE_PMD_EXPORT_NAME_ARRAY lib/eal/include/rte_dev.h
lib/eal/include/rte_dev.h:#define
	RTE_PMD_EXPORT_NAME_ARRAY(n, idx) n##idx[]

Adjust the symbol filter for both ELF and COFF implementations.

Bugzilla ID: 1466

Reported-by: Ali Alnubani <alialnu@nvidia.com>
Reported-by: Song Jiale <songx.jiale@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
---
 buildtools/pmdinfogen.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py
index 2a44f17bda..dfb89500c0 100755
--- a/buildtools/pmdinfogen.py
+++ b/buildtools/pmdinfogen.py
@@ -6,6 +6,7 @@
 import argparse
 import ctypes
 import json
+import re
 import sys
 import tempfile
 
@@ -66,11 +67,11 @@ class ELFImage:
                 return [symbol]
         return None
 
-    def find_by_prefix(self, prefix):
-        prefix = prefix.encode("utf-8") if self._legacy_elftools else prefix
+    def find_by_pattern(self, pattern):
+        pattern = pattern.encode("utf-8") if self._legacy_elftools else pattern
         for i in range(self._symtab.num_symbols()):
             symbol = self._symtab.get_symbol(i)
-            if symbol.name.startswith(prefix):
+            if re.match(pattern, symbol.name):
                 yield ELFSymbol(self._image, symbol)
 
 
@@ -97,9 +98,9 @@ class COFFImage:
     def is_big_endian(self):
         return False
 
-    def find_by_prefix(self, prefix):
+    def find_by_pattern(self, pattern):
         for symbol in self._image.symbols:
-            if symbol.name.startswith(prefix):
+            if re.match(pattern, symbol.name):
                 yield COFFSymbol(self._image, symbol)
 
     def find_by_name(self, name):
@@ -199,7 +200,7 @@ class Driver:
 
 def load_drivers(image):
     drivers = []
-    for symbol in image.find_by_prefix("this_pmd_name"):
+    for symbol in image.find_by_pattern("^this_pmd_name[0-9]+$"):
         drivers.append(Driver.load(image, symbol))
     return drivers
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.201813065 +0800
+++ 0050-buildtools-fix-build-with-clang-17-and-ASan.patch	2024-08-12 20:44:02.055069287 +0800
@@ -1 +1 @@
-From e1d8a879abac499a66801bb8238d59ba52f4fc6b Mon Sep 17 00:00:00 2001
+From aafeb830bc49268349189d0b0b6d76559e8358ca Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e1d8a879abac499a66801bb8238d59ba52f4fc6b ]
@@ -49 +51,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice/base: fix pointer to variable outside scope' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (49 preceding siblings ...)
  2024-08-12 12:48       ` patch 'buildtools: fix build with clang 17 and ASan' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/ice/base: fix memory leak in firmware version check' " Xueming Li
                         ` (106 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Stefan Wegrzyn; +Cc: xuemingl, Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=87d7cf40823272f5556dc23a24bf325b1a7b0af4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 87d7cf40823272f5556dc23a24bf325b1a7b0af4 Mon Sep 17 00:00:00 2001
From: Stefan Wegrzyn <stefan.wegrzyn@intel.com>
Date: Tue, 25 Jun 2024 12:12:10 +0100
Subject: [PATCH] net/ice/base: fix pointer to variable outside scope
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 794adf885cbbc949b4a292ce98bc57d77ea77391 ]

Currently, the 'temp' variable is in smaller scope than 'first_teid_ptr'
which can point to it. This means on new loop iterations the memory
goes out of scope and we can end up with a dangling pointer.
Move 'temp' to outside of the loop to fix it.

Fixes: 254f19c8c061 ("net/ice/base: modify recursive way of adding nodes")

Signed-off-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index a4d31647fe..75dd15c3f3 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -1069,11 +1069,11 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi,
 	u32 *first_teid_ptr = first_node_teid;
 	u16 new_num_nodes = num_nodes;
 	enum ice_status status = ICE_SUCCESS;
+	u32 temp;
 
 	*num_nodes_added = 0;
 	while (*num_nodes_added < num_nodes) {
 		u16 max_child_nodes, num_added = 0;
-		u32 temp;
 
 		status = ice_sched_add_nodes_to_hw_layer(pi, tc_node, parent,
 							 layer,	new_num_nodes,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.225899863 +0800
+++ 0051-net-ice-base-fix-pointer-to-variable-outside-scope.patch	2024-08-12 20:44:02.055069287 +0800
@@ -1 +1 @@
-From 794adf885cbbc949b4a292ce98bc57d77ea77391 Mon Sep 17 00:00:00 2001
+From 87d7cf40823272f5556dc23a24bf325b1a7b0af4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 794adf885cbbc949b4a292ce98bc57d77ea77391 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index d694bfd414..c9d70fb043 100644
+index a4d31647fe..75dd15c3f3 100644
@@ -28 +30 @@
- 	int status = 0;
+ 	enum ice_status status = ICE_SUCCESS;

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

* patch 'net/ice/base: fix memory leak in firmware version check' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (50 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/ice/base: fix pointer to variable outside scope' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/ice/base: fix resource leak' " Xueming Li
                         ` (105 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Eric Joyner; +Cc: xuemingl, Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=7a6c0e6212a2b74e1b3ea6c39672c93be8f63f3a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7a6c0e6212a2b74e1b3ea6c39672c93be8f63f3a Mon Sep 17 00:00:00 2001
From: Eric Joyner <eric.joyner@intel.com>
Date: Tue, 25 Jun 2024 12:12:25 +0100
Subject: [PATCH] net/ice/base: fix memory leak in firmware version check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6b75956aacc081d56a36ab8f82c530832b288c01 ]

If ice_cfg_phy_fec() goes through case ICE_FEC_DIS_AUTO but the
underlying device firmware isn't the correct version, then the memory
used to hold the PHY capabilities output from the firmware isn't freed.

Fix this by making sure the memory is freed by jumping to the label that
frees the memory instead of returning from the version check
immediately.

Fixes: 4b6ede113f55 ("net/ice/base: support auto FEC with FEC disabled")

Signed-off-by: Eric Joyner <eric.joyner@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_common.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 8867279c28..dcf008175e 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -3890,8 +3890,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
 		break;
 	case ICE_FEC_DIS_AUTO:
 		/* Set No FEC and auto FEC */
-		if (!ice_fw_supports_fec_dis_auto(hw))
-			return ICE_ERR_NOT_SUPPORTED;
+		if (!ice_fw_supports_fec_dis_auto(hw)) {
+			status = ICE_ERR_NOT_SUPPORTED;
+			goto out;
+		}
 		cfg->link_fec_opt |= ICE_AQC_PHY_FEC_DIS;
 		/* fall-through */
 	case ICE_FEC_AUTO:
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.259234461 +0800
+++ 0052-net-ice-base-fix-memory-leak-in-firmware-version-che.patch	2024-08-12 20:44:02.065069289 +0800
@@ -1 +1 @@
-From 6b75956aacc081d56a36ab8f82c530832b288c01 Mon Sep 17 00:00:00 2001
+From 7a6c0e6212a2b74e1b3ea6c39672c93be8f63f3a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6b75956aacc081d56a36ab8f82c530832b288c01 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 3d787d2a29..ef6696cddf 100644
+index 8867279c28..dcf008175e 100644
@@ -28 +30 @@
-@@ -3843,8 +3843,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
+@@ -3890,8 +3890,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,

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

* patch 'net/ice/base: fix resource leak' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (51 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/ice/base: fix memory leak in firmware version check' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/ice/base: fix sign extension' " Xueming Li
                         ` (104 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Fabio Pricoco; +Cc: xuemingl, Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2458257e56ecddc177bff0cbb93f9028e819c3fe

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2458257e56ecddc177bff0cbb93f9028e819c3fe Mon Sep 17 00:00:00 2001
From: Fabio Pricoco <fabio.pricoco@intel.com>
Date: Wed, 26 Jun 2024 12:40:57 +0100
Subject: [PATCH] net/ice/base: fix resource leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e2072ba1b039a92f0f405a9533237a15404ef3a1 ]

When errors happen during OROM reads, the allocated buffer is not freed.
Fix it by adding a goto label to free the buffer in case of error.

Fixes: ac882a0eda69 ("net/ice/base: store NVM version in extracted format")

Signed-off-by: Fabio Pricoco <fabio.pricoco@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_nvm.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
index e46aded12a..c112d3a27e 100644
--- a/drivers/net/ice/base/ice_nvm.c
+++ b/drivers/net/ice/base/ice_nvm.c
@@ -749,7 +749,7 @@ ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank,
 				       orom_data, hw->flash.banks.orom_size);
 	if (status) {
 		ice_debug(hw, ICE_DBG_NVM, "Unable to read Option ROM data\n");
-		return status;
+		goto exit_error;;
 	}
 
 	/* Scan the memory buffer to locate the CIVD data section */
@@ -773,7 +773,8 @@ ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank,
 		if (sum) {
 			ice_debug(hw, ICE_DBG_NVM, "Found CIVD data with invalid checksum of %u\n",
 				  sum);
-			goto err_invalid_checksum;
+			status = ICE_ERR_NVM;
+			goto exit_error;
 		}
 
 		*civd = *tmp;
@@ -781,11 +782,12 @@ ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank,
 		return ICE_SUCCESS;
 	}
 
+	status = ICE_ERR_NVM;
 	ice_debug(hw, ICE_DBG_NVM, "Unable to locate CIVD data within the Option ROM\n");
 
-err_invalid_checksum:
+exit_error:
 	ice_free(hw, orom_data);
-	return ICE_ERR_NVM;
+	return status;
 }
 
 /**
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.303305057 +0800
+++ 0053-net-ice-base-fix-resource-leak.patch	2024-08-12 20:44:02.075069291 +0800
@@ -1 +1 @@
-From e2072ba1b039a92f0f405a9533237a15404ef3a1 Mon Sep 17 00:00:00 2001
+From 2458257e56ecddc177bff0cbb93f9028e819c3fe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e2072ba1b039a92f0f405a9533237a15404ef3a1 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 9cebe7a07b..55e624cb31 100644
+index e46aded12a..c112d3a27e 100644
@@ -23 +25 @@
-@@ -748,7 +748,7 @@ ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank,
+@@ -749,7 +749,7 @@ ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank,
@@ -32 +34 @@
-@@ -772,7 +772,8 @@ ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank,
+@@ -773,7 +773,8 @@ ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank,
@@ -42,2 +44,2 @@
-@@ -780,11 +781,12 @@ ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank,
- 		return 0;
+@@ -781,11 +782,12 @@ ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank,
+ 		return ICE_SUCCESS;

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

* patch 'net/ice/base: fix sign extension' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (52 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/ice/base: fix resource leak' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/ice/base: fix size when allocating children arrays' " Xueming Li
                         ` (103 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Jesse Brandeburg; +Cc: xuemingl, Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=1257bf9a7cdd3d73b90f0ffb05d79830f408c20e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1257bf9a7cdd3d73b90f0ffb05d79830f408c20e Mon Sep 17 00:00:00 2001
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Date: Wed, 26 Jun 2024 12:41:03 +0100
Subject: [PATCH] net/ice/base: fix sign extension
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4fe3f901f86243bf2dc5925e870030995f229888 ]

Fix a static analysis warning where if the 16-bit value in mask has the
high-bit set, it will be sign extended by the shift left (which converts
it to a signed integer). Avoid this by casting to a u32 to make sure the
conversion happens before the shift and that it stays unsigned.

Fixes: 9467486f179f ("net/ice/base: enable masking for RSS and FD field vectors")

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_flex_pipe.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index f9266447d9..a0e4f5fa27 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -1534,16 +1534,14 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
 	switch (blk) {
 	case ICE_BLK_RSS:
 		offset = GLQF_HMASK(mask_idx);
-		val = (idx << GLQF_HMASK_MSK_INDEX_S) &
-			GLQF_HMASK_MSK_INDEX_M;
-		val |= (mask << GLQF_HMASK_MASK_S) & GLQF_HMASK_MASK_M;
+		val = (idx << GLQF_HMASK_MSK_INDEX_S) & GLQF_HMASK_MSK_INDEX_M;
+		val |= ((u32)mask << GLQF_HMASK_MASK_S) & GLQF_HMASK_MASK_M;
 		break;
 	case ICE_BLK_FD:
 		offset = GLQF_FDMASK(mask_idx);
 		val = (idx << GLQF_FDMASK_MSK_INDEX_S) &
 			GLQF_FDMASK_MSK_INDEX_M;
-		val |= (mask << GLQF_FDMASK_MASK_S) &
-			GLQF_FDMASK_MASK_M;
+		val |= ((u32)mask << GLQF_FDMASK_MASK_S) & GLQF_FDMASK_MASK_M;
 		break;
 	default:
 		ice_debug(hw, ICE_DBG_PKG, "No profile masks for block %d\n",
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.338305054 +0800
+++ 0054-net-ice-base-fix-sign-extension.patch	2024-08-12 20:44:02.085069292 +0800
@@ -1 +1 @@
-From 4fe3f901f86243bf2dc5925e870030995f229888 Mon Sep 17 00:00:00 2001
+From 1257bf9a7cdd3d73b90f0ffb05d79830f408c20e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4fe3f901f86243bf2dc5925e870030995f229888 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index e06dbb0885..413b6f8ece 100644
+index f9266447d9..a0e4f5fa27 100644

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

* patch 'net/ice/base: fix size when allocating children arrays' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (53 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/ice/base: fix sign extension' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/ice/base: fix GCS descriptor field offsets' " Xueming Li
                         ` (102 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Jacob Keller; +Cc: xuemingl, Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8bc9ae6b59c2a6a3bb4783a9d3b604195831347f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8bc9ae6b59c2a6a3bb4783a9d3b604195831347f Mon Sep 17 00:00:00 2001
From: Jacob Keller <jacob.e.keller@intel.com>
Date: Wed, 26 Jun 2024 12:41:08 +0100
Subject: [PATCH] net/ice/base: fix size when allocating children arrays
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3072e5e2da9870d8cb119f15482eae9d9fb51e98 ]

The ice_sched_add_root_node() and ice_sched_add_node() functions have
comments to suppress Coverity warnings about a suspicious sizeof used
when allocating the children array of an struct ice_sched_node.

The size is calculated using the size of the scheduler node, which
overallocates the array by a significant amount.

Fix the code to correctly calculate the size by using *root->children
and *node->children respectively.

This saves some memory and allows us to drop the Coverity suppression
comments.

Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 75dd15c3f3..21cfe53a6d 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -28,9 +28,8 @@ ice_sched_add_root_node(struct ice_port_info *pi,
 	if (!root)
 		return ICE_ERR_NO_MEMORY;
 
-	/* coverity[suspicious_sizeof] */
 	root->children = (struct ice_sched_node **)
-		ice_calloc(hw, hw->max_children[0], sizeof(*root));
+		ice_calloc(hw, hw->max_children[0], sizeof(*root->children));
 	if (!root->children) {
 		ice_free(hw, root);
 		return ICE_ERR_NO_MEMORY;
@@ -186,9 +185,9 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer,
 	if (!node)
 		return ICE_ERR_NO_MEMORY;
 	if (hw->max_children[layer]) {
-		/* coverity[suspicious_sizeof] */
 		node->children = (struct ice_sched_node **)
-			ice_calloc(hw, hw->max_children[layer], sizeof(*node));
+			ice_calloc(hw, hw->max_children[layer],
+				   sizeof(*node->children));
 		if (!node->children) {
 			ice_free(hw, node);
 			return ICE_ERR_NO_MEMORY;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.378657751 +0800
+++ 0055-net-ice-base-fix-size-when-allocating-children-array.patch	2024-08-12 20:44:02.085069292 +0800
@@ -1 +1 @@
-From 3072e5e2da9870d8cb119f15482eae9d9fb51e98 Mon Sep 17 00:00:00 2001
+From 8bc9ae6b59c2a6a3bb4783a9d3b604195831347f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3072e5e2da9870d8cb119f15482eae9d9fb51e98 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index c9d70fb043..74d57329da 100644
+index 75dd15c3f3..21cfe53a6d 100644

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

* patch 'net/ice/base: fix GCS descriptor field offsets' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (54 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/ice/base: fix size when allocating children arrays' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/ice/base: fix return type of bitmap hamming weight' " Xueming Li
                         ` (101 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Eric Joyner; +Cc: xuemingl, Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c9eae16d5efb1a8724417604c8e492110a264133

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c9eae16d5efb1a8724417604c8e492110a264133 Mon Sep 17 00:00:00 2001
From: Eric Joyner <eric.joyner@intel.com>
Date: Wed, 26 Jun 2024 12:41:09 +0100
Subject: [PATCH] net/ice/base: fix GCS descriptor field offsets
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 243ec291b1eba3ddf7554c9c80a173e9aee58b68 ]

Update the offsets, and remove the ICE_TX_GCS_DESC_ENA define since a
non-0 value used for the ICE_TX_GCS_DESC_TYPE field will enable GCS
offload; there is no dedicated bit to enable it anymore.

Fixes: c31095a0b20f ("net/ice/base: add GCO defines and GCO flex descriptor")

Signed-off-by: Eric Joyner <eric.joyner@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_lan_tx_rx.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/base/ice_lan_tx_rx.h b/drivers/net/ice/base/ice_lan_tx_rx.h
index d816df0ff6..39673e36f7 100644
--- a/drivers/net/ice/base/ice_lan_tx_rx.h
+++ b/drivers/net/ice/base/ice_lan_tx_rx.h
@@ -1074,10 +1074,9 @@ struct ice_tx_ctx_desc {
 	__le64 qw1;
 };
 
-#define ICE_TX_GSC_DESC_START	0  /* 7 BITS */
-#define ICE_TX_GSC_DESC_OFFSET	7  /* 4 BITS */
-#define ICE_TX_GSC_DESC_TYPE	11 /* 2 BITS */
-#define ICE_TX_GSC_DESC_ENA	13 /* 1 BIT */
+#define ICE_TX_GCS_DESC_START	0  /* 8 BITS */
+#define ICE_TX_GCS_DESC_OFFSET	8  /* 4 BITS */
+#define ICE_TX_GCS_DESC_TYPE	12 /* 3 BITS */
 
 #define ICE_TXD_CTX_QW1_DTYPE_S	0
 #define ICE_TXD_CTX_QW1_DTYPE_M	(0xFUL << ICE_TXD_CTX_QW1_DTYPE_S)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.419904348 +0800
+++ 0056-net-ice-base-fix-GCS-descriptor-field-offsets.patch	2024-08-12 20:44:02.095069294 +0800
@@ -1 +1 @@
-From 243ec291b1eba3ddf7554c9c80a173e9aee58b68 Mon Sep 17 00:00:00 2001
+From c9eae16d5efb1a8724417604c8e492110a264133 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 243ec291b1eba3ddf7554c9c80a173e9aee58b68 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice/base: fix return type of bitmap hamming weight' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (55 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/ice/base: fix GCS descriptor field offsets' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/ice/base: fix check for existing switch rule' " Xueming Li
                         ` (100 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Chinh Cao; +Cc: xuemingl, Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=fddfbdbf498321fff0dcf34a0a097ff548eac8ca

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fddfbdbf498321fff0dcf34a0a097ff548eac8ca Mon Sep 17 00:00:00 2001
From: Chinh Cao <chinh.t.cao@intel.com>
Date: Wed, 26 Jun 2024 12:41:11 +0100
Subject: [PATCH] net/ice/base: fix return type of bitmap hamming weight
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 509c55f699d1e13f38abaaf85df7bd9b585f5b87 ]

"count" is the returned value, and in this function, value of "count"
and "bit" are the same, so there is no reason why these values should be
declared as different types, and for returned value data type to be
different.

Fixes: 6d288fa5f72b ("net/ice/base: introduce and use bitmap hamming weight API")

Signed-off-by: Chinh Cao <chinh.t.cao@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_bitops.h | 4 ++--
 drivers/net/ice/base/ice_switch.c | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/base/ice_bitops.h b/drivers/net/ice/base/ice_bitops.h
index 3b71c1b7f5..5c17bcb674 100644
--- a/drivers/net/ice/base/ice_bitops.h
+++ b/drivers/net/ice/base/ice_bitops.h
@@ -418,10 +418,10 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
  * Note that this function assumes it is operating on a bitmap declared using
  * ice_declare_bitmap.
  */
-static inline int
+static inline u16
 ice_bitmap_hweight(ice_bitmap_t *bm, u16 size)
 {
-	int count = 0;
+	u16 count = 0;
 	u16 bit = 0;
 
 	while (size > (bit = ice_find_next_bit(bm, size, bit))) {
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index f7fcc3a8d4..07ebc624f5 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -7390,7 +7390,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
 	ice_xor_bitmap(free_idx, used_idx, possible_idx, ICE_MAX_FV_WORDS);
 
 	/* return number of free indexes */
-	return (u16)ice_bitmap_hweight(free_idx, ICE_MAX_FV_WORDS);
+	return ice_bitmap_hweight(free_idx, ICE_MAX_FV_WORDS);
 }
 
 static void ice_set_recipe_index(unsigned long idx, u8 *bitmap)
@@ -8101,6 +8101,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
 	enum ice_status status = ICE_SUCCESS;
 	struct ice_sw_recipe *rm;
 	u8 i;
+	u16 cnt;
 
 	if (!ice_is_prof_rule(rinfo->tun_type) && !lkups_cnt)
 		return ICE_ERR_PARAM;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.456166345 +0800
+++ 0057-net-ice-base-fix-return-type-of-bitmap-hamming-weigh.patch	2024-08-12 20:44:02.105069296 +0800
@@ -1 +1 @@
-From 509c55f699d1e13f38abaaf85df7bd9b585f5b87 Mon Sep 17 00:00:00 2001
+From fddfbdbf498321fff0dcf34a0a097ff548eac8ca Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 509c55f699d1e13f38abaaf85df7bd9b585f5b87 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -40 +42 @@
-index 711a6cfbbe..fa5bd94c58 100644
+index f7fcc3a8d4..07ebc624f5 100644
@@ -43 +45 @@
-@@ -7467,7 +7467,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
+@@ -7390,7 +7390,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
@@ -52 +54,2 @@
-@@ -8178,6 +8178,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+@@ -8101,6 +8101,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+ 	enum ice_status status = ICE_SUCCESS;
@@ -55 +57,0 @@
- 	int status = ICE_SUCCESS;

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

* patch 'net/ice/base: fix check for existing switch rule' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (56 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/ice/base: fix return type of bitmap hamming weight' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/ice/base: fix potential TLV length overflow' " Xueming Li
                         ` (99 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Mateusz Pacuszka; +Cc: xuemingl, Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=abd055ea635cdc1df9386a75ddda6157c785d541

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From abd055ea635cdc1df9386a75ddda6157c785d541 Mon Sep 17 00:00:00 2001
From: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>
Date: Wed, 26 Jun 2024 12:41:20 +0100
Subject: [PATCH] net/ice/base: fix check for existing switch rule
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 771db7d9466488135a2899f8809d6e61bc685ed5 ]

In case the rule already exists and another VSI wants to subscribe to
it, a new VSI list is being created and both VSIs are moved to it.
Currently, the check for already existing VSI with the same rule is done
based on fdw_id.hw_vsi_id, which applies only to LOOKUP_RX flag. Change
it to vsi_handle. This is software VSI ID, but it can be applied here,
because vsi_map itself is also based on it.

Additionally change return status in case the VSI already exists in the
VSI map to "Already exists". Such case should be handled by the caller.

Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")

Signed-off-by: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 07ebc624f5..c4fd07199e 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -4603,7 +4603,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
 		u16 vsi_handle_arr[2];
 
 		/* A rule already exists with the new VSI being added */
-		if (cur_fltr->fwd_id.hw_vsi_id == new_fltr->fwd_id.hw_vsi_id)
+		if (cur_fltr->vsi_handle == new_fltr->vsi_handle)
 			return ICE_ERR_ALREADY_EXISTS;
 
 		vsi_handle_arr[0] = cur_fltr->vsi_handle;
@@ -4651,7 +4651,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
 
 		/* A rule already exists with the new VSI being added */
 		if (ice_is_bit_set(m_entry->vsi_list_info->vsi_map, vsi_handle))
-			return ICE_SUCCESS;
+			return ICE_ERR_ALREADY_EXISTS;
 
 		/* Update the previously created VSI list set with
 		 * the new VSI ID passed in
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.505987641 +0800
+++ 0058-net-ice-base-fix-check-for-existing-switch-rule.patch	2024-08-12 20:44:02.115069298 +0800
@@ -1 +1 @@
-From 771db7d9466488135a2899f8809d6e61bc685ed5 Mon Sep 17 00:00:00 2001
+From abd055ea635cdc1df9386a75ddda6157c785d541 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 771db7d9466488135a2899f8809d6e61bc685ed5 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index fa5bd94c58..f8d98d8a9e 100644
+index 07ebc624f5..c4fd07199e 100644
@@ -30 +32 @@
-@@ -4624,7 +4624,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
+@@ -4603,7 +4603,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
@@ -39 +41 @@
-@@ -4672,7 +4672,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
+@@ -4651,7 +4651,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
@@ -43 +45 @@
--			return 0;
+-			return ICE_SUCCESS;

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

* patch 'net/ice/base: fix potential TLV length overflow' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (57 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/ice/base: fix check for existing switch rule' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/ice/base: fix board type definition' " Xueming Li
                         ` (98 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Paul Greenwalt
  Cc: xuemingl, Dan Nowlin, Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5167b4d2d3921f86591da1798acba43a902514d6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5167b4d2d3921f86591da1798acba43a902514d6 Mon Sep 17 00:00:00 2001
From: Paul Greenwalt <paul.greenwalt@intel.com>
Date: Wed, 26 Jun 2024 12:41:33 +0100
Subject: [PATCH] net/ice/base: fix potential TLV length overflow
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2c5f6b43524e9dc6cc25c67a536ee6564ea71e09 ]

It's possible that an NVM with an invalid tlv_len could cause an integer
overflow of next_tlv which can result an infinite loop.

Fix this issue by changing next_tlv from u16 to u32 to prevent overflow.
Also check that tlv_len is valid and less than pfa_len.

Fix an issue with conversion from 'u32' to 'u16', possible loss
of data compile errors by making appropriate casts.

Fixes: 77a649999047 ("net/ice/base: move functions from common to NVM module")

Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_nvm.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
index c112d3a27e..30e603127e 100644
--- a/drivers/net/ice/base/ice_nvm.c
+++ b/drivers/net/ice/base/ice_nvm.c
@@ -474,7 +474,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
 {
 	enum ice_status status;
 	u16 pfa_len, pfa_ptr;
-	u16 next_tlv;
+	u32 next_tlv;
 
 	status = ice_read_sr_word(hw, ICE_SR_PFA_PTR, &pfa_ptr);
 	if (status != ICE_SUCCESS) {
@@ -490,25 +490,30 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
 	 * of TLVs to find the requested one.
 	 */
 	next_tlv = pfa_ptr + 1;
-	while (next_tlv < pfa_ptr + pfa_len) {
+	while (next_tlv < ((u32)pfa_ptr + pfa_len)) {
 		u16 tlv_sub_module_type;
 		u16 tlv_len;
 
 		/* Read TLV type */
-		status = ice_read_sr_word(hw, next_tlv, &tlv_sub_module_type);
-		if (status != ICE_SUCCESS) {
+		status = ice_read_sr_word(hw, (u16)next_tlv,
+					  &tlv_sub_module_type);
+		if (status) {
 			ice_debug(hw, ICE_DBG_INIT, "Failed to read TLV type.\n");
 			break;
 		}
 		/* Read TLV length */
-		status = ice_read_sr_word(hw, next_tlv + 1, &tlv_len);
+		status = ice_read_sr_word(hw, (u16)(next_tlv + 1), &tlv_len);
 		if (status != ICE_SUCCESS) {
 			ice_debug(hw, ICE_DBG_INIT, "Failed to read TLV length.\n");
 			break;
 		}
+		if (tlv_len > pfa_len) {
+			ice_debug(hw, ICE_DBG_INIT, "Invalid TLV length.\n");
+			return ICE_ERR_INVAL_SIZE;
+		}
 		if (tlv_sub_module_type == module_type) {
 			if (tlv_len) {
-				*module_tlv = next_tlv;
+				*module_tlv = (u16)next_tlv;
 				*module_tlv_len = tlv_len;
 				return ICE_SUCCESS;
 			}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.540225538 +0800
+++ 0059-net-ice-base-fix-potential-TLV-length-overflow.patch	2024-08-12 20:44:02.125069300 +0800
@@ -1 +1 @@
-From 2c5f6b43524e9dc6cc25c67a536ee6564ea71e09 Mon Sep 17 00:00:00 2001
+From 5167b4d2d3921f86591da1798acba43a902514d6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2c5f6b43524e9dc6cc25c67a536ee6564ea71e09 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -23,2 +25,2 @@
- drivers/net/ice/base/ice_nvm.c | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
+ drivers/net/ice/base/ice_nvm.c | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
@@ -27 +29 @@
-index 79b66fa70f..811bbc9bbc 100644
+index c112d3a27e..30e603127e 100644
@@ -30,2 +32 @@
-@@ -472,7 +472,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
- 		       u16 module_type)
+@@ -474,7 +474,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -32,0 +34 @@
+ 	enum ice_status status;
@@ -36 +37,0 @@
- 	int status;
@@ -39 +40,2 @@
-@@ -489,25 +489,30 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+ 	if (status != ICE_SUCCESS) {
+@@ -490,25 +490,30 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -49,0 +52 @@
+-		if (status != ICE_SUCCESS) {
@@ -52 +55 @@
- 		if (status) {
++		if (status) {
@@ -59 +62 @@
- 		if (status) {
+ 		if (status != ICE_SUCCESS) {
@@ -72 +75 @@
- 				return 0;
+ 				return ICE_SUCCESS;

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

* patch 'net/ice/base: fix board type definition' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (58 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/ice/base: fix potential TLV length overflow' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'net/ice/base: fix masking when reading context' " Xueming Li
                         ` (97 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Waldemar Dworakowski; +Cc: xuemingl, Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=67a40ce4ef85d55f13b2e6796e7b13152ffaa182

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 67a40ce4ef85d55f13b2e6796e7b13152ffaa182 Mon Sep 17 00:00:00 2001
From: Waldemar Dworakowski <waldemar.dworakowski@intel.com>
Date: Wed, 26 Jun 2024 12:41:38 +0100
Subject: [PATCH] net/ice/base: fix board type definition
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ee7419d85e4c55559002fdb57ec6dc4959155b2f ]

The new version is compliant with implementation and documentation.

Fixes: f4f79aa849b5 ("net/ice/base: add AQC get link topology handle support")

Signed-off-by: Waldemar Dworakowski <waldemar.dworakowski@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index 844e90bbce..1131379d63 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -1728,8 +1728,8 @@ struct ice_aqc_link_topo_addr {
 #define ICE_AQC_LINK_TOPO_HANDLE_M	(0x3FF << ICE_AQC_LINK_TOPO_HANDLE_S)
 /* Used to decode the handle field */
 #define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_M	BIT(9)
-#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_LOM	BIT(9)
-#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_MEZZ	0
+#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_LOM	0
+#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_MEZZ	BIT(9)
 #define ICE_AQC_LINK_TOPO_HANDLE_NODE_S		0
 /* In case of a Mezzanine type */
 #define ICE_AQC_LINK_TOPO_HANDLE_MEZZ_NODE_M	\
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.563346536 +0800
+++ 0060-net-ice-base-fix-board-type-definition.patch	2024-08-12 20:44:02.125069300 +0800
@@ -1 +1 @@
-From ee7419d85e4c55559002fdb57ec6dc4959155b2f Mon Sep 17 00:00:00 2001
+From 67a40ce4ef85d55f13b2e6796e7b13152ffaa182 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ee7419d85e4c55559002fdb57ec6dc4959155b2f ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index c431b82784..d90a5b0d34 100644
+index 844e90bbce..1131379d63 100644
@@ -22 +24 @@
-@@ -1746,8 +1746,8 @@ struct ice_aqc_link_topo_addr {
+@@ -1728,8 +1728,8 @@ struct ice_aqc_link_topo_addr {

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

* patch 'net/ice/base: fix masking when reading context' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (59 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/ice/base: fix board type definition' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:48       ` patch 'common/idpf: fix flex descriptor mask' " Xueming Li
                         ` (96 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Yahui Cao; +Cc: xuemingl, Ian Stokes, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=bd5b88d172021a010c131ea3ae3b1c8af919dc12

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bd5b88d172021a010c131ea3ae3b1c8af919dc12 Mon Sep 17 00:00:00 2001
From: Yahui Cao <yahui.cao@intel.com>
Date: Wed, 26 Jun 2024 12:42:14 +0100
Subject: [PATCH] net/ice/base: fix masking when reading context
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ]

No need to invert mask since we only reserve the masked bits instead of
clear them.

Fixes: a03c714bfe0b ("net/ice/base: add two helper functions")

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_common.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index dcf008175e..7a50a0f9f0 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -4906,7 +4906,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
 
 	ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA);
 
-	dest_byte &= ~(mask);
+	dest_byte &= mask;
 
 	dest_byte >>= shift_width;
 
@@ -4946,7 +4946,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
 	/* the data in the memory is stored as little endian so mask it
 	 * correctly
 	 */
-	src_word &= ~(CPU_TO_LE16(mask));
+	src_word &= CPU_TO_LE16(mask);
 
 	/* get the data back into host order before shifting */
 	dest_word = LE16_TO_CPU(src_word);
@@ -4997,7 +4997,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
 	/* the data in the memory is stored as little endian so mask it
 	 * correctly
 	 */
-	src_dword &= ~(CPU_TO_LE32(mask));
+	src_dword &= CPU_TO_LE32(mask);
 
 	/* get the data back into host order before shifting */
 	dest_dword = LE32_TO_CPU(src_dword);
@@ -5048,7 +5048,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
 	/* the data in the memory is stored as little endian so mask it
 	 * correctly
 	 */
-	src_qword &= ~(CPU_TO_LE64(mask));
+	src_qword &= CPU_TO_LE64(mask);
 
 	/* get the data back into host order before shifting */
 	dest_qword = LE64_TO_CPU(src_qword);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.588939734 +0800
+++ 0061-net-ice-base-fix-masking-when-reading-context.patch	2024-08-12 20:44:02.135069302 +0800
@@ -1 +1 @@
-From 045ff68c49244d998933ef74a719b96db0e43988 Mon Sep 17 00:00:00 2001
+From bd5b88d172021a010c131ea3ae3b1c8af919dc12 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index c14f66d55b..9a9c8f86e5 100644
+index dcf008175e..7a50a0f9f0 100644
@@ -23 +25 @@
-@@ -5014,7 +5014,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4906,7 +4906,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
@@ -25 +27 @@
- 	ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_NONDMA_TO_NONDMA);
+ 	ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA);
@@ -32 +34 @@
-@@ -5054,7 +5054,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4946,7 +4946,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
@@ -41 +43 @@
-@@ -5105,7 +5105,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4997,7 +4997,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
@@ -50 +52 @@
-@@ -5156,7 +5156,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -5048,7 +5048,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)

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

* patch 'common/idpf: fix flex descriptor mask' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (60 preceding siblings ...)
  2024-08-12 12:48       ` patch 'net/ice/base: fix masking when reading context' " Xueming Li
@ 2024-08-12 12:48       ` Xueming Li
  2024-08-12 12:49       ` patch 'common/idpf: fix PTP message validation' " Xueming Li
                         ` (95 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:48 UTC (permalink / raw)
  To: Soumyadeep Hore; +Cc: xuemingl, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e0f453462f2668bacc282afe9f11721c651fafdd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e0f453462f2668bacc282afe9f11721c651fafdd Mon Sep 17 00:00:00 2001
From: Soumyadeep Hore <soumyadeep.hore@intel.com>
Date: Mon, 24 Jun 2024 09:16:32 +0000
Subject: [PATCH] common/idpf: fix flex descriptor mask
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 757addd900598d5a42bfaad9992a305907022680 ]

Mask for VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M was defined wrongly
and this patch fixes it.

Fixes: fb4ac04e9bfa ("common/idpf: introduce common library")

Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/common/idpf/base/virtchnl2_lan_desc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/idpf/base/virtchnl2_lan_desc.h b/drivers/common/idpf/base/virtchnl2_lan_desc.h
index e6e782a219..a5e3f05014 100644
--- a/drivers/common/idpf/base/virtchnl2_lan_desc.h
+++ b/drivers/common/idpf/base/virtchnl2_lan_desc.h
@@ -110,7 +110,7 @@
 	BIT_ULL(VIRTCHNL2_RX_FLEX_DESC_ADV_SPH_S)
 #define VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_S		12
 #define VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M			\
-	IDPF_M(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M)
+	IDPF_M(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_S)
 #define VIRTCHNL2_RX_FLEX_DESC_ADV_MISS_S		15
 #define VIRTCHNL2_RX_FLEX_DESC_ADV_MISS_M		\
 	BIT_ULL(VIRTCHNL2_RX_FLEX_DESC_ADV_MISS_S)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.615798132 +0800
+++ 0062-common-idpf-fix-flex-descriptor-mask.patch	2024-08-12 20:44:02.135069302 +0800
@@ -1 +1 @@
-From 757addd900598d5a42bfaad9992a305907022680 Mon Sep 17 00:00:00 2001
+From e0f453462f2668bacc282afe9f11721c651fafdd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 757addd900598d5a42bfaad9992a305907022680 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index f632271788..9e04cf8628 100644
+index e6e782a219..a5e3f05014 100644
@@ -22 +24 @@
-@@ -111,7 +111,7 @@
+@@ -110,7 +110,7 @@

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

* patch 'common/idpf: fix PTP message validation' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (61 preceding siblings ...)
  2024-08-12 12:48       ` patch 'common/idpf: fix flex descriptor mask' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/cpfl: add checks on control queue messages' " Xueming Li
                         ` (94 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Soumyadeep Hore; +Cc: xuemingl, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=39b2b4c7de880511a0cbe5a3412d49328380b100

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 39b2b4c7de880511a0cbe5a3412d49328380b100 Mon Sep 17 00:00:00 2001
From: Soumyadeep Hore <soumyadeep.hore@intel.com>
Date: Mon, 24 Jun 2024 09:16:36 +0000
Subject: [PATCH] common/idpf: fix PTP message validation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 420cde5c539eb8bc9936a482404fc29f4d53c5e1 ]

When the message for getting timestamp latches is sent by the driver,
number of latches is equal to 0. Current implementation of message
validation function incorrectly notifies this kind of message length as
invalid.

Fixes: 3f72f4472b57 ("common/idpf/base: initialize PTP support")

Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/common/idpf/base/virtchnl2.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/idpf/base/virtchnl2.h b/drivers/common/idpf/base/virtchnl2.h
index 3900b784d0..21b2039aa2 100644
--- a/drivers/common/idpf/base/virtchnl2.h
+++ b/drivers/common/idpf/base/virtchnl2.h
@@ -1872,7 +1872,7 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3
 	case VIRTCHNL2_OP_GET_PTP_CAPS:
 		valid_len = sizeof(struct virtchnl2_get_ptp_caps);
 
-		if (msglen >= valid_len) {
+		if (msglen > valid_len) {
 			struct virtchnl2_get_ptp_caps *ptp_caps =
 			(struct virtchnl2_get_ptp_caps *)msg;
 
@@ -1888,7 +1888,7 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3
 	case VIRTCHNL2_OP_GET_PTP_TX_TSTAMP_LATCHES:
 		valid_len = sizeof(struct virtchnl2_ptp_tx_tstamp_latches);
 
-		if (msglen >= valid_len) {
+		if (msglen > valid_len) {
 			struct virtchnl2_ptp_tx_tstamp_latches *tx_tstamp_latches =
 			(struct virtchnl2_ptp_tx_tstamp_latches *)msg;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.638477030 +0800
+++ 0063-common-idpf-fix-PTP-message-validation.patch	2024-08-12 20:44:02.135069302 +0800
@@ -1 +1 @@
-From 420cde5c539eb8bc9936a482404fc29f4d53c5e1 Mon Sep 17 00:00:00 2001
+From 39b2b4c7de880511a0cbe5a3412d49328380b100 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 420cde5c539eb8bc9936a482404fc29f4d53c5e1 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index e76ccbd46f..24a8b37876 100644
+index 3900b784d0..21b2039aa2 100644
@@ -24 +26 @@
-@@ -2272,7 +2272,7 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3
+@@ -1872,7 +1872,7 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3
@@ -33 +35 @@
-@@ -2288,7 +2288,7 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3
+@@ -1888,7 +1888,7 @@ virtchnl2_vc_validate_vf_msg(__rte_unused struct virtchnl2_version_info *ver, u3

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

* patch 'net/cpfl: add checks on control queue messages' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (62 preceding siblings ...)
  2024-08-12 12:49       ` patch 'common/idpf: fix PTP message validation' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/cpfl: fix 32-bit build' " Xueming Li
                         ` (93 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Soumyadeep Hore; +Cc: xuemingl, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ec9de9db2d45cd8aef7bd3287e56755ebf2704da

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ec9de9db2d45cd8aef7bd3287e56755ebf2704da Mon Sep 17 00:00:00 2001
From: Soumyadeep Hore <soumyadeep.hore@intel.com>
Date: Fri, 5 Jul 2024 13:05:14 +0000
Subject: [PATCH] net/cpfl: add checks on control queue messages
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 632b57048bb86bb88eb31ef118a0715218d528f0 ]

Include checks for error status returned for specific opcodes and
display error messages accordingly, returning the error status back to
the caller. Update caller to handle these new positive error values as
well as the negative ones.

Fixes: db042ef09d26 ("net/cpfl: implement FXP rule creation and destroying")

Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/cpfl/cpfl_flow_engine_fxp.c |  2 +-
 drivers/net/cpfl/cpfl_fxp_rule.c        |  8 ++++++++
 drivers/net/cpfl/cpfl_rules.h           | 11 +++++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/net/cpfl/cpfl_flow_engine_fxp.c b/drivers/net/cpfl/cpfl_flow_engine_fxp.c
index 8a4e1419b4..f6bd1f7599 100644
--- a/drivers/net/cpfl/cpfl_flow_engine_fxp.c
+++ b/drivers/net/cpfl/cpfl_flow_engine_fxp.c
@@ -95,7 +95,7 @@ cpfl_fxp_create(struct rte_eth_dev *dev,
 
 	ret = cpfl_rule_process(itf, ad->ctlqp[cpq_id], ad->ctlqp[cpq_id + 1],
 				rim->rules, rim->rule_num, true);
-	if (ret < 0) {
+	if (ret != 0) {
 		rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 				   "cpfl filter create flow fail");
 		rte_free(rim);
diff --git a/drivers/net/cpfl/cpfl_fxp_rule.c b/drivers/net/cpfl/cpfl_fxp_rule.c
index 0e710a007b..be34da9fa2 100644
--- a/drivers/net/cpfl/cpfl_fxp_rule.c
+++ b/drivers/net/cpfl/cpfl_fxp_rule.c
@@ -92,6 +92,14 @@ cpfl_receive_ctlq_msg(struct idpf_hw *hw, struct idpf_ctlq_info *cq, u16 num_q_m
 
 		/* TODO - process rx controlq message */
 		for (i = 0; i < num_q_msg; i++) {
+			ret = q_msg[i].status;
+			if (ret != CPFL_CFG_PKT_ERR_OK &&
+			    q_msg[i].opcode != cpfl_ctlq_sem_query_del_rule_hash_addr) {
+				PMD_INIT_LOG(ERR, "Failed to process rx_ctrlq msg: %s",
+					cpfl_cfg_pkt_errormsg[ret]);
+				return ret;
+			}
+
 			if (q_msg[i].data_len > 0)
 				dma = q_msg[i].ctx.indirect.payload;
 			else
diff --git a/drivers/net/cpfl/cpfl_rules.h b/drivers/net/cpfl/cpfl_rules.h
index d23eae8e91..10569b1fdc 100644
--- a/drivers/net/cpfl/cpfl_rules.h
+++ b/drivers/net/cpfl/cpfl_rules.h
@@ -62,6 +62,17 @@ enum cpfl_cfg_pkt_error_code {
 	CPFL_CFG_PKT_ERR_EMAXCOL = 9    /* Max Hash Collision */
 };
 
+static const char * const cpfl_cfg_pkt_errormsg[] = {
+	[CPFL_CFG_PKT_ERR_ESRCH] = "Bad opcode",
+	[CPFL_CFG_PKT_ERR_EEXIST] = "The rule conflicts with already existed one",
+	[CPFL_CFG_PKT_ERR_ENOSPC] = "No space left in the table",
+	[CPFL_CFG_PKT_ERR_ERANGE] = "Parameter out of range",
+	[CPFL_CFG_PKT_ERR_ESBCOMP] = "Completion error",
+	[CPFL_CFG_PKT_ERR_ENOPIN] = "Entry cannot be pinned in cache",
+	[CPFL_CFG_PKT_ERR_ENOTFND] = "Entry does not exist",
+	[CPFL_CFG_PKT_ERR_EMAXCOL] = "Maximum Hash Collisions reached",
+};
+
 /* macros for creating context for rule descriptor */
 #define MEV_RULE_VSI_ID_S		0
 #define MEV_RULE_VSI_ID_M		\
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.662185528 +0800
+++ 0064-net-cpfl-add-checks-on-control-queue-messages.patch	2024-08-12 20:44:02.145069304 +0800
@@ -1 +1 @@
-From 632b57048bb86bb88eb31ef118a0715218d528f0 Mon Sep 17 00:00:00 2001
+From ec9de9db2d45cd8aef7bd3287e56755ebf2704da Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 632b57048bb86bb88eb31ef118a0715218d528f0 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 39a281fa61..b9e825ef57 100644
+index 8a4e1419b4..f6bd1f7599 100644

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

* patch 'net/cpfl: fix 32-bit build' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (63 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/cpfl: add checks on control queue messages' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'app/testpmd: handle IEEE1588 init failure' " Xueming Li
                         ` (92 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: xuemingl, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e7f8c62dfc30a2d6f27b2d290da298df44929a07

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e7f8c62dfc30a2d6f27b2d290da298df44929a07 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 10 Jul 2024 15:53:51 +0100
Subject: [PATCH] net/cpfl: fix 32-bit build
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6ad49bd46baa87af17bb0879fcc563ca37200fca ]

When building for debian 11 32-bit, errors were reported with cpfl
driver[1]. The error is due to comparing signed and unsigned values:

../drivers/net/cpfl/cpfl_flow_parser.c:1699:29: error: comparison of
  integer expressions of different signedness: 'long int' and
  'uint32_t' {aka 'unsigned int'} [-Werror=sign-compare]

Fix the issue by using an explicitly cast for the return value from
atol.

[1] https://build.opensuse.org/package/live_build_log/home:bluca:dpdk/dpdk/Debian_11/i586

Fixes: c10881d3ee74 ("net/cpfl: support flow prog action")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/cpfl/cpfl_flow_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cpfl/cpfl_flow_parser.c b/drivers/net/cpfl/cpfl_flow_parser.c
index a8f0488f21..40569ddc6f 100644
--- a/drivers/net/cpfl/cpfl_flow_parser.c
+++ b/drivers/net/cpfl/cpfl_flow_parser.c
@@ -1696,7 +1696,7 @@ cpfl_parse_check_prog_action(struct cpfl_flow_js_mr_key_action *key_act,
 	bool check_name;
 
 	check_name = key_act->prog.has_name ? strcmp(prog->name, key_act->prog.name) == 0
-					    : atol(prog->name) == key_act->prog.id;
+					    : (uint32_t)atol(prog->name) == key_act->prog.id;
 	if (!check_name) {
 		PMD_DRV_LOG(ERR, "Not support this prog type: %s.", prog->name);
 		return -EINVAL;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.689425926 +0800
+++ 0065-net-cpfl-fix-32-bit-build.patch	2024-08-12 20:44:02.145069304 +0800
@@ -1 +1 @@
-From 6ad49bd46baa87af17bb0879fcc563ca37200fca Mon Sep 17 00:00:00 2001
+From e7f8c62dfc30a2d6f27b2d290da298df44929a07 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6ad49bd46baa87af17bb0879fcc563ca37200fca ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/testpmd: handle IEEE1588 init failure' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (64 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/cpfl: fix 32-bit build' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'doc: remove empty section from testpmd guide' " Xueming Li
                         ` (91 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: xuemingl, Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f11711212c988fd0df19d9044710a68909f2e99b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f11711212c988fd0df19d9044710a68909f2e99b Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Sat, 30 Mar 2024 15:44:09 +0800
Subject: [PATCH] app/testpmd: handle IEEE1588 init failure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 80071a1c8ed669298434c56efe4ca0839f2a970e ]

When the port's timestamping function failed to initialize
(for example, the device does not support PTP), the packets
received by the hardware do not contain the timestamp.
In this case, IEEE1588 packet forwarding should not start.
This patch fix it.

Plus, adding a failure message when failed to disable PTP.

Fixes: a78040c990cb ("app/testpmd: update forward engine beginning")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/ieee1588fwd.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 386d9f10e6..52ae551e2f 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -197,14 +197,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 static int
 port_ieee1588_fwd_begin(portid_t pi)
 {
-	rte_eth_timesync_enable(pi);
-	return 0;
+	int ret;
+
+	ret = rte_eth_timesync_enable(pi);
+	if (ret)
+		printf("Port %u enable PTP failed, ret = %d\n", pi, ret);
+
+	return ret;
 }
 
 static void
 port_ieee1588_fwd_end(portid_t pi)
 {
-	rte_eth_timesync_disable(pi);
+	int ret;
+
+	ret = rte_eth_timesync_disable(pi);
+	if (ret)
+		printf("Port %u disable PTP failed, ret = %d\n", pi, ret);
 }
 
 static void
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.714636624 +0800
+++ 0066-app-testpmd-handle-IEEE1588-init-failure.patch	2024-08-12 20:44:02.145069304 +0800
@@ -1 +1 @@
-From 80071a1c8ed669298434c56efe4ca0839f2a970e Mon Sep 17 00:00:00 2001
+From f11711212c988fd0df19d9044710a68909f2e99b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 80071a1c8ed669298434c56efe4ca0839f2a970e ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 3371771751..afea7735c7 100644
+index 386d9f10e6..52ae551e2f 100644

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

* patch 'doc: remove empty section from testpmd guide' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (65 preceding siblings ...)
  2024-08-12 12:49       ` patch 'app/testpmd: handle IEEE1588 init failure' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'app/testpmd: fix parsing for connection tracking item' " Xueming Li
                         ` (90 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: xuemingl, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=11b6493c45d8f7289bd0c66bd58cbd0c6d9edd79

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 11b6493c45d8f7289bd0c66bd58cbd0c6d9edd79 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Fri, 24 May 2024 18:02:09 +0200
Subject: [PATCH] doc: remove empty section from testpmd guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 06d8e7da01a7e3095e4ff7a6697693233173dc59 ]

When removing the documentation for the obsolete flow filtering,
the related section was kept almost empty.
It can be safely removed.

Fixes: 5007ac13189d ("ethdev: remove deprecated Flow Director configuration")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 547b4dc0dc..45d34d2632 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2910,14 +2910,6 @@ for port 0 and queue 0::
 
    testpmd> set port cman config 0 0 obj queue mode red 10 100 1
 
-Filter Functions
-----------------
-
-This section details the available filter functions that are available.
-
-Note these functions interface the deprecated legacy filtering framework,
-superseded by *rte_flow*. See `Flow rules management`_.
-
 .. _testpmd_rte_flow:
 
 Flow rules management
@@ -2927,10 +2919,6 @@ Control of the generic flow API (*rte_flow*) is fully exposed through the
 ``flow`` command (configuration, validation, creation, destruction, queries
 and operation modes).
 
-Considering *rte_flow* overlaps with all `Filter Functions`_, using both
-features simultaneously may cause undefined side-effects and is therefore
-not recommended.
-
 ``flow`` syntax
 ~~~~~~~~~~~~~~~
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.741104222 +0800
+++ 0067-doc-remove-empty-section-from-testpmd-guide.patch	2024-08-12 20:44:02.155069306 +0800
@@ -1 +1 @@
-From 06d8e7da01a7e3095e4ff7a6697693233173dc59 Mon Sep 17 00:00:00 2001
+From 11b6493c45d8f7289bd0c66bd58cbd0c6d9edd79 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 06d8e7da01a7e3095e4ff7a6697693233173dc59 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 1de1420b94..c19b4f8958 100644
+index 547b4dc0dc..45d34d2632 100644
@@ -23 +25 @@
-@@ -2918,14 +2918,6 @@ for port 0 and queue 0::
+@@ -2910,14 +2910,6 @@ for port 0 and queue 0::
@@ -38 +40 @@
-@@ -2935,10 +2927,6 @@ Control of the generic flow API (*rte_flow*) is fully exposed through the
+@@ -2927,10 +2919,6 @@ Control of the generic flow API (*rte_flow*) is fully exposed through the

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

* patch 'app/testpmd: fix parsing for connection tracking item' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (66 preceding siblings ...)
  2024-08-12 12:49       ` patch 'doc: remove empty section from testpmd guide' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/mana: fix uninitialized return value' " Xueming Li
                         ` (89 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Maayan Kashani; +Cc: xuemingl, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e1135127122c6597997ab0a01a9c40338c4ea933

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e1135127122c6597997ab0a01a9c40338c4ea933 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Sun, 2 Jun 2024 13:23:26 +0300
Subject: [PATCH] app/testpmd: fix parsing for connection tracking item
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 944e5f43ffdb847c7a04edd8ae90baa899a8c697 ]

In command line translation there were missing fields for
connection tracking item, as a result this item was not parsed
and was missing from the items list received from test-pmd.

Fixes: 4d07cbefe3ba ("app/testpmd: add commands for conntrack")

Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/cmdline_flow.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 681924b379..c20c1f8b5e 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -5543,9 +5543,12 @@ static const struct token token_list[] = {
 	[ITEM_CONNTRACK] = {
 		.name = "conntrack",
 		.help = "conntrack state",
+		.priv = PRIV_ITEM(CONNTRACK,
+				  sizeof(struct rte_flow_item_conntrack)),
 		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
+		.call = parse_vc,
 	},
 	[ITEM_PORT_REPRESENTOR] = {
 		.name = "port_representor",
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.769945220 +0800
+++ 0068-app-testpmd-fix-parsing-for-connection-tracking-item.patch	2024-08-12 20:44:02.165069308 +0800
@@ -1 +1 @@
-From 944e5f43ffdb847c7a04edd8ae90baa899a8c697 Mon Sep 17 00:00:00 2001
+From e1135127122c6597997ab0a01a9c40338c4ea933 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 944e5f43ffdb847c7a04edd8ae90baa899a8c697 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index aca3547c74..a76b44bf39 100644
+index 681924b379..c20c1f8b5e 100644
@@ -23 +25 @@
-@@ -5863,9 +5863,12 @@ static const struct token token_list[] = {
+@@ -5543,9 +5543,12 @@ static const struct token token_list[] = {

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

* patch 'net/mana: fix uninitialized return value' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (67 preceding siblings ...)
  2024-08-12 12:49       ` patch 'app/testpmd: fix parsing for connection tracking item' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/txgbe: fix tunnel packet parsing' " Xueming Li
                         ` (88 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Mahmoud Maatuq; +Cc: xuemingl, Long Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=708d5a261b673590204842dda9988a18a649fd25

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 708d5a261b673590204842dda9988a18a649fd25 Mon Sep 17 00:00:00 2001
From: Mahmoud Maatuq <mahmoudmatook.mm@gmail.com>
Date: Thu, 13 Jun 2024 22:30:39 +0400
Subject: [PATCH] net/mana: fix uninitialized return value
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c2c0c8af08ed4e37a10bbabf98a09a105a5650a8 ]

in case we didn't enter or finished the loop without getting ifname we
ret shouldn't have an arbitrary value.

Coverity issue: 424690
Fixes: 84497839d9ca ("net/mana: support MTU update")

Signed-off-by: Mahmoud Maatuq <mahmoudmatook.mm@gmail.com>
Reviewed-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/mana.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 58257c971e..65ca139be5 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -711,7 +711,7 @@ mana_dev_stats_reset(struct rte_eth_dev *dev __rte_unused)
 static int
 mana_get_ifname(const struct mana_priv *priv, char (*ifname)[IF_NAMESIZE])
 {
-	int ret;
+	int ret = -ENODEV;
 	DIR *dir;
 	struct dirent *dent;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.805287417 +0800
+++ 0069-net-mana-fix-uninitialized-return-value.patch	2024-08-12 20:44:02.165069308 +0800
@@ -1 +1 @@
-From c2c0c8af08ed4e37a10bbabf98a09a105a5650a8 Mon Sep 17 00:00:00 2001
+From 708d5a261b673590204842dda9988a18a649fd25 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c2c0c8af08ed4e37a10bbabf98a09a105a5650a8 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 68c625258e..c37c4e3444 100644
+index 58257c971e..65ca139be5 100644
@@ -23 +25 @@
-@@ -715,7 +715,7 @@ mana_dev_stats_reset(struct rte_eth_dev *dev __rte_unused)
+@@ -711,7 +711,7 @@ mana_dev_stats_reset(struct rte_eth_dev *dev __rte_unused)

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

* patch 'net/txgbe: fix tunnel packet parsing' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (68 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/mana: fix uninitialized return value' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/txgbe: fix flow filters in VT mode' " Xueming Li
                         ` (87 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=842a7baf9cc6383d17bc54ce861e9475e75a8eb0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 842a7baf9cc6383d17bc54ce861e9475e75a8eb0 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:32 +0800
Subject: [PATCH] net/txgbe: fix tunnel packet parsing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 60847e50b5280effa6e92a452bbb36fa7051db28 ]

The outer-ipv6 tunnel packet was parsed to the wrong packet type, remove
the default RTE_PTYPE_L2_ETHER and RTE_PTYPE_L3_IPV4 flags for tunnel
packets. And correct the calculation of tunnel length for GRE and GENEVE
packets.

Fixes: ca46fcd753b1 ("net/txgbe: support Tx with hardware offload")
Fixes: e5ece1f467aa ("net/txgbe: fix VXLAN-GPE packet checksum")
Fixes: 0e32d6edd479 ("net/txgbe: fix packet type to parse from offload flags")
Fixes: 5bbaf75ed6df ("net/txgbe: fix GRE tunnel packet checksum")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_rxtx.c | 69 ++++++++++++++++++----------------
 1 file changed, 37 insertions(+), 32 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index 1cd4b25965..0e825f89fe 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -564,26 +564,17 @@ tx_desc_ol_flags_to_ptype(uint64_t oflags)
 	switch (oflags & RTE_MBUF_F_TX_TUNNEL_MASK) {
 	case RTE_MBUF_F_TX_TUNNEL_VXLAN:
 	case RTE_MBUF_F_TX_TUNNEL_VXLAN_GPE:
-		ptype |= RTE_PTYPE_L2_ETHER |
-			 RTE_PTYPE_L3_IPV4 |
-			 RTE_PTYPE_TUNNEL_GRENAT;
+		ptype |= RTE_PTYPE_TUNNEL_GRENAT;
 		break;
 	case RTE_MBUF_F_TX_TUNNEL_GRE:
-		ptype |= RTE_PTYPE_L2_ETHER |
-			 RTE_PTYPE_L3_IPV4 |
-			 RTE_PTYPE_TUNNEL_GRE;
+		ptype |= RTE_PTYPE_TUNNEL_GRE;
 		break;
 	case RTE_MBUF_F_TX_TUNNEL_GENEVE:
-		ptype |= RTE_PTYPE_L2_ETHER |
-			 RTE_PTYPE_L3_IPV4 |
-			 RTE_PTYPE_TUNNEL_GENEVE;
-		ptype |= RTE_PTYPE_INNER_L2_ETHER;
+		ptype |= RTE_PTYPE_TUNNEL_GENEVE;
 		break;
 	case RTE_MBUF_F_TX_TUNNEL_IPIP:
 	case RTE_MBUF_F_TX_TUNNEL_IP:
-		ptype |= RTE_PTYPE_L2_ETHER |
-			 RTE_PTYPE_L3_IPV4 |
-			 RTE_PTYPE_TUNNEL_IP;
+		ptype |= RTE_PTYPE_TUNNEL_IP;
 		break;
 	}
 
@@ -667,11 +658,20 @@ txgbe_xmit_cleanup(struct txgbe_tx_queue *txq)
 	return 0;
 }
 
+#define GRE_CHECKSUM_PRESENT	0x8000
+#define GRE_KEY_PRESENT		0x2000
+#define GRE_SEQUENCE_PRESENT	0x1000
+#define GRE_EXT_LEN		4
+#define GRE_SUPPORTED_FIELDS	(GRE_CHECKSUM_PRESENT | GRE_KEY_PRESENT |\
+				 GRE_SEQUENCE_PRESENT)
+
 static inline uint8_t
 txgbe_get_tun_len(struct rte_mbuf *mbuf)
 {
 	struct txgbe_genevehdr genevehdr;
 	const struct txgbe_genevehdr *gh;
+	const struct txgbe_grehdr *grh;
+	struct txgbe_grehdr grehdr;
 	uint8_t tun_len;
 
 	switch (mbuf->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
@@ -684,11 +684,16 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
 			+ sizeof(struct txgbe_vxlanhdr);
 		break;
 	case RTE_MBUF_F_TX_TUNNEL_GRE:
-		tun_len = sizeof(struct txgbe_nvgrehdr);
+		tun_len = sizeof(struct txgbe_grehdr);
+		grh = rte_pktmbuf_read(mbuf,
+			mbuf->outer_l2_len + mbuf->outer_l3_len,
+			sizeof(grehdr), &grehdr);
+		if (grh->flags & rte_cpu_to_be_16(GRE_SUPPORTED_FIELDS))
+			tun_len += GRE_EXT_LEN;
 		break;
 	case RTE_MBUF_F_TX_TUNNEL_GENEVE:
-		gh = rte_pktmbuf_read(mbuf,
-			mbuf->outer_l2_len + mbuf->outer_l3_len,
+		gh = rte_pktmbuf_read(mbuf, mbuf->outer_l2_len +
+			mbuf->outer_l3_len + sizeof(struct txgbe_udphdr),
 			sizeof(genevehdr), &genevehdr);
 		tun_len = sizeof(struct txgbe_udphdr)
 			+ sizeof(struct txgbe_genevehdr)
@@ -702,27 +707,26 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
 }
 
 static inline uint8_t
-txgbe_parse_tun_ptid(struct rte_mbuf *tx_pkt)
+txgbe_parse_tun_ptid(struct rte_mbuf *tx_pkt, uint8_t tun_len)
 {
-	uint64_t l2_vxlan, l2_vxlan_mac, l2_vxlan_mac_vlan;
-	uint64_t l2_gre, l2_gre_mac, l2_gre_mac_vlan;
+	uint64_t inner_l2_len;
 	uint8_t ptid = 0;
 
-	l2_vxlan = sizeof(struct txgbe_udphdr) + sizeof(struct txgbe_vxlanhdr);
-	l2_vxlan_mac = l2_vxlan + sizeof(struct rte_ether_hdr);
-	l2_vxlan_mac_vlan = l2_vxlan_mac + sizeof(struct rte_vlan_hdr);
+	inner_l2_len = tx_pkt->l2_len - tun_len;
 
-	l2_gre = sizeof(struct txgbe_grehdr);
-	l2_gre_mac = l2_gre + sizeof(struct rte_ether_hdr);
-	l2_gre_mac_vlan = l2_gre_mac + sizeof(struct rte_vlan_hdr);
-
-	if (tx_pkt->l2_len == l2_vxlan || tx_pkt->l2_len == l2_gre)
+	switch (inner_l2_len) {
+	case 0:
 		ptid = TXGBE_PTID_TUN_EIG;
-	else if (tx_pkt->l2_len == l2_vxlan_mac || tx_pkt->l2_len == l2_gre_mac)
+		break;
+	case sizeof(struct rte_ether_hdr):
 		ptid = TXGBE_PTID_TUN_EIGM;
-	else if (tx_pkt->l2_len == l2_vxlan_mac_vlan ||
-			tx_pkt->l2_len == l2_gre_mac_vlan)
+		break;
+	case sizeof(struct rte_ether_hdr) + sizeof(struct rte_vlan_hdr):
 		ptid = TXGBE_PTID_TUN_EIGMV;
+		break;
+	default:
+		ptid = TXGBE_PTID_TUN_EI;
+	}
 
 	return ptid;
 }
@@ -789,8 +793,6 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		tx_ol_req = ol_flags & TXGBE_TX_OFFLOAD_MASK;
 		if (tx_ol_req) {
 			tx_offload.ptid = tx_desc_ol_flags_to_ptid(tx_ol_req);
-			if (tx_offload.ptid & TXGBE_PTID_PKT_TUN)
-				tx_offload.ptid |= txgbe_parse_tun_ptid(tx_pkt);
 			tx_offload.l2_len = tx_pkt->l2_len;
 			tx_offload.l3_len = tx_pkt->l3_len;
 			tx_offload.l4_len = tx_pkt->l4_len;
@@ -799,6 +801,9 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			tx_offload.outer_l2_len = tx_pkt->outer_l2_len;
 			tx_offload.outer_l3_len = tx_pkt->outer_l3_len;
 			tx_offload.outer_tun_len = txgbe_get_tun_len(tx_pkt);
+			if (tx_offload.ptid & TXGBE_PTID_PKT_TUN)
+				tx_offload.ptid |= txgbe_parse_tun_ptid(tx_pkt,
+							tx_offload.outer_tun_len);
 
 #ifdef RTE_LIB_SECURITY
 			if (use_ipsec) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.829958615 +0800
+++ 0070-net-txgbe-fix-tunnel-packet-parsing.patch	2024-08-12 20:44:02.185069312 +0800
@@ -1 +1 @@
-From 60847e50b5280effa6e92a452bbb36fa7051db28 Mon Sep 17 00:00:00 2001
+From 842a7baf9cc6383d17bc54ce861e9475e75a8eb0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 60847e50b5280effa6e92a452bbb36fa7051db28 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 4b78e68a40..7731ad8491 100644
+index 1cd4b25965..0e825f89fe 100644
@@ -26 +28 @@
-@@ -586,26 +586,17 @@ tx_desc_ol_flags_to_ptype(uint64_t oflags)
+@@ -564,26 +564,17 @@ tx_desc_ol_flags_to_ptype(uint64_t oflags)
@@ -57 +59 @@
-@@ -689,11 +680,20 @@ txgbe_xmit_cleanup(struct txgbe_tx_queue *txq)
+@@ -667,11 +658,20 @@ txgbe_xmit_cleanup(struct txgbe_tx_queue *txq)
@@ -78 +80 @@
-@@ -706,11 +706,16 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
+@@ -684,11 +684,16 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
@@ -98 +100 @@
-@@ -724,27 +729,26 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
+@@ -702,27 +707,26 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
@@ -139 +141 @@
-@@ -811,8 +815,6 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -789,8 +793,6 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -148 +150 @@
-@@ -821,6 +823,9 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -799,6 +801,9 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,

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

* patch 'net/txgbe: fix flow filters in VT mode' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (69 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/txgbe: fix tunnel packet parsing' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/txgbe: fix Tx hang on queue disable' " Xueming Li
                         ` (86 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6ea637699a7fa4897cb24947dab91c334e68ed98

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6ea637699a7fa4897cb24947dab91c334e68ed98 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:33 +0800
Subject: [PATCH] net/txgbe: fix flow filters in VT mode
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit af8c90f424ff704578971fb07f5005d4615c9f3e ]

In virtualization mode, target pool should be determined for the
filters. For ether type filter, virtualization mode must be enabled
to filter broadcast/multicast packets due to hardware limitations.

Fixes: f8e2cfc7702b ("net/txgbe: support ethertype filter add and delete")
Fixes: 77a72b4d9dc0 ("net/txgbe: support ntuple filter add and delete")
Fixes: 983a4ef2265b ("net/txgbe: support syn filter add and delete")
Fixes: 08d61139be0a ("net/txgbe: support flow director filter add and delete")
Fixes: 9fdfed08a5e3 ("net/txgbe: restore RSS filter")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 24 +++++++++++++++++++++---
 drivers/net/txgbe/txgbe_fdir.c   |  3 +++
 drivers/net/txgbe/txgbe_rxtx.c   |  8 +++++++-
 3 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 6bc231a130..33e4c2ec9b 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -4004,6 +4004,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
 	struct txgbe_filter_info *filter_info = TXGBE_DEV_FILTER(dev);
 	uint32_t syn_info;
 	uint32_t synqf;
+	uint16_t queue;
 
 	if (filter->queue >= TXGBE_MAX_RX_QUEUE_NUM)
 		return -EINVAL;
@@ -4013,7 +4014,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
 	if (add) {
 		if (syn_info & TXGBE_SYNCLS_ENA)
 			return -EINVAL;
-		synqf = (uint32_t)TXGBE_SYNCLS_QPID(filter->queue);
+		if (RTE_ETH_DEV_SRIOV(dev).active)
+			queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue;
+		else
+			queue = filter->queue;
+		synqf = (uint32_t)TXGBE_SYNCLS_QPID(queue);
 		synqf |= TXGBE_SYNCLS_ENA;
 
 		if (filter->hig_pri)
@@ -4082,7 +4087,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
 	wr32(hw, TXGBE_5TFPORT(i), sdpqf);
 	wr32(hw, TXGBE_5TFCTL0(i), ftqf);
 
-	l34timir |= TXGBE_5TFCTL1_QP(filter->queue);
+	if (RTE_ETH_DEV_SRIOV(dev).active)
+		l34timir |= TXGBE_5TFCTL1_QP(RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue);
+	else
+		l34timir |= TXGBE_5TFCTL1_QP(filter->queue);
 	wr32(hw, TXGBE_5TFCTL1(i), l34timir);
 }
 
@@ -4366,7 +4374,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
 	if (add) {
 		etqf = TXGBE_ETFLT_ENA;
 		etqf |= TXGBE_ETFLT_ETID(filter->ether_type);
-		etqs |= TXGBE_ETCLS_QPID(filter->queue);
+		if (RTE_ETH_DEV_SRIOV(dev).active) {
+			int pool, queue;
+
+			pool = RTE_ETH_DEV_SRIOV(dev).def_vmdq_idx;
+			queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue;
+			etqf |= TXGBE_ETFLT_POOLENA;
+			etqf |= TXGBE_ETFLT_POOL(pool);
+			etqs |= TXGBE_ETCLS_QPID(queue);
+		} else {
+			etqs |= TXGBE_ETCLS_QPID(filter->queue);
+		}
 		etqs |= TXGBE_ETCLS_QENA;
 
 		ethertype_filter.ethertype = filter->ether_type;
diff --git a/drivers/net/txgbe/txgbe_fdir.c b/drivers/net/txgbe/txgbe_fdir.c
index a198b6781b..f627ab681d 100644
--- a/drivers/net/txgbe/txgbe_fdir.c
+++ b/drivers/net/txgbe/txgbe_fdir.c
@@ -844,6 +844,9 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev,
 		return -EINVAL;
 	}
 
+	if (RTE_ETH_DEV_SRIOV(dev).active)
+		queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + queue;
+
 	node = txgbe_fdir_filter_lookup(info, &rule->input);
 	if (node) {
 		if (!update) {
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index 0e825f89fe..50207eb6cf 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -5074,6 +5074,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
 	uint32_t reta;
 	uint16_t i;
 	uint16_t j;
+	uint16_t queue;
 	struct rte_eth_rss_conf rss_conf = {
 		.rss_key = conf->conf.key_len ?
 			(void *)(uintptr_t)conf->conf.key : NULL,
@@ -5106,7 +5107,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
 	for (i = 0, j = 0; i < RTE_ETH_RSS_RETA_SIZE_128; i++, j++) {
 		if (j == conf->conf.queue_num)
 			j = 0;
-		reta = (reta >> 8) | LS32(conf->conf.queue[j], 24, 0xFF);
+		if (RTE_ETH_DEV_SRIOV(dev).active)
+			queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx +
+				conf->conf.queue[j];
+		else
+			queue = conf->conf.queue[j];
+		reta = (reta >> 8) | LS32(queue, 24, 0xFF);
 		if ((i & 3) == 3)
 			wr32at(hw, TXGBE_REG_RSSTBL, i >> 2, reta);
 	}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.857356313 +0800
+++ 0071-net-txgbe-fix-flow-filters-in-VT-mode.patch	2024-08-12 20:44:02.195069314 +0800
@@ -1 +1 @@
-From af8c90f424ff704578971fb07f5005d4615c9f3e Mon Sep 17 00:00:00 2001
+From 6ea637699a7fa4897cb24947dab91c334e68ed98 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit af8c90f424ff704578971fb07f5005d4615c9f3e ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 6d11412616..fa68a5d2ca 100644
+index 6bc231a130..33e4c2ec9b 100644
@@ -28 +30 @@
-@@ -4011,6 +4011,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
+@@ -4004,6 +4004,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
@@ -36 +38 @@
-@@ -4020,7 +4021,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
+@@ -4013,7 +4014,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
@@ -49 +51 @@
-@@ -4089,7 +4094,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
+@@ -4082,7 +4087,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
@@ -61 +63 @@
-@@ -4373,7 +4381,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
+@@ -4366,7 +4374,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
@@ -95 +97 @@
-index 7731ad8491..35f80d73ac 100644
+index 0e825f89fe..50207eb6cf 100644
@@ -98 +100 @@
-@@ -5160,6 +5160,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
+@@ -5074,6 +5074,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
@@ -106 +108 @@
-@@ -5192,7 +5193,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
+@@ -5106,7 +5107,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,

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

* patch 'net/txgbe: fix Tx hang on queue disable' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (70 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/txgbe: fix flow filters in VT mode' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/txgbe: restrict configuration of VLAN strip offload' " Xueming Li
                         ` (85 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ed2250e120be7e7ba7b2d07b7da41c130dd10889

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ed2250e120be7e7ba7b2d07b7da41c130dd10889 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:34 +0800
Subject: [PATCH] net/txgbe: fix Tx hang on queue disable
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8a31f4bbbbb73baf77297f00887f4b267feb7b8e ]

The problem of Tx hang also occurs on Wangxun 10Gb NICs, when stop
device under heavy traffic.

Refer to commit ac6c5e9af56a ("net/ngbe: fix Tx hang on queue disable")

Disable PCIe bus master to clear BME when stop hardware, and verify
there are no pending requests. Move disabling Tx queue after disabling
PCIe bus master to ensure that there are no packets left to cause Tx
hang.

Fixes: b1f596677d8e ("net/txgbe: support device start")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/meson.build   |  2 +-
 drivers/net/txgbe/base/txgbe_hw.c    | 60 +++++++++++++++++++++++-----
 drivers/net/txgbe/base/txgbe_hw.h    |  1 +
 drivers/net/txgbe/base/txgbe_osdep.h |  1 +
 drivers/net/txgbe/base/txgbe_regs.h  |  3 ++
 drivers/net/txgbe/base/txgbe_type.h  |  1 +
 drivers/net/txgbe/txgbe_ethdev.c     |  7 ++++
 7 files changed, 65 insertions(+), 10 deletions(-)

diff --git a/drivers/net/txgbe/base/meson.build b/drivers/net/txgbe/base/meson.build
index a81d6890fe..4cf90a394a 100644
--- a/drivers/net/txgbe/base/meson.build
+++ b/drivers/net/txgbe/base/meson.build
@@ -22,6 +22,6 @@ foreach flag: error_cflags
 endforeach
 
 base_lib = static_library('txgbe_base', sources,
-    dependencies: [static_rte_eal, static_rte_net],
+    dependencies: [static_rte_eal, static_rte_net, static_rte_bus_pci],
     c_args: c_args)
 base_objs = base_lib.extract_all_objects(recursive: true)
diff --git a/drivers/net/txgbe/base/txgbe_hw.c b/drivers/net/txgbe/base/txgbe_hw.c
index d19fd0065d..7094551fee 100644
--- a/drivers/net/txgbe/base/txgbe_hw.c
+++ b/drivers/net/txgbe/base/txgbe_hw.c
@@ -462,7 +462,7 @@ void txgbe_set_lan_id_multi_port(struct txgbe_hw *hw)
  **/
 s32 txgbe_stop_hw(struct txgbe_hw *hw)
 {
-	u32 reg_val;
+	s32 status = 0;
 	u16 i;
 
 	/*
@@ -484,16 +484,26 @@ s32 txgbe_stop_hw(struct txgbe_hw *hw)
 	wr32(hw, TXGBE_ICR(0), TXGBE_ICR_MASK);
 	wr32(hw, TXGBE_ICR(1), TXGBE_ICR_MASK);
 
-	/* Disable the transmit unit.  Each queue must be disabled. */
-	for (i = 0; i < hw->mac.max_tx_queues; i++)
-		wr32(hw, TXGBE_TXCFG(i), TXGBE_TXCFG_FLUSH);
+	wr32(hw, TXGBE_BMECTL, 0x3);
 
 	/* Disable the receive unit by stopping each queue */
-	for (i = 0; i < hw->mac.max_rx_queues; i++) {
-		reg_val = rd32(hw, TXGBE_RXCFG(i));
-		reg_val &= ~TXGBE_RXCFG_ENA;
-		wr32(hw, TXGBE_RXCFG(i), reg_val);
-	}
+	for (i = 0; i < hw->mac.max_rx_queues; i++)
+		wr32(hw, TXGBE_RXCFG(i), 0);
+
+	/* flush all queues disables */
+	txgbe_flush(hw);
+	msec_delay(2);
+
+	/* Prevent the PCI-E bus from hanging by disabling PCI-E master
+	 * access and verify no pending requests
+	 */
+	status = txgbe_set_pcie_master(hw, false);
+	if (status)
+		return status;
+
+	/* Disable the transmit unit.  Each queue must be disabled. */
+	for (i = 0; i < hw->mac.max_tx_queues; i++)
+		wr32(hw, TXGBE_TXCFG(i), 0);
 
 	/* flush all queues disables */
 	txgbe_flush(hw);
@@ -1174,6 +1184,38 @@ out:
 	}
 }
 
+s32 txgbe_set_pcie_master(struct txgbe_hw *hw, bool enable)
+{
+	struct rte_pci_device *pci_dev = (struct rte_pci_device *)hw->back;
+	s32 status = 0;
+	u32 i;
+
+	if (rte_pci_set_bus_master(pci_dev, enable) < 0) {
+		DEBUGOUT("Cannot configure PCI bus master.");
+		return -1;
+	}
+
+	if (enable)
+		goto out;
+
+	/* Exit if master requests are blocked */
+	if (!(rd32(hw, TXGBE_BMEPEND)))
+		goto out;
+
+	/* Poll for master request bit to clear */
+	for (i = 0; i < TXGBE_PCI_MASTER_DISABLE_TIMEOUT; i++) {
+		usec_delay(100);
+		if (!(rd32(hw, TXGBE_BMEPEND)))
+			goto out;
+	}
+
+	DEBUGOUT("PCIe transaction pending bit also did not clear.");
+	status = TXGBE_ERR_MASTER_REQUESTS_PENDING;
+
+out:
+	return status;
+}
+
 /**
  *  txgbe_acquire_swfw_sync - Acquire SWFW semaphore
  *  @hw: pointer to hardware structure
diff --git a/drivers/net/txgbe/base/txgbe_hw.h b/drivers/net/txgbe/base/txgbe_hw.h
index 7031589f7c..4bf9da2d4c 100644
--- a/drivers/net/txgbe/base/txgbe_hw.h
+++ b/drivers/net/txgbe/base/txgbe_hw.h
@@ -40,6 +40,7 @@ s32 txgbe_setup_fc(struct txgbe_hw *hw);
 s32 txgbe_validate_mac_addr(u8 *mac_addr);
 s32 txgbe_acquire_swfw_sync(struct txgbe_hw *hw, u32 mask);
 void txgbe_release_swfw_sync(struct txgbe_hw *hw, u32 mask);
+s32 txgbe_set_pcie_master(struct txgbe_hw *hw, bool enable);
 
 s32 txgbe_get_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr);
 s32 txgbe_set_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr);
diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h
index b62c0b0824..0d9492c3cb 100644
--- a/drivers/net/txgbe/base/txgbe_osdep.h
+++ b/drivers/net/txgbe/base/txgbe_osdep.h
@@ -19,6 +19,7 @@
 #include <rte_config.h>
 #include <rte_io.h>
 #include <rte_ether.h>
+#include <bus_pci_driver.h>
 
 #include "../txgbe_logs.h"
 
diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index 79290a7afe..86896d11dc 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1236,6 +1236,9 @@ enum txgbe_5tuple_protocol {
 #define TXGBE_TCPTMR                    0x000170
 #define TXGBE_ITRSEL                    0x000180
 
+#define TXGBE_BMECTL                    0x012020
+#define TXGBE_BMEPEND                   0x000168
+
 /* P2V Mailbox */
 #define TXGBE_MBMEM(i)           (0x005000 + 0x40 * (i)) /* 0-63 */
 #define TXGBE_MBCTL(i)           (0x000600 + 4 * (i)) /* 0-63 */
diff --git a/drivers/net/txgbe/base/txgbe_type.h b/drivers/net/txgbe/base/txgbe_type.h
index 75e839b7de..f52736cae9 100644
--- a/drivers/net/txgbe/base/txgbe_type.h
+++ b/drivers/net/txgbe/base/txgbe_type.h
@@ -29,6 +29,7 @@
 #define TXGBE_FDIRCMD_CMD_POLL			10
 #define TXGBE_VF_INIT_TIMEOUT	200 /* Number of retries to clear RSTI */
 #define TXGBE_SPI_TIMEOUT	10000
+#define TXGBE_PCI_MASTER_DISABLE_TIMEOUT	800
 
 #define TXGBE_ALIGN		128 /* as intel did */
 
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 33e4c2ec9b..af98762680 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -601,6 +601,7 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
 
 	/* Vendor and Device ID need to be set before init of shared code */
+	hw->back = pci_dev;
 	hw->device_id = pci_dev->id.device_id;
 	hw->vendor_id = pci_dev->id.vendor_id;
 	if (pci_dev->id.subsystem_vendor_id == PCI_VENDOR_ID_WANGXUN) {
@@ -1716,6 +1717,8 @@ txgbe_dev_start(struct rte_eth_dev *dev)
 	hw->mac.get_link_status = true;
 	hw->dev_start = true;
 
+	txgbe_set_pcie_master(hw, true);
+
 	/* workaround for GPIO intr lost when mng_veto bit is set */
 	if (txgbe_check_reset_blocked(hw))
 		txgbe_reinit_gpio_intr(hw);
@@ -1979,6 +1982,8 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
 	adapter->rss_reta_updated = 0;
 	wr32m(hw, TXGBE_LEDCTL, 0xFFFFFFFF, TXGBE_LEDCTL_SEL_MASK);
 
+	txgbe_set_pcie_master(hw, true);
+
 	hw->adapter_stopped = true;
 	dev->data->dev_started = 0;
 	hw->dev_start = false;
@@ -2061,6 +2066,8 @@ txgbe_dev_close(struct rte_eth_dev *dev)
 
 	txgbe_dev_free_queues(dev);
 
+	txgbe_set_pcie_master(hw, false);
+
 	/* reprogram the RAR[0] in case user changed it. */
 	txgbe_set_rar(hw, 0, hw->mac.addr, 0, true);
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.894827510 +0800
+++ 0072-net-txgbe-fix-Tx-hang-on-queue-disable.patch	2024-08-12 20:44:02.215069318 +0800
@@ -1 +1 @@
-From 8a31f4bbbbb73baf77297f00887f4b267feb7b8e Mon Sep 17 00:00:00 2001
+From ed2250e120be7e7ba7b2d07b7da41c130dd10889 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8a31f4bbbbb73baf77297f00887f4b267feb7b8e ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -142 +144 @@
-index 4fce355000..62d16a6abb 100644
+index b62c0b0824..0d9492c3cb 100644
@@ -180 +182 @@
-index fa68a5d2ca..121dccb5eb 100644
+index 33e4c2ec9b..af98762680 100644
@@ -191 +193 @@
-@@ -1717,6 +1718,8 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+@@ -1716,6 +1717,8 @@ txgbe_dev_start(struct rte_eth_dev *dev)
@@ -200 +202 @@
-@@ -1980,6 +1983,8 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -1979,6 +1982,8 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
@@ -209 +211 @@
-@@ -2062,6 +2067,8 @@ txgbe_dev_close(struct rte_eth_dev *dev)
+@@ -2061,6 +2066,8 @@ txgbe_dev_close(struct rte_eth_dev *dev)

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

* patch 'net/txgbe: restrict configuration of VLAN strip offload' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (71 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/txgbe: fix Tx hang on queue disable' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/txgbe: reconfigure more MAC Rx registers' " Xueming Li
                         ` (84 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=55d8be2055f28556f418b6696fe0bd5145140289

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 55d8be2055f28556f418b6696fe0bd5145140289 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:35 +0800
Subject: [PATCH] net/txgbe: restrict configuration of VLAN strip offload
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 66364efcf95884b97b71aaff697f8597a286f52e ]

There is a hardware limitation that Rx ring config register is not
writable when Rx ring is enabled, i.e. the TXGBE_RXCFG_ENA bit is set.
But disabling the ring when there is traffic will cause ring get stuck.
So restrict the configuration of VLAN strip offload only if device is
started.

Fixes: 220b0e49bc47 ("net/txgbe: support VLAN")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 49 +++++++++++++-------------------
 1 file changed, 20 insertions(+), 29 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index af98762680..d1305b0507 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -1000,41 +1000,25 @@ txgbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 }
 
 static void
-txgbe_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
+txgbe_vlan_strip_q_set(struct rte_eth_dev *dev, uint16_t queue, int on)
 {
-	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
-	struct txgbe_rx_queue *rxq;
-	bool restart;
-	uint32_t rxcfg, rxbal, rxbah;
-
 	if (on)
 		txgbe_vlan_hw_strip_enable(dev, queue);
 	else
 		txgbe_vlan_hw_strip_disable(dev, queue);
+}
 
-	rxq = dev->data->rx_queues[queue];
-	rxbal = rd32(hw, TXGBE_RXBAL(rxq->reg_idx));
-	rxbah = rd32(hw, TXGBE_RXBAH(rxq->reg_idx));
-	rxcfg = rd32(hw, TXGBE_RXCFG(rxq->reg_idx));
-	if (rxq->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) {
-		restart = (rxcfg & TXGBE_RXCFG_ENA) &&
-			!(rxcfg & TXGBE_RXCFG_VLAN);
-		rxcfg |= TXGBE_RXCFG_VLAN;
-	} else {
-		restart = (rxcfg & TXGBE_RXCFG_ENA) &&
-			(rxcfg & TXGBE_RXCFG_VLAN);
-		rxcfg &= ~TXGBE_RXCFG_VLAN;
-	}
-	rxcfg &= ~TXGBE_RXCFG_ENA;
+static void
+txgbe_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
+{
+	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
 
-	if (restart) {
-		/* set vlan strip for ring */
-		txgbe_dev_rx_queue_stop(dev, queue);
-		wr32(hw, TXGBE_RXBAL(rxq->reg_idx), rxbal);
-		wr32(hw, TXGBE_RXBAH(rxq->reg_idx), rxbah);
-		wr32(hw, TXGBE_RXCFG(rxq->reg_idx), rxcfg);
-		txgbe_dev_rx_queue_start(dev, queue);
+	if (!hw->adapter_stopped) {
+		PMD_DRV_LOG(ERR, "Please stop port first");
+		return;
 	}
+
+	txgbe_vlan_strip_q_set(dev, queue, on);
 }
 
 static int
@@ -1259,9 +1243,9 @@ txgbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
 		rxq = dev->data->rx_queues[i];
 
 		if (rxq->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)
-			txgbe_vlan_strip_queue_set(dev, i, 1);
+			txgbe_vlan_strip_q_set(dev, i, 1);
 		else
-			txgbe_vlan_strip_queue_set(dev, i, 0);
+			txgbe_vlan_strip_q_set(dev, i, 0);
 	}
 }
 
@@ -1323,6 +1307,13 @@ txgbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)
 static int
 txgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
+	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
+
+	if (!hw->adapter_stopped && (mask & RTE_ETH_VLAN_STRIP_MASK)) {
+		PMD_DRV_LOG(ERR, "Please stop port first");
+		return -EPERM;
+	}
+
 	txgbe_config_vlan_strip_on_all_queues(dev, mask);
 
 	txgbe_vlan_offload_config(dev, mask);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.928433307 +0800
+++ 0073-net-txgbe-restrict-configuration-of-VLAN-strip-offlo.patch	2024-08-12 20:44:02.225069320 +0800
@@ -1 +1 @@
-From 66364efcf95884b97b71aaff697f8597a286f52e Mon Sep 17 00:00:00 2001
+From 55d8be2055f28556f418b6696fe0bd5145140289 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 66364efcf95884b97b71aaff697f8597a286f52e ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 121dccb5eb..a59d964a5b 100644
+index af98762680..d1305b0507 100644

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

* patch 'net/txgbe: reconfigure more MAC Rx registers' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (72 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/txgbe: restrict configuration of VLAN strip offload' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/txgbe: fix VF promiscuous and allmulticast' " Xueming Li
                         ` (83 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ea62ead19d19d609512349b7650c943a062eb3b7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ea62ead19d19d609512349b7650c943a062eb3b7 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:36 +0800
Subject: [PATCH] net/txgbe: reconfigure more MAC Rx registers
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3056288933f06afa72f8611ab7c4accdd01899fa ]

When link status changes, there is a probability that no more packets
can be received on the port, due to hardware defects. These MAC Rx
registers should be reconfigured to fix this problem.

Fixes: 950a6954df13 ("net/txgbe: reconfigure MAC Rx when link update")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_regs.h | 2 ++
 drivers/net/txgbe/txgbe_ethdev.c    | 8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index 86896d11dc..a2984f1106 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1022,6 +1022,8 @@ enum txgbe_5tuple_protocol {
 #define   TXGBE_MACRXFLT_CTL_PASS       LS(3, 6, 0x3)
 #define   TXGBE_MACRXFLT_RXALL          MS(31, 0x1)
 
+#define TXGBE_MAC_WDG_TIMEOUT           0x01100C
+
 /******************************************************************************
  * Statistic Registers
  ******************************************************************************/
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index d1305b0507..52584ce60f 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2874,6 +2874,7 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	bool link_up;
 	int err;
 	int wait = 1;
+	u32 reg;
 
 	memset(&link, 0, sizeof(link));
 	link.link_status = RTE_ETH_LINK_DOWN;
@@ -2961,9 +2962,14 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	}
 
 	/* Re configure MAC RX */
-	if (hw->mac.type == txgbe_mac_raptor)
+	if (hw->mac.type == txgbe_mac_raptor) {
+		reg = rd32(hw, TXGBE_MACRXCFG);
+		wr32(hw, TXGBE_MACRXCFG, reg);
 		wr32m(hw, TXGBE_MACRXFLT, TXGBE_MACRXFLT_PROMISC,
 			TXGBE_MACRXFLT_PROMISC);
+		reg = rd32(hw, TXGBE_MAC_WDG_TIMEOUT);
+		wr32(hw, TXGBE_MAC_WDG_TIMEOUT, reg);
+	}
 
 	return rte_eth_linkstatus_set(dev, &link);
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.958384705 +0800
+++ 0074-net-txgbe-reconfigure-more-MAC-Rx-registers.patch	2024-08-12 20:44:02.235069322 +0800
@@ -1 +1 @@
-From 3056288933f06afa72f8611ab7c4accdd01899fa Mon Sep 17 00:00:00 2001
+From ea62ead19d19d609512349b7650c943a062eb3b7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3056288933f06afa72f8611ab7c4accdd01899fa ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -33 +35 @@
-index a59d964a5b..699ff1c920 100644
+index d1305b0507..52584ce60f 100644
@@ -36 +38 @@
-@@ -2879,6 +2879,7 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -2874,6 +2874,7 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -44 +46 @@
-@@ -2968,9 +2969,14 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -2961,9 +2962,14 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,

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

* patch 'net/txgbe: fix VF promiscuous and allmulticast' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (73 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/txgbe: reconfigure more MAC Rx registers' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/ngbe: add special config for YT8531SH-CA PHY' " Xueming Li
                         ` (82 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=85bd339e194d0ad1a3162616f3c3a4a66d397148

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 85bd339e194d0ad1a3162616f3c3a4a66d397148 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:37 +0800
Subject: [PATCH] net/txgbe: fix VF promiscuous and allmulticast
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 055a51ff85112200706a07e99b92c9459774080a ]

The configuration of allmulti and promiscuous modes conflicts
together. For instance, if we enable promiscuous mode, then enable and
disable allmulti, then the promiscuous mode is wrongly disabled.

Fix this behavior by:
- doing nothing when we set/unset allmulti if promiscuous mode is on
- restorting the proper mode (none or allmulti) when we disable
  promiscuous mode

Fixes: 29072d593fe4 ("net/txgbe: support VF promiscuous and allmulticast")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev_vf.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index f1341fbf7e..1d7f1dcd15 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -1201,9 +1201,13 @@ static int
 txgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev)
 {
 	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
+	int mode = TXGBEVF_XCAST_MODE_NONE;
 	int ret;
 
-	switch (hw->mac.update_xcast_mode(hw, TXGBEVF_XCAST_MODE_NONE)) {
+	if (dev->data->all_multicast)
+		mode = TXGBEVF_XCAST_MODE_ALLMULTI;
+
+	switch (hw->mac.update_xcast_mode(hw, mode)) {
 	case 0:
 		ret = 0;
 		break;
@@ -1224,6 +1228,9 @@ txgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
 	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
 	int ret;
 
+	if (dev->data->promiscuous)
+		return 0;
+
 	switch (hw->mac.update_xcast_mode(hw, TXGBEVF_XCAST_MODE_ALLMULTI)) {
 	case 0:
 		ret = 0;
@@ -1245,6 +1252,9 @@ txgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)
 	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
 	int ret;
 
+	if (dev->data->promiscuous)
+		return 0;
+
 	switch (hw->mac.update_xcast_mode(hw, TXGBEVF_XCAST_MODE_MULTI)) {
 	case 0:
 		ret = 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.990859402 +0800
+++ 0075-net-txgbe-fix-VF-promiscuous-and-allmulticast.patch	2024-08-12 20:44:02.235069322 +0800
@@ -1 +1 @@
-From 055a51ff85112200706a07e99b92c9459774080a Mon Sep 17 00:00:00 2001
+From 85bd339e194d0ad1a3162616f3c3a4a66d397148 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 055a51ff85112200706a07e99b92c9459774080a ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index ec40419289..6ac34058ab 100644
+index f1341fbf7e..1d7f1dcd15 100644
@@ -27 +29 @@
-@@ -1202,9 +1202,13 @@ static int
+@@ -1201,9 +1201,13 @@ static int
@@ -42 +44 @@
-@@ -1225,6 +1229,9 @@ txgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
+@@ -1224,6 +1228,9 @@ txgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
@@ -52 +54 @@
-@@ -1246,6 +1253,9 @@ txgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)
+@@ -1245,6 +1252,9 @@ txgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)

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

* patch 'net/ngbe: add special config for YT8531SH-CA PHY' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (74 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/txgbe: fix VF promiscuous and allmulticast' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/ngbe: keep PHY power down while device probing' " Xueming Li
                         ` (81 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=658060fffe00127261dcb5f279898822ee10fdd4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 658060fffe00127261dcb5f279898822ee10fdd4 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:38 +0800
Subject: [PATCH] net/ngbe: add special config for YT8531SH-CA PHY
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 79be49dd2d655f2f5e830f33115528276a994bae ]

YT8531SH-CA PHY will switch to SDS space automatically when UTP and
SDS media are not present, causing failure to link up. Add the special
configuration to fix it.

Fixes: 3d0af7066759 ("net/ngbe: setup PHY link")
Fixes: 1c44384fce76 ("net/ngbe: support custom PHY interfaces")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_phy_yt.c | 4 ++++
 drivers/net/ngbe/base/ngbe_phy_yt.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/drivers/net/ngbe/base/ngbe_phy_yt.c b/drivers/net/ngbe/base/ngbe_phy_yt.c
index ea313cd9a5..a374b015fd 100644
--- a/drivers/net/ngbe/base/ngbe_phy_yt.c
+++ b/drivers/net/ngbe/base/ngbe_phy_yt.c
@@ -320,6 +320,10 @@ skip_an_fiber:
 			value |= value_r4;
 			ngbe_write_phy_reg_mdi(hw, YT_ANA, 0, value);
 
+			/* config for yt8531sh-ca */
+			ngbe_write_phy_reg_ext_yt(hw, YT_SPEC_CONF, 0,
+						YT_SPEC_CONF_8531SH_CA);
+
 			/* software reset to make the above configuration
 			 * take effect
 			 */
diff --git a/drivers/net/ngbe/base/ngbe_phy_yt.h b/drivers/net/ngbe/base/ngbe_phy_yt.h
index ddf992e79a..c45bec7ce7 100644
--- a/drivers/net/ngbe/base/ngbe_phy_yt.h
+++ b/drivers/net/ngbe/base/ngbe_phy_yt.h
@@ -32,6 +32,8 @@
 #define YT_MISC				0xA006
 #define   YT_MISC_FIBER_PRIO		MS16(8, 0x1) /* 0 for UTP */
 #define   YT_MISC_RESV			MS16(0, 0x1)
+#define YT_SPEC_CONF			0xA023
+#define   YT_SPEC_CONF_8531SH_CA	0x4031
 
 /* SDS EXT */
 #define YT_AUTO				0xA5
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.015334400 +0800
+++ 0076-net-ngbe-add-special-config-for-YT8531SH-CA-PHY.patch	2024-08-12 20:44:02.235069322 +0800
@@ -1 +1 @@
-From 79be49dd2d655f2f5e830f33115528276a994bae Mon Sep 17 00:00:00 2001
+From 658060fffe00127261dcb5f279898822ee10fdd4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 79be49dd2d655f2f5e830f33115528276a994bae ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ngbe: keep PHY power down while device probing' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (75 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/ngbe: add special config for YT8531SH-CA PHY' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/txgbe: fix hotplug remove' " Xueming Li
                         ` (80 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6d224307f6ebe654be82355595d66bc927620ac4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6d224307f6ebe654be82355595d66bc927620ac4 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:39 +0800
Subject: [PATCH] net/ngbe: keep PHY power down while device probing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 01d94f0fb04cbb59e77b8b045616aeb11722bacf ]

The internal PHY will be set to default power down after LAN reset,
but the external PHY will not. To keep the PHY behavior consistent,
set PHY power down uniformly here.

Fixes: 708ebe7d0399 ("net/ngbe: fix external PHY power down")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_devids.h | 1 +
 drivers/net/ngbe/base/ngbe_hw.c     | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/ngbe/base/ngbe_devids.h b/drivers/net/ngbe/base/ngbe_devids.h
index 83eedf423e..e1efa62015 100644
--- a/drivers/net/ngbe/base/ngbe_devids.h
+++ b/drivers/net/ngbe/base/ngbe_devids.h
@@ -83,6 +83,7 @@
 #define NGBE_YT8521S_SFP_GPIO			0x0062
 #define NGBE_INTERNAL_YT8521S_SFP_GPIO		0x0064
 #define NGBE_LY_YT8521S_SFP			0x0070
+#define NGBE_RGMII_FPGA				0x0080
 #define NGBE_WOL_SUP				0x4000
 #define NGBE_NCSI_SUP				0x8000
 
diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index 22ccdb0b7d..4dced0d328 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -173,6 +173,9 @@ s32 ngbe_reset_hw_em(struct ngbe_hw *hw)
 	ngbe_reset_misc_em(hw);
 	hw->mac.clear_hw_cntrs(hw);
 
+	if (!((hw->sub_device_id & NGBE_OEM_MASK) == NGBE_RGMII_FPGA))
+		hw->phy.set_phy_power(hw, false);
+
 	msec_delay(50);
 
 	/* Store the permanent mac address */
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.043237098 +0800
+++ 0077-net-ngbe-keep-PHY-power-down-while-device-probing.patch	2024-08-12 20:44:02.255069326 +0800
@@ -1 +1 @@
-From 01d94f0fb04cbb59e77b8b045616aeb11722bacf Mon Sep 17 00:00:00 2001
+From 6d224307f6ebe654be82355595d66bc927620ac4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 01d94f0fb04cbb59e77b8b045616aeb11722bacf ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/txgbe: fix hotplug remove' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (76 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/ngbe: keep PHY power down while device probing' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/ngbe: " Xueming Li
                         ` (79 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5de5204582c5dd29823c59ecdd6fb08e476b08e9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5de5204582c5dd29823c59ecdd6fb08e476b08e9 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:41 +0800
Subject: [PATCH] net/txgbe: fix hotplug remove
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 82ffdaf14d3b3a3391a873d2ef8ab33fa5c70e0f ]

This bug occurs in OpenvSwitch. After adding a port bound to vfio-pci
to ovs, detach it from ovs and then unbind it from vfio-pci(that is
hotplug) will cause operating system to get stuck.

Fixes: 7dc117068a7c ("net/txgbe: support probe and remove")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 52584ce60f..b7b4763f1a 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -964,7 +964,7 @@ static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev)
 	if (!ethdev)
 		return 0;
 
-	return rte_eth_dev_destroy(ethdev, eth_txgbe_dev_uninit);
+	return rte_eth_dev_pci_generic_remove(pci_dev, eth_txgbe_dev_uninit);
 }
 
 static struct rte_pci_driver rte_txgbe_pmd = {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.080858595 +0800
+++ 0078-net-txgbe-fix-hotplug-remove.patch	2024-08-12 20:44:02.265069328 +0800
@@ -1 +1 @@
-From 82ffdaf14d3b3a3391a873d2ef8ab33fa5c70e0f Mon Sep 17 00:00:00 2001
+From 5de5204582c5dd29823c59ecdd6fb08e476b08e9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 82ffdaf14d3b3a3391a873d2ef8ab33fa5c70e0f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 699ff1c920..20fa0a5b05 100644
+index 52584ce60f..b7b4763f1a 100644

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

* patch 'net/ngbe: fix hotplug remove' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (77 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/txgbe: fix hotplug remove' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/txgbe: fix MTU range' " Xueming Li
                         ` (78 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=db50b74b3c423660806ad1f69b5763e1cf690276

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From db50b74b3c423660806ad1f69b5763e1cf690276 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:42 +0800
Subject: [PATCH] net/ngbe: fix hotplug remove
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c602202c346663572043b408a27cb98e20f31886 ]

This bug occurs in OpenvSwitch. After adding a port bound to vfio-pci
to ovs, detach it from ovs and then unbind it from vfio-pci(that is
hotplug) will cause operating system to get stuck.

Fixes: 6ee7e574cd48 ("net/ngbe: support probe and remove")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 478da014b2..8ffab71baf 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -546,7 +546,7 @@ static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
 	if (ethdev == NULL)
 		return 0;
 
-	return rte_eth_dev_destroy(ethdev, eth_ngbe_dev_uninit);
+	return rte_eth_dev_pci_generic_remove(pci_dev, eth_ngbe_dev_uninit);
 }
 
 static struct rte_pci_driver rte_ngbe_pmd = {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.122170592 +0800
+++ 0079-net-ngbe-fix-hotplug-remove.patch	2024-08-12 20:44:02.275069330 +0800
@@ -1 +1 @@
-From c602202c346663572043b408a27cb98e20f31886 Mon Sep 17 00:00:00 2001
+From db50b74b3c423660806ad1f69b5763e1cf690276 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c602202c346663572043b408a27cb98e20f31886 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 2a858b76d0..9d75e222c3 100644
+index 478da014b2..8ffab71baf 100644
@@ -22 +24 @@
-@@ -547,7 +547,7 @@ static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
+@@ -546,7 +546,7 @@ static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)

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

* patch 'net/txgbe: fix MTU range' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (78 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/ngbe: " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/ngbe: " Xueming Li
                         ` (77 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=0fe77d1de34c748c9eb36f57b632d950864d3690

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0fe77d1de34c748c9eb36f57b632d950864d3690 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:43 +0800
Subject: [PATCH] net/txgbe: fix MTU range
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf ]

The valid range of MTU is 68 to 9414. Set min_mtu and max_mtu in
dev_info.

Fixes: 3926214fd80d ("net/txgbe: support MTU set")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 12 +++++-------
 drivers/net/txgbe/txgbe_ethdev.h |  2 +-
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index b7b4763f1a..09cab60fa9 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2669,7 +2669,9 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues;
 	dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
 	dev_info->min_rx_bufsize = 1024;
-	dev_info->max_rx_pktlen = 15872;
+	dev_info->max_rx_pktlen = TXGBE_MAX_MTU + TXGBE_ETH_OVERHEAD;
+	dev_info->min_mtu = RTE_ETHER_MIN_MTU;
+	dev_info->max_mtu = TXGBE_MAX_MTU;
 	dev_info->max_mac_addrs = hw->mac.num_rar_entries;
 	dev_info->max_hash_mac_addrs = TXGBE_VMDQ_NUM_UC_MAC;
 	dev_info->max_vfs = pci_dev->max_vfs;
@@ -3687,12 +3689,8 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EINVAL;
 	}
 
-	if (hw->mode)
-		wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK,
-			TXGBE_FRAME_SIZE_MAX);
-	else
-		wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK,
-			TXGBE_FRMSZ_MAX(frame_size));
+	wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK,
+		TXGBE_FRMSZ_MAX(frame_size));
 
 	return 0;
 }
diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h
index 7feb45d0cf..d5b58018a4 100644
--- a/drivers/net/txgbe/txgbe_ethdev.h
+++ b/drivers/net/txgbe/txgbe_ethdev.h
@@ -56,7 +56,7 @@
 #define TXGBE_5TUPLE_MAX_PRI            7
 #define TXGBE_5TUPLE_MIN_PRI            1
 
-
+#define TXGBE_MAX_MTU			9414
 /* The overhead from MTU to max frame size. */
 #define TXGBE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.163226889 +0800
+++ 0080-net-txgbe-fix-MTU-range.patch	2024-08-12 20:44:02.285069332 +0800
@@ -1 +1 @@
-From af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf Mon Sep 17 00:00:00 2001
+From 0fe77d1de34c748c9eb36f57b632d950864d3690 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 20fa0a5b05..c2df5a314b 100644
+index b7b4763f1a..09cab60fa9 100644
@@ -22 +24 @@
-@@ -2670,7 +2670,9 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -2669,7 +2669,9 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -33 +35 @@
-@@ -3694,12 +3696,8 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -3687,12 +3689,8 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -49 +51 @@
-index 050acd967f..f0f4ced5b0 100644
+index 7feb45d0cf..d5b58018a4 100644

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

* patch 'net/ngbe: fix MTU range' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (79 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/txgbe: fix MTU range' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/txgbe: fix memory leaks' " Xueming Li
                         ` (76 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d0a84e43b3d4d2fc67f6a05715f7355183a636de

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d0a84e43b3d4d2fc67f6a05715f7355183a636de Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:44 +0800
Subject: [PATCH] net/ngbe: fix MTU range
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit df2075eb681111637d5340c9abaf60e0aefab615 ]

The valid range of MTU is 68 to 9414. Set min_mtu and max_mtu in
dev_info.

Fixes: 07baabb6a51a ("net/ngbe: support MTU set")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_ethdev.c | 4 +++-
 drivers/net/ngbe/ngbe_ethdev.h | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 8ffab71baf..fb86e7b10d 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -1811,7 +1811,9 @@ ngbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues;
 	dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
 	dev_info->min_rx_bufsize = 1024;
-	dev_info->max_rx_pktlen = 15872;
+	dev_info->max_rx_pktlen = NGBE_MAX_MTU + NGBE_ETH_OVERHEAD;
+	dev_info->min_mtu = RTE_ETHER_MIN_MTU;
+	dev_info->max_mtu = NGBE_MAX_MTU;
 	dev_info->max_mac_addrs = hw->mac.num_rar_entries;
 	dev_info->max_hash_mac_addrs = NGBE_VMDQ_NUM_UC_MAC;
 	dev_info->max_vfs = pci_dev->max_vfs;
diff --git a/drivers/net/ngbe/ngbe_ethdev.h b/drivers/net/ngbe/ngbe_ethdev.h
index 3cde7c8750..9b43d5f20e 100644
--- a/drivers/net/ngbe/ngbe_ethdev.h
+++ b/drivers/net/ngbe/ngbe_ethdev.h
@@ -32,6 +32,7 @@
 
 #define NGBE_QUEUE_ITR_INTERVAL_DEFAULT	500 /* 500us */
 
+#define NGBE_MAX_MTU		9414
 /* The overhead from MTU to max frame size. */
 #define NGBE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.202891285 +0800
+++ 0081-net-ngbe-fix-MTU-range.patch	2024-08-12 20:44:02.285069332 +0800
@@ -1 +1 @@
-From df2075eb681111637d5340c9abaf60e0aefab615 Mon Sep 17 00:00:00 2001
+From d0a84e43b3d4d2fc67f6a05715f7355183a636de Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit df2075eb681111637d5340c9abaf60e0aefab615 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 9d75e222c3..d7fc4bc70b 100644
+index 8ffab71baf..fb86e7b10d 100644
@@ -22 +24 @@
-@@ -1818,7 +1818,9 @@ ngbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1811,7 +1811,9 @@ ngbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -34 +36 @@
-index c748bfbe4d..7af58a57ac 100644
+index 3cde7c8750..9b43d5f20e 100644

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

* patch 'net/txgbe: fix memory leaks' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (80 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/ngbe: " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/ngbe: " Xueming Li
                         ` (75 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=638e12515aa720573b3017b5a03705e4328724c9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 638e12515aa720573b3017b5a03705e4328724c9 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:45 +0800
Subject: [PATCH] net/txgbe: fix memory leaks
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9a4abe8dfd85376b8ef35bf958332d837f4a3ee1 ]

Fix some memory leaks caused by not release resource in time.

Fixes: e1698e383c2a ("net/txgbe: add device init and uninit")
Fixes: 635c21354f9a ("net/txgbe: add flow director filter init and uninit")
Fixes: c13f84a71b2d ("net/txgbe: add L2 tunnel filter init and uninit")
Fixes: 3a123ba60a71 ("net/txgbe: support VF start and stop")
Fixes: 039b769f7c01 ("net/txgbe: support VF MAC address")
Fixes: 226bf98eda87 ("net/txgbe: add Rx and Tx queues setup and release")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c    | 4 ++++
 drivers/net/txgbe/txgbe_ethdev_vf.c | 7 ++++++-
 drivers/net/txgbe/txgbe_rxtx.c      | 5 +++++
 drivers/net/txgbe/txgbe_rxtx.h      | 2 ++
 4 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 09cab60fa9..ee510fe83b 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -735,6 +735,8 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 		PMD_INIT_LOG(ERR,
 			     "Failed to allocate %d bytes needed to store MAC addresses",
 			     RTE_ETHER_ADDR_LEN * TXGBE_VMDQ_NUM_UC_MAC);
+		rte_free(eth_dev->data->mac_addrs);
+		eth_dev->data->mac_addrs = NULL;
 		return -ENOMEM;
 	}
 
@@ -902,6 +904,7 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
 	if (!fdir_info->hash_map) {
 		PMD_INIT_LOG(ERR,
 			     "Failed to allocate memory for fdir hash map!");
+		rte_hash_free(fdir_info->hash_handle);
 		return -ENOMEM;
 	}
 	fdir_info->mask_added = FALSE;
@@ -937,6 +940,7 @@ static int txgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
 	if (!l2_tn_info->hash_map) {
 		PMD_INIT_LOG(ERR,
 			"Failed to allocate memory for L2 TN hash map!");
+		rte_hash_free(l2_tn_info->hash_handle);
 		return -ENOMEM;
 	}
 	l2_tn_info->e_tag_en = FALSE;
diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index 1d7f1dcd15..b42c94adc1 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -295,6 +295,8 @@ eth_txgbevf_dev_init(struct rte_eth_dev *eth_dev)
 	err = hw->mac.start_hw(hw);
 	if (err) {
 		PMD_INIT_LOG(ERR, "VF Initialization Failure: %d", err);
+		rte_free(eth_dev->data->mac_addrs);
+		eth_dev->data->mac_addrs = NULL;
 		return -EIO;
 	}
 
@@ -670,8 +672,10 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
 		 * now only one vector is used for Rx queue
 		 */
 		intr_vector = 1;
-		if (rte_intr_efd_enable(intr_handle, intr_vector))
+		if (rte_intr_efd_enable(intr_handle, intr_vector)) {
+			txgbe_dev_clear_queues(dev);
 			return -1;
+		}
 	}
 
 	if (rte_intr_dp_is_en(intr_handle)) {
@@ -679,6 +683,7 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
 						   dev->data->nb_rx_queues)) {
 			PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues"
 				     " intr_vec", dev->data->nb_rx_queues);
+			txgbe_dev_clear_queues(dev);
 			return -ENOMEM;
 		}
 	}
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index 50207eb6cf..2efc2bcf29 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -2135,6 +2135,7 @@ txgbe_tx_queue_release(struct txgbe_tx_queue *txq)
 	if (txq != NULL && txq->ops != NULL) {
 		txq->ops->release_mbufs(txq);
 		txq->ops->free_swring(txq);
+		rte_memzone_free(txq->mz);
 		rte_free(txq);
 	}
 }
@@ -2346,6 +2347,7 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		return -ENOMEM;
 	}
 
+	txq->mz = tz;
 	txq->nb_tx_desc = nb_desc;
 	txq->tx_free_thresh = tx_free_thresh;
 	txq->pthresh = tx_conf->tx_thresh.pthresh;
@@ -2463,6 +2465,7 @@ txgbe_rx_queue_release(struct txgbe_rx_queue *rxq)
 		txgbe_rx_queue_release_mbufs(rxq);
 		rte_free(rxq->sw_ring);
 		rte_free(rxq->sw_sc_ring);
+		rte_memzone_free(rxq->mz);
 		rte_free(rxq);
 	}
 }
@@ -2556,6 +2559,7 @@ txgbe_reset_rx_queue(struct txgbe_adapter *adapter, struct txgbe_rx_queue *rxq)
 	rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1);
 	rxq->rx_tail = 0;
 	rxq->nb_rx_hold = 0;
+	rte_pktmbuf_free(rxq->pkt_first_seg);
 	rxq->pkt_first_seg = NULL;
 	rxq->pkt_last_seg = NULL;
 }
@@ -2636,6 +2640,7 @@ txgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
 		return -ENOMEM;
 	}
 
+	rxq->mz = rz;
 	/*
 	 * Zero init all the descriptors in the ring.
 	 */
diff --git a/drivers/net/txgbe/txgbe_rxtx.h b/drivers/net/txgbe/txgbe_rxtx.h
index 27d4c842c0..c579e1a9f2 100644
--- a/drivers/net/txgbe/txgbe_rxtx.h
+++ b/drivers/net/txgbe/txgbe_rxtx.h
@@ -314,6 +314,7 @@ struct txgbe_rx_queue {
 	struct rte_mbuf fake_mbuf;
 	/** hold packets to return to application */
 	struct rte_mbuf *rx_stage[RTE_PMD_TXGBE_RX_MAX_BURST * 2];
+	const struct rte_memzone *mz;
 };
 
 /**
@@ -402,6 +403,7 @@ struct txgbe_tx_queue {
 	uint8_t		    using_ipsec;
 	/**< indicates that IPsec TX feature is in use */
 #endif
+	const struct rte_memzone *mz;
 };
 
 struct txgbe_txq_ops {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.230525883 +0800
+++ 0082-net-txgbe-fix-memory-leaks.patch	2024-08-12 20:44:02.295069334 +0800
@@ -1 +1 @@
-From 9a4abe8dfd85376b8ef35bf958332d837f4a3ee1 Mon Sep 17 00:00:00 2001
+From 638e12515aa720573b3017b5a03705e4328724c9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9a4abe8dfd85376b8ef35bf958332d837f4a3ee1 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index c2df5a314b..26cf7632c3 100644
+index 09cab60fa9..ee510fe83b 100644
@@ -54 +56 @@
-index 6ac34058ab..87f76673d7 100644
+index 1d7f1dcd15..b42c94adc1 100644
@@ -66 +68 @@
-@@ -671,8 +673,10 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -670,8 +672,10 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
@@ -78 +80 @@
-@@ -680,6 +684,7 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -679,6 +683,7 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
@@ -87 +89 @@
-index 35f80d73ac..5bc0f8772f 100644
+index 50207eb6cf..2efc2bcf29 100644
@@ -90 +92 @@
-@@ -2157,6 +2157,7 @@ txgbe_tx_queue_release(struct txgbe_tx_queue *txq)
+@@ -2135,6 +2135,7 @@ txgbe_tx_queue_release(struct txgbe_tx_queue *txq)
@@ -98 +100 @@
-@@ -2376,6 +2377,7 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -2346,6 +2347,7 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -106 +108 @@
-@@ -2499,6 +2501,7 @@ txgbe_rx_queue_release(struct txgbe_rx_queue *rxq)
+@@ -2463,6 +2465,7 @@ txgbe_rx_queue_release(struct txgbe_rx_queue *rxq)
@@ -114 +116 @@
-@@ -2592,6 +2595,7 @@ txgbe_reset_rx_queue(struct txgbe_adapter *adapter, struct txgbe_rx_queue *rxq)
+@@ -2556,6 +2559,7 @@ txgbe_reset_rx_queue(struct txgbe_adapter *adapter, struct txgbe_rx_queue *rxq)
@@ -121,2 +123,2 @@
- 
-@@ -2677,6 +2681,7 @@ txgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
+ }
+@@ -2636,6 +2640,7 @@ txgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -131 +133 @@
-index 336f060633..9155eb1f70 100644
+index 27d4c842c0..c579e1a9f2 100644
@@ -134 +136 @@
-@@ -322,6 +322,7 @@ struct txgbe_rx_queue {
+@@ -314,6 +314,7 @@ struct txgbe_rx_queue {
@@ -142 +144 @@
-@@ -410,6 +411,7 @@ struct txgbe_tx_queue {
+@@ -402,6 +403,7 @@ struct txgbe_tx_queue {

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

* patch 'net/ngbe: fix memory leaks' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (81 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/txgbe: fix memory leaks' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/txgbe: fix Rx interrupt' " Xueming Li
                         ` (74 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2dfb54ff33bccc083f78f7a2ed47fc862ec750e1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2dfb54ff33bccc083f78f7a2ed47fc862ec750e1 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:46 +0800
Subject: [PATCH] net/ngbe: fix memory leaks
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fea7422f7a4ec2b4c406865629b5ebea699f6588 ]

Fix some memory leaks caused by not release resource in time.

Fixes: 43b7e5ea60ac ("net/ngbe: support Rx queue setup/release")
Fixes: a58e7c312c6b ("net/ngbe: support Tx queue setup/release")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_rxtx.c | 5 +++++
 drivers/net/ngbe/ngbe_rxtx.h | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c
index 8a873b858e..4680ff91f1 100644
--- a/drivers/net/ngbe/ngbe_rxtx.c
+++ b/drivers/net/ngbe/ngbe_rxtx.c
@@ -1791,6 +1791,7 @@ ngbe_tx_queue_release(struct ngbe_tx_queue *txq)
 		if (txq->ops != NULL) {
 			txq->ops->release_mbufs(txq);
 			txq->ops->free_swring(txq);
+			rte_memzone_free(txq->mz);
 		}
 		rte_free(txq);
 	}
@@ -1995,6 +1996,7 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		return -ENOMEM;
 	}
 
+	txq->mz = tz;
 	txq->nb_tx_desc = nb_desc;
 	txq->tx_free_thresh = tx_free_thresh;
 	txq->pthresh = tx_conf->tx_thresh.pthresh;
@@ -2097,6 +2099,7 @@ ngbe_rx_queue_release(struct ngbe_rx_queue *rxq)
 		ngbe_rx_queue_release_mbufs(rxq);
 		rte_free(rxq->sw_ring);
 		rte_free(rxq->sw_sc_ring);
+		rte_memzone_free(rxq->mz);
 		rte_free(rxq);
 	}
 }
@@ -2187,6 +2190,7 @@ ngbe_reset_rx_queue(struct ngbe_adapter *adapter, struct ngbe_rx_queue *rxq)
 	rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1);
 	rxq->rx_tail = 0;
 	rxq->nb_rx_hold = 0;
+	rte_pktmbuf_free(rxq->pkt_first_seg);
 	rxq->pkt_first_seg = NULL;
 	rxq->pkt_last_seg = NULL;
 }
@@ -2277,6 +2281,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
 		return -ENOMEM;
 	}
 
+	rxq->mz = rz;
 	/*
 	 * Zero init all the descriptors in the ring.
 	 */
diff --git a/drivers/net/ngbe/ngbe_rxtx.h b/drivers/net/ngbe/ngbe_rxtx.h
index 9130f9d0df..2914b9a756 100644
--- a/drivers/net/ngbe/ngbe_rxtx.h
+++ b/drivers/net/ngbe/ngbe_rxtx.h
@@ -276,6 +276,7 @@ struct ngbe_rx_queue {
 	struct rte_mbuf fake_mbuf;
 	/** hold packets to return to application */
 	struct rte_mbuf *rx_stage[RTE_PMD_NGBE_RX_MAX_BURST * 2];
+	const struct rte_memzone *mz;
 };
 
 /**
@@ -353,6 +354,7 @@ struct ngbe_tx_queue {
 	uint8_t              tx_deferred_start; /**< not in global dev start */
 
 	const struct ngbe_txq_ops *ops;       /**< txq ops */
+	const struct rte_memzone *mz;
 };
 
 struct ngbe_txq_ops {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.260509581 +0800
+++ 0083-net-ngbe-fix-memory-leaks.patch	2024-08-12 20:44:02.295069334 +0800
@@ -1 +1 @@
-From fea7422f7a4ec2b4c406865629b5ebea699f6588 Mon Sep 17 00:00:00 2001
+From 2dfb54ff33bccc083f78f7a2ed47fc862ec750e1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fea7422f7a4ec2b4c406865629b5ebea699f6588 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index c54c67f7ee..f3eb797d0c 100644
+index 8a873b858e..4680ff91f1 100644
@@ -22 +24 @@
-@@ -1813,6 +1813,7 @@ ngbe_tx_queue_release(struct ngbe_tx_queue *txq)
+@@ -1791,6 +1791,7 @@ ngbe_tx_queue_release(struct ngbe_tx_queue *txq)
@@ -30 +32 @@
-@@ -2030,6 +2031,7 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -1995,6 +1996,7 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -38 +40 @@
-@@ -2138,6 +2140,7 @@ ngbe_rx_queue_release(struct ngbe_rx_queue *rxq)
+@@ -2097,6 +2099,7 @@ ngbe_rx_queue_release(struct ngbe_rx_queue *rxq)
@@ -46 +48 @@
-@@ -2228,6 +2231,7 @@ ngbe_reset_rx_queue(struct ngbe_adapter *adapter, struct ngbe_rx_queue *rxq)
+@@ -2187,6 +2190,7 @@ ngbe_reset_rx_queue(struct ngbe_adapter *adapter, struct ngbe_rx_queue *rxq)
@@ -53,2 +55,2 @@
- 
-@@ -2323,6 +2327,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
+ }
+@@ -2277,6 +2281,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -63 +65 @@
-index 41580ba0b9..7574db32d8 100644
+index 9130f9d0df..2914b9a756 100644
@@ -66 +68 @@
-@@ -291,6 +291,7 @@ struct ngbe_rx_queue {
+@@ -276,6 +276,7 @@ struct ngbe_rx_queue {
@@ -74 +76 @@
-@@ -373,6 +374,7 @@ struct ngbe_tx_queue {
+@@ -353,6 +354,7 @@ struct ngbe_tx_queue {

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

* patch 'net/txgbe: fix Rx interrupt' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (82 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/ngbe: " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/vmxnet3: fix init logs' " Xueming Li
                         ` (73 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=fdc5f6074bd954cc85bfebc10fbb48c12b3f6673

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fdc5f6074bd954cc85bfebc10fbb48c12b3f6673 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:47 +0800
Subject: [PATCH] net/txgbe: fix Rx interrupt
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 37af8751f2726cd49881d2cf8089302893ea0f41 ]

Fix Rx interrupt enable failure.

Fixes: a5682d28f134 ("net/txgbe: support Rx interrupt")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c    | 18 +++++++++---------
 drivers/net/txgbe/txgbe_ethdev_vf.c |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index ee510fe83b..ad29c3cfec 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -3845,13 +3845,13 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
 
 	if (queue_id < 32) {
-		mask = rd32(hw, TXGBE_IMS(0));
-		mask &= (1 << queue_id);
-		wr32(hw, TXGBE_IMS(0), mask);
+		mask = rd32(hw, TXGBE_IMC(0));
+		mask |= (1 << queue_id);
+		wr32(hw, TXGBE_IMC(0), mask);
 	} else if (queue_id < 64) {
-		mask = rd32(hw, TXGBE_IMS(1));
-		mask &= (1 << (queue_id - 32));
-		wr32(hw, TXGBE_IMS(1), mask);
+		mask = rd32(hw, TXGBE_IMC(1));
+		mask |= (1 << (queue_id - 32));
+		wr32(hw, TXGBE_IMC(1), mask);
 	}
 	rte_intr_enable(intr_handle);
 
@@ -3866,11 +3866,11 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
 
 	if (queue_id < 32) {
 		mask = rd32(hw, TXGBE_IMS(0));
-		mask &= ~(1 << queue_id);
+		mask |= (1 << queue_id);
 		wr32(hw, TXGBE_IMS(0), mask);
 	} else if (queue_id < 64) {
 		mask = rd32(hw, TXGBE_IMS(1));
-		mask &= ~(1 << (queue_id - 32));
+		mask |= (1 << (queue_id - 32));
 		wr32(hw, TXGBE_IMS(1), mask);
 	}
 
@@ -3904,7 +3904,7 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
 		wr32(hw, TXGBE_IVARMISC, tmp);
 	} else {
 		/* rx or tx causes */
-		/* Workaround for ICR lost */
+		msix_vector |= TXGBE_IVAR_VLD; /* Workaround for ICR lost */
 		idx = ((16 * (queue & 1)) + (8 * direction));
 		tmp = rd32(hw, TXGBE_IVAR(queue >> 1));
 		tmp &= ~(0xFF << idx);
diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index b42c94adc1..92603fccc2 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -970,7 +970,7 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
 		wr32(hw, TXGBE_VFIVARMISC, tmp);
 	} else {
 		/* rx or tx cause */
-		/* Workaround for ICR lost */
+		msix_vector |= TXGBE_VFIVAR_VLD; /* Workaround for ICR lost */
 		idx = ((16 * (queue & 1)) + (8 * direction));
 		tmp = rd32(hw, TXGBE_VFIVAR(queue >> 1));
 		tmp &= ~(0xFF << idx);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.287592479 +0800
+++ 0084-net-txgbe-fix-Rx-interrupt.patch	2024-08-12 20:44:02.305069336 +0800
@@ -1 +1 @@
-From 37af8751f2726cd49881d2cf8089302893ea0f41 Mon Sep 17 00:00:00 2001
+From fdc5f6074bd954cc85bfebc10fbb48c12b3f6673 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 37af8751f2726cd49881d2cf8089302893ea0f41 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 26cf7632c3..700be8f83c 100644
+index ee510fe83b..ad29c3cfec 100644
@@ -21 +23 @@
-@@ -3852,13 +3852,13 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -3845,13 +3845,13 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -41 +43 @@
-@@ -3873,11 +3873,11 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -3866,11 +3866,11 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -55 +57 @@
-@@ -3911,7 +3911,7 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
+@@ -3904,7 +3904,7 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
@@ -65 +67 @@
-index 87f76673d7..d075f9d232 100644
+index b42c94adc1..92603fccc2 100644
@@ -68 +70 @@
-@@ -971,7 +971,7 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
+@@ -970,7 +970,7 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,

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

* patch 'net/vmxnet3: fix init logs' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (83 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/txgbe: fix Rx interrupt' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/nfp: fix IPv6 TTL and DSCP flow action' " Xueming Li
                         ` (72 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: David Marchand; +Cc: xuemingl, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3762e1ed038fded114ea65ec1ee94597e83ef231

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3762e1ed038fded114ea65ec1ee94597e83ef231 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 25 Jun 2024 14:22:52 +0200
Subject: [PATCH] net/vmxnet3: fix init logs
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e095395a416d33e45cb626bf8fbdee7a2ce355af ]

All logs for this driver are emitted under pmd.net.vmxnet3.driver while
two logtypes exist.
This issue comes from the conversion to dynamic logtypes change.
Redirect PMD_INIT_LOG to pmd.net.vmxnet3.init.

Fixes: 79daffdcb6ac ("net/vmxnet3: implement dynamic logging")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/vmxnet3/vmxnet3_logs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_logs.h b/drivers/net/vmxnet3/vmxnet3_logs.h
index 74154e3a1a..ae8542811a 100644
--- a/drivers/net/vmxnet3/vmxnet3_logs.h
+++ b/drivers/net/vmxnet3/vmxnet3_logs.h
@@ -7,7 +7,7 @@
 
 extern int vmxnet3_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	rte_log(RTE_LOG_ ## level, vmxnet3_logtype_driver, \
+	rte_log(RTE_LOG_ ## level, vmxnet3_logtype_init, \
 		"%s(): " fmt "\n", __func__, ## args)
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.319763776 +0800
+++ 0085-net-vmxnet3-fix-init-logs.patch	2024-08-12 20:44:02.305069336 +0800
@@ -1 +1 @@
-From e095395a416d33e45cb626bf8fbdee7a2ce355af Mon Sep 17 00:00:00 2001
+From 3762e1ed038fded114ea65ec1ee94597e83ef231 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e095395a416d33e45cb626bf8fbdee7a2ce355af ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index e2127988f6..5962325d62 100644
+index 74154e3a1a..ae8542811a 100644

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

* patch 'net/nfp: fix IPv6 TTL and DSCP flow action' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (84 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/vmxnet3: fix init logs' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/netvsc: fix MTU set' " Xueming Li
                         ` (71 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Chaoyong He; +Cc: xuemingl, Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e2ef427581f5d746c3266b1a3f7dc2aa6f251763

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e2ef427581f5d746c3266b1a3f7dc2aa6f251763 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Wed, 19 Jun 2024 17:13:38 +0800
Subject: [PATCH] net/nfp: fix IPv6 TTL and DSCP flow action
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 76caca76bf62efb041642194adf47181f9fe1bc2 ]

The IPv6 TTL and DSCP flow action logic use 'ttl_tos_flag' wrongly,
actually it should use 'tc_hl_flag'.

Fixes: ac12e126c482 ("net/nfp: support TTL flow action")
Fixes: 3202b003bec1 ("net/nfp: support IPv6 DSCP flow action")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index f832b52d89..942301f855 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3658,7 +3658,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
 					ttl_tos_flag = true;
 				}
 			} else {
-				nfp_flow_action_set_hl(position, action, ttl_tos_flag);
+				nfp_flow_action_set_hl(position, action, tc_hl_flag);
 				if (!tc_hl_flag) {
 					position += sizeof(struct nfp_fl_act_set_ipv6_tc_hl_fl);
 					tc_hl_flag = true;
@@ -3675,7 +3675,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
 			break;
 		case RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP:
 			PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP");
-			nfp_flow_action_set_tc(position, action, ttl_tos_flag);
+			nfp_flow_action_set_tc(position, action, tc_hl_flag);
 			if (!tc_hl_flag) {
 				position += sizeof(struct nfp_fl_act_set_ipv6_tc_hl_fl);
 				tc_hl_flag = true;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.343922374 +0800
+++ 0086-net-nfp-fix-IPv6-TTL-and-DSCP-flow-action.patch	2024-08-12 20:44:02.315069338 +0800
@@ -1 +1 @@
-From 76caca76bf62efb041642194adf47181f9fe1bc2 Mon Sep 17 00:00:00 2001
+From e2ef427581f5d746c3266b1a3f7dc2aa6f251763 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 76caca76bf62efb041642194adf47181f9fe1bc2 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
- drivers/net/nfp/flower/nfp_flower_flow.c | 4 ++--
+ drivers/net/nfp/nfp_flow.c | 4 ++--
@@ -20,5 +22,5 @@
-diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c
-index bd77807db0..45a020b228 100644
---- a/drivers/net/nfp/flower/nfp_flower_flow.c
-+++ b/drivers/net/nfp/flower/nfp_flower_flow.c
-@@ -3833,7 +3833,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
+diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
+index f832b52d89..942301f855 100644
+--- a/drivers/net/nfp/nfp_flow.c
++++ b/drivers/net/nfp/nfp_flow.c
+@@ -3658,7 +3658,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
@@ -33 +35 @@
-@@ -3850,7 +3850,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
+@@ -3675,7 +3675,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,

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

* patch 'net/netvsc: fix MTU set' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (85 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/nfp: fix IPv6 TTL and DSCP flow action' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/nfp: fix allocation of switch domain' " Xueming Li
                         ` (70 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Alexander Skorichenko; +Cc: xuemingl, Long Li, Sam Andrew, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2a50559bfd461ed25ff5507626a5d0b5cf956232

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2a50559bfd461ed25ff5507626a5d0b5cf956232 Mon Sep 17 00:00:00 2001
From: Alexander Skorichenko <askorichenko@netgate.com>
Date: Fri, 28 Jun 2024 18:35:03 +0200
Subject: [PATCH] net/netvsc: fix MTU set
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 107c9ef336c24fce06047b29475ad97b2d5dc74f ]

Prevent segfault in hn_reinit() caused by changing the MTU for
an incompletely initialized device.

Fixes: 45c83603087e ("net/netvsc: support MTU set")

Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
Acked-by: Long Li <longli@microsoft.com>
Reviewed-by: Sam Andrew <samandrew@microsoft.com>
---
 .mailmap                       |  1 +
 drivers/net/netvsc/hn_ethdev.c | 16 ++++++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/.mailmap b/.mailmap
index 12ed3d1e74..24c450efaa 100644
--- a/.mailmap
+++ b/.mailmap
@@ -51,6 +51,7 @@ Alexander Chernavin <achernavin@netgate.com>
 Alexander Guy <alexander@andern.org>
 Alexander Kozyrev <akozyrev@nvidia.com> <akozyrev@mellanox.com>
 Alexander Matushevsky <matua@amazon.com>
+Alexander Skorichenko <askorichenko@netgate.com>
 Alexander Solganik <solganik@gmail.com>
 Alexander V Gutkin <alexander.v.gutkin@intel.com>
 Alexandre Ferrieux <alexandre.ferrieux@orange.com>
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index b8a32832d7..f8cb05a118 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -1127,8 +1127,10 @@ hn_reinit(struct rte_eth_dev *dev, uint16_t mtu)
 	int i, ret = 0;
 
 	/* Point primary queues at new primary channel */
-	rxqs[0]->chan = hv->channels[0];
-	txqs[0]->chan = hv->channels[0];
+	if (rxqs[0]) {
+		rxqs[0]->chan = hv->channels[0];
+		txqs[0]->chan = hv->channels[0];
+	}
 
 	ret = hn_attach(hv, mtu);
 	if (ret)
@@ -1140,10 +1142,12 @@ hn_reinit(struct rte_eth_dev *dev, uint16_t mtu)
 		return ret;
 
 	/* Point any additional queues at new subchannels */
-	for (i = 1; i < dev->data->nb_rx_queues; i++)
-		rxqs[i]->chan = hv->channels[i];
-	for (i = 1; i < dev->data->nb_tx_queues; i++)
-		txqs[i]->chan = hv->channels[i];
+	if (rxqs[0]) {
+		for (i = 1; i < dev->data->nb_rx_queues; i++)
+			rxqs[i]->chan = hv->channels[i];
+		for (i = 1; i < dev->data->nb_tx_queues; i++)
+			txqs[i]->chan = hv->channels[i];
+	}
 
 	return ret;
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.371991372 +0800
+++ 0087-net-netvsc-fix-MTU-set.patch	2024-08-12 20:44:02.335069342 +0800
@@ -1 +1 @@
-From 107c9ef336c24fce06047b29475ad97b2d5dc74f Mon Sep 17 00:00:00 2001
+From 2a50559bfd461ed25ff5507626a5d0b5cf956232 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 107c9ef336c24fce06047b29475ad97b2d5dc74f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 256506fba4..874df4d162 100644
+index 12ed3d1e74..24c450efaa 100644
@@ -24 +26 @@
-@@ -52,6 +52,7 @@ Alexander Chernavin <achernavin@netgate.com>
+@@ -51,6 +51,7 @@ Alexander Chernavin <achernavin@netgate.com>

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

* patch 'net/nfp: fix allocation of switch domain' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (86 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/netvsc: fix MTU set' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/nfp: fix flow mask table entry' " Xueming Li
                         ` (69 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Chaoyong He; +Cc: xuemingl, Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8df473a6531abedd05d4b7b13bf4bb6304af73ec

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8df473a6531abedd05d4b7b13bf4bb6304af73ec Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Wed, 19 Jun 2024 17:51:33 +0800
Subject: [PATCH] net/nfp: fix allocation of switch domain
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e393598fc2967284398fcdfee6c7a75d0ceb95db ]

The check of 'RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID' cause the following
call of 'rte_eth_switch_domain_alloc()' never trigger.

Fix this by just remove the check logic.

Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_representor.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index dba9ceee95..b51b467e7c 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -816,10 +816,9 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower)
 	pci_dev = pf_dev->pci_dev;
 
 	/* Allocate a switch domain for the flower app */
-	if (app_fw_flower->switch_domain_id == RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID &&
-			rte_eth_switch_domain_alloc(&app_fw_flower->switch_domain_id) != 0) {
+	ret = rte_eth_switch_domain_alloc(&app_fw_flower->switch_domain_id);
+	if (ret != 0)
 		PMD_INIT_LOG(WARNING, "failed to allocate switch domain for device");
-	}
 
 	/* Now parse PCI device args passed for representor info */
 	if (pci_dev->device.devargs != NULL) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.403212869 +0800
+++ 0088-net-nfp-fix-allocation-of-switch-domain.patch	2024-08-12 20:44:02.345069344 +0800
@@ -1 +1 @@
-From e393598fc2967284398fcdfee6c7a75d0ceb95db Mon Sep 17 00:00:00 2001
+From 8df473a6531abedd05d4b7b13bf4bb6304af73ec Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e393598fc2967284398fcdfee6c7a75d0ceb95db ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 700957f945..e7550ce9ef 100644
+index dba9ceee95..b51b467e7c 100644
@@ -25 +27 @@
-@@ -907,10 +907,9 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower,
+@@ -816,10 +816,9 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower)

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

* patch 'net/nfp: fix flow mask table entry' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (87 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/nfp: fix allocation of switch domain' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/ionic: fix mbuf double-free when emptying array' " Xueming Li
                         ` (68 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Chaoyong He; +Cc: xuemingl, Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2e84f93745cb6f5bc3875d193245f58993674613

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2e84f93745cb6f5bc3875d193245f58993674613 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Wed, 19 Jun 2024 17:53:36 +0800
Subject: [PATCH] net/nfp: fix flow mask table entry
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit dbb29b4685912b7df4332d49d4037f282803eb9a ]

The mask table entry using reference count to manage the flow rules
which have the same mask, and the new mask table entry will indicated by
flag 'NFP_FL_META_FLAG_MANAGE_MASK'.

The abuse of 'NFP_FL_META_FLAG_MANAGE_MASK' will cause the firmware
abnormal and the flow offload will not work.

Fixes: 7d18af7f6fdc ("net/nfp: support merged flows and conntrack stats")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 942301f855..9ad434affb 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -312,14 +312,14 @@ nfp_check_mask_add(struct nfp_flow_priv *priv,
 		ret = nfp_mask_table_add(priv, mask_data, mask_len, mask_id);
 		if (ret != 0)
 			return false;
+
+		*meta_flags |= NFP_FL_META_FLAG_MANAGE_MASK;
 	} else {
 		/* Mask entry already exist */
 		mask_entry->ref_cnt++;
 		*mask_id = mask_entry->mask_id;
 	}
 
-	*meta_flags |= NFP_FL_META_FLAG_MANAGE_MASK;
-
 	return true;
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.426913668 +0800
+++ 0089-net-nfp-fix-flow-mask-table-entry.patch	2024-08-12 20:44:02.355069346 +0800
@@ -1 +1 @@
-From dbb29b4685912b7df4332d49d4037f282803eb9a Mon Sep 17 00:00:00 2001
+From 2e84f93745cb6f5bc3875d193245f58993674613 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dbb29b4685912b7df4332d49d4037f282803eb9a ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
- drivers/net/nfp/flower/nfp_flower_flow.c | 4 ++--
+ drivers/net/nfp/nfp_flow.c | 4 ++--
@@ -23,5 +25,5 @@
-diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c
-index af2c824ff2..980eabee93 100644
---- a/drivers/net/nfp/flower/nfp_flower_flow.c
-+++ b/drivers/net/nfp/flower/nfp_flower_flow.c
-@@ -317,14 +317,14 @@ nfp_check_mask_add(struct nfp_flow_priv *priv,
+diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
+index 942301f855..9ad434affb 100644
+--- a/drivers/net/nfp/nfp_flow.c
++++ b/drivers/net/nfp/nfp_flow.c
+@@ -312,14 +312,14 @@ nfp_check_mask_add(struct nfp_flow_priv *priv,

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

* patch 'net/ionic: fix mbuf double-free when emptying array' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (88 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/nfp: fix flow mask table entry' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/nfp: disable ctrl VNIC queues on close' " Xueming Li
                         ` (67 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Andrew Boyer; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c22c079e1c293d0fc1b8273e0ec47d2f0d577e87

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c22c079e1c293d0fc1b8273e0ec47d2f0d577e87 Mon Sep 17 00:00:00 2001
From: Andrew Boyer <andrew.boyer@amd.com>
Date: Mon, 1 Jul 2024 08:19:43 -0700
Subject: [PATCH] net/ionic: fix mbuf double-free when emptying array
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d46b9fa83f136beb0e6feedd0a7b3a228b0d8cd3 ]

The bulk-allocation array is used back to front, so we need to free
everything before the marker, not after it. Flip ionic_empty_array()
so that it frees from 0 to the provided index. Adjust the callers
as needed.

Fixes: 218afd825bca ("net/ionic: do bulk allocations of Rx mbufs")

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_rxtx.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 2f1ca986b3..170d3b0802 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -26,38 +26,40 @@
 #include "ionic_logs.h"
 
 static void
-ionic_empty_array(void **array, uint32_t cnt, uint16_t idx)
+ionic_empty_array(void **array, uint32_t free_idx, uint32_t zero_idx)
 {
 	uint32_t i;
 
-	for (i = idx; i < cnt; i++)
+	for (i = 0; i < free_idx; i++)
 		if (array[i])
 			rte_pktmbuf_free_seg(array[i]);
 
-	memset(array, 0, sizeof(void *) * cnt);
+	memset(array, 0, sizeof(void *) * zero_idx);
 }
 
 static void __rte_cold
 ionic_tx_empty(struct ionic_tx_qcq *txq)
 {
 	struct ionic_queue *q = &txq->qcq.q;
+	uint32_t info_len = q->num_descs * q->num_segs;
 
-	ionic_empty_array(q->info, q->num_descs * q->num_segs, 0);
+	ionic_empty_array(q->info, info_len, info_len);
 }
 
 static void __rte_cold
 ionic_rx_empty(struct ionic_rx_qcq *rxq)
 {
 	struct ionic_queue *q = &rxq->qcq.q;
+	uint32_t info_len = q->num_descs * q->num_segs;
 
 	/*
 	 * Walk the full info array so that the clean up includes any
 	 * fragments that were left dangling for later reuse
 	 */
-	ionic_empty_array(q->info, q->num_descs * q->num_segs, 0);
+	ionic_empty_array(q->info, info_len, info_len);
 
-	ionic_empty_array((void **)rxq->mbs,
-			IONIC_MBUF_BULK_ALLOC, rxq->mb_idx);
+	ionic_empty_array((void **)rxq->mbs, rxq->mb_idx,
+			IONIC_MBUF_BULK_ALLOC);
 	rxq->mb_idx = 0;
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.453436265 +0800
+++ 0090-net-ionic-fix-mbuf-double-free-when-emptying-array.patch	2024-08-12 20:44:02.355069346 +0800
@@ -1 +1 @@
-From d46b9fa83f136beb0e6feedd0a7b3a228b0d8cd3 Mon Sep 17 00:00:00 2001
+From c22c079e1c293d0fc1b8273e0ec47d2f0d577e87 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d46b9fa83f136beb0e6feedd0a7b3a228b0d8cd3 ]
@@ -12 +14,0 @@
-CC: stable@dpdk.org
@@ -20 +22 @@
-index 923f517661..339b20f113 100644
+index 2f1ca986b3..170d3b0802 100644

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

* patch 'net/nfp: disable ctrl VNIC queues on close' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (89 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/ionic: fix mbuf double-free when emptying array' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/nfp: fix dereference of null pointer' " Xueming Li
                         ` (66 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Peng Zhang; +Cc: xuemingl, Chaoyong He, Long Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d0d759188e29b63fefd861e04cc14ba254e6e4d2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d0d759188e29b63fefd861e04cc14ba254e6e4d2 Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Wed, 19 Jun 2024 17:58:09 +0800
Subject: [PATCH] net/nfp: disable ctrl VNIC queues on close
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 23a04fe2b8b7775aaa694bb1253c9072b74210fc ]

The logic forgot to disable the ctrl VNIC queues when representor
port close, and this will cause DPDK application restart fail if
not force reload the flower firmware.

Fix this by adding the missing logic to disable the ctrl VNIC
queues.

Fixes: 945441ebdb9c ("net/nfp: add flower ctrl VNIC")

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index ecf7a1e576..9ecd5f49c7 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -511,6 +511,8 @@ nfp_flower_cleanup_ctrl_vnic(struct nfp_net_hw *hw)
 
 	pci_name = strchr(app_fw_flower->pf_hw->pf_dev->pci_dev->name, ':') + 1;
 
+	nfp_net_disable_queues(eth_dev);
+
 	snprintf(ctrl_txring_name, sizeof(ctrl_txring_name), "%s_cttx_ring", pci_name);
 	for (i = 0; i < hw->max_tx_queues; i++) {
 		txq = eth_dev->data->tx_queues[i];
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.477753764 +0800
+++ 0091-net-nfp-disable-ctrl-VNIC-queues-on-close.patch	2024-08-12 20:44:02.355069346 +0800
@@ -1 +1 @@
-From 23a04fe2b8b7775aaa694bb1253c9072b74210fc Mon Sep 17 00:00:00 2001
+From d0d759188e29b63fefd861e04cc14ba254e6e4d2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 23a04fe2b8b7775aaa694bb1253c9072b74210fc ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 0edebd574a..5caaf9d745 100644
+index ecf7a1e576..9ecd5f49c7 100644
@@ -27 +29 @@
-@@ -533,6 +533,8 @@ nfp_flower_cleanup_ctrl_vnic(struct nfp_app_fw_flower *app_fw_flower,
+@@ -511,6 +511,8 @@ nfp_flower_cleanup_ctrl_vnic(struct nfp_net_hw *hw)
@@ -29 +31 @@
- 	pci_name = strchr(hw_priv->pf_dev->pci_dev->name, ':') + 1;
+ 	pci_name = strchr(app_fw_flower->pf_hw->pf_dev->pci_dev->name, ':') + 1;

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

* patch 'net/nfp: fix dereference of null pointer' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (90 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/nfp: disable ctrl VNIC queues on close' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/nfp: fix repeat disable port' " Xueming Li
                         ` (65 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Peng Zhang; +Cc: xuemingl, Chaoyong He, Long Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=51d6936232523f4f798868217607a8b781deef2d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 51d6936232523f4f798868217607a8b781deef2d Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Wed, 19 Jun 2024 17:58:10 +0800
Subject: [PATCH] net/nfp: fix dereference of null pointer
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bb177a392fe5e9f3b1145e29b5febbd8cfff4b6e ]

The original logic can not make sure the 'repr' pointer has
valid value and the dereference of null pointer will cause
a segment fault problem.

Fixes: eae7dadbe987 ("net/nfp: update link status reporting")

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_ctrl.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/nfp/flower/nfp_flower_ctrl.c b/drivers/net/nfp/flower/nfp_flower_ctrl.c
index c25487c277..102daa3d70 100644
--- a/drivers/net/nfp/flower/nfp_flower_ctrl.c
+++ b/drivers/net/nfp/flower/nfp_flower_ctrl.c
@@ -441,6 +441,11 @@ nfp_flower_cmsg_port_mod_rx(struct nfp_app_fw_flower *app_fw_flower,
 		return -EINVAL;
 	}
 
+	if (repr == NULL) {
+		PMD_DRV_LOG(ERR, "Can not get 'repr' for port %#x", port);
+		return -EINVAL;
+	}
+
 	repr->link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
 	if ((msg->info & NFP_FLOWER_CMSG_PORT_MOD_INFO_LINK) != 0)
 		repr->link.link_status = RTE_ETH_LINK_UP;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.501181862 +0800
+++ 0092-net-nfp-fix-dereference-of-null-pointer.patch	2024-08-12 20:44:02.355069346 +0800
@@ -1 +1 @@
-From bb177a392fe5e9f3b1145e29b5febbd8cfff4b6e Mon Sep 17 00:00:00 2001
+From 51d6936232523f4f798868217607a8b781deef2d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bb177a392fe5e9f3b1145e29b5febbd8cfff4b6e ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index de6e419cac..8cfafe91c8 100644
+index c25487c277..102daa3d70 100644

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

* patch 'net/nfp: fix repeat disable port' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (91 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/nfp: fix dereference of null pointer' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/ena: fix bad checksum handling' " Xueming Li
                         ` (64 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Peng Zhang; +Cc: xuemingl, Chaoyong He, Long Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5453c7a0b0a10851b2e23fba077d191c981a1906

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5453c7a0b0a10851b2e23fba077d191c981a1906 Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Wed, 19 Jun 2024 17:58:11 +0800
Subject: [PATCH] net/nfp: fix repeat disable port
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bd4969ab939e0f188926f64e410a8ab285392b3a ]

For firmware with multiple PFs, all the PFs share
the same 'nfp_eth_table' data structure. So the original
logic loop the ports in 'nfp_eth_table' will make other
PFs suddently down, which will cause problem.

Fix this by adding the special logic for firmware with
multiple PFs.

Fixes: 3b00109d2b65 ("net/nfp: add PF ID used to format symbols")

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c     | 35 +++++++++++++++++++++++++-------
 drivers/net/nfp/nfp_net_common.c | 10 +++++++++
 drivers/net/nfp/nfp_net_common.h |  2 ++
 3 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 7d86618bc9..8bb6715450 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -1187,14 +1187,35 @@ app_cleanup:
 	return ret;
 }
 
+/* Force the physical port down to clear the possible DMA error */
 static int
-nfp_pf_init(struct rte_pci_device *pci_dev)
+nfp_net_force_port_down(struct nfp_pf_dev *pf_dev,
+		struct nfp_eth_table *nfp_eth_table,
+		struct nfp_cpp *cpp)
 {
+	int ret;
 	uint32_t i;
 	uint32_t id;
+	uint32_t index;
+	uint32_t count;
+
+	count = nfp_net_get_port_num(pf_dev, nfp_eth_table);
+	for (i = 0; i < count; i++) {
+		id = nfp_function_id_get(pf_dev, i);
+		index = nfp_eth_table->ports[id].index;
+		ret = nfp_eth_set_configured(cpp, index, 0);
+		if (ret < 0)
+			return ret;
+	}
+
+	return 0;
+}
+
+static int
+nfp_pf_init(struct rte_pci_device *pci_dev)
+{
 	int ret = 0;
 	uint64_t addr;
-	uint32_t index;
 	uint32_t cpp_id;
 	uint8_t function_id;
 	struct nfp_cpp *cpp;
@@ -1266,11 +1287,11 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 	pf_dev->multi_pf.enabled = nfp_check_multi_pf_from_nsp(pci_dev, cpp);
 	pf_dev->multi_pf.function_id = function_id;
 
-	/* Force the physical port down to clear the possible DMA error */
-	for (i = 0; i < nfp_eth_table->count; i++) {
-		id = nfp_function_id_get(pf_dev, i);
-		index = nfp_eth_table->ports[id].index;
-		nfp_eth_set_configured(cpp, index, 0);
+	ret = nfp_net_force_port_down(pf_dev, nfp_eth_table, cpp);
+	if (ret != 0) {
+		PMD_INIT_LOG(ERR, "Failed to force port down");
+		ret = -EIO;
+		goto eth_table_cleanup;
 	}
 
 	if (nfp_fw_setup(pci_dev, cpp, nfp_eth_table, hwinfo,
diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
index 10732f459c..effb104af5 100644
--- a/drivers/net/nfp/nfp_net_common.c
+++ b/drivers/net/nfp/nfp_net_common.c
@@ -2250,3 +2250,13 @@ nfp_net_flow_ctrl_set(struct rte_eth_dev *dev,
 
 	return 0;
 }
+
+uint32_t
+nfp_net_get_port_num(struct nfp_pf_dev *pf_dev,
+		struct nfp_eth_table *nfp_eth_table)
+{
+	if (pf_dev->multi_pf.enabled)
+		return 1;
+	else
+		return nfp_eth_table->count;
+}
diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h
index c96f55976a..827aa2c0e2 100644
--- a/drivers/net/nfp/nfp_net_common.h
+++ b/drivers/net/nfp/nfp_net_common.h
@@ -274,6 +274,8 @@ int nfp_net_flow_ctrl_get(struct rte_eth_dev *dev,
 int nfp_net_flow_ctrl_set(struct rte_eth_dev *dev,
 		struct rte_eth_fc_conf *fc_conf);
 void nfp_pf_uninit(struct nfp_pf_dev *pf_dev);
+uint32_t nfp_net_get_port_num(struct nfp_pf_dev *pf_dev,
+		struct nfp_eth_table *nfp_eth_table);
 
 #define NFP_PRIV_TO_APP_FW_NIC(app_fw_priv)\
 	((struct nfp_app_fw_nic *)app_fw_priv)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.523373860 +0800
+++ 0093-net-nfp-fix-repeat-disable-port.patch	2024-08-12 20:44:02.365069347 +0800
@@ -1 +1 @@
-From bd4969ab939e0f188926f64e410a8ab285392b3a Mon Sep 17 00:00:00 2001
+From 5453c7a0b0a10851b2e23fba077d191c981a1906 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bd4969ab939e0f188926f64e410a8ab285392b3a ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
- drivers/net/nfp/nfp_ethdev.c     | 35 ++++++++++++++++++++++++++------
+ drivers/net/nfp/nfp_ethdev.c     | 35 +++++++++++++++++++++++++-------
@@ -24 +26 @@
- 3 files changed, 41 insertions(+), 6 deletions(-)
+ 3 files changed, 40 insertions(+), 7 deletions(-)
@@ -27 +29 @@
-index a3c237e607..d706f27ac2 100644
+index 7d86618bc9..8bb6715450 100644
@@ -30,2 +32,2 @@
-@@ -1772,6 +1772,30 @@ nfp_net_speed_capa_get(struct nfp_pf_dev *pf_dev,
- 	return 0;
+@@ -1187,14 +1187,35 @@ app_cleanup:
+ 	return ret;
@@ -35 +37,2 @@
-+static int
+ static int
+-nfp_pf_init(struct rte_pci_device *pci_dev)
@@ -39 +42 @@
-+{
+ {
@@ -41,2 +44,2 @@
-+	uint32_t i;
-+	uint32_t id;
+ 	uint32_t i;
+ 	uint32_t id;
@@ -58,5 +61,3 @@
- static int
- nfp_pf_init(struct rte_pci_device *pci_dev)
- {
-@@ -1780,7 +1804,6 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
- 	uint32_t id;
++static int
++nfp_pf_init(struct rte_pci_device *pci_dev)
++{
@@ -69 +70 @@
-@@ -1874,11 +1897,11 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+@@ -1266,11 +1287,11 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
@@ -85 +86 @@
- 	ret = nfp_devargs_parse(&pf_dev->devargs, pci_dev->device.devargs);
+ 	if (nfp_fw_setup(pci_dev, cpp, nfp_eth_table, hwinfo,
@@ -87 +88 @@
-index 260920ecff..30ad6fc29e 100644
+index 10732f459c..effb104af5 100644
@@ -90 +91 @@
-@@ -2554,3 +2554,13 @@ nfp_net_fec_set(struct rte_eth_dev *dev,
+@@ -2250,3 +2250,13 @@ nfp_net_flow_ctrl_set(struct rte_eth_dev *dev,
@@ -92 +93 @@
- 	return nfp_eth_set_fec(hw_priv->pf_dev->cpp, eth_port->index, fec);
+ 	return 0;
@@ -105 +106 @@
-index 2feeb6f5bd..4016652cf9 100644
+index c96f55976a..827aa2c0e2 100644
@@ -108,4 +109,4 @@
-@@ -326,6 +326,8 @@ void nfp_net_get_fw_version(struct nfp_cpp *cpp,
- 		uint32_t *fw_version);
- int nfp_net_txrwb_alloc(struct rte_eth_dev *eth_dev);
- void nfp_net_txrwb_free(struct rte_eth_dev *eth_dev);
+@@ -274,6 +274,8 @@ int nfp_net_flow_ctrl_get(struct rte_eth_dev *dev,
+ int nfp_net_flow_ctrl_set(struct rte_eth_dev *dev,
+ 		struct rte_eth_fc_conf *fc_conf);
+ void nfp_pf_uninit(struct nfp_pf_dev *pf_dev);

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

* patch 'net/ena: fix bad checksum handling' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (92 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/nfp: fix repeat disable port' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/ena: fix return value check' " Xueming Li
                         ` (63 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Shai Brandes; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=db4ca6f1cbd6e5dd9ae133f7609a7538fd5c889c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From db4ca6f1cbd6e5dd9ae133f7609a7538fd5c889c Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 2 Jul 2024 17:46:22 +0300
Subject: [PATCH] net/ena: fix bad checksum handling
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]

Removed a workaround for a false L4 bad Rx csum
indication from the device. The workaround was to set it
as unknown so the application would check it instead.
The issue was fixed in the device, thus the driver bad csum
handling should be fixed in the PMD.

Fixes: b2d2f1cf89a6 ("net/ena: fix checksum flag for L4")

Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index e122a55fa4..676c8cbcc3 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -653,13 +653,7 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
 	} else {
 		if (unlikely(ena_rx_ctx->l4_csum_err)) {
 			++rx_stats->l4_csum_bad;
-			/*
-			 * For the L4 Rx checksum offload the HW may indicate
-			 * bad checksum although it's valid. Because of that,
-			 * we're setting the UNKNOWN flag to let the app
-			 * re-verify the checksum.
-			 */
-			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
+			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
 		} else {
 			++rx_stats->l4_csum_good;
 			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.555819657 +0800
+++ 0094-net-ena-fix-bad-checksum-handling.patch	2024-08-12 20:44:02.365069347 +0800
@@ -1 +1 @@
-From fa4bb7025255036fcff9556c637efa2627ac4af4 Mon Sep 17 00:00:00 2001
+From db4ca6f1cbd6e5dd9ae133f7609a7538fd5c889c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 4e7171e629..b43b913903 100644
+index e122a55fa4..676c8cbcc3 100644
@@ -24 +26 @@
-@@ -674,13 +674,7 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
+@@ -653,13 +653,7 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,

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

* patch 'net/ena: fix return value check' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (93 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/ena: fix bad checksum handling' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/ena: fix checksum handling' " Xueming Li
                         ` (62 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Shai Brandes; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ffba3914ad7bc4a63b24e678d83e02dd87f652f9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ffba3914ad7bc4a63b24e678d83e02dd87f652f9 Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 2 Jul 2024 17:46:23 +0300
Subject: [PATCH] net/ena: fix return value check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8936b01a512a8e25a7369d282a17b9b09c55728b ]

Removed the sign inversion for when checking if
ena_com_set_host_attributes returns ENA_COM_UNSUPPORTED.
ENA_COM_UNSUPPORTED is defined as -EOPNOTSUPP, so the extra sign
inversion is wrong.

Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")

Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 676c8cbcc3..6d8e36263b 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -791,7 +791,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
 
 	rc = ena_com_set_host_attributes(ena_dev);
 	if (rc) {
-		if (rc == -ENA_COM_UNSUPPORTED)
+		if (rc == ENA_COM_UNSUPPORTED)
 			PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
 		else
 			PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
@@ -835,7 +835,7 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
 
 	rc = ena_com_set_host_attributes(&adapter->ena_dev);
 	if (rc) {
-		if (rc == -ENA_COM_UNSUPPORTED)
+		if (rc == ENA_COM_UNSUPPORTED)
 			PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
 		else
 			PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.582382555 +0800
+++ 0095-net-ena-fix-return-value-check.patch	2024-08-12 20:44:02.365069347 +0800
@@ -1 +1 @@
-From 8936b01a512a8e25a7369d282a17b9b09c55728b Mon Sep 17 00:00:00 2001
+From ffba3914ad7bc4a63b24e678d83e02dd87f652f9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8936b01a512a8e25a7369d282a17b9b09c55728b ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index b43b913903..67a1d86f9a 100644
+index 676c8cbcc3..6d8e36263b 100644
@@ -23 +25 @@
-@@ -812,7 +812,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
+@@ -791,7 +791,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
@@ -32 +34 @@
-@@ -856,7 +856,7 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
+@@ -835,7 +835,7 @@ static void ena_config_debug_area(struct ena_adapter *adapter)

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

* patch 'net/ena: fix checksum handling' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (94 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/ena: fix return value check' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/gve: fix RSS hash endianness in DQO format' " Xueming Li
                         ` (61 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Shai Brandes; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=316baf3f0b62c82bd5b4322c72e5f39ec0feaf79

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 316baf3f0b62c82bd5b4322c72e5f39ec0feaf79 Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 2 Jul 2024 17:46:24 +0300
Subject: [PATCH] net/ena: fix checksum handling
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f66055c7564050e55c7eab147d039bf01048829a ]

This change fixes an issue where a non tcp/udp packet can be indicated
to have an invalid csum. If the device erroneously tries to verify the
csum on a non tcp/udp packet it will result in false indication that
there is a csum error. This change make the driver ignore the
indication for csum error on such packets.

Fixes: 84daba9962b5 ("net/ena: add extra Rx checksum related xstats")

Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 6d8e36263b..f3962aa76e 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -648,7 +648,8 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
 		packet_type |= RTE_PTYPE_L3_IPV6;
 	}
 
-	if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag) {
+	if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag ||
+		!(packet_type & (RTE_PTYPE_L4_TCP | RTE_PTYPE_L4_UDP))) {
 		ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
 	} else {
 		if (unlikely(ena_rx_ctx->l4_csum_err)) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.609000453 +0800
+++ 0096-net-ena-fix-checksum-handling.patch	2024-08-12 20:44:02.375069349 +0800
@@ -1 +1 @@
-From f66055c7564050e55c7eab147d039bf01048829a Mon Sep 17 00:00:00 2001
+From 316baf3f0b62c82bd5b4322c72e5f39ec0feaf79 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f66055c7564050e55c7eab147d039bf01048829a ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 67a1d86f9a..a18c94df28 100644
+index 6d8e36263b..f3962aa76e 100644
@@ -24 +26 @@
-@@ -669,7 +669,8 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
+@@ -648,7 +648,8 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,

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

* patch 'net/gve: fix RSS hash endianness in DQO format' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (95 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/ena: fix checksum handling' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/nfp: remove redundant function call' " Xueming Li
                         ` (60 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Shreesh Adiga; +Cc: xuemingl, Joshua Washington, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c90d304f0eed545d8f7ec36ceacf04778c856a7c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c90d304f0eed545d8f7ec36ceacf04778c856a7c Mon Sep 17 00:00:00 2001
From: Shreesh Adiga <16567adigashreesh@gmail.com>
Date: Wed, 3 Jul 2024 19:01:53 +0530
Subject: [PATCH] net/gve: fix RSS hash endianness in DQO format
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b0ab5e931135664a554e0fd1e28fe11ee73f4463 ]

The hash field in struct gve_rx_compl_desc_dqo defined in
gve_desc_dqo.h has the type __le32. Therefore the hash must be
read in little endian rather than big endian.

Bugzilla ID: 1441
Fixes: 45da16b5b181 ("net/gve: support basic Rx data path for DQO")

Signed-off-by: Shreesh Adiga <16567adigashreesh@gmail.com>
Acked-by: Joshua Washington <joshwash@google.com>
---
 .mailmap                     | 1 +
 drivers/net/gve/gve_rx_dqo.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 24c450efaa..38af1e8603 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1319,6 +1319,7 @@ Shiyang He <shiyangx.he@intel.com>
 Shlomi Gridish <sgridish@marvell.com>
 Shougang Wang <shougangx.wang@intel.com>
 Shraddha Joshi <jshraddha@vmware.com>
+Shreesh Adiga <16567adigashreesh@gmail.com>
 Shreyansh Jain <shreyansh.jain@nxp.com>
 Shrikrishna Khare <skhare@vmware.com>
 Shuai Zhu <shuaix.zhu@intel.com>
diff --git a/drivers/net/gve/gve_rx_dqo.c b/drivers/net/gve/gve_rx_dqo.c
index 7c7a8c48d0..a56cdbf11b 100644
--- a/drivers/net/gve/gve_rx_dqo.c
+++ b/drivers/net/gve/gve_rx_dqo.c
@@ -127,7 +127,7 @@ gve_rx_burst_dqo(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		rxm->ol_flags = 0;
 
 		rxm->ol_flags |= RTE_MBUF_F_RX_RSS_HASH;
-		rxm->hash.rss = rte_be_to_cpu_32(rx_desc->hash);
+		rxm->hash.rss = rte_le_to_cpu_32(rx_desc->hash);
 
 		rx_pkts[nb_rx++] = rxm;
 		bytes += pkt_len;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.633803551 +0800
+++ 0097-net-gve-fix-RSS-hash-endianness-in-DQO-format.patch	2024-08-12 20:44:02.375069349 +0800
@@ -1 +1 @@
-From b0ab5e931135664a554e0fd1e28fe11ee73f4463 Mon Sep 17 00:00:00 2001
+From c90d304f0eed545d8f7ec36ceacf04778c856a7c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b0ab5e931135664a554e0fd1e28fe11ee73f4463 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 874df4d162..9bc25b1521 100644
+index 24c450efaa..38af1e8603 100644
@@ -25 +27 @@
-@@ -1356,6 +1356,7 @@ Shiyang He <shiyangx.he@intel.com>
+@@ -1319,6 +1319,7 @@ Shiyang He <shiyangx.he@intel.com>
@@ -34 +36 @@
-index f08b58c78d..5efcce3312 100644
+index 7c7a8c48d0..a56cdbf11b 100644
@@ -37 +39 @@
-@@ -161,7 +161,7 @@ gve_rx_burst_dqo(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -127,7 +127,7 @@ gve_rx_burst_dqo(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
@@ -39,2 +41,2 @@
- 		rxm->ol_flags |= RTE_MBUF_F_RX_RSS_HASH |
- 				gve_parse_csum_ol_flags(rx_desc, rxq->hw);
+ 
+ 		rxm->ol_flags |= RTE_MBUF_F_RX_RSS_HASH;

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

* patch 'net/nfp: remove redundant function call' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (96 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/gve: fix RSS hash endianness in DQO format' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/nfp: fix getting firmware version' " Xueming Li
                         ` (59 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Chaoyong He; +Cc: xuemingl, Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=241976029a5e87ef3a1e07416a00cca49cafd5eb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 241976029a5e87ef3a1e07416a00cca49cafd5eb Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 24 Jun 2024 09:57:12 +0800
Subject: [PATCH] net/nfp: remove redundant function call
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d16a42f4a7cf2e73f0e2f7daa9bc64aa63e7bcd9 ]

Remove the redundancy call of 'rte_eth_copy_pci_info()' as the API
'rte_eth_dev_pci_allocate()' already done that.

Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfp_ethdev_vf.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c
index 88da593190..cfe7225ca5 100644
--- a/drivers/net/nfp/nfp_ethdev_vf.c
+++ b/drivers/net/nfp/nfp_ethdev_vf.c
@@ -288,8 +288,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
-	rte_eth_copy_pci_info(eth_dev, pci_dev);
-
 	net_hw->eth_xstats_base = rte_malloc("rte_eth_xstat",
 			sizeof(struct rte_eth_xstat) * nfp_net_xstats_size(eth_dev), 0);
 	if (net_hw->eth_xstats_base == NULL) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.658207349 +0800
+++ 0098-net-nfp-remove-redundant-function-call.patch	2024-08-12 20:44:02.375069349 +0800
@@ -1 +1 @@
-From d16a42f4a7cf2e73f0e2f7daa9bc64aa63e7bcd9 Mon Sep 17 00:00:00 2001
+From 241976029a5e87ef3a1e07416a00cca49cafd5eb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d16a42f4a7cf2e73f0e2f7daa9bc64aa63e7bcd9 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index a422bcd057..e7c18fe90a 100644
+index 88da593190..cfe7225ca5 100644
@@ -23 +25 @@
-@@ -302,8 +302,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
+@@ -288,8 +288,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)

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

* patch 'net/nfp: fix getting firmware version' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (97 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/nfp: remove redundant function call' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'doc: update metadata description in nfp guide' " Xueming Li
                         ` (58 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Zerun Fu; +Cc: xuemingl, Chaoyong He, Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=174b2b5a9a3d6892847cbe2901bb77c8cac69d89

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 174b2b5a9a3d6892847cbe2901bb77c8cac69d89 Mon Sep 17 00:00:00 2001
From: Zerun Fu <zerun.fu@corigine.com>
Date: Mon, 24 Jun 2024 09:57:18 +0800
Subject: [PATCH] net/nfp: fix getting firmware version
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b7adbb2efe98eccb60ea7a7cfc1cff6ae3c5fbc8 ]

The original logic try to get the NSP resource every time the application
call 'rte_eth_dev_fw_version_get()' interface, there are chances the NSP
resource busy and fail to get it. And because the local string variables
not initialized, there will be out of range problem when it fail to get
the NSP resource.

Fix this by initializing the local string variables and storing the
firmware version string once we get it.

Fixes: 128c8ad951bf ("net/nfp: support getting firmware version")

Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfp_net_common.c | 26 ++++++++++++++++++--------
 drivers/net/nfp/nfp_net_common.h |  6 ++++++
 2 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
index effb104af5..0491912bd3 100644
--- a/drivers/net/nfp/nfp_net_common.c
+++ b/drivers/net/nfp/nfp_net_common.c
@@ -189,9 +189,6 @@ nfp_net_notify_port_speed(struct nfp_net_hw *hw,
 			nfp_net_link_speed_rte2nfp(link->link_speed));
 }
 
-/* The length of firmware version string */
-#define FW_VER_LEN        32
-
 /**
  * Reconfigure the firmware via the mailbox
  *
@@ -2063,16 +2060,21 @@ nfp_net_firmware_version_get(struct rte_eth_dev *dev,
 		size_t fw_size)
 {
 	struct nfp_net_hw *hw;
-	char mip_name[FW_VER_LEN];
-	char app_name[FW_VER_LEN];
-	char nsp_version[FW_VER_LEN];
-	char vnic_version[FW_VER_LEN];
+	char app_name[FW_VER_LEN] = {0};
+	char mip_name[FW_VER_LEN] = {0};
+	char nsp_version[FW_VER_LEN] = {0};
+	char vnic_version[FW_VER_LEN] = {0};
 
 	if (fw_size < FW_VER_LEN)
 		return FW_VER_LEN;
 
 	hw = nfp_net_get_hw(dev);
 
+	if (hw->fw_version[0] != 0) {
+		snprintf(fw_version, FW_VER_LEN, "%s", hw->fw_version);
+		return 0;
+	}
+
 	if ((dev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR) == 0) {
 		snprintf(vnic_version, FW_VER_LEN, "%d.%d.%d.%d",
 			hw->ver.extend, hw->ver.class,
@@ -2085,8 +2087,16 @@ nfp_net_firmware_version_get(struct rte_eth_dev *dev,
 	nfp_net_get_mip_name(hw, mip_name);
 	nfp_net_get_app_name(hw, app_name);
 
-	snprintf(fw_version, FW_VER_LEN, "%s %s %s %s",
+	if (nsp_version[0] == 0 || mip_name[0] == 0) {
+		snprintf(fw_version, FW_VER_LEN, "%s %s %s %s",
 			vnic_version, nsp_version, mip_name, app_name);
+		return 0;
+	}
+
+	snprintf(hw->fw_version, FW_VER_LEN, "%s %s %s %s",
+			vnic_version, nsp_version, mip_name, app_name);
+
+	snprintf(fw_version, FW_VER_LEN, "%s", hw->fw_version);
 
 	return 0;
 }
diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h
index 827aa2c0e2..41d59bfa99 100644
--- a/drivers/net/nfp/nfp_net_common.h
+++ b/drivers/net/nfp/nfp_net_common.h
@@ -38,6 +38,9 @@
 
 #define NFP_BEAT_LENGTH         8
 
+/* The length of firmware version string */
+#define FW_VER_LEN        32
+
 /*
  * Each PF has corresponding word to beat:
  * Offset | Usage
@@ -178,6 +181,9 @@ struct nfp_net_hw {
 	struct nfp_net_tlv_caps tlv_caps;
 
 	struct nfp_net_ipsec_data *ipsec_data;
+
+	/** Used for firmware version */
+	char fw_version[FW_VER_LEN];
 };
 
 static inline uint32_t
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.680993647 +0800
+++ 0099-net-nfp-fix-getting-firmware-version.patch	2024-08-12 20:44:02.385069351 +0800
@@ -1 +1 @@
-From b7adbb2efe98eccb60ea7a7cfc1cff6ae3c5fbc8 Mon Sep 17 00:00:00 2001
+From 174b2b5a9a3d6892847cbe2901bb77c8cac69d89 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b7adbb2efe98eccb60ea7a7cfc1cff6ae3c5fbc8 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 2260e7c66b..379335e210 100644
+index effb104af5..0491912bd3 100644
@@ -31 +33 @@
-@@ -193,9 +193,6 @@ nfp_net_notify_port_speed(struct nfp_net_hw *hw,
+@@ -189,9 +189,6 @@ nfp_net_notify_port_speed(struct nfp_net_hw *hw,
@@ -39 +41 @@
-  * Reconfigure the firmware of VF configure
+  * Reconfigure the firmware via the mailbox
@@ -41 +43 @@
-@@ -2250,11 +2247,11 @@ nfp_net_firmware_version_get(struct rte_eth_dev *dev,
+@@ -2063,16 +2060,21 @@ nfp_net_firmware_version_get(struct rte_eth_dev *dev,
@@ -49 +50,0 @@
- 	struct nfp_net_hw_priv *hw_priv;
@@ -57 +58 @@
-@@ -2262,6 +2259,11 @@ nfp_net_firmware_version_get(struct rte_eth_dev *dev,
+ 
@@ -59 +59,0 @@
- 	hw_priv = dev->process_private;
@@ -66 +66 @@
- 	if (!rte_eth_dev_is_repr(dev)) {
+ 	if ((dev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR) == 0) {
@@ -69,3 +69,3 @@
-@@ -2274,8 +2276,16 @@ nfp_net_firmware_version_get(struct rte_eth_dev *dev,
- 	nfp_net_get_mip_name(hw_priv, mip_name);
- 	nfp_net_get_app_name(hw_priv, app_name);
+@@ -2085,8 +2087,16 @@ nfp_net_firmware_version_get(struct rte_eth_dev *dev,
+ 	nfp_net_get_mip_name(hw, mip_name);
+ 	nfp_net_get_app_name(hw, app_name);
@@ -88 +88 @@
-index 4bf7453512..bebb754ced 100644
+index 827aa2c0e2..41d59bfa99 100644
@@ -91,3 +91,3 @@
-@@ -50,6 +50,9 @@
- 				RTE_ETH_RSS_NONFRAG_IPV6_UDP  | \
- 				RTE_ETH_RSS_NONFRAG_IPV6_SCTP)
+@@ -38,6 +38,9 @@
+ 
+ #define NFP_BEAT_LENGTH         8
@@ -101 +101,2 @@
-@@ -255,6 +258,9 @@ struct nfp_net_hw {
+@@ -178,6 +181,9 @@ struct nfp_net_hw {
+ 	struct nfp_net_tlv_caps tlv_caps;
@@ -103,2 +104 @@
- 	/** Used for rte_flow of CoreNIC firmware */
- 	struct nfp_net_priv *priv;
+ 	struct nfp_net_ipsec_data *ipsec_data;

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

* patch 'doc: update metadata description in nfp guide' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (98 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/nfp: fix getting firmware version' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/nfp: remove unneeded logic for VLAN layer' " Xueming Li
                         ` (57 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Peng Zhang; +Cc: xuemingl, Chaoyong He, Long Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=4c45c694ca8a39e97d2375a193b1cf0da93e9971

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4c45c694ca8a39e97d2375a193b1cf0da93e9971 Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Mon, 24 Jun 2024 09:57:19 +0800
Subject: [PATCH] doc: update metadata description in nfp guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6bb1c98c802857d384b02735a638366d270bec55 ]

The description about the metadata of Tx direction
when using the firmware with NFDk is not correct.
Because of the exist of 8-bits metadata length, the
32-bits field type header contains only 6 4-bits
datatype specifiers rather than 8.

Fixes: c4b058784e75 ("net/nfp: modify parse metadata logic")

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
---
 doc/guides/nics/nfp.rst | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst
index fee1860f4a..b577229bda 100644
--- a/doc/guides/nics/nfp.rst
+++ b/doc/guides/nics/nfp.rst
@@ -299,10 +299,6 @@ be wrote N times in the heads. It is the same with NFD3.
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        Data for field 5                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   |                        Data for field 6                       |
-   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   |                        Data for field 7                       |
-   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          Packet Data                          |
    |                              ...                              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.714686945 +0800
+++ 0100-doc-update-metadata-description-in-nfp-guide.patch	2024-08-12 20:44:02.385069351 +0800
@@ -1 +1 @@
-From 6bb1c98c802857d384b02735a638366d270bec55 Mon Sep 17 00:00:00 2001
+From 4c45c694ca8a39e97d2375a193b1cf0da93e9971 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6bb1c98c802857d384b02735a638366d270bec55 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 7579aa1e95..d756d7cc07 100644
+index fee1860f4a..b577229bda 100644
@@ -26 +28 @@
-@@ -329,10 +329,6 @@ be wrote N times in the heads. It is the same with NFD3.
+@@ -299,10 +299,6 @@ be wrote N times in the heads. It is the same with NFD3.

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

* patch 'net/nfp: remove unneeded logic for VLAN layer' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (99 preceding siblings ...)
  2024-08-12 12:49       ` patch 'doc: update metadata description in nfp guide' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/nfp: adapt reverse sequence card' " Xueming Li
                         ` (56 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Peng Zhang; +Cc: xuemingl, Chaoyong He, Long Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ea7085704a60700fc259763e1414beffa8ee3cfc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ea7085704a60700fc259763e1414beffa8ee3cfc Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Mon, 24 Jun 2024 09:57:20 +0800
Subject: [PATCH] net/nfp: remove unneeded logic for VLAN layer
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c3cf736fb9f77ffb1ce841c5fca26522e2d5fd9e ]

The logic in NFDk datapath can make sure there only one layer VLAN,
so remove the unneeded logic here and make it clean and easy to
understand.

Fixes: 7c82b8626af8 ("net/nfp: support VLAN insert with NFDk")

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
---
 drivers/net/nfp/nfdk/nfp_nfdk_dp.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c
index 6a9e7ec042..772c847b9d 100644
--- a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c
+++ b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c
@@ -178,7 +178,6 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt,
 	uint32_t cap_extend;
 	struct nfp_net_hw *hw;
 	uint32_t header_offset;
-	uint8_t vlan_layer = 0;
 	uint8_t ipsec_layer = 0;
 	struct nfp_net_meta_raw meta_data;
 
@@ -223,13 +222,8 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt,
 			meta += NFP_NET_META_FIELD_SIZE) {
 		switch (meta_type & NFP_NET_META_FIELD_MASK) {
 		case NFP_NET_META_VLAN:
-			if (vlan_layer > 0) {
-				PMD_DRV_LOG(ERR, "At most 1 layers of vlan is supported");
-				return -EINVAL;
-			}
 
 			nfp_net_set_meta_vlan(&meta_data, pkt, layer);
-			vlan_layer++;
 			break;
 		case NFP_NET_META_IPSEC:
 			if (ipsec_layer > 2) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.743014142 +0800
+++ 0101-net-nfp-remove-unneeded-logic-for-VLAN-layer.patch	2024-08-12 20:44:02.385069351 +0800
@@ -1 +1 @@
-From c3cf736fb9f77ffb1ce841c5fca26522e2d5fd9e Mon Sep 17 00:00:00 2001
+From ea7085704a60700fc259763e1414beffa8ee3cfc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c3cf736fb9f77ffb1ce841c5fca26522e2d5fd9e ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 3ba97e23a9..8b8c191b82 100644
+index 6a9e7ec042..772c847b9d 100644
@@ -24,2 +26,2 @@
-@@ -180,7 +180,6 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt,
- 	uint32_t meta_type;
+@@ -178,7 +178,6 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt,
+ 	uint32_t cap_extend;
@@ -32 +34 @@
-@@ -223,12 +222,7 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt,
+@@ -223,13 +222,8 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt,
@@ -40 +42,2 @@
- 			nfp_net_meta_set_vlan(&meta_data, pkt, layer);
+ 
+ 			nfp_net_set_meta_vlan(&meta_data, pkt, layer);

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

* patch 'net/nfp: adapt reverse sequence card' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (100 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/nfp: remove unneeded logic for VLAN layer' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'doc: update AF_XDP device plugin repository' " Xueming Li
                         ` (55 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Peng Zhang; +Cc: xuemingl, Chaoyong He, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=811fcdf23a370c8b598aad6a1a776d5c2a929a0a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 811fcdf23a370c8b598aad6a1a776d5c2a929a0a Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Mon, 24 Jun 2024 09:57:21 +0800
Subject: [PATCH] net/nfp: adapt reverse sequence card
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 497b94dc2c8795d31fa2020bcdb0cd62a156ccb0 ]

The NFP chip-wide port index is 'eth_port->index'.
In the normal card, it uses 'eth_port->eth_index', but because
'eth_port->eth_index' and 'eth_port->index' have the same value,
it doesn't have any problem.
But in the reverse sequence card, the value is different,
so it will lead the 'nfp_eth_config_start()' failed.

In this commit, fix this bug by using 'eth_port->index'.

Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_representor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index b51b467e7c..88fb6975af 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -740,7 +740,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
 		eth_port = &nfp_eth_table->ports[i];
 		flower_repr.repr_type = NFP_REPR_TYPE_PHYS_PORT;
 		flower_repr.port_id = nfp_flower_get_phys_port_id(eth_port->index);
-		flower_repr.nfp_idx = eth_port->eth_index;
+		flower_repr.nfp_idx = eth_port->index;
 		flower_repr.vf_id = i + 1;
 
 		/* Copy the real mac of the interface to the representor struct */
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.768655840 +0800
+++ 0102-net-nfp-adapt-reverse-sequence-card.patch	2024-08-12 20:44:02.395069353 +0800
@@ -1 +1 @@
-From 497b94dc2c8795d31fa2020bcdb0cd62a156ccb0 Mon Sep 17 00:00:00 2001
+From 811fcdf23a370c8b598aad6a1a776d5c2a929a0a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 497b94dc2c8795d31fa2020bcdb0cd62a156ccb0 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 086dbc58e3..b1589cf78c 100644
+index b51b467e7c..88fb6975af 100644
@@ -28,2 +30,2 @@
-@@ -845,7 +845,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower,
- 		eth_port = &nfp_eth_table->ports[id];
+@@ -740,7 +740,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
+ 		eth_port = &nfp_eth_table->ports[i];

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

* patch 'doc: update AF_XDP device plugin repository' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (101 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/nfp: adapt reverse sequence card' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/nfp: fix disabling 32-bit build' " Xueming Li
                         ` (54 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Maryam Tahhan; +Cc: xuemingl, Ciara Loftus, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=de0c58c4b8d2eae3ed7d5ec3dfebf66589a03510

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From de0c58c4b8d2eae3ed7d5ec3dfebf66589a03510 Mon Sep 17 00:00:00 2001
From: Maryam Tahhan <mtahhan@redhat.com>
Date: Wed, 1 May 2024 08:36:51 -0400
Subject: [PATCH] doc: update AF_XDP device plugin repository
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ffcfbfc89ad27c5155858bee1a7b50a512573744 ]

Original repo is archived, there is a new active repo for plugin.
Fixup the references to the AF_XDP Device Plugin repo.

Signed-off-by: Maryam Tahhan <mtahhan@redhat.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 doc/guides/howto/af_xdp_dp.rst | 14 +++++++-------
 doc/guides/nics/af_xdp.rst     |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/guides/howto/af_xdp_dp.rst b/doc/guides/howto/af_xdp_dp.rst
index f0f82c79f6..4ca5462c69 100644
--- a/doc/guides/howto/af_xdp_dp.rst
+++ b/doc/guides/howto/af_xdp_dp.rst
@@ -22,7 +22,7 @@ while the CNI configures and plumbs network interfaces for the Pod.
 This document explains how to use the `AF_XDP Device Plugin for Kubernetes`_
 with a DPDK application using the :doc:`../nics/af_xdp`.
 
-.. _AF_XDP Device Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes
+.. _AF_XDP Device Plugin for Kubernetes: https://github.com/redhat-et/afxdp-plugins-for-kubernetes
 
 
 Background
@@ -80,7 +80,7 @@ then the AF_XDP PMD configures it internally.
    with (older) versions of the AF_XDP DP <= commit id `38317c2`_
    by explicitly setting ``dp_path`` to ``/tmp/afxdp.sock``.
 
-.. _38317c2: https://github.com/intel/afxdp-plugins-for-kubernetes/commit/38317c256b5c7dfb39e013a0f76010c2ded03669
+.. _38317c2: https://github.com/redhat-et/afxdp-plugins-for-kubernetes/commit/38317c256b5c7dfb39e013a0f76010c2ded03669
 
 Prerequisites
 -------------
@@ -173,7 +173,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
 
   .. code-block:: console
 
-     # git clone https://github.com/intel/afxdp-plugins-for-kubernetes.git
+     # git clone https://github.com/redhat-et/afxdp-plugins-for-kubernetes.git
 
   .. note::
 
@@ -189,7 +189,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
 * Make sure to modify the image used by the `daemonset.yml`_ file
   in the deployments directory with the following configuration:
 
-  .. _daemonset.yml : https://github.com/intel/afxdp-plugins-for-kubernetes/blob/main/deployments/daemonset.yml
+  .. _daemonset.yml : https://github.com/redhat-et/afxdp-plugins-for-kubernetes/blob/main/deployments/daemonset.yml
 
   .. code-block:: yaml
 
@@ -200,7 +200,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
      This will select the AF_XDP DP image that was built locally.
      Detailed configuration options can be found in the AF_XDP Device Plugin `readme`_ .
 
-  .. _readme: https://github.com/intel/afxdp-plugins-for-kubernetes#readme
+  .. _readme: https://github.com/redhat-et/afxdp-plugins-for-kubernetes#readme
 
 * Deploy the AF_XDP Device Plugin and CNI
 
@@ -248,7 +248,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
 
   For further reference please use the example provided by the AF_XDP DP `nad.yaml`_
 
-  .. _nad.yaml: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/main/examples/network-attachment-definition.yaml
+  .. _nad.yaml: https://github.com/redhat-et/afxdp-plugins-for-kubernetes/blob/main/examples/network-attachment-definition.yaml
 
 * Run the Pod
 
@@ -294,7 +294,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
 
   For further reference please see the `pod.yaml`_
 
-  .. _pod.yaml: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/main/examples/pod-spec.yaml
+  .. _pod.yaml: https://github.com/redhat-et/afxdp-plugins-for-kubernetes/blob/main/examples/pod-spec.yaml
 
 * Run DPDK with a command like the following:
 
diff --git a/doc/guides/nics/af_xdp.rst b/doc/guides/nics/af_xdp.rst
index ec97d0155e..60a88c467e 100644
--- a/doc/guides/nics/af_xdp.rst
+++ b/doc/guides/nics/af_xdp.rst
@@ -157,7 +157,7 @@ use_cni
 The EAL vdev argument ``use_cni`` is used to indicate that the user wishes to
 enable the `AF_XDP Device Plugin for Kubernetes`_ with a DPDK application/pod.
 
-.. _AF_XDP Device Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes
+.. _AF_XDP Device Plugin for Kubernetes: https://github.com/redhat-et/afxdp-plugins-for-kubernetes
 
 .. code-block:: console
 
@@ -180,7 +180,7 @@ to interact with the `AF_XDP Device Plugin for Kubernetes`_.
 If this argument is not passed alongside the ``use_cni`` argument
 then the AF_XDP PMD configures it internally.
 
-.. _AF_XDP Device Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes
+.. _AF_XDP Device Plugin for Kubernetes: https://github.com/redhat-et/afxdp-plugins-for-kubernetes
 
 .. code-block:: console
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.793217338 +0800
+++ 0103-doc-update-AF_XDP-device-plugin-repository.patch	2024-08-12 20:44:02.395069353 +0800
@@ -1 +1 @@
-From ffcfbfc89ad27c5155858bee1a7b50a512573744 Mon Sep 17 00:00:00 2001
+From de0c58c4b8d2eae3ed7d5ec3dfebf66589a03510 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ffcfbfc89ad27c5155858bee1a7b50a512573744 ]
@@ -9,2 +11,0 @@
-Cc: stable@dpdk.org
-
@@ -16,2 +17,2 @@
- doc/guides/nics/af_xdp.rst     |  6 +++---
- 2 files changed, 10 insertions(+), 10 deletions(-)
+ doc/guides/nics/af_xdp.rst     |  4 ++--
+ 2 files changed, 9 insertions(+), 9 deletions(-)
@@ -20 +21 @@
-index dd588c64bc..9da68e0bfa 100644
+index f0f82c79f6..4ca5462c69 100644
@@ -32 +33 @@
-@@ -90,7 +90,7 @@ then the AF_XDP PMD configures it internally to the `AF_XDP Device Plugin for Ku
+@@ -80,7 +80,7 @@ then the AF_XDP PMD configures it internally.
@@ -41 +42 @@
-@@ -183,7 +183,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
+@@ -173,7 +173,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
@@ -50 +51 @@
-@@ -199,7 +199,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
+@@ -189,7 +189,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
@@ -59 +60 @@
-@@ -210,7 +210,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
+@@ -200,7 +200,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
@@ -68 +69 @@
-@@ -258,7 +258,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
+@@ -248,7 +248,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
@@ -77 +78 @@
-@@ -304,7 +304,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
+@@ -294,7 +294,7 @@ Run dpdk-testpmd with the AF_XDP Device Plugin + CNI
@@ -87 +88 @@
-index 3da81da732..8bd17f04ae 100644
+index ec97d0155e..60a88c467e 100644
@@ -99,12 +100,3 @@
-@@ -178,7 +178,7 @@ The EAL vdev argument ``use_pinned_map`` is used to indicate that the user wishe
- load a pinned xskmap mounted by `AF_XDP Device Plugin for Kubernetes`_ in the DPDK
- application/pod.
- 
--.. _AF_XDP Device Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes
-+.. _AF_XDP Device Plugin for Kubernetes: https://github.com/redhat-et/afxdp-plugins-for-kubernetes
- 
- .. code-block:: console
- 
-@@ -202,7 +202,7 @@ to explicitly tell the AF_XDP PMD where to find either:
- If this argument is not passed alongside the ``use_cni`` or ``use_pinned_map`` arguments then
- the AF_XDP PMD configures it internally to the `AF_XDP Device Plugin for Kubernetes`_.
+@@ -180,7 +180,7 @@ to interact with the `AF_XDP Device Plugin for Kubernetes`_.
+ If this argument is not passed alongside the ``use_cni`` argument
+ then the AF_XDP PMD configures it internally.

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

* patch 'net/nfp: fix disabling 32-bit build' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (102 preceding siblings ...)
  2024-08-12 12:49       ` patch 'doc: update AF_XDP device plugin repository' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'crypto/qat: fix GEN4 write' " Xueming Li
                         ` (53 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Long Wu; +Cc: xuemingl, Chaoyong He, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f707532cde7e1c948f24c877acfdbc344b985a4c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f707532cde7e1c948f24c877acfdbc344b985a4c Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Tue, 9 Jul 2024 16:24:01 +0800
Subject: [PATCH] net/nfp: fix disabling 32-bit build
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c7c2199a6a7b3d9bc605bfee7e578d9b0a647e17 ]

NFP PMD only support compile on 64-bit linux OS, add exit logic in
other conditions.

Fixes: 8741a9074536 ("net/nfp: disable for 32-bit meson builds")

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/nfp/meson.build b/drivers/net/nfp/meson.build
index cf9c16266d..7bf94710f1 100644
--- a/drivers/net/nfp/meson.build
+++ b/drivers/net/nfp/meson.build
@@ -4,6 +4,7 @@
 if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
     build = false
     reason = 'only supported on 64-bit Linux'
+    subdir_done()
 endif
 
 sources = files(
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.819289536 +0800
+++ 0104-net-nfp-fix-disabling-32-bit-build.patch	2024-08-12 20:44:02.395069353 +0800
@@ -1 +1 @@
-From c7c2199a6a7b3d9bc605bfee7e578d9b0a647e17 Mon Sep 17 00:00:00 2001
+From f707532cde7e1c948f24c877acfdbc344b985a4c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c7c2199a6a7b3d9bc605bfee7e578d9b0a647e17 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index d805644ec5..7216c8dff9 100644
+index cf9c16266d..7bf94710f1 100644

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

* patch 'crypto/qat: fix GEN4 write' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (103 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/nfp: fix disabling 32-bit build' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'crypto/ipsec_mb: fix function comment' " Xueming Li
                         ` (52 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Brian Dooley; +Cc: xuemingl, Arkadiusz Kusztal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c6111cb5fd8bc40a1fb3c3eacd46c12793f4f72a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c6111cb5fd8bc40a1fb3c3eacd46c12793f4f72a Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Fri, 12 Jul 2024 15:48:51 +0100
Subject: [PATCH] crypto/qat: fix GEN4 write
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c355c2d8e65f02fa9621249c9b2a111477230c89 ]

All generations of QAT use the same Gen1 raw datapath.
Gen4 needs a different WRITE function than other generations.
Added separation for configuration of raw ctx for Gen4 from
the Gen1 codepath.

Fixes: 85fec6fd9674 ("crypto/qat: unify raw data path functions")

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c | 121 ++++++++++++++++++-
 drivers/crypto/qat/dev/qat_crypto_pmd_gens.h |   6 +
 2 files changed, 123 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
index de72383d4b..b44acece7c 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
@@ -9,6 +9,7 @@
 #include "qat_asym.h"
 #include "qat_crypto.h"
 #include "qat_crypto_pmd_gens.h"
+#include "adf_transport_access_macros_gen4vf.h"
 
 
 static struct rte_cryptodev_capabilities qat_sym_crypto_legacy_caps_gen4[] = {
@@ -233,6 +234,78 @@ qat_sym_build_op_aead_gen4(void *in_op, struct qat_sym_session *ctx,
 	return 0;
 }
 
+int
+qat_sym_dp_enqueue_done_gen4(void *qp_data, uint8_t *drv_ctx, uint32_t n)
+{
+	struct qat_qp *qp = qp_data;
+	struct qat_queue *tx_queue = &qp->tx_q;
+	struct qat_sym_dp_ctx *dp_ctx = (void *)drv_ctx;
+
+	if (unlikely(dp_ctx->cached_enqueue != n))
+		return -1;
+
+	qp->enqueued += n;
+	qp->stats.enqueued_count += n;
+
+	tx_queue->tail = dp_ctx->tail;
+
+	WRITE_CSR_RING_TAIL_GEN4VF(qp->mmap_bar_addr,
+		tx_queue->hw_bundle_number,
+		tx_queue->hw_queue_number, tx_queue->tail);
+
+	tx_queue->csr_tail = tx_queue->tail;
+	dp_ctx->cached_enqueue = 0;
+
+	return 0;
+}
+
+int
+qat_sym_dp_dequeue_done_gen4(void *qp_data, uint8_t *drv_ctx, uint32_t n)
+{
+	struct qat_qp *qp = qp_data;
+	struct qat_queue *rx_queue = &qp->rx_q;
+	struct qat_sym_dp_ctx *dp_ctx = (void *)drv_ctx;
+
+	if (unlikely(dp_ctx->cached_dequeue != n))
+		return -1;
+
+	rx_queue->head = dp_ctx->head;
+	rx_queue->nb_processed_responses += n;
+	qp->dequeued += n;
+	qp->stats.dequeued_count += n;
+	if (rx_queue->nb_processed_responses > QAT_CSR_HEAD_WRITE_THRESH) {
+		uint32_t old_head, new_head;
+		uint32_t max_head;
+
+		old_head = rx_queue->csr_head;
+		new_head = rx_queue->head;
+		max_head = qp->nb_descriptors * rx_queue->msg_size;
+
+		/* write out free descriptors */
+		void *cur_desc = (uint8_t *)rx_queue->base_addr + old_head;
+
+		if (new_head < old_head) {
+			memset(cur_desc, ADF_RING_EMPTY_SIG_BYTE,
+					max_head - old_head);
+			memset(rx_queue->base_addr, ADF_RING_EMPTY_SIG_BYTE,
+					new_head);
+		} else {
+			memset(cur_desc, ADF_RING_EMPTY_SIG_BYTE, new_head -
+					old_head);
+		}
+		rx_queue->nb_processed_responses = 0;
+		rx_queue->csr_head = new_head;
+
+		/* write current head to CSR */
+		WRITE_CSR_RING_HEAD_GEN4VF(qp->mmap_bar_addr,
+			rx_queue->hw_bundle_number, rx_queue->hw_queue_number,
+			new_head);
+	}
+
+	dp_ctx->cached_dequeue = 0;
+	return 0;
+}
+
 static int
 qat_sym_crypto_set_session_gen4(void *cdev, void *session)
 {
@@ -390,11 +463,51 @@ qat_sym_configure_raw_dp_ctx_gen4(void *_raw_dp_ctx, void *_ctx)
 {
 	struct rte_crypto_raw_dp_ctx *raw_dp_ctx = _raw_dp_ctx;
 	struct qat_sym_session *ctx = _ctx;
-	int ret;
 
-	ret = qat_sym_configure_raw_dp_ctx_gen1(_raw_dp_ctx, _ctx);
-	if (ret < 0)
-		return ret;
+	raw_dp_ctx->enqueue_done = qat_sym_dp_enqueue_done_gen4;
+	raw_dp_ctx->dequeue_burst = qat_sym_dp_dequeue_burst_gen1;
+	raw_dp_ctx->dequeue = qat_sym_dp_dequeue_single_gen1;
+	raw_dp_ctx->dequeue_done = qat_sym_dp_dequeue_done_gen4;
+
+	if ((ctx->qat_cmd == ICP_QAT_FW_LA_CMD_HASH_CIPHER ||
+			ctx->qat_cmd == ICP_QAT_FW_LA_CMD_CIPHER_HASH) &&
+			!ctx->is_gmac) {
+		/* AES-GCM or AES-CCM */
+		if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_GALOIS_128 ||
+			ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_GALOIS_64 ||
+			(ctx->qat_cipher_alg == ICP_QAT_HW_CIPHER_ALGO_AES128
+			&& ctx->qat_mode == ICP_QAT_HW_CIPHER_CTR_MODE
+			&& ctx->qat_hash_alg ==
+					ICP_QAT_HW_AUTH_ALGO_AES_CBC_MAC)) {
+			raw_dp_ctx->enqueue_burst =
+					qat_sym_dp_enqueue_aead_jobs_gen1;
+			raw_dp_ctx->enqueue =
+					qat_sym_dp_enqueue_single_aead_gen1;
+		} else {
+			raw_dp_ctx->enqueue_burst =
+					qat_sym_dp_enqueue_chain_jobs_gen1;
+			raw_dp_ctx->enqueue =
+					qat_sym_dp_enqueue_single_chain_gen1;
+		}
+	} else if (ctx->qat_cmd == ICP_QAT_FW_LA_CMD_AUTH || ctx->is_gmac) {
+		raw_dp_ctx->enqueue_burst = qat_sym_dp_enqueue_auth_jobs_gen1;
+		raw_dp_ctx->enqueue = qat_sym_dp_enqueue_single_auth_gen1;
+	} else if (ctx->qat_cmd == ICP_QAT_FW_LA_CMD_CIPHER) {
+		if (ctx->qat_mode == ICP_QAT_HW_CIPHER_AEAD_MODE ||
+			ctx->qat_cipher_alg ==
+				ICP_QAT_HW_CIPHER_ALGO_CHACHA20_POLY1305) {
+			raw_dp_ctx->enqueue_burst =
+					qat_sym_dp_enqueue_aead_jobs_gen1;
+			raw_dp_ctx->enqueue =
+					qat_sym_dp_enqueue_single_aead_gen1;
+		} else {
+			raw_dp_ctx->enqueue_burst =
+					qat_sym_dp_enqueue_cipher_jobs_gen1;
+			raw_dp_ctx->enqueue =
+					qat_sym_dp_enqueue_single_cipher_gen1;
+		}
+	} else
+		return -1;
 
 	if (ctx->is_single_pass && ctx->is_ucs) {
 		raw_dp_ctx->enqueue_burst = qat_sym_dp_enqueue_aead_jobs_gen4;
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 24044bec13..b87253ae02 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -1009,6 +1009,12 @@ qat_sym_dp_enqueue_done_gen1(void *qp_data, uint8_t *drv_ctx, uint32_t n);
 int
 qat_sym_dp_dequeue_done_gen1(void *qp_data, uint8_t *drv_ctx, uint32_t n);
 
+int
+qat_sym_dp_enqueue_done_gen4(void *qp_data, uint8_t *drv_ctx, uint32_t n);
+
+int
+qat_sym_dp_dequeue_done_gen4(void *qp_data, uint8_t *drv_ctx, uint32_t n);
+
 int
 qat_sym_configure_raw_dp_ctx_gen1(void *_raw_dp_ctx, void *_ctx);
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.841211335 +0800
+++ 0105-crypto-qat-fix-GEN4-write.patch	2024-08-12 20:44:02.405069355 +0800
@@ -1 +1 @@
-From c355c2d8e65f02fa9621249c9b2a111477230c89 Mon Sep 17 00:00:00 2001
+From c6111cb5fd8bc40a1fb3c3eacd46c12793f4f72a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c355c2d8e65f02fa9621249c9b2a111477230c89 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 5e808a60bf..6a5d6e78b9 100644
+index de72383d4b..b44acece7c 100644
@@ -109 +111 @@
- int
+ static int
@@ -169 +171 @@
-index 1f5d2583c4..2c5816e696 100644
+index 24044bec13..b87253ae02 100644
@@ -172 +174 @@
-@@ -1040,6 +1040,12 @@ qat_sym_dp_enqueue_done_gen1(void *qp_data, uint8_t *drv_ctx, uint32_t n);
+@@ -1009,6 +1009,12 @@ qat_sym_dp_enqueue_done_gen1(void *qp_data, uint8_t *drv_ctx, uint32_t n);

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

* patch 'crypto/ipsec_mb: fix function comment' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (104 preceding siblings ...)
  2024-08-12 12:49       ` patch 'crypto/qat: fix GEN4 write' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'test/crypto: fix allocation " Xueming Li
                         ` (51 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Joel Kavanagh; +Cc: xuemingl, Brian Dooley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=9fef0db81be92257525c8877db9a13a5aaa31fa1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9fef0db81be92257525c8877db9a13a5aaa31fa1 Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:05 +0000
Subject: [PATCH] crypto/ipsec_mb: fix function comment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2615a7312153fac0bf2507248c28bc6e1b35289e ]

This patch fixes a typo in the log message for error allocation.
The typo incorrectly spelled 'allocating' as 'allocationg' in the
log message for error allocation.

Fixes: f9dfb59edbcc ("crypto/ipsec_mb: support remaining SGL")

Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
 .mailmap                               | 1 +
 drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 38af1e8603..4a92c054fb 100644
--- a/.mailmap
+++ b/.mailmap
@@ -665,6 +665,7 @@ Jin Yu <jin.yu@intel.com>
 Jiri Slaby <jslaby@suse.cz>
 Job Abraham <job.abraham@intel.com>
 Jochen Behrens <jbehrens@vmware.com>
+Joel Kavanagh <joel.kavanagh@intel.com>
 Joey Xing <joey.xing@jaguarmicro.com>
 Johan Faltstrom <johan.faltstrom@netinsight.net>
 Johan Källström <johan.kallstrom@ericsson.com>
diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
index 4de4866cf3..80de25c65b 100644
--- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
@@ -1500,7 +1500,7 @@ aesni_mb_digest_appended_in_src(struct rte_crypto_op *op, IMB_JOB *job,
  *
  * @return
  * - 0 on success, the IMB_JOB will be filled
- * - -1 if invalid session or errors allocationg SGL linear buffer,
+ * - -1 if invalid session or errors allocating SGL linear buffer,
  *   IMB_JOB will not be filled
  */
 static inline int
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.868832932 +0800
+++ 0106-crypto-ipsec_mb-fix-function-comment.patch	2024-08-12 20:44:02.405069355 +0800
@@ -1 +1 @@
-From 2615a7312153fac0bf2507248c28bc6e1b35289e Mon Sep 17 00:00:00 2001
+From 9fef0db81be92257525c8877db9a13a5aaa31fa1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2615a7312153fac0bf2507248c28bc6e1b35289e ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 3f3f0442e5..a6088813cc 100644
+index 38af1e8603..4a92c054fb 100644
@@ -24 +26 @@
-@@ -685,6 +685,7 @@ Jin Yu <jin.yu@intel.com>
+@@ -665,6 +665,7 @@ Jin Yu <jin.yu@intel.com>
@@ -27 +29 @@
- Jochen Behrens <jochen.behrens@broadcom.com> <jbehrens@vmware.com>
+ Jochen Behrens <jbehrens@vmware.com>
@@ -33 +35 @@
-index d74946c180..ef4228bd38 100644
+index 4de4866cf3..80de25c65b 100644
@@ -36 +38 @@
-@@ -1534,7 +1534,7 @@ aesni_mb_digest_appended_in_src(struct rte_crypto_op *op, IMB_JOB *job,
+@@ -1500,7 +1500,7 @@ aesni_mb_digest_appended_in_src(struct rte_crypto_op *op, IMB_JOB *job,

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

* patch 'test/crypto: fix allocation comment' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (105 preceding siblings ...)
  2024-08-12 12:49       ` patch 'crypto/ipsec_mb: fix function comment' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'crypto/qat: fix log message typo' " Xueming Li
                         ` (50 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Joel Kavanagh; +Cc: xuemingl, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5d66d4a3f0bf9fc53d6fd70c7669d47c32cd0afb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5d66d4a3f0bf9fc53d6fd70c7669d47c32cd0afb Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:06 +0000
Subject: [PATCH] test/crypto: fix allocation comment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8020502dde70cabc7f65219d8f8db762b03b0e41 ]

This patch fixes a typo in the `test_cryptodev.c` file where "out-op" was
incorrectly used instead of "out-of-place" on three separate occasions.

Fixes: f3dbf94be60c ("app/test: check SGL on QAT")
Fixes: 43220096d66a ("test/crypto: add PDCP cases for scatter gather")

Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_cryptodev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index c3e4737bf9..6cd38aefae 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -9123,7 +9123,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
 	/* Out of place support */
 	if (oop) {
 		/*
-		 * For out-op-place we need to alloc another mbuf
+		 * For out-of-place we need to alloc another mbuf
 		 */
 		ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
 		rte_pktmbuf_append(ut_params->obuf, output_vec_len);
@@ -9332,7 +9332,7 @@ test_pdcp_proto_SGL(int i, int oop,
 	/* Out of place support */
 	if (oop) {
 		/*
-		 * For out-op-place we need to alloc another mbuf
+		 * For out-of-place we need to alloc another mbuf
 		 */
 		ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
 		rte_pktmbuf_append(ut_params->obuf, frag_size_oop);
@@ -15570,7 +15570,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 	}
 
 	/*
-	 * For out-op-place we need to alloc another mbuf
+	 * For out-of-place we need to alloc another mbuf
 	 */
 	if (oop) {
 		ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.907935029 +0800
+++ 0107-test-crypto-fix-allocation-comment.patch	2024-08-12 20:44:02.425069359 +0800
@@ -1 +1 @@
-From 8020502dde70cabc7f65219d8f8db762b03b0e41 Mon Sep 17 00:00:00 2001
+From 5d66d4a3f0bf9fc53d6fd70c7669d47c32cd0afb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8020502dde70cabc7f65219d8f8db762b03b0e41 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 6042db36a4..c846b26ed1 100644
+index c3e4737bf9..6cd38aefae 100644
@@ -23 +25 @@
-@@ -9428,7 +9428,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
+@@ -9123,7 +9123,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
@@ -32 +34 @@
-@@ -9637,7 +9637,7 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -9332,7 +9332,7 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -41 +43 @@
-@@ -16831,7 +16831,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -15570,7 +15570,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,

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

* patch 'crypto/qat: fix log message typo' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (106 preceding siblings ...)
  2024-08-12 12:49       ` patch 'test/crypto: fix allocation " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'doc: fix typo in l2fwd-crypto guide' " Xueming Li
                         ` (49 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Joel Kavanagh; +Cc: xuemingl, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=0e19bfa703992caf3fbab6d4f6dabbc2b4a03c97

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0e19bfa703992caf3fbab6d4f6dabbc2b4a03c97 Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:07 +0000
Subject: [PATCH] crypto/qat: fix log message typo
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8731420d9ad6087e4b3ebe3c2bfb26ee5c3c8826 ]

This patch fixes a typo in the log message for rte_security support.
The typo incorrectly spelled 'enabled' as 'ensabled' in the
log message indicating that rte_security support is enabled.

Fixes: fb3b9f492205 ("crypto/qat: rework burst data path")

Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/qat/qat_sym.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 4fa539769b..8235fc0a5a 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -265,7 +265,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
 		}
 
 		cryptodev->feature_flags |= RTE_CRYPTODEV_FF_SECURITY;
-		QAT_LOG(INFO, "Device %s rte_security support ensabled", name);
+		QAT_LOG(INFO, "Device %s rte_security support enabled", name);
 	} else {
 		QAT_LOG(INFO, "Device %s rte_security support disabled", name);
 	}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.965554325 +0800
+++ 0108-crypto-qat-fix-log-message-typo.patch	2024-08-12 20:44:02.425069359 +0800
@@ -1 +1 @@
-From 8731420d9ad6087e4b3ebe3c2bfb26ee5c3c8826 Mon Sep 17 00:00:00 2001
+From 0e19bfa703992caf3fbab6d4f6dabbc2b4a03c97 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8731420d9ad6087e4b3ebe3c2bfb26ee5c3c8826 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index b41d1b1def..d979ae6489 100644
+index 4fa539769b..8235fc0a5a 100644
@@ -23 +25 @@
-@@ -291,7 +291,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
+@@ -265,7 +265,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,

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

* patch 'doc: fix typo in l2fwd-crypto guide' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (107 preceding siblings ...)
  2024-08-12 12:49       ` patch 'crypto/qat: fix log message typo' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'test/crypto: remove unused stats in setup' " Xueming Li
                         ` (48 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Joel Kavanagh; +Cc: xuemingl, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=4b0d806babe75b13be3790c8a3908dca39677991

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4b0d806babe75b13be3790c8a3908dca39677991 Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:08 +0000
Subject: [PATCH] doc: fix typo in l2fwd-crypto guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cf0556f4a11c1de87f94ed9ba0c14267cb034217 ]

This patch fixes a typo in the l2fwd-crypto documentation where
the l2fwd-crypt was changed to l2fwd-crypto.

Fixes: 7cacb0565539 ("doc: add generic build instructions for sample apps")

Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 doc/guides/sample_app_ug/l2_forward_crypto.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/sample_app_ug/l2_forward_crypto.rst b/doc/guides/sample_app_ug/l2_forward_crypto.rst
index ce49eab96f..7ff304d05c 100644
--- a/doc/guides/sample_app_ug/l2_forward_crypto.rst
+++ b/doc/guides/sample_app_ug/l2_forward_crypto.rst
@@ -30,7 +30,7 @@ Compiling the Application
 
 To compile the sample application see :doc:`compiling`.
 
-The application is located in the ``l2fwd-crypt`` sub-directory.
+The application is located in the ``l2fwd-crypto`` sub-directory.
 
 Running the Application
 -----------------------
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.006391121 +0800
+++ 0109-doc-fix-typo-in-l2fwd-crypto-guide.patch	2024-08-12 20:44:02.425069359 +0800
@@ -1 +1 @@
-From cf0556f4a11c1de87f94ed9ba0c14267cb034217 Mon Sep 17 00:00:00 2001
+From 4b0d806babe75b13be3790c8a3908dca39677991 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cf0556f4a11c1de87f94ed9ba0c14267cb034217 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'test/crypto: remove unused stats in setup' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (108 preceding siblings ...)
  2024-08-12 12:49       ` patch 'doc: fix typo in l2fwd-crypto guide' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'test/crypto: fix asymmetric capability test' " Xueming Li
                         ` (47 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: xuemingl, Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=adffcf438371d484a588eb0ec188ad9a335aea89

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From adffcf438371d484a588eb0ec188ad9a335aea89 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Mon, 15 Jul 2024 19:06:10 +0530
Subject: [PATCH] test/crypto: remove unused stats in setup
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cda0736804e1803c0c7176fd0d81e42e50b2d010 ]

Remove unused stats in test setup.

Coverity issue: 373869
Fixes: 2c6dab9cd93d ("test/crypto: add RSA and Mod tests")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test_cryptodev_asym.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index fec53f87db..d28f096de1 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -547,8 +547,6 @@ ut_setup_asym(void)
 			qp_id, ts_params->valid_devs[0]);
 	}
 
-	rte_cryptodev_stats_reset(ts_params->valid_devs[0]);
-
 	/* Start the device */
 	TEST_ASSERT_SUCCESS(rte_cryptodev_start(ts_params->valid_devs[0]),
 						"Failed to start cryptodev %u",
@@ -561,7 +559,6 @@ static void
 ut_teardown_asym(void)
 {
 	struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
-	struct rte_cryptodev_stats stats;
 	uint8_t dev_id = ts_params->valid_devs[0];
 
 	if (self->sess != NULL)
@@ -571,8 +568,6 @@ ut_teardown_asym(void)
 	self->op = NULL;
 	self->result_op = NULL;
 
-	rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
-
 	/* Stop the device */
 	rte_cryptodev_stop(ts_params->valid_devs[0]);
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.037957919 +0800
+++ 0110-test-crypto-remove-unused-stats-in-setup.patch	2024-08-12 20:44:02.435069361 +0800
@@ -1 +1 @@
-From cda0736804e1803c0c7176fd0d81e42e50b2d010 Mon Sep 17 00:00:00 2001
+From adffcf438371d484a588eb0ec188ad9a335aea89 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cda0736804e1803c0c7176fd0d81e42e50b2d010 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index ef926c6229..3802cf8022 100644
+index fec53f87db..d28f096de1 100644

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

* patch 'test/crypto: fix asymmetric capability test' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (109 preceding siblings ...)
  2024-08-12 12:49       ` patch 'test/crypto: remove unused stats in setup' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'test/crypto: fix modex comparison' " Xueming Li
                         ` (46 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: xuemingl, Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d308cefc96099397c4d160938201f78180b09dbd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d308cefc96099397c4d160938201f78180b09dbd Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Mon, 15 Jul 2024 19:07:25 +0530
Subject: [PATCH] test/crypto: fix asymmetric capability test
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 624ce7e33a793d8d6a4ac6b0b8e1c6f2bce7feb1 ]

Updated asymmetric capability test for below issues:
 * Skip test if asymmetric crypto feature is not supported by device.
 * Assert return value of RTE function to get asymmetric capability.

Coverity issue: 373365
Fixes: 2c6dab9cd93d ("test/crypto: add RSA and Mod tests")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test_cryptodev_asym.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index d28f096de1..a6bb1e03f3 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -626,7 +626,7 @@ test_capability(void)
 				RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO)) {
 		RTE_LOG(INFO, USER1,
 				"Device doesn't support asymmetric. Test Skipped\n");
-		return TEST_SUCCESS;
+		return TEST_SKIPPED;
 	}
 
 	/* print xform capability */
@@ -641,6 +641,7 @@ test_capability(void)
 			capa = rte_cryptodev_asym_capability_get(dev_id,
 				(const struct
 				rte_cryptodev_asym_capability_idx *) &idx);
+			TEST_ASSERT_NOT_NULL(capa, "Failed to get asymmetric capability");
 			print_asym_capa(capa);
 			}
 	}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.061160017 +0800
+++ 0111-test-crypto-fix-asymmetric-capability-test.patch	2024-08-12 20:44:02.435069361 +0800
@@ -1 +1 @@
-From 624ce7e33a793d8d6a4ac6b0b8e1c6f2bce7feb1 Mon Sep 17 00:00:00 2001
+From d308cefc96099397c4d160938201f78180b09dbd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 624ce7e33a793d8d6a4ac6b0b8e1c6f2bce7feb1 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 3802cf8022..1d88832146 100644
+index d28f096de1..a6bb1e03f3 100644

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

* patch 'test/crypto: fix modex comparison' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (110 preceding siblings ...)
  2024-08-12 12:49       ` patch 'test/crypto: fix asymmetric capability test' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'crypto/qat: fix placement of OOP offset' " Xueming Li
                         ` (45 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: xuemingl, Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b2acb5218f3a79b0fd68593c08ceb308c199e94b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b2acb5218f3a79b0fd68593c08ceb308c199e94b Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Mon, 15 Jul 2024 19:08:33 +0530
Subject: [PATCH] test/crypto: fix modex comparison
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cc42abd111e09672edb51e786baa7e49263c5c0a ]

Fix comparison function used by modex test to check from
first non-zero value itself.

Coverity issue: 430125
Fixes: 2162d32c1c3b ("test/crypto: validate modex from first non-zero")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test_cryptodev_asym.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index a6bb1e03f3..3b57a0249b 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -3197,21 +3197,26 @@ static int send_one(void)
 }
 
 static int
-modular_cmpeq(const uint8_t *a, const uint8_t *b, size_t len)
+modular_cmpeq(const uint8_t *a, size_t a_len, const uint8_t *b, size_t b_len)
 {
-	const uint8_t *new_a = a, *new_b = b;
+	const uint8_t *new_a, *new_b;
 	size_t i, j;
 
 	/* Strip leading NUL bytes */
-	for (i = 0; i < len; i++)
+	for (i = 0; i < a_len; i++)
 		if (a[i] != 0)
-			new_a = &a[i];
+			break;
 
-	for (j = 0; j < len; j++)
+	for (j = 0; j < b_len; j++)
 		if (b[j] != 0)
-			new_b = &b[i];
+			break;
+
+	if (a_len - i != b_len - j)
+		return 1;
 
-	if (i != j || memcmp(new_a, new_b, len - i))
+	new_a = &a[i];
+	new_b = &b[j];
+	if (memcmp(new_a, new_b, a_len - i))
 		return 1;
 
 	return 0;
@@ -3251,7 +3256,7 @@ modular_exponentiation(const void *test_data)
 
 	TEST_ASSERT_SUCCESS(send_one(),
 		"Failed to process crypto op");
-	TEST_ASSERT_SUCCESS(modular_cmpeq(vector->reminder.data,
+	TEST_ASSERT_SUCCESS(modular_cmpeq(vector->reminder.data, vector->reminder.len,
 			self->result_op->asym->modex.result.data,
 			self->result_op->asym->modex.result.length),
 			"operation verification failed\n");
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.086771915 +0800
+++ 0112-test-crypto-fix-modex-comparison.patch	2024-08-12 20:44:02.445069363 +0800
@@ -1 +1 @@
-From cc42abd111e09672edb51e786baa7e49263c5c0a Mon Sep 17 00:00:00 2001
+From b2acb5218f3a79b0fd68593c08ceb308c199e94b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cc42abd111e09672edb51e786baa7e49263c5c0a ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 1d88832146..f0b5d38543 100644
+index a6bb1e03f3..3b57a0249b 100644

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

* patch 'crypto/qat: fix placement of OOP offset' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (111 preceding siblings ...)
  2024-08-12 12:49       ` patch 'test/crypto: fix modex comparison' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'common/cnxk: fix integer overflow' " Xueming Li
                         ` (44 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Arkadiusz Kusztal; +Cc: xuemingl, Brian Dooley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a408bd0bcb3a3f3cdb83e1d1d08d16f184f59150

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a408bd0bcb3a3f3cdb83e1d1d08d16f184f59150 Mon Sep 17 00:00:00 2001
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thu, 4 Jul 2024 11:26:49 +0100
Subject: [PATCH] crypto/qat: fix placement of OOP offset
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9f0a50dd2bc4acec586616bf5553de4711451991 ]

This patch fixes incorrect placement of OOP offset.
Data preceding crypto operation is not copied to the output
buffer, which is conformant to the API.

Fixes: a815a04cea05 ("crypto/qat: support symmetric build op request")

Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
 drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index b87253ae02..64e892d022 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -394,7 +394,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
 		struct qat_sym_op_cookie *cookie)
 {
 	union rte_crypto_sym_ofs ofs;
-	uint32_t max_len = 0;
+	uint32_t max_len = 0, oop_offset = 0;
 	uint32_t cipher_len = 0, cipher_ofs = 0;
 	uint32_t auth_len = 0, auth_ofs = 0;
 	int is_oop = (op->sym->m_dst != NULL) &&
@@ -468,6 +468,16 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
 
 	max_len = RTE_MAX(cipher_ofs + cipher_len, auth_ofs + auth_len);
 
+	/* If OOP, we need to keep in mind that offset needs to start where
+	 * cipher/auth starts, namely no offset on the smaller one
+	 */
+	if (is_oop) {
+		oop_offset = RTE_MIN(auth_ofs, cipher_ofs);
+		auth_ofs -= oop_offset;
+		cipher_ofs -= oop_offset;
+		max_len -= oop_offset;
+	}
+
 	/* digest in buffer check. Needed only for wireless algos
 	 * or combined cipher-crc operations
 	 */
@@ -508,9 +518,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
 			max_len = RTE_MAX(max_len, auth_ofs + auth_len +
 					ctx->digest_length);
 	}
-
-	/* Passing 0 as cipher & auth offsets are assigned into ofs later */
-	n_src = rte_crypto_mbuf_to_vec(op->sym->m_src, 0, max_len,
+	n_src = rte_crypto_mbuf_to_vec(op->sym->m_src, oop_offset, max_len,
 			in_sgl->vec, QAT_SYM_SGL_MAX_NUMBER);
 	if (unlikely(n_src < 0 || n_src > op->sym->m_src->nb_segs)) {
 		op->status = RTE_CRYPTO_OP_STATUS_ERROR;
@@ -520,7 +528,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
 
 	if (unlikely((op->sym->m_dst != NULL) &&
 			(op->sym->m_dst != op->sym->m_src))) {
-		int n_dst = rte_crypto_mbuf_to_vec(op->sym->m_dst, 0,
+		int n_dst = rte_crypto_mbuf_to_vec(op->sym->m_dst, oop_offset,
 				max_len, out_sgl->vec, QAT_SYM_SGL_MAX_NUMBER);
 
 		if (n_dst < 0 || n_dst > op->sym->m_dst->nb_segs) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.110492913 +0800
+++ 0113-crypto-qat-fix-placement-of-OOP-offset.patch	2024-08-12 20:44:02.445069363 +0800
@@ -1 +1 @@
-From 9f0a50dd2bc4acec586616bf5553de4711451991 Mon Sep 17 00:00:00 2001
+From a408bd0bcb3a3f3cdb83e1d1d08d16f184f59150 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9f0a50dd2bc4acec586616bf5553de4711451991 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 2c5816e696..35c1888082 100644
+index b87253ae02..64e892d022 100644
@@ -23 +25 @@
-@@ -399,7 +399,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -394,7 +394,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -32 +34 @@
-@@ -473,6 +473,16 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -468,6 +468,16 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -49 +51 @@
-@@ -513,9 +523,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -508,9 +518,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -60 +62 @@
-@@ -525,7 +533,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -520,7 +528,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,

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

* patch 'common/cnxk: fix integer overflow' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (112 preceding siblings ...)
  2024-08-12 12:49       ` patch 'crypto/qat: fix placement of OOP offset' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/ice: fix memory leaks in raw pattern parsing' " Xueming Li
                         ` (43 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8f23521ad7ee5964b12554bf6f622e234fb73249

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8f23521ad7ee5964b12554bf6f622e234fb73249 Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Thu, 18 Jul 2024 12:04:37 +0530
Subject: [PATCH] common/cnxk: fix integer overflow
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 118ba4e3f2a39e6fc10075c680310f4cdabc1bd7 ]

The expression flow_age->aging_poll_freq * NPC_AGE_WAIT_TIMEOUT_US is
evaluated using 32 bit arithmetic. An integer overflow may occur when
the value is too large to fit in 32 bits. This patch resolves this by
casting flow_age->aging_poll_freq to 64 bit.

Coverity issue: 428156
Fixes: a4878294318e ("common/cnxk: fix flow aging on application exit")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
---
 drivers/common/cnxk/roc_npc_aging.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_npc_aging.c b/drivers/common/cnxk/roc_npc_aging.c
index 1e85033e2a..258c15e341 100644
--- a/drivers/common/cnxk/roc_npc_aging.c
+++ b/drivers/common/cnxk/roc_npc_aging.c
@@ -145,7 +145,7 @@ npc_age_wait_until(struct roc_npc_flow_age *flow_age)
 		plt_delay_us(sleep);
 		timeout += sleep;
 	} while (!flow_age->aged_flows_get_thread_exit &&
-		 (timeout < (flow_age->aging_poll_freq * NPC_AGE_WAIT_TIMEOUT_US)));
+		 (timeout < ((uint64_t)flow_age->aging_poll_freq * NPC_AGE_WAIT_TIMEOUT_US)));
 }
 
 uint32_t
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.135061611 +0800
+++ 0114-common-cnxk-fix-integer-overflow.patch	2024-08-12 20:44:02.445069363 +0800
@@ -1 +1 @@
-From 118ba4e3f2a39e6fc10075c680310f4cdabc1bd7 Mon Sep 17 00:00:00 2001
+From 8f23521ad7ee5964b12554bf6f622e234fb73249 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 118ba4e3f2a39e6fc10075c680310f4cdabc1bd7 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice: fix memory leaks in raw pattern parsing' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (113 preceding siblings ...)
  2024-08-12 12:49       ` patch 'common/cnxk: fix integer overflow' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/ice: fix return value for " Xueming Li
                         ` (42 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Vladimir Medvedkin
  Cc: xuemingl, Michael Theodore Stolarchuk, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=17e800edd19dc5cb00acf53ffd8baef713954c9c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 17e800edd19dc5cb00acf53ffd8baef713954c9c Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 22 Jul 2024 13:50:44 +0000
Subject: [PATCH] net/ice: fix memory leaks in raw pattern parsing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8044e1d19db3d0012bd1348cb4fcf542d31cd41a ]

This patch fixes possible memory leaks inside the
ice_hash_parse_raw_pattern() due to the lack of a call to rte_free() for
previously allocated pkt_buf and msk_buf.

Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading in RSS")

Reported-by: Michael Theodore Stolarchuk <mike.stolarchuk@arista.com>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 .mailmap                   |  1 +
 drivers/net/ice/ice_hash.c | 22 ++++++++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/.mailmap b/.mailmap
index 4a92c054fb..bea129355d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -953,6 +953,7 @@ Michael Santana <maicolgabriel@hotmail.com> <msantana@redhat.com>
 Michael Savisko <michaelsav@nvidia.com>
 Michael Shamis <michaelsh@marvell.com>
 Michael S. Tsirkin <mst@redhat.com>
+Michael Theodore Stolarchuk <mike.stolarchuk@arista.com>
 Michael Wildt <michael.wildt@broadcom.com>
 Michal Berger <michallinuxstuff@gmail.com>
 Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index f923641533..6b3095e2c5 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -650,7 +650,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
 	uint8_t *pkt_buf, *msk_buf;
 	uint8_t tmp_val = 0;
 	uint8_t tmp_c = 0;
-	int i, j;
+	int i, j, ret = 0;
 
 	if (ad->psr == NULL)
 		return -rte_errno;
@@ -670,8 +670,10 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
 		return -ENOMEM;
 
 	msk_buf = rte_zmalloc(NULL, pkt_len, 0);
-	if (!msk_buf)
+	if (!msk_buf) {
+		rte_free(pkt_buf);
 		return -ENOMEM;
+	}
 
 	/* convert string to int array */
 	for (i = 0, j = 0; i < spec_len; i += 2, j++) {
@@ -708,18 +710,22 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
 			msk_buf[j] = tmp_val * 16 + tmp_c - '0';
 	}
 
-	if (ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt))
-		return -rte_errno;
+	ret = ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt);
+	if (ret)
+		goto free_mem;
 
-	if (ice_parser_profile_init(&rslt, pkt_buf, msk_buf,
-		pkt_len, ICE_BLK_RSS, true, &prof))
-		return -rte_errno;
+	ret = ice_parser_profile_init(&rslt, pkt_buf, msk_buf,
+			pkt_len, ICE_BLK_RSS, true, &prof);
+	if (ret)
+		goto free_mem;
 
 	rte_memcpy(&meta->raw.prof, &prof, sizeof(prof));
 
+free_mem:
 	rte_free(pkt_buf);
 	rte_free(msk_buf);
-	return 0;
+
+	return ret;
 }
 
 static void
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.156823909 +0800
+++ 0115-net-ice-fix-memory-leaks-in-raw-pattern-parsing.patch	2024-08-12 20:44:02.445069363 +0800
@@ -1 +1 @@
-From 8044e1d19db3d0012bd1348cb4fcf542d31cd41a Mon Sep 17 00:00:00 2001
+From 17e800edd19dc5cb00acf53ffd8baef713954c9c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8044e1d19db3d0012bd1348cb4fcf542d31cd41a ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index a6088813cc..541ca895a4 100644
+index 4a92c054fb..bea129355d 100644
@@ -25 +27 @@
-@@ -978,6 +978,7 @@ Michael Santana <maicolgabriel@hotmail.com> <msantana@redhat.com>
+@@ -953,6 +953,7 @@ Michael Santana <maicolgabriel@hotmail.com> <msantana@redhat.com>

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

* patch 'net/ice: fix return value for raw pattern parsing' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (114 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/ice: fix memory leaks in raw pattern parsing' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/mlx5: fix shared Rx queue data access race' " Xueming Li
                         ` (41 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: xuemingl, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=15e2b0e7368cbbfeab1d8edb96add5de41bf9d72

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 15e2b0e7368cbbfeab1d8edb96add5de41bf9d72 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 22 Jul 2024 13:50:46 +0000
Subject: [PATCH] net/ice: fix return value for raw pattern parsing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4fe08bab4bc71f1c04854f764bae98927c2b6fe1 ]

If the parser was not initialized when calling ice_hash_parse_raw_pattern()
-rte_errno was returned. Replace returning rte_errno with ENOTSUP since
rte_errno is meaningless in the context of ice_hash_parse_raw_pattern().

Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading in RSS")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/ice_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 6b3095e2c5..d8c46347d2 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -653,7 +653,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
 	int i, j, ret = 0;
 
 	if (ad->psr == NULL)
-		return -rte_errno;
+		return -ENOTSUP;
 
 	raw_spec = item->spec;
 	raw_mask = item->mask;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.182171307 +0800
+++ 0116-net-ice-fix-return-value-for-raw-pattern-parsing.patch	2024-08-12 20:44:02.455069365 +0800
@@ -1 +1 @@
-From 4fe08bab4bc71f1c04854f764bae98927c2b6fe1 Mon Sep 17 00:00:00 2001
+From 15e2b0e7368cbbfeab1d8edb96add5de41bf9d72 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4fe08bab4bc71f1c04854f764bae98927c2b6fe1 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index aa76718313..b720e0f755 100644
+index 6b3095e2c5..d8c46347d2 100644

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

* patch 'net/mlx5: fix shared Rx queue data access race' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (115 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/ice: fix return value for " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/mlx5: fix Arm build with GCC 9.1' " Xueming Li
                         ` (40 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: xuemingl, Bing Zhao, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a8331ab8b2e9d930af3dfc94d723f8deaad22be9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a8331ab8b2e9d930af3dfc94d723f8deaad22be9 Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Fri, 5 Jul 2024 16:05:46 +0300
Subject: [PATCH] net/mlx5: fix shared Rx queue data access race
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2d8763432add2efd8b10b7718d41181a2633c733 ]

The rxq_data resources were shared for shared Rx queue with the same
group and queue ID.
The cq_ci:24 of rxq_data was unalignment with other fields in the one
32-bit data, like the dynf_meta and delay_drop.

  32bit:  xxxx xxxI IIII IIII IIII IIII IIII IIIx
                  ^ .... .... .... .... ...^
                  |          cq_ci         |

The issue is that while the control thread updates the dynf_meta:1 or
delay_drop:1 value during port start, another data thread updates the
cq_ci at the same time, it causes the bytes race condition with
different thread, and cq_ci value may be overwritten and updated the
abnormal value into HW CQ DB.

This patch separates the cq_ci from the configuration data spaces, and
adds checking for delay_drop and dynf_meta if shared Rx queue if
started.

Fixes: 02a6195cbeaa ("net/mlx5: support enhanced CQE compression in Rx burst")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_devx.c |  3 ++-
 drivers/net/mlx5/mlx5_flow.c | 24 +++++++++++++-----------
 drivers/net/mlx5/mlx5_rx.h   |  4 ++--
 3 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index 9fa400fc48..4f08ddf899 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -592,7 +592,8 @@ mlx5_rxq_devx_obj_new(struct mlx5_rxq_priv *rxq)
 		DRV_LOG(ERR, "Failed to create CQ.");
 		goto error;
 	}
-	rxq_data->delay_drop = priv->config.std_delay_drop;
+	if (!rxq_data->shared || !rxq_ctrl->started)
+		rxq_data->delay_drop = priv->config.std_delay_drop;
 	/* Create RQ using DevX API. */
 	ret = mlx5_rxq_create_devx_rq_resources(rxq);
 	if (ret) {
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 85b9ae3901..fdc7c3ea54 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1953,18 +1953,20 @@ mlx5_flow_rxq_dynf_set(struct rte_eth_dev *dev)
 		if (rxq == NULL || rxq->ctrl == NULL)
 			continue;
 		data = &rxq->ctrl->rxq;
-		if (!rte_flow_dynf_metadata_avail()) {
-			data->dynf_meta = 0;
-			data->flow_meta_mask = 0;
-			data->flow_meta_offset = -1;
-			data->flow_meta_port_mask = 0;
-		} else {
-			data->dynf_meta = 1;
-			data->flow_meta_mask = rte_flow_dynf_metadata_mask;
-			data->flow_meta_offset = rte_flow_dynf_metadata_offs;
-			data->flow_meta_port_mask = priv->sh->dv_meta_mask;
+		if (!data->shared || !rxq->ctrl->started) {
+			if (!rte_flow_dynf_metadata_avail()) {
+				data->dynf_meta = 0;
+				data->flow_meta_mask = 0;
+				data->flow_meta_offset = -1;
+				data->flow_meta_port_mask = 0;
+			} else {
+				data->dynf_meta = 1;
+				data->flow_meta_mask = rte_flow_dynf_metadata_mask;
+				data->flow_meta_offset = rte_flow_dynf_metadata_offs;
+				data->flow_meta_port_mask = priv->sh->dv_meta_mask;
+			}
+			data->mark_flag = mark_flag;
 		}
-		data->mark_flag = mark_flag;
 	}
 }
 
diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
index 2fce908499..d0ceae72ea 100644
--- a/drivers/net/mlx5/mlx5_rx.h
+++ b/drivers/net/mlx5/mlx5_rx.h
@@ -101,14 +101,14 @@ struct mlx5_rxq_data {
 	unsigned int shared:1; /* Shared RXQ. */
 	unsigned int delay_drop:1; /* Enable delay drop. */
 	unsigned int cqe_comp_layout:1; /* CQE Compression Layout*/
-	unsigned int cq_ci:24;
+	uint16_t port_id;
 	volatile uint32_t *rq_db;
 	volatile uint32_t *cq_db;
-	uint16_t port_id;
 	uint32_t elts_ci;
 	uint32_t rq_ci;
 	uint16_t consumed_strd; /* Number of consumed strides in WQE. */
 	uint32_t rq_pi;
+	uint32_t cq_ci:24;
 	uint16_t rq_repl_thresh; /* Threshold for buffer replenishment. */
 	uint32_t byte_mask;
 	union {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.209327705 +0800
+++ 0117-net-mlx5-fix-shared-Rx-queue-data-access-race.patch	2024-08-12 20:44:02.465069367 +0800
@@ -1 +1 @@
-From 2d8763432add2efd8b10b7718d41181a2633c733 Mon Sep 17 00:00:00 2001
+From a8331ab8b2e9d930af3dfc94d723f8deaad22be9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2d8763432add2efd8b10b7718d41181a2633c733 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -38 +40 @@
-index 7db271acb4..8ebe784000 100644
+index 9fa400fc48..4f08ddf899 100644
@@ -41 +43 @@
-@@ -684,7 +684,8 @@ mlx5_rxq_devx_obj_new(struct mlx5_rxq_priv *rxq)
+@@ -592,7 +592,8 @@ mlx5_rxq_devx_obj_new(struct mlx5_rxq_priv *rxq)
@@ -52 +54 @@
-index 5b3f2b9119..72fb3a55ba 100644
+index 85b9ae3901..fdc7c3ea54 100644
@@ -55 +57 @@
-@@ -1853,18 +1853,20 @@ mlx5_flow_rxq_dynf_set(struct rte_eth_dev *dev)
+@@ -1953,18 +1953,20 @@ mlx5_flow_rxq_dynf_set(struct rte_eth_dev *dev)
@@ -88 +90 @@
-index 1485556d89..7d144921ab 100644
+index 2fce908499..d0ceae72ea 100644
@@ -91 +93 @@
-@@ -101,14 +101,14 @@ struct __rte_cache_aligned mlx5_rxq_data {
+@@ -101,14 +101,14 @@ struct mlx5_rxq_data {

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

* patch 'net/mlx5: fix Arm build with GCC 9.1' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (116 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/mlx5: fix shared Rx queue data access race' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/mlx5: fix MTU configuration' " Xueming Li
                         ` (39 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: xuemingl, Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c1792007ffae7fb76ed201ef03126e31d829e38f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c1792007ffae7fb76ed201ef03126e31d829e38f Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 7 Jul 2024 12:57:23 +0300
Subject: [PATCH] net/mlx5: fix Arm build with GCC 9.1
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 42d6a9084f55281a70bece647803cddbeb8aaec8 ]

GCC has introduced a bugfix in 9.1 that changed GCC ABI in ARM setups
https://gcc.gnu.org/gcc-9/changes.html
```
On Arm targets (arm*-*-*), a bug in the implementation of the
procedure call standard (AAPCS) in the GCC 6, 7 and 8 releases
has been fixed a structure containing a bit-field based on a 64-bit
integral type and where no other element in a structure required
64-bit alignment could be passed incorrectly to functions.
This is an ABI change. If the option -Wpsabi is enabled
(on by default) the compiler will emit a diagnostic note for code
that might be affected.
```

This fixes the PMD compilation in the INTEGRITY flow item.

Fixes: 23b0a8b298b1 ("net/mlx5: fix integrity item validation and translation")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index d7eba9a71f..863737ceba 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7075,11 +7075,13 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
 }
 
 static int
-validate_integrity_bits(const struct rte_flow_item_integrity *mask,
+validate_integrity_bits(const void *arg,
 			int64_t pattern_flags, uint64_t l3_flags,
 			uint64_t l4_flags, uint64_t ip4_flag,
 			struct rte_flow_error *error)
 {
+	const struct rte_flow_item_integrity *mask = arg;
+
 	if (mask->l3_ok && !(pattern_flags & l3_flags))
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ITEM,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.242745703 +0800
+++ 0118-net-mlx5-fix-Arm-build-with-GCC-9.1.patch	2024-08-12 20:44:02.485069371 +0800
@@ -1 +1 @@
-From 42d6a9084f55281a70bece647803cddbeb8aaec8 Mon Sep 17 00:00:00 2001
+From c1792007ffae7fb76ed201ef03126e31d829e38f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 42d6a9084f55281a70bece647803cddbeb8aaec8 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index 8a0d58cb05..89057edbcf 100644
+index d7eba9a71f..863737ceba 100644
@@ -34 +36 @@
-@@ -7396,11 +7396,13 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
+@@ -7075,11 +7075,13 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,

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

* patch 'net/mlx5: fix MTU configuration' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (117 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/mlx5: fix Arm build with GCC 9.1' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/mlx5/hws: fix memory leak in modify header' " Xueming Li
                         ` (38 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: xuemingl, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=85eeb293b366ead7bfd7e7349bb16e710ce4c224

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 85eeb293b366ead7bfd7e7349bb16e710ce4c224 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Mon, 8 Jul 2024 12:59:31 +0200
Subject: [PATCH] net/mlx5: fix MTU configuration
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 10859ecf09c424c0f6a89379f0326a0c51f9cd2f ]

Apply provided MTU, derived from rte_eth_conf.rxmode.mtu,
on port configuration.

Bugzilla ID: 1483
Fixes: e60fbd5b24fc ("mlx5: add device configure/start/stop")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index ab30e2c215..ec4bdd8af1 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -146,6 +146,12 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
 	ret = mlx5_proc_priv_init(dev);
 	if (ret)
 		return ret;
+	ret = mlx5_dev_set_mtu(dev, dev->data->mtu);
+	if (ret) {
+		DRV_LOG(ERR, "port %u failed to set MTU to %u", dev->data->port_id,
+			dev->data->mtu);
+		return ret;
+	}
 	return 0;
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.279830100 +0800
+++ 0119-net-mlx5-fix-MTU-configuration.patch	2024-08-12 20:44:02.485069371 +0800
@@ -1 +1 @@
-From 10859ecf09c424c0f6a89379f0326a0c51f9cd2f Mon Sep 17 00:00:00 2001
+From 85eeb293b366ead7bfd7e7349bb16e710ce4c224 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 10859ecf09c424c0f6a89379f0326a0c51f9cd2f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 1b721cda5e..6a678d6dcc 100644
+index ab30e2c215..ec4bdd8af1 100644
@@ -23 +25 @@
-@@ -154,6 +154,12 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
+@@ -146,6 +146,12 @@ mlx5_dev_configure(struct rte_eth_dev *dev)

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

* patch 'net/mlx5/hws: fix memory leak in modify header' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (118 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/mlx5: fix MTU configuration' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/mlx5/hws: fix check of range templates' " Xueming Li
                         ` (37 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Erez Shitrit; +Cc: xuemingl, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3c9aff8fbf6d58dd55c365b351e1367c4681d489

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3c9aff8fbf6d58dd55c365b351e1367c4681d489 Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Tue, 9 Jul 2024 15:30:57 +0300
Subject: [PATCH] net/mlx5/hws: fix memory leak in modify header
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3d22ef2dc1c830c5bc29a974b8a1cc67b1f6c1a4 ]

When creating action from type MLX5DR_ACTION_TYP_REFORMAT_TNL_L3_TO_L2
we use modify-header object, we support few of that type at the same
time over this action depends on the number of headers.
Now when destroying the modify-header object we run over the
number_of_patterns, this variable was not set in the creation of that
action.

Fixes: 3a6c50215c07 ("net/mlx5/hws: support multi-pattern")

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_action.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index d21bca294c..7a0d1b49c6 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -1491,6 +1491,7 @@ mlx5dr_action_handle_tunnel_l3_to_l2(struct mlx5dr_action *action,
 
 		action[i].modify_header.max_num_of_actions = num_of_actions;
 		action[i].modify_header.num_of_actions = num_of_actions;
+		action[i].modify_header.num_of_patterns = num_of_hdrs;
 		action[i].modify_header.arg_obj = arg_obj;
 		action[i].modify_header.pat_obj = pat_obj;
 		action[i].modify_header.require_reparse =
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.307806397 +0800
+++ 0120-net-mlx5-hws-fix-memory-leak-in-modify-header.patch	2024-08-12 20:44:02.485069371 +0800
@@ -1 +1 @@
-From 3d22ef2dc1c830c5bc29a974b8a1cc67b1f6c1a4 Mon Sep 17 00:00:00 2001
+From 3c9aff8fbf6d58dd55c365b351e1367c4681d489 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3d22ef2dc1c830c5bc29a974b8a1cc67b1f6c1a4 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 03c3683f71..b90f18df8a 100644
+index d21bca294c..7a0d1b49c6 100644
@@ -26 +28 @@
-@@ -1820,6 +1820,7 @@ mlx5dr_action_handle_tunnel_l3_to_l2(struct mlx5dr_action *action,
+@@ -1491,6 +1491,7 @@ mlx5dr_action_handle_tunnel_l3_to_l2(struct mlx5dr_action *action,

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

* patch 'net/mlx5/hws: fix check of range templates' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (119 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/mlx5/hws: fix memory leak in modify header' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:49       ` patch 'net/mlx5/hws: fix deletion of action vport' " Xueming Li
                         ` (36 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Itamar Gozlan; +Cc: xuemingl, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=dcd02c715e00c5d2609a90248aff83980e1f2178

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dcd02c715e00c5d2609a90248aff83980e1f2178 Mon Sep 17 00:00:00 2001
From: Itamar Gozlan <igozlan@nvidia.com>
Date: Tue, 9 Jul 2024 15:30:58 +0300
Subject: [PATCH] net/mlx5/hws: fix check of range templates
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2cb66e444aa9066f697e157c51525126479b6dde ]

Using range and non range templates is not allowed, and in HWS there is a
check that enforce that limitation with constantly check that, in a loop,
if the current template defined as range, the last one
should also be defined as range.
But, in the case where there are two templates in the following order:
(1) template with range, and (2) template without range.
The existing checks will not cover this case.
This commit fixes that hole by maintain the invariant that if a template
without a range exist, all the previous match template are also.

Fixes: 9732ffe13bd6 ("net/mlx5/hws: add range definer creation")

Signed-off-by: Itamar Gozlan <igozlan@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index 003b50623c..031e87bc0c 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -3206,15 +3206,18 @@ mlx5dr_definer_matcher_range_init(struct mlx5dr_context *ctx,
 
 	/* Create optional range definers */
 	for (i = 0; i < matcher->num_of_mt; i++) {
-		if (!mt[i].fcr_sz)
-			continue;
-
 		/* All must use range if requested */
-		if (i && !mt[i - 1].range_definer) {
+		bool is_range = !!mt[i].fcr_sz;
+		bool has_range = matcher->flags & MLX5DR_MATCHER_FLAGS_RANGE_DEFINER;
+
+		if (i && ((is_range && !has_range) || (!is_range && has_range))) {
 			DR_LOG(ERR, "Using range and non range templates is not allowed");
 			goto free_definers;
 		}
 
+		if (!mt[i].fcr_sz)
+			continue;
+
 		matcher->flags |= MLX5DR_MATCHER_FLAGS_RANGE_DEFINER;
 		/* Create definer without fcr binding, already binded */
 		mt[i].range_definer = mlx5dr_definer_alloc(ctx,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.333529595 +0800
+++ 0121-net-mlx5-hws-fix-check-of-range-templates.patch	2024-08-12 20:44:02.495069373 +0800
@@ -1 +1 @@
-From 2cb66e444aa9066f697e157c51525126479b6dde Mon Sep 17 00:00:00 2001
+From dcd02c715e00c5d2609a90248aff83980e1f2178 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2cb66e444aa9066f697e157c51525126479b6dde ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 9ebda9267d..51a3f7be4b 100644
+index 003b50623c..031e87bc0c 100644
@@ -29 +31 @@
-@@ -4041,15 +4041,18 @@ mlx5dr_definer_matcher_range_init(struct mlx5dr_context *ctx,
+@@ -3206,15 +3206,18 @@ mlx5dr_definer_matcher_range_init(struct mlx5dr_context *ctx,

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

* patch 'net/mlx5/hws: fix deletion of action vport' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (120 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/mlx5/hws: fix check of range templates' " Xueming Li
@ 2024-08-12 12:49       ` Xueming Li
  2024-08-12 12:50       ` patch 'net/mlx5/hws: fix port ID on root item convert' " Xueming Li
                         ` (35 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:49 UTC (permalink / raw)
  To: Erez Shitrit; +Cc: xuemingl, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=4a80ab31f019d43a79dacd0caf312fb3355b1a78

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4a80ab31f019d43a79dacd0caf312fb3355b1a78 Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Tue, 9 Jul 2024 15:30:59 +0300
Subject: [PATCH] net/mlx5/hws: fix deletion of action vport
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 29cd96c98dd999756f43715c7f3e85c44044b115 ]

No more ignoring this action while destroying it.

Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object")

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_action.c | 4 ++++
 drivers/net/mlx5/hws/mlx5dr_cmd.c    | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index 7a0d1b49c6..a068f100c5 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -2550,6 +2550,7 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
 	case MLX5DR_ACTION_TYP_ASO_CT:
 	case MLX5DR_ACTION_TYP_PUSH_VLAN:
 	case MLX5DR_ACTION_TYP_REMOVE_HEADER:
+	case MLX5DR_ACTION_TYP_VPORT:
 		mlx5dr_action_destroy_stcs(action);
 		break;
 	case MLX5DR_ACTION_TYP_DEST_ROOT:
@@ -2603,6 +2604,9 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
 			if (action->ipv6_route_ext.action[i])
 				mlx5dr_action_destroy(action->ipv6_route_ext.action[i]);
 		break;
+	default:
+		DR_LOG(ERR, "Not supported action type: %d", action->type);
+		assert(false);
 	}
 }
 
diff --git a/drivers/net/mlx5/hws/mlx5dr_cmd.c b/drivers/net/mlx5/hws/mlx5dr_cmd.c
index 876a47147d..0fb764df32 100644
--- a/drivers/net/mlx5/hws/mlx5dr_cmd.c
+++ b/drivers/net/mlx5/hws/mlx5dr_cmd.c
@@ -1027,7 +1027,8 @@ int mlx5dr_cmd_generate_wqe(struct ibv_context *ctx,
 
 	ret = mlx5_glue->devx_general_cmd(ctx, in, sizeof(in), out, sizeof(out));
 	if (ret) {
-		DR_LOG(ERR, "Failed to write GTA WQE using FW");
+		DR_LOG(ERR, "Failed to write GTA WQE using FW (syndrome: %#x)",
+		       mlx5dr_cmd_get_syndrome(out));
 		rte_errno = errno;
 		return rte_errno;
 	}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.362531193 +0800
+++ 0122-net-mlx5-hws-fix-deletion-of-action-vport.patch	2024-08-12 20:44:02.495069373 +0800
@@ -1 +1 @@
-From 29cd96c98dd999756f43715c7f3e85c44044b115 Mon Sep 17 00:00:00 2001
+From 4a80ab31f019d43a79dacd0caf312fb3355b1a78 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 29cd96c98dd999756f43715c7f3e85c44044b115 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index b90f18df8a..0d90280a7d 100644
+index 7a0d1b49c6..a068f100c5 100644
@@ -22 +24 @@
-@@ -2968,6 +2968,7 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
+@@ -2550,6 +2550,7 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
@@ -30,3 +32,3 @@
-@@ -3027,6 +3028,9 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
- 		break;
- 	case MLX5DR_ACTION_TYP_LAST:
+@@ -2603,6 +2604,9 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
+ 			if (action->ipv6_route_ext.action[i])
+ 				mlx5dr_action_destroy(action->ipv6_route_ext.action[i]);
@@ -41 +43 @@
-index 72fc9e3d91..a4f778a8a4 100644
+index 876a47147d..0fb764df32 100644
@@ -44 +46 @@
-@@ -1033,7 +1033,8 @@ int mlx5dr_cmd_generate_wqe(struct ibv_context *ctx,
+@@ -1027,7 +1027,8 @@ int mlx5dr_cmd_generate_wqe(struct ibv_context *ctx,

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

* patch 'net/mlx5/hws: fix port ID on root item convert' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (121 preceding siblings ...)
  2024-08-12 12:49       ` patch 'net/mlx5/hws: fix deletion of action vport' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'net/mlx5/hws: remove unused variable' " Xueming Li
                         ` (34 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Alex Vesker; +Cc: xuemingl, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=1163643a1e9398959a022020af4654f883e3a55c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1163643a1e9398959a022020af4654f883e3a55c Mon Sep 17 00:00:00 2001
From: Alex Vesker <valex@nvidia.com>
Date: Tue, 9 Jul 2024 15:31:00 +0300
Subject: [PATCH] net/mlx5/hws: fix port ID on root item convert
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit befb138bdd924956375745cb1ae8fe3fd029902f ]

When calling item convert function we need to pass the port_id
in the attributes. This value should be passed not only for cases
that match on PORT related items, to resolve we will always pass it.

Fixes: 572fe9ef2f46 ("net/mlx5/hws: fix port ID for root table")

Signed-off-by: Alex Vesker <valex@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_matcher.c | 20 +++++---------------
 drivers/net/mlx5/hws/mlx5dr_rule.c    | 21 +++++----------------
 2 files changed, 10 insertions(+), 31 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c
index 89e52d6c28..36be96c668 100644
--- a/drivers/net/mlx5/hws/mlx5dr_matcher.c
+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c
@@ -1143,7 +1143,6 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
 	struct mlx5dv_flow_match_parameters *mask;
 	struct mlx5_flow_attr flow_attr = {0};
 	struct rte_flow_error rte_error;
-	struct rte_flow_item *item;
 	uint8_t match_criteria;
 	int ret;
 
@@ -1172,20 +1171,11 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
 		return rte_errno;
 	}
 
-	/* We need the port id in case of matching representor */
-	item = matcher->mt[0].items;
-	while (item->type != RTE_FLOW_ITEM_TYPE_END) {
-		if (item->type == RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR ||
-		    item->type == RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT) {
-			ret = flow_hw_get_port_id_from_ctx(ctx, &flow_attr.port_id);
-			if (ret) {
-				DR_LOG(ERR, "Failed to get port id for dev %s",
-				       ctx->ibv_ctx->device->name);
-				rte_errno = EINVAL;
-				return rte_errno;
-			}
-		}
-		++item;
+	ret = flow_hw_get_port_id_from_ctx(ctx, &flow_attr.port_id);
+	if (ret) {
+		DR_LOG(ERR, "Failed to get port id for dev %s", ctx->ibv_ctx->device->name);
+		rte_errno = EINVAL;
+		return rte_errno;
 	}
 
 	mask = simple_calloc(1, MLX5_ST_SZ_BYTES(fte_match_param) +
diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c
index 82ceaf0750..cc7a30d6d0 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -599,26 +599,15 @@ static int mlx5dr_rule_create_root(struct mlx5dr_rule *rule,
 	struct mlx5dv_flow_match_parameters *value;
 	struct mlx5_flow_attr flow_attr = {0};
 	struct mlx5dv_flow_action_attr *attr;
-	const struct rte_flow_item *cur_item;
 	struct rte_flow_error error;
 	uint8_t match_criteria;
 	int ret;
 
-	/* We need the port id in case of matching representor */
-	cur_item = items;
-	while (cur_item->type != RTE_FLOW_ITEM_TYPE_END) {
-		if (cur_item->type == RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR ||
-		    cur_item->type == RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT) {
-			ret = flow_hw_get_port_id_from_ctx(rule->matcher->tbl->ctx,
-							   &flow_attr.port_id);
-			if (ret) {
-				DR_LOG(ERR, "Failed to get port id for dev %s",
-				       rule->matcher->tbl->ctx->ibv_ctx->device->name);
-				rte_errno = EINVAL;
-				return rte_errno;
-			}
-		}
-		++cur_item;
+	ret = flow_hw_get_port_id_from_ctx(ctx, &flow_attr.port_id);
+	if (ret) {
+		DR_LOG(ERR, "Failed to get port id for dev %s", ctx->ibv_ctx->device->name);
+		rte_errno = EINVAL;
+		return rte_errno;
 	}
 
 	attr = simple_calloc(num_actions, sizeof(*attr));
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.392845191 +0800
+++ 0123-net-mlx5-hws-fix-port-ID-on-root-item-convert.patch	2024-08-12 20:44:02.495069373 +0800
@@ -1 +1 @@
-From befb138bdd924956375745cb1ae8fe3fd029902f Mon Sep 17 00:00:00 2001
+From 1163643a1e9398959a022020af4654f883e3a55c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit befb138bdd924956375745cb1ae8fe3fd029902f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +19,2 @@
- drivers/net/mlx5/hws/mlx5dr_rule.c    | 22 ++++++----------------
- 2 files changed, 11 insertions(+), 31 deletions(-)
+ drivers/net/mlx5/hws/mlx5dr_rule.c    | 21 +++++----------------
+ 2 files changed, 10 insertions(+), 31 deletions(-)
@@ -21 +23 @@
-index 6a939eb031..dfa2cd435c 100644
+index 89e52d6c28..36be96c668 100644
@@ -24 +26 @@
-@@ -1231,7 +1231,6 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
+@@ -1143,7 +1143,6 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
@@ -32 +34 @@
-@@ -1260,20 +1259,11 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
+@@ -1172,20 +1171,11 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
@@ -59 +61 @@
-index 06d8e66f63..1edb7eac74 100644
+index 82ceaf0750..cc7a30d6d0 100644
@@ -62,5 +64 @@
-@@ -694,29 +694,19 @@ int mlx5dr_rule_create_root_no_comp(struct mlx5dr_rule *rule,
- 				    struct mlx5dr_rule_action rule_actions[])
- {
- 	struct mlx5dv_flow_matcher *dv_matcher = rule->matcher->dv_matcher;
-+	struct mlx5dr_context *ctx = rule->matcher->tbl->ctx;
+@@ -599,26 +599,15 @@ static int mlx5dr_rule_create_root(struct mlx5dr_rule *rule,

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

* patch 'net/mlx5/hws: remove unused variable' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (122 preceding siblings ...)
  2024-08-12 12:50       ` patch 'net/mlx5/hws: fix port ID on root item convert' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'net/mlx5: fix end condition of reading xstats' " Xueming Li
                         ` (33 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Erez Shitrit; +Cc: xuemingl, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b7c9a02306fa69776c1aea964ae3e57b5d20a042

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b7c9a02306fa69776c1aea964ae3e57b5d20a042 Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Tue, 9 Jul 2024 15:31:01 +0300
Subject: [PATCH] net/mlx5/hws: remove unused variable
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 168f9cf3455ef0be63ba1593cd7b651d50b2043d ]

Removing a redundant variable.
Was there from day 1, not in use.

Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object")

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_pat_arg.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_pat_arg.h b/drivers/net/mlx5/hws/mlx5dr_pat_arg.h
index bbe313102f..c4e0cbc843 100644
--- a/drivers/net/mlx5/hws/mlx5dr_pat_arg.h
+++ b/drivers/net/mlx5/hws/mlx5dr_pat_arg.h
@@ -30,7 +30,6 @@ struct mlx5dr_pattern_cache {
 struct mlx5dr_pattern_cache_item {
 	struct {
 		struct mlx5dr_devx_obj *pattern_obj;
-		struct dr_icm_chunk *chunk;
 		uint8_t *data;
 		uint16_t num_of_actions;
 	} mh_data;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.425824488 +0800
+++ 0124-net-mlx5-hws-remove-unused-variable.patch	2024-08-12 20:44:02.495069373 +0800
@@ -1 +1 @@
-From 168f9cf3455ef0be63ba1593cd7b651d50b2043d Mon Sep 17 00:00:00 2001
+From b7c9a02306fa69776c1aea964ae3e57b5d20a042 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 168f9cf3455ef0be63ba1593cd7b651d50b2043d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/mlx5: fix end condition of reading xstats' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (123 preceding siblings ...)
  2024-08-12 12:50       ` patch 'net/mlx5/hws: remove unused variable' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'net/mlx5: fix uplink port probing in bonding mode' " Xueming Li
                         ` (32 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Bing Zhao; +Cc: xuemingl, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=07ad92c1a69b27be817a22f7afd590cef0098c6b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 07ad92c1a69b27be817a22f7afd590cef0098c6b Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 17 Jul 2024 19:33:37 +0300
Subject: [PATCH] net/mlx5: fix end condition of reading xstats
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1be61fe1333cd4a8a4bba6eb0d68780073fe3512 ]

The "mlx5_stats_n" in the "struct mlx5_xstats_ctrl" is the number of
device stats identified by PMD. Right now, the mapping of device
stats to the xstats is not compact. The "input index" of the device
stats would remain UINT16_MAX and be skipped when reading counters.

If some DPDK stats cannot be identified in the middle of the map, the
end condition should be bigger than the "mlx5_stats_n". Or else, some
counters would not be read and calculated.

Using the global const "xstats_n" as the end condition to traverse
the whole array in case some counters are missed. The "xstats_o_idx"
should be used instead of the iteration to check if the statistics
is an IB device counter.

In the meanwhile, adding another field to record the start index of
the IB counters to reduce the redundancy iterations.

Fixes: a687c3e658c2 ("net/mlx5: fix counters map in bonding mode")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 23 +++++++++++++----------
 drivers/net/mlx5/mlx5.h                 |  5 +++++
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 4f3e790c0b..1d999ef66b 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -1292,6 +1292,7 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
 	struct ethtool_stats *et_stats = (struct ethtool_stats *)et_stat_buf;
 	int ret;
 	uint16_t i_idx, o_idx;
+	uint32_t total_stats = xstats_n;
 
 	et_stats->cmd = ETHTOOL_GSTATS;
 	/* Pass the maximum value, the driver may ignore this. */
@@ -1309,19 +1310,19 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
 		return ret;
 	}
 	if (pf <= 0) {
-		for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+		for (i = 0; i != total_stats; i++) {
 			i_idx = xstats_ctrl->dev_table_idx[i];
-			if (i_idx == UINT16_MAX || xstats_ctrl->info[i].dev)
-				continue;
 			o_idx = xstats_ctrl->xstats_o_idx[i];
+			if (i_idx == UINT16_MAX || xstats_ctrl->info[o_idx].dev)
+				continue;
 			stats[o_idx] += (uint64_t)et_stats->data[i_idx];
 		}
 	} else {
-		for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+		for (i = 0; i != total_stats; i++) {
 			i_idx = xstats_ctrl->dev_table_idx_2nd[i];
-			if (i_idx == UINT16_MAX)
-				continue;
 			o_idx = xstats_ctrl->xstats_o_idx_2nd[i];
+			if (i_idx == UINT16_MAX || xstats_ctrl->info[o_idx].dev)
+				continue;
 			stats[o_idx] += (uint64_t)et_stats->data[i_idx];
 		}
 	}
@@ -1364,11 +1365,11 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *s
 			return ret;
 	}
 	/*
-	 * Read IB counters.
-	 * The counters are unique per IB device but not per net IF.
+	 * Read IB dev counters.
+	 * The counters are unique per IB device but not per netdev IF.
 	 * In bonding mode, getting the stats name only from 1 port is enough.
 	 */
-	for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+	for (i = xstats_ctrl->dev_cnt_start; i < xstats_ctrl->mlx5_stats_n; i++) {
 		if (!xstats_ctrl->info[i].dev)
 			continue;
 		/* return last xstats counter if fail to read. */
@@ -1618,7 +1619,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
 	},
 };
 
-static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
+const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
 
 static int
 mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
@@ -1664,6 +1665,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
 	}
 	if (!bond_master) {
 		/* Add dev counters, unique per IB device. */
+		xstats_ctrl->dev_cnt_start = xstats_ctrl->mlx5_stats_n;
 		for (j = 0; j != xstats_n; j++) {
 			if (mlx5_counters_init[j].dev) {
 				idx = xstats_ctrl->mlx5_stats_n++;
@@ -1705,6 +1707,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
 		}
 	}
 	/* Dev counters are always at the last now. */
+	xstats_ctrl->dev_cnt_start = xstats_ctrl->mlx5_stats_n;
 	for (j = 0; j != xstats_n; j++) {
 		if (mlx5_counters_init[j].dev) {
 			idx = xstats_ctrl->mlx5_stats_n++;
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 1ac8e07d07..0c81bcab9f 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -267,6 +267,8 @@ struct mlx5_xstats_ctrl {
 	uint16_t stats_n_2nd;
 	/* Number of device stats identified by PMD. */
 	uint16_t mlx5_stats_n;
+	/* First device counters index. */
+	uint16_t dev_cnt_start;
 	/* Index in the device counters table. */
 	uint16_t dev_table_idx[MLX5_MAX_XSTATS];
 	/* Index in the output table. */
@@ -281,6 +283,9 @@ struct mlx5_xstats_ctrl {
 	uint16_t xstats_o_idx_2nd[MLX5_MAX_XSTATS];
 };
 
+/* xstats array size. */
+extern const unsigned int xstats_n;
+
 struct mlx5_stats_ctrl {
 	/* Base for imissed counter. */
 	uint64_t imissed_base;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.454732586 +0800
+++ 0125-net-mlx5-fix-end-condition-of-reading-xstats.patch	2024-08-12 20:44:02.505069375 +0800
@@ -1 +1 @@
-From 1be61fe1333cd4a8a4bba6eb0d68780073fe3512 Mon Sep 17 00:00:00 2001
+From 07ad92c1a69b27be817a22f7afd590cef0098c6b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1be61fe1333cd4a8a4bba6eb0d68780073fe3512 ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -34 +36 @@
-index 82f651f2f3..5d64984022 100644
+index 4f3e790c0b..1d999ef66b 100644
@@ -37 +39 @@
-@@ -1201,6 +1201,7 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
+@@ -1292,6 +1292,7 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
@@ -45 +47 @@
-@@ -1218,19 +1219,19 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
+@@ -1309,19 +1310,19 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
@@ -71 +73 @@
-@@ -1273,11 +1274,11 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *s
+@@ -1364,11 +1365,11 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *s
@@ -86 +88 @@
-@@ -1573,7 +1574,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
+@@ -1618,7 +1619,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
@@ -95 +97 @@
-@@ -1619,6 +1620,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
+@@ -1664,6 +1665,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
@@ -103 +105 @@
-@@ -1660,6 +1662,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
+@@ -1705,6 +1707,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
@@ -112 +114 @@
-index 75a1e170af..869aac032b 100644
+index 1ac8e07d07..0c81bcab9f 100644
@@ -115 +117 @@
-@@ -281,6 +281,8 @@ struct mlx5_xstats_ctrl {
+@@ -267,6 +267,8 @@ struct mlx5_xstats_ctrl {
@@ -124 +126 @@
-@@ -295,6 +297,9 @@ struct mlx5_xstats_ctrl {
+@@ -281,6 +283,9 @@ struct mlx5_xstats_ctrl {

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

* patch 'net/mlx5: fix uplink port probing in bonding mode' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (124 preceding siblings ...)
  2024-08-12 12:50       ` patch 'net/mlx5: fix end condition of reading xstats' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'common/mlx5: remove unneeded field when modify RQ table' " Xueming Li
                         ` (31 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Bing Zhao; +Cc: xuemingl, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=1988c32194f9c1caad80970882960b3eda418fcf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1988c32194f9c1caad80970882960b3eda418fcf Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 17 Jul 2024 19:35:41 +0300
Subject: [PATCH] net/mlx5: fix uplink port probing in bonding mode
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 39d4ec8f36192b9dafbad4994cbe37f7674c7190 ]

In the HW-LAG bonding mode, the representor port can be from both
slave PFs. When probing a representor (REP), the UPLINK (proxy) port
always needs to be probed firstly before any REP port.

In the current implementation, when probing a device with the
following format:

  -a 0000:XX:00.0,dv_flow_en=N,representor=pf1vfy

Since the REP belongs to the 2nd PF in the bonding, the UPLINK would
not be added into the probing ports list.

1. In dv_flow_en=1 mode, the REP itself can be probed. But it didn't
   obey the rules and the behaviors were inconsistent.
    a. When probing the REP from 1st PFs, the UPLINK was also probed.
    b. When detaching the UPLINK, all REPs were detached.
2. In dv_flow_en=2 mode, since some resources can only be allocated /
   created on the proxy port, the probing would get a failure.

By removing the unneeded check of the bonding PF device index, the
UPLINK will always try to be probed with any format.

Fixes: 2e569a370395 ("net/mlx5: add VF LAG mode bonding device recognition")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 2cf609873a..2241e84341 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -2437,8 +2437,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
 						list[ns].info.master = 0;
 						list[ns].info.representor = 0;
 					}
-					if (list[ns].info.port_name == bd)
-						ns++;
+					ns++;
 					break;
 				case MLX5_PHYS_PORT_NAME_TYPE_PFHPF:
 					/* Fallthrough */
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.485998083 +0800
+++ 0126-net-mlx5-fix-uplink-port-probing-in-bonding-mode.patch	2024-08-12 20:44:02.505069375 +0800
@@ -1 +1 @@
-From 39d4ec8f36192b9dafbad4994cbe37f7674c7190 Mon Sep 17 00:00:00 2001
+From 1988c32194f9c1caad80970882960b3eda418fcf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 39d4ec8f36192b9dafbad4994cbe37f7674c7190 ]
@@ -29 +31,0 @@
-Cc: stable@dpdk.org
@@ -38 +40 @@
-index 5e950e9be1..11336c430b 100644
+index 2cf609873a..2241e84341 100644
@@ -41 +43 @@
-@@ -2473,8 +2473,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
+@@ -2437,8 +2437,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,

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

* patch 'common/mlx5: remove unneeded field when modify RQ table' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (125 preceding siblings ...)
  2024-08-12 12:50       ` patch 'net/mlx5: fix uplink port probing in bonding mode' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'net/mlx5: fix disabling E-Switch default flow rules' " Xueming Li
                         ` (30 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Bing Zhao; +Cc: xuemingl, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3b60ef3db6dd122ec86a400c31fe19911fb4aec2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3b60ef3db6dd122ec86a400c31fe19911fb4aec2 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 17 Jul 2024 19:37:19 +0300
Subject: [PATCH] common/mlx5: remove unneeded field when modify RQ table
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 463e5abe09362f1d20d0ec99b5969549d51167d6 ]

The attribute "rqt_max_size" of the RQT(RQ table) context is only
needed by when creating a new one. When modifying an old one, there
is no need to set this attribute.

The firmware usually ignored this unneeded field. When enabling some
extra check, an error will be returned to prevent the code from
continuing to run.

In the meanwhile, this field will always be set to the maximal one
fetched from the capability without any change.  Removing the value
set and leave it to 0 will help to solve the potential failure.

Fixes: e1da60a8a6e9 ("common/mlx5: add DevX command to modify RQT")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 52b07367b7..630ab96a8f 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1872,7 +1872,6 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
 	MLX5_SET64(modify_rqt_in, in, modify_bitmask, 0x1);
 	rqt_ctx = MLX5_ADDR_OF(modify_rqt_in, in, rqt_context);
 	MLX5_SET(rqtc, rqt_ctx, list_q_type, rqt_attr->rq_type);
-	MLX5_SET(rqtc, rqt_ctx, rqt_max_size, rqt_attr->rqt_max_size);
 	MLX5_SET(rqtc, rqt_ctx, rqt_actual_size, rqt_attr->rqt_actual_size);
 	for (i = 0; i < rqt_attr->rqt_actual_size; i++)
 		MLX5_SET(rqtc, rqt_ctx, rq_num[i], rqt_attr->rq_list[i]);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.513353581 +0800
+++ 0127-common-mlx5-remove-unneeded-field-when-modify-RQ-tab.patch	2024-08-12 20:44:02.505069375 +0800
@@ -1 +1 @@
-From 463e5abe09362f1d20d0ec99b5969549d51167d6 Mon Sep 17 00:00:00 2001
+From 3b60ef3db6dd122ec86a400c31fe19911fb4aec2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 463e5abe09362f1d20d0ec99b5969549d51167d6 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 8e12ac50de..9710dcedd3 100644
+index 52b07367b7..630ab96a8f 100644
@@ -31 +33 @@
-@@ -1914,7 +1914,6 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
+@@ -1872,7 +1872,6 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,

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

* patch 'net/mlx5: fix disabling E-Switch default flow rules' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (126 preceding siblings ...)
  2024-08-12 12:50       ` patch 'common/mlx5: remove unneeded field when modify RQ table' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'net/hns3: check Rx DMA address alignmnent' " Xueming Li
                         ` (29 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: xuemingl, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6bf4a626e4810f6ed97c94a6c6c86a0a8bac0003

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6bf4a626e4810f6ed97c94a6c6c86a0a8bac0003 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Thu, 18 Jul 2024 11:57:15 +0200
Subject: [PATCH] net/mlx5: fix disabling E-Switch default flow rules
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cf9a91c67b88071a03beb32a3ea9970e6ee00391 ]

`fdb_def_rule_en` devarg controls whether mlx5 PMD creates default
E-Switch flow rules for:

- Transferring traffic from wire, VFs and SFs to group 1 (default jump).
- Providing default behavior for application traffic (default SQ miss
  flow rules).

With these flow rules, applications effectively create transfer flow
rules in group 1 and higher (application group is translated to one
higher) allowing for faster insertion on all groups and providing
ability to forward to VF, SF and wire on any group.

By default, these rules are created (`fdb_def_rule_en` == 1).

When these default flow rules are disabled (`fdb_def_rule_en` == 0)
with HW Steering flow engine (`dv_flow_en` == 2) only creation of
default jump rules was disabled. Also, necessary template table and
pattern/actions templates were created as well,
but they were never used.
SQ miss flow rules were still created.
This is a bug, because with `fdb_def_rule_en` == 0, application should
not expect any default E-Switch flow rules.

This patch fixes that by disabling all default E-Switch flow rules
creation and disabling creating templates for these flow rules,
when `fdb_def_rule_en` == 0.
If an application needs to run with these flow rules disabled,
and requires flow rules providing SQ miss flow rules functionality,
then application must explicitly create similar flow rules.

Fixes: 1939eb6f660c ("net/mlx5: support flow port action with HWS")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 142 ++++++++++++++++++--------------
 drivers/net/mlx5/mlx5_trigger.c |   4 +-
 drivers/net/mlx5/mlx5_txq.c     |  13 ++-
 3 files changed, 91 insertions(+), 68 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index fa6ae623c9..af4df13b2f 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -8627,6 +8627,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
 	struct mlx5_flow_hw_ctrl_fdb *hw_ctrl_fdb;
 	uint32_t xmeta = priv->sh->config.dv_xmeta_en;
 	uint32_t repr_matching = priv->sh->config.repr_matching;
+	uint32_t fdb_def_rule = priv->sh->config.fdb_def_rule;
 
 	MLX5_ASSERT(priv->hw_ctrl_fdb == NULL);
 	hw_ctrl_fdb = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*hw_ctrl_fdb), 0, SOCKET_ID_ANY);
@@ -8637,70 +8638,79 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
 		goto err;
 	}
 	priv->hw_ctrl_fdb = hw_ctrl_fdb;
-	/* Create templates and table for default SQ miss flow rules - root table. */
-	hw_ctrl_fdb->esw_mgr_items_tmpl = flow_hw_create_ctrl_esw_mgr_pattern_template(dev, error);
-	if (!hw_ctrl_fdb->esw_mgr_items_tmpl) {
-		DRV_LOG(ERR, "port %u failed to create E-Switch Manager item"
-			" template for control flows", dev->data->port_id);
-		goto err;
-	}
-	hw_ctrl_fdb->regc_jump_actions_tmpl = flow_hw_create_ctrl_regc_jump_actions_template
-			(dev, error);
-	if (!hw_ctrl_fdb->regc_jump_actions_tmpl) {
-		DRV_LOG(ERR, "port %u failed to create REG_C set and jump action template"
-			" for control flows", dev->data->port_id);
-		goto err;
-	}
-	hw_ctrl_fdb->hw_esw_sq_miss_root_tbl = flow_hw_create_ctrl_sq_miss_root_table
-			(dev, hw_ctrl_fdb->esw_mgr_items_tmpl, hw_ctrl_fdb->regc_jump_actions_tmpl,
-			 error);
-	if (!hw_ctrl_fdb->hw_esw_sq_miss_root_tbl) {
-		DRV_LOG(ERR, "port %u failed to create table for default sq miss (root table)"
-			" for control flows", dev->data->port_id);
-		goto err;
-	}
-	/* Create templates and table for default SQ miss flow rules - non-root table. */
-	hw_ctrl_fdb->regc_sq_items_tmpl = flow_hw_create_ctrl_regc_sq_pattern_template(dev, error);
-	if (!hw_ctrl_fdb->regc_sq_items_tmpl) {
-		DRV_LOG(ERR, "port %u failed to create SQ item template for"
-			" control flows", dev->data->port_id);
-		goto err;
-	}
-	hw_ctrl_fdb->port_actions_tmpl = flow_hw_create_ctrl_port_actions_template(dev, error);
-	if (!hw_ctrl_fdb->port_actions_tmpl) {
-		DRV_LOG(ERR, "port %u failed to create port action template"
-			" for control flows", dev->data->port_id);
-		goto err;
-	}
-	hw_ctrl_fdb->hw_esw_sq_miss_tbl = flow_hw_create_ctrl_sq_miss_table
-			(dev, hw_ctrl_fdb->regc_sq_items_tmpl, hw_ctrl_fdb->port_actions_tmpl,
-			 error);
-	if (!hw_ctrl_fdb->hw_esw_sq_miss_tbl) {
-		DRV_LOG(ERR, "port %u failed to create table for default sq miss (non-root table)"
-			" for control flows", dev->data->port_id);
-		goto err;
-	}
-	/* Create templates and table for default FDB jump flow rules. */
-	hw_ctrl_fdb->port_items_tmpl = flow_hw_create_ctrl_port_pattern_template(dev, error);
-	if (!hw_ctrl_fdb->port_items_tmpl) {
-		DRV_LOG(ERR, "port %u failed to create SQ item template for"
-			" control flows", dev->data->port_id);
-		goto err;
-	}
-	hw_ctrl_fdb->jump_one_actions_tmpl = flow_hw_create_ctrl_jump_actions_template
-			(dev, MLX5_HW_LOWEST_USABLE_GROUP, error);
-	if (!hw_ctrl_fdb->jump_one_actions_tmpl) {
-		DRV_LOG(ERR, "port %u failed to create jump action template"
-			" for control flows", dev->data->port_id);
-		goto err;
-	}
-	hw_ctrl_fdb->hw_esw_zero_tbl = flow_hw_create_ctrl_jump_table
-			(dev, hw_ctrl_fdb->port_items_tmpl, hw_ctrl_fdb->jump_one_actions_tmpl,
-			 error);
-	if (!hw_ctrl_fdb->hw_esw_zero_tbl) {
-		DRV_LOG(ERR, "port %u failed to create table for default jump to group 1"
-			" for control flows", dev->data->port_id);
-		goto err;
+	if (fdb_def_rule) {
+		/* Create templates and table for default SQ miss flow rules - root table. */
+		hw_ctrl_fdb->esw_mgr_items_tmpl =
+				flow_hw_create_ctrl_esw_mgr_pattern_template(dev, error);
+		if (!hw_ctrl_fdb->esw_mgr_items_tmpl) {
+			DRV_LOG(ERR, "port %u failed to create E-Switch Manager item"
+				" template for control flows", dev->data->port_id);
+			goto err;
+		}
+		hw_ctrl_fdb->regc_jump_actions_tmpl =
+				flow_hw_create_ctrl_regc_jump_actions_template(dev, error);
+		if (!hw_ctrl_fdb->regc_jump_actions_tmpl) {
+			DRV_LOG(ERR, "port %u failed to create REG_C set and jump action template"
+				" for control flows", dev->data->port_id);
+			goto err;
+		}
+		hw_ctrl_fdb->hw_esw_sq_miss_root_tbl =
+				flow_hw_create_ctrl_sq_miss_root_table
+					(dev, hw_ctrl_fdb->esw_mgr_items_tmpl,
+					 hw_ctrl_fdb->regc_jump_actions_tmpl, error);
+		if (!hw_ctrl_fdb->hw_esw_sq_miss_root_tbl) {
+			DRV_LOG(ERR, "port %u failed to create table for default sq miss (root table)"
+				" for control flows", dev->data->port_id);
+			goto err;
+		}
+		/* Create templates and table for default SQ miss flow rules - non-root table. */
+		hw_ctrl_fdb->regc_sq_items_tmpl =
+				flow_hw_create_ctrl_regc_sq_pattern_template(dev, error);
+		if (!hw_ctrl_fdb->regc_sq_items_tmpl) {
+			DRV_LOG(ERR, "port %u failed to create SQ item template for"
+				" control flows", dev->data->port_id);
+			goto err;
+		}
+		hw_ctrl_fdb->port_actions_tmpl =
+				flow_hw_create_ctrl_port_actions_template(dev, error);
+		if (!hw_ctrl_fdb->port_actions_tmpl) {
+			DRV_LOG(ERR, "port %u failed to create port action template"
+				" for control flows", dev->data->port_id);
+			goto err;
+		}
+		hw_ctrl_fdb->hw_esw_sq_miss_tbl =
+				flow_hw_create_ctrl_sq_miss_table
+					(dev, hw_ctrl_fdb->regc_sq_items_tmpl,
+					 hw_ctrl_fdb->port_actions_tmpl, error);
+		if (!hw_ctrl_fdb->hw_esw_sq_miss_tbl) {
+			DRV_LOG(ERR, "port %u failed to create table for default sq miss (non-root table)"
+				" for control flows", dev->data->port_id);
+			goto err;
+		}
+		/* Create templates and table for default FDB jump flow rules. */
+		hw_ctrl_fdb->port_items_tmpl =
+				flow_hw_create_ctrl_port_pattern_template(dev, error);
+		if (!hw_ctrl_fdb->port_items_tmpl) {
+			DRV_LOG(ERR, "port %u failed to create SQ item template for"
+				" control flows", dev->data->port_id);
+			goto err;
+		}
+		hw_ctrl_fdb->jump_one_actions_tmpl =
+				flow_hw_create_ctrl_jump_actions_template
+					(dev, MLX5_HW_LOWEST_USABLE_GROUP, error);
+		if (!hw_ctrl_fdb->jump_one_actions_tmpl) {
+			DRV_LOG(ERR, "port %u failed to create jump action template"
+				" for control flows", dev->data->port_id);
+			goto err;
+		}
+		hw_ctrl_fdb->hw_esw_zero_tbl = flow_hw_create_ctrl_jump_table
+				(dev, hw_ctrl_fdb->port_items_tmpl,
+				 hw_ctrl_fdb->jump_one_actions_tmpl, error);
+		if (!hw_ctrl_fdb->hw_esw_zero_tbl) {
+			DRV_LOG(ERR, "port %u failed to create table for default jump to group 1"
+				" for control flows", dev->data->port_id);
+			goto err;
+		}
 	}
 	/* Create templates and table for default Tx metadata copy flow rule. */
 	if (!repr_matching && xmeta == MLX5_XMETA_MODE_META32_HWS) {
@@ -12234,6 +12244,8 @@ mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn)
 	}
 	proxy_dev = &rte_eth_devices[proxy_port_id];
 	proxy_priv = proxy_dev->data->dev_private;
+	/* FDB default flow rules must be enabled. */
+	MLX5_ASSERT(proxy_priv->sh->config.fdb_def_rule);
 	if (!proxy_priv->dr_ctx)
 		return 0;
 	if (!proxy_priv->hw_ctrl_fdb ||
@@ -12298,6 +12310,8 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
 	}
 	proxy_dev = &rte_eth_devices[proxy_port_id];
 	proxy_priv = proxy_dev->data->dev_private;
+	/* FDB default flow rules must be enabled. */
+	MLX5_ASSERT(proxy_priv->sh->config.fdb_def_rule);
 	if (!proxy_priv->dr_ctx) {
 		DRV_LOG(DEBUG, "Transfer proxy port (port %u) of port %u must be configured "
 			       "for HWS to create default FDB jump rule. Default rule will "
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index f8d67282ce..fe2c512c5c 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1498,7 +1498,9 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
 		if (!txq)
 			continue;
 		queue = mlx5_txq_get_sqn(txq);
-		if ((priv->representor || priv->master) && config->dv_esw_en) {
+		if ((priv->representor || priv->master) &&
+		    config->dv_esw_en &&
+		    config->fdb_def_rule) {
 			if (mlx5_flow_hw_esw_create_sq_miss_flow(dev, queue, false)) {
 				mlx5_txq_release(dev, i);
 				goto error;
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 1ac43548b2..aac078a6ed 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -1311,11 +1311,18 @@ rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num)
 	}
 #ifdef HAVE_MLX5_HWS_SUPPORT
 	if (priv->sh->config.dv_flow_en == 2) {
-		if (mlx5_flow_hw_esw_create_sq_miss_flow(dev, sq_num, true))
-			return -rte_errno;
+		bool sq_miss_created = false;
+
+		if (priv->sh->config.fdb_def_rule) {
+			if (mlx5_flow_hw_esw_create_sq_miss_flow(dev, sq_num, true))
+				return -rte_errno;
+			sq_miss_created = true;
+		}
+
 		if (priv->sh->config.repr_matching &&
 		    mlx5_flow_hw_tx_repr_matching_flow(dev, sq_num, true)) {
-			mlx5_flow_hw_esw_destroy_sq_miss_flow(dev, sq_num);
+			if (sq_miss_created)
+				mlx5_flow_hw_esw_destroy_sq_miss_flow(dev, sq_num);
 			return -rte_errno;
 		}
 		return 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.554055678 +0800
+++ 0128-net-mlx5-fix-disabling-E-Switch-default-flow-rules.patch	2024-08-12 20:44:02.515069377 +0800
@@ -1 +1 @@
-From cf9a91c67b88071a03beb32a3ea9970e6ee00391 Mon Sep 17 00:00:00 2001
+From 6bf4a626e4810f6ed97c94a6c6c86a0a8bac0003 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cf9a91c67b88071a03beb32a3ea9970e6ee00391 ]
@@ -37 +39,0 @@
-Cc: stable@dpdk.org
@@ -48 +50 @@
-index e7d8c251a0..fe7df7305f 100644
+index fa6ae623c9..af4df13b2f 100644
@@ -51 +53 @@
-@@ -10580,6 +10580,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
+@@ -8627,6 +8627,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
@@ -59 +61 @@
-@@ -10590,70 +10591,79 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
+@@ -8637,70 +8638,79 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
@@ -203 +205 @@
-@@ -15383,6 +15393,8 @@ mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn)
+@@ -12234,6 +12244,8 @@ mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn)
@@ -212 +214 @@
-@@ -15447,6 +15459,8 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
+@@ -12298,6 +12310,8 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
@@ -222 +224 @@
-index 6fa7c01cd0..a65a460731 100644
+index f8d67282ce..fe2c512c5c 100644
@@ -225 +227 @@
-@@ -1504,7 +1504,9 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
+@@ -1498,7 +1498,9 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
@@ -237 +239 @@
-index 8eb1ae1f03..f05534e168 100644
+index 1ac43548b2..aac078a6ed 100644
@@ -240 +242 @@
-@@ -1363,11 +1363,18 @@ rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num)
+@@ -1311,11 +1311,18 @@ rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num)

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

* patch 'net/hns3: check Rx DMA address alignmnent' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (127 preceding siblings ...)
  2024-08-12 12:50       ` patch 'net/mlx5: fix disabling E-Switch default flow rules' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'net/ark: fix index arithmetic' " Xueming Li
                         ` (28 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: xuemingl, Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=7deaec6ac8c2242b225cf97963cdd8b4dc176b69

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7deaec6ac8c2242b225cf97963cdd8b4dc176b69 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 15 Jul 2024 10:04:39 +0800
Subject: [PATCH] net/hns3: check Rx DMA address alignmnent
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d14c995b775a9b5910c51c3ab3685b320736f3f6 ]

The network engine has Rx DMA address align requirement, if this
requirement is violated, the Rx function will be abnormal. The detail
requirement is:
1) For HIP08 platform, require 64-bytes alignment.
2) For later platform, require 128-bytes alignment.

The setup Rx DMA address exists both on the control and data plane, to
ensure performance, the alignment check is added only on the control
plane.

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    |  2 ++
 drivers/net/hns3/hns3_ethdev.h    |  8 ++++++++
 drivers/net/hns3/hns3_ethdev_vf.c |  2 ++
 drivers/net/hns3/hns3_rxtx.c      | 21 +++++++++++++++++++++
 4 files changed, 33 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 90dbc4a84b..8e18aaf110 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2738,6 +2738,7 @@ hns3_get_capability(struct hns3_hw *hw)
 		hw->rss_info.ipv6_sctp_offload_supported = false;
 		hw->udp_cksum_mode = HNS3_SPECIAL_PORT_SW_CKSUM_MODE;
 		pf->support_multi_tc_pause = false;
+		hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_64;
 		return 0;
 	}
 
@@ -2758,6 +2759,7 @@ hns3_get_capability(struct hns3_hw *hw)
 	hw->rss_info.ipv6_sctp_offload_supported = true;
 	hw->udp_cksum_mode = HNS3_SPECIAL_PORT_HW_CKSUM_MODE;
 	pf->support_multi_tc_pause = true;
+	hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_128;
 
 	return 0;
 }
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index e70c5fff2a..c190d5109b 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -487,6 +487,9 @@ struct hns3_queue_intr {
 #define HNS3_PKTS_DROP_STATS_MODE1		0
 #define HNS3_PKTS_DROP_STATS_MODE2		1
 
+#define HNS3_RX_DMA_ADDR_ALIGN_128	128
+#define HNS3_RX_DMA_ADDR_ALIGN_64	64
+
 struct hns3_hw {
 	struct rte_eth_dev_data *data;
 	void *io_base;
@@ -554,6 +557,11 @@ struct hns3_hw {
 	 * direction.
 	 */
 	uint8_t min_tx_pkt_len;
+	/*
+	 * The required alignment of the DMA address of the RX buffer.
+	 * See HNS3_RX_DMA_ADDR_ALIGN_XXX for available values.
+	 */
+	uint16_t rx_dma_addr_align;
 
 	struct hns3_queue_intr intr;
 	/*
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 83d3d66005..d4d691ad86 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -707,6 +707,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
 		hw->min_tx_pkt_len = HNS3_HIP08_MIN_TX_PKT_LEN;
 		hw->rss_info.ipv6_sctp_offload_supported = false;
 		hw->promisc_mode = HNS3_UNLIMIT_PROMISC_MODE;
+		hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_64;
 		return 0;
 	}
 
@@ -724,6 +725,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
 	hw->drop_stats_mode = HNS3_PKTS_DROP_STATS_MODE2;
 	hw->rss_info.ipv6_sctp_offload_supported = true;
 	hw->promisc_mode = HNS3_LIMIT_PROMISC_MODE;
+	hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_128;
 
 	return 0;
 }
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 75ea6bdca9..8d0db134d2 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -273,12 +273,27 @@ hns3_free_all_queues(struct rte_eth_dev *dev)
 	hns3_free_tx_queues(dev);
 }
 
+static int
+hns3_check_rx_dma_addr(struct hns3_hw *hw, uint64_t dma_addr)
+{
+	uint64_t rem;
+
+	rem = dma_addr & (hw->rx_dma_addr_align - 1);
+	if (rem > 0) {
+		hns3_err(hw, "The IO address of the beginning of the mbuf data "
+			 "must be %u-byte aligned", hw->rx_dma_addr_align);
+		return -EINVAL;
+	}
+	return 0;
+}
+
 static int
 hns3_alloc_rx_queue_mbufs(struct hns3_hw *hw, struct hns3_rx_queue *rxq)
 {
 	struct rte_mbuf *mbuf;
 	uint64_t dma_addr;
 	uint16_t i;
+	int ret;
 
 	for (i = 0; i < rxq->nb_rx_desc; i++) {
 		mbuf = rte_mbuf_raw_alloc(rxq->mb_pool);
@@ -299,6 +314,12 @@ hns3_alloc_rx_queue_mbufs(struct hns3_hw *hw, struct hns3_rx_queue *rxq)
 		dma_addr = rte_cpu_to_le_64(rte_mbuf_data_iova_default(mbuf));
 		rxq->rx_ring[i].addr = dma_addr;
 		rxq->rx_ring[i].rx.bd_base_info = 0;
+
+		ret = hns3_check_rx_dma_addr(hw, dma_addr);
+		if (ret != 0) {
+			hns3_rx_queue_release_mbufs(rxq);
+			return ret;
+		}
 	}
 
 	return 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.603907474 +0800
+++ 0129-net-hns3-check-Rx-DMA-address-alignmnent.patch	2024-08-12 20:44:02.525069379 +0800
@@ -1 +1 @@
-From d14c995b775a9b5910c51c3ab3685b320736f3f6 Mon Sep 17 00:00:00 2001
+From 7deaec6ac8c2242b225cf97963cdd8b4dc176b69 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d14c995b775a9b5910c51c3ab3685b320736f3f6 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index 327f6fe908..ec1251cb7e 100644
+index 90dbc4a84b..8e18aaf110 100644
@@ -49 +51 @@
-index a6b652455b..799b61038a 100644
+index e70c5fff2a..c190d5109b 100644
@@ -75 +77 @@
-index b83d5b9589..ea9225cd26 100644
+index 83d3d66005..d4d691ad86 100644
@@ -95 +97 @@
-index d7f9cff547..5941b966e0 100644
+index 75ea6bdca9..8d0db134d2 100644

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

* patch 'net/ark: fix index arithmetic' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (128 preceding siblings ...)
  2024-08-12 12:50       ` patch 'net/hns3: check Rx DMA address alignmnent' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'ethdev: fix GENEVE option item conversion' " Xueming Li
                         ` (27 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Ed Czeck; +Cc: xuemingl, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e2b3b0a5d4cee408f6d1638010669df467e7398b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e2b3b0a5d4cee408f6d1638010669df467e7398b Mon Sep 17 00:00:00 2001
From: Ed Czeck <ed.czeck@atomicrules.com>
Date: Wed, 17 Jul 2024 16:38:30 -0400
Subject: [PATCH] net/ark: fix index arithmetic
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 73c0e26c8ed9f59f867ff251fbb2a50c8dfa06c5 ]

Behavior for signed integer overflow is not defined which can causes
undesired behavior at values near max and min bounds.
The used of unsigned is defined as to use modulo arithmetic which is the
desired behavior.
This patch replaces int32_t with uint32_t except for necessary casts.

Fixes: 9ee9e0d3b85e ("net/ark: update to reflect FPGA updates")

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/ark/ark_ethdev_tx.c | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 4792754f19..8f1f90b1a4 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -39,8 +39,8 @@ struct ark_tx_queue {
 	uint32_t queue_mask;
 
 	/* 3 indexes to the paired data rings. */
-	int32_t prod_index;		/* where to put the next one */
-	int32_t free_index;		/* mbuf has been freed */
+	uint32_t prod_index;		/* where to put the next one */
+	uint32_t free_index;		/* mbuf has been freed */
 
 	/* The queue Id is used to identify the HW Q */
 	uint16_t phys_qid;
@@ -49,7 +49,7 @@ struct ark_tx_queue {
 
 	/* next cache line - fields written by device */
 	RTE_MARKER cacheline1 __rte_cache_min_aligned;
-	volatile int32_t cons_index;		/* hw is done, can be freed */
+	volatile uint32_t cons_index;		/* hw is done, can be freed */
 } __rte_cache_aligned;
 
 /* Forward declarations */
@@ -108,7 +108,7 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	uint32_t user_meta[5];
 
 	int stat;
-	int32_t prod_index_limit;
+	uint32_t prod_index_limit;
 	uint16_t nb;
 	uint8_t user_len = 0;
 	const uint32_t min_pkt_len = ARK_MIN_TX_PKTLEN;
@@ -123,8 +123,13 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	/* leave 4 elements mpu data */
 	prod_index_limit = queue->queue_size + queue->free_index - 4;
 
+	/* Populate the buffer bringing prod_index up to or slightly beyond
+	 * prod_index_limit. Prod_index will increment by 2 or more each
+	 * iteration.  Note: indexes are uint32_t, cast to (signed) int32_t
+	 * to catch the slight overage case;  e.g. (200 - 201)
+	 */
 	for (nb = 0;
-	     (nb < nb_pkts) && (prod_index_limit - queue->prod_index) > 0;
+	     (nb < nb_pkts) && (int32_t)(prod_index_limit - queue->prod_index) > 0;
 	     ++nb) {
 		mbuf = tx_pkts[nb];
 
@@ -194,13 +199,13 @@ eth_ark_tx_jumbo(struct ark_tx_queue *queue, struct rte_mbuf *mbuf,
 		 uint32_t *user_meta, uint8_t meta_cnt)
 {
 	struct rte_mbuf *next;
-	int32_t free_queue_space;
+	uint32_t free_queue_space;
 	uint8_t flags = ARK_DDM_SOP;
 
 	free_queue_space = queue->queue_mask -
 		(queue->prod_index - queue->free_index);
 	/* We need up to 4 mbufs for first header and 2 for subsequent ones */
-	if (unlikely(free_queue_space < (2 + (2 * mbuf->nb_segs))))
+	if (unlikely(free_queue_space < (2U + (2U * mbuf->nb_segs))))
 		return -1;
 
 	while (mbuf != NULL) {
@@ -392,10 +397,11 @@ free_completed_tx(struct ark_tx_queue *queue)
 {
 	struct rte_mbuf *mbuf;
 	union ark_tx_meta *meta;
-	int32_t top_index;
+	uint32_t top_index;
 
 	top_index = queue->cons_index;	/* read once */
-	while ((top_index - queue->free_index) > 0) {
+
+	while ((int32_t)(top_index - queue->free_index) > 0) {
 		meta = &queue->meta_q[queue->free_index & queue->queue_mask];
 		if (likely((meta->flags & ARK_DDM_SOP) != 0)) {
 			mbuf = queue->bufs[queue->free_index &
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.642847471 +0800
+++ 0130-net-ark-fix-index-arithmetic.patch	2024-08-12 20:44:02.525069379 +0800
@@ -1 +1 @@
-From 73c0e26c8ed9f59f867ff251fbb2a50c8dfa06c5 Mon Sep 17 00:00:00 2001
+From e2b3b0a5d4cee408f6d1638010669df467e7398b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 73c0e26c8ed9f59f867ff251fbb2a50c8dfa06c5 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 9c89c85f50..ca6cd297a1 100644
+index 4792754f19..8f1f90b1a4 100644
@@ -25 +27 @@
-@@ -39,8 +39,8 @@ struct __rte_cache_aligned ark_tx_queue {
+@@ -39,8 +39,8 @@ struct ark_tx_queue {
@@ -36 +38 @@
-@@ -49,7 +49,7 @@ struct __rte_cache_aligned ark_tx_queue {
+@@ -49,7 +49,7 @@ struct ark_tx_queue {
@@ -39 +41 @@
- 	alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1;
+ 	RTE_MARKER cacheline1 __rte_cache_min_aligned;
@@ -42 +44 @@
- };
+ } __rte_cache_aligned;

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

* patch 'ethdev: fix GENEVE option item conversion' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (129 preceding siblings ...)
  2024-08-12 12:50       ` patch 'net/ark: fix index arithmetic' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'net/netvsc: use ethdev API to set VF MTU' " Xueming Li
                         ` (26 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Michael Baum; +Cc: xuemingl, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e8746659b2e038bfbf6b5891a33dbe35acca3e99

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e8746659b2e038bfbf6b5891a33dbe35acca3e99 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Mon, 15 Jul 2024 15:13:16 +0300
Subject: [PATCH] ethdev: fix GENEVE option item conversion
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 841a0445442de154441ac2b4700658a9eb83c986 ]

The "rte_flow_conv()" function, enables, among other things, to copy
item list.

For GENEVE option item, the function copies it without considering deep
copy. It copies the "data" pointer without copying the pointed values.

This patch adds deep copy for after regular copy.

Fixes: 2b4c72b4d10d ("ethdev: introduce GENEVE header TLV option item")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_flow.c | 29 +++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 04348e0243..fa2a8fedce 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -616,6 +616,7 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
 	switch (item->type) {
 		union {
 			const struct rte_flow_item_raw *raw;
+			const struct rte_flow_item_geneve_opt *geneve_opt;
 		} spec;
 		union {
 			const struct rte_flow_item_raw *raw;
@@ -625,10 +626,13 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
 		} mask;
 		union {
 			const struct rte_flow_item_raw *raw;
+			const struct rte_flow_item_geneve_opt *geneve_opt;
 		} src;
 		union {
 			struct rte_flow_item_raw *raw;
+			struct rte_flow_item_geneve_opt *geneve_opt;
 		} dst;
+		void *deep_src;
 		size_t tmp;
 
 	case RTE_FLOW_ITEM_TYPE_RAW:
@@ -657,13 +661,30 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
 			tmp = last.raw->length & mask.raw->length;
 		if (tmp) {
 			off = RTE_ALIGN_CEIL(off, sizeof(*dst.raw->pattern));
-			if (size >= off + tmp)
-				dst.raw->pattern = rte_memcpy
-					((void *)((uintptr_t)dst.raw + off),
-					 src.raw->pattern, tmp);
+			if (size >= off + tmp) {
+				deep_src = (void *)((uintptr_t)dst.raw + off);
+				dst.raw->pattern = rte_memcpy(deep_src,
+							      src.raw->pattern,
+							      tmp);
+			}
 			off += tmp;
 		}
 		break;
+	case RTE_FLOW_ITEM_TYPE_GENEVE_OPT:
+		off = rte_flow_conv_copy(buf, data, size,
+					 rte_flow_desc_item, item->type);
+		spec.geneve_opt = item->spec;
+		src.geneve_opt = data;
+		dst.geneve_opt = buf;
+		tmp = spec.geneve_opt->option_len << 2;
+		if (size > 0 && src.geneve_opt->data) {
+			deep_src = (void *)((uintptr_t)(dst.geneve_opt + 1));
+			dst.geneve_opt->data = rte_memcpy(deep_src,
+							  src.geneve_opt->data,
+							  tmp);
+		}
+		off += tmp;
+		break;
 	default:
 		off = rte_flow_conv_copy(buf, data, size,
 					 rte_flow_desc_item, item->type);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.678581268 +0800
+++ 0131-ethdev-fix-GENEVE-option-item-conversion.patch	2024-08-12 20:44:02.535069381 +0800
@@ -1 +1 @@
-From 841a0445442de154441ac2b4700658a9eb83c986 Mon Sep 17 00:00:00 2001
+From e8746659b2e038bfbf6b5891a33dbe35acca3e99 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 841a0445442de154441ac2b4700658a9eb83c986 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index ca2f85c3fa..4076ae4ee1 100644
+index 04348e0243..fa2a8fedce 100644
@@ -27 +29 @@
-@@ -623,6 +623,7 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
+@@ -616,6 +616,7 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
@@ -35 +37 @@
-@@ -632,10 +633,13 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
+@@ -625,10 +626,13 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
@@ -49 +51 @@
-@@ -664,13 +668,30 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
+@@ -657,13 +661,30 @@ rte_flow_conv_item_spec(void *buf, const size_t size,

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

* patch 'net/netvsc: use ethdev API to set VF MTU' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (130 preceding siblings ...)
  2024-08-12 12:50       ` patch 'ethdev: fix GENEVE option item conversion' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'app/testpmd: add postpone option to async flow destroy' " Xueming Li
                         ` (25 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: xuemingl, Long Li, Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=fbd7ac3b83d6fa7c0edc88008985d021b6014a35

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fbd7ac3b83d6fa7c0edc88008985d021b6014a35 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 18 Jul 2024 12:35:16 -0700
Subject: [PATCH] net/netvsc: use ethdev API to set VF MTU
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e57f8c38dc99b32a747b0aa4a0442a167e52d085 ]

The current code uses unnecessary locking to set VF MTU, resulting in
deadlock on hot add/remove path. Fix this by using rte_eth_dev_set_mtu()
to set VF MTU.

Fixes: 45c83603087e ("net/netvsc: support MTU set")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Long Li <longli@microsoft.com>
Reviewed-by: Wei Hu <weh@microsoft.com>
---
 drivers/net/netvsc/hn_vf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
index 90cb6f6923..a4e958419d 100644
--- a/drivers/net/netvsc/hn_vf.c
+++ b/drivers/net/netvsc/hn_vf.c
@@ -264,7 +264,7 @@ int hn_vf_add(struct rte_eth_dev *dev, struct hn_data *hv)
 			goto exit;
 		}
 
-		ret = hn_vf_mtu_set(dev, dev->data->mtu);
+		ret = rte_eth_dev_set_mtu(port, dev->data->mtu);
 		if (ret) {
 			PMD_DRV_LOG(ERR, "Failed to set VF MTU");
 			goto exit;
@@ -794,7 +794,7 @@ int hn_vf_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	rte_rwlock_read_lock(&hv->vf_lock);
 	vf_dev = hn_get_vf_dev(hv);
 	if (hv->vf_ctx.vf_vsc_switched && vf_dev)
-		ret = vf_dev->dev_ops->mtu_set(vf_dev, mtu);
+		ret = rte_eth_dev_set_mtu(vf_dev->data->port_id, mtu);
 	rte_rwlock_read_unlock(&hv->vf_lock);
 
 	return ret;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.707220366 +0800
+++ 0132-net-netvsc-use-ethdev-API-to-set-VF-MTU.patch	2024-08-12 20:44:02.535069381 +0800
@@ -1 +1 @@
-From e57f8c38dc99b32a747b0aa4a0442a167e52d085 Mon Sep 17 00:00:00 2001
+From fbd7ac3b83d6fa7c0edc88008985d021b6014a35 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e57f8c38dc99b32a747b0aa4a0442a167e52d085 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 6b3d0eb0c8..b664beaa5d 100644
+index 90cb6f6923..a4e958419d 100644
@@ -33 +35 @@
-@@ -796,7 +796,7 @@ int hn_vf_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -794,7 +794,7 @@ int hn_vf_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)

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

* patch 'app/testpmd: add postpone option to async flow destroy' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (131 preceding siblings ...)
  2024-08-12 12:50       ` patch 'net/netvsc: use ethdev API to set VF MTU' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'ethdev: fix device init without socket-local memory' " Xueming Li
                         ` (24 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: xuemingl, Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=890b02b9075d73ddf5ad28b3f8fd9e589cf6d4f9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 890b02b9075d73ddf5ad28b3f8fd9e589cf6d4f9 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Wed, 17 Jul 2024 17:19:54 +0300
Subject: [PATCH] app/testpmd: add postpone option to async flow destroy
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8e74ca6d627ddd0b934609f8575f3bd66f04a0c5 ]

The postpone option is not available in the async flow destroy CLI.
Only flow creation can be postponed in the testpmd application.
Insert this option into the async flow destroy CLI before the rule ID.

Fixes: ecdc927b99f2 ("app/testpmd: add async flow create/destroy operations")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index c20c1f8b5e..7e6e06a04f 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3520,7 +3520,7 @@ static const struct token token_list[] = {
 	[QUEUE_DESTROY] = {
 		.name = "destroy",
 		.help = "destroy a flow rule",
-		.next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_ID),
+		.next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_POSTPONE),
 			     NEXT_ENTRY(COMMON_QUEUE_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, queue)),
 		.call = parse_qo_destroy,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.737383663 +0800
+++ 0133-app-testpmd-add-postpone-option-to-async-flow-destro.patch	2024-08-12 20:44:02.545069383 +0800
@@ -1 +1 @@
-From 8e74ca6d627ddd0b934609f8575f3bd66f04a0c5 Mon Sep 17 00:00:00 2001
+From 890b02b9075d73ddf5ad28b3f8fd9e589cf6d4f9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8e74ca6d627ddd0b934609f8575f3bd66f04a0c5 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index a76b44bf39..fb6a552863 100644
+index c20c1f8b5e..7e6e06a04f 100644
@@ -23 +25 @@
-@@ -3703,7 +3703,7 @@ static const struct token token_list[] = {
+@@ -3520,7 +3520,7 @@ static const struct token token_list[] = {

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

* patch 'ethdev: fix device init without socket-local memory' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (132 preceding siblings ...)
  2024-08-12 12:50       ` patch 'app/testpmd: add postpone option to async flow destroy' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'net/gve: fix Tx queue state on queue start' " Xueming Li
                         ` (23 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: xuemingl, Padraig Connolly, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=7ff9eeeb710f2d1b441d7db1efca0809c20bebae

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7ff9eeeb710f2d1b441d7db1efca0809c20bebae Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 22 Jul 2024 11:02:28 +0100
Subject: [PATCH] ethdev: fix device init without socket-local memory
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ed34d87d9cfbae8b908159f60df2008e45e4c39f ]

When allocating memory for an ethdev, the rte_malloc_socket call used
only allocates memory on the NUMA node/socket local to the device. This
means that even if the user wanted to, they could never use a remote NIC
without also having memory on that NIC's socket.

For example, if we change examples/skeleton/basicfwd.c to have
SOCKET_ID_ANY as the socket_id parameter for Rx and Tx rings, we should
be able to run the app cross-numa e.g. as below, where the two PCI
devices are on socket 1, and core 1 is on socket 0:

 ./build/examples/dpdk-skeleton -l 1 --legacy-mem --socket-mem=1024,0 \
		-a a8:00.0 -a b8:00.0

This fails however, with the error:

  ETHDEV: failed to allocate private data
  PCI_BUS: Requested device 0000:a8:00.0 cannot be used

We can remove this restriction by doing a fallback call to general
rte_malloc after a call to rte_malloc_socket fails. This should be safe
to do because the later ethdev calls to setup Rx/Tx queues all take a
socket_id parameter, which can be used by applications to enforce the
requirement for local-only memory for a device, if so desired. [If
device-local memory is present it will be used as before, while if not
present the rte_eth_dev_configure call will now pass, but the subsequent
queue setup calls requesting local memory will fail].

Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs")
Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Padraig Connolly <padraig.j.connolly@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/ethdev_driver.c | 20 +++++++++++++++-----
 lib/ethdev/ethdev_pci.h    | 20 +++++++++++++++++---
 2 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index 55a9dcc565..47659d5e8c 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -297,15 +297,25 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
 			return -ENODEV;
 
 		if (priv_data_size) {
+			/* try alloc private data on device-local node. */
 			ethdev->data->dev_private = rte_zmalloc_socket(
 				name, priv_data_size, RTE_CACHE_LINE_SIZE,
 				device->numa_node);
 
-			if (!ethdev->data->dev_private) {
-				RTE_ETHDEV_LOG(ERR,
-					"failed to allocate private data\n");
-				retval = -ENOMEM;
-				goto probe_failed;
+			/* fall back to alloc on any socket on failure */
+			if (ethdev->data->dev_private == NULL) {
+				ethdev->data->dev_private = rte_zmalloc(name,
+						priv_data_size, RTE_CACHE_LINE_SIZE);
+
+				if (ethdev->data->dev_private == NULL) {
+					RTE_ETHDEV_LOG(ERR, "failed to allocate private data\n");
+					retval = -ENOMEM;
+					goto probe_failed;
+				}
+				/* got memory, but not local, so issue warning */
+				RTE_ETHDEV_LOG(WARNING,
+					       "Private data for ethdev '%s' not allocated on local NUMA node %d\n",
+					       device->name, device->numa_node);
 			}
 		}
 	} else {
diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h
index ddb559aa95..c40bc2ed02 100644
--- a/lib/ethdev/ethdev_pci.h
+++ b/lib/ethdev/ethdev_pci.h
@@ -93,12 +93,26 @@ rte_eth_dev_pci_allocate(struct rte_pci_device *dev, size_t private_data_size)
 			return NULL;
 
 		if (private_data_size) {
+			/* Try and alloc the private-data structure on socket local to the device */
 			eth_dev->data->dev_private = rte_zmalloc_socket(name,
 				private_data_size, RTE_CACHE_LINE_SIZE,
 				dev->device.numa_node);
-			if (!eth_dev->data->dev_private) {
-				rte_eth_dev_release_port(eth_dev);
-				return NULL;
+
+			/* if cannot allocate memory on the socket local to the device
+			 * use rte_malloc to allocate memory on some other socket, if available.
+			 */
+			if (eth_dev->data->dev_private == NULL) {
+				eth_dev->data->dev_private = rte_zmalloc(name,
+						private_data_size, RTE_CACHE_LINE_SIZE);
+
+				if (eth_dev->data->dev_private == NULL) {
+					rte_eth_dev_release_port(eth_dev);
+					return NULL;
+				}
+				/* got memory, but not local, so issue warning */
+				RTE_ETHDEV_LOG(WARNING,
+					       "Private data for ethdev '%s' not allocated on local NUMA node %d\n",
+					       dev->device.name, dev->device.numa_node);
 			}
 		}
 	} else {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.766476861 +0800
+++ 0134-ethdev-fix-device-init-without-socket-local-memory.patch	2024-08-12 20:44:02.545069383 +0800
@@ -1 +1 @@
-From ed34d87d9cfbae8b908159f60df2008e45e4c39f Mon Sep 17 00:00:00 2001
+From 7ff9eeeb710f2d1b441d7db1efca0809c20bebae Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ed34d87d9cfbae8b908159f60df2008e45e4c39f ]
@@ -35 +37,0 @@
-Cc: stable@dpdk.org
@@ -46 +48 @@
-index f48c0eb8bc..c335a25a82 100644
+index 55a9dcc565..47659d5e8c 100644
@@ -49 +51 @@
-@@ -303,15 +303,25 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
+@@ -297,15 +297,25 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
@@ -59,2 +61,2 @@
--				RTE_ETHDEV_LOG_LINE(ERR,
--					"failed to allocate private data");
+-				RTE_ETHDEV_LOG(ERR,
+-					"failed to allocate private data\n");
@@ -69 +71 @@
-+					RTE_ETHDEV_LOG_LINE(ERR, "failed to allocate private data");
++					RTE_ETHDEV_LOG(ERR, "failed to allocate private data\n");
@@ -74,3 +76,3 @@
-+				RTE_ETHDEV_LOG_LINE(WARNING,
-+						"Private data for ethdev '%s' not allocated on local NUMA node %d",
-+						device->name, device->numa_node);
++				RTE_ETHDEV_LOG(WARNING,
++					       "Private data for ethdev '%s' not allocated on local NUMA node %d\n",
++					       device->name, device->numa_node);
@@ -81 +83 @@
-index 737fff1833..ec4f731270 100644
+index ddb559aa95..c40bc2ed02 100644
@@ -108,3 +110,3 @@
-+				RTE_ETHDEV_LOG_LINE(WARNING,
-+						"Private data for ethdev '%s' not allocated on local NUMA node %d",
-+						dev->device.name, dev->device.numa_node);
++				RTE_ETHDEV_LOG(WARNING,
++					       "Private data for ethdev '%s' not allocated on local NUMA node %d\n",
++					       dev->device.name, dev->device.numa_node);

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

* patch 'net/gve: fix Tx queue state on queue start' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (133 preceding siblings ...)
  2024-08-12 12:50       ` patch 'ethdev: fix device init without socket-local memory' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'app/testpmd: fix build on signed comparison' " Xueming Li
                         ` (22 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Tathagat Priyadarshi; +Cc: xuemingl, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b858eb7a55f98bdc92c633cbf7c553ac47ebfe69

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b858eb7a55f98bdc92c633cbf7c553ac47ebfe69 Mon Sep 17 00:00:00 2001
From: Tathagat Priyadarshi <tathagat.dpdk@gmail.com>
Date: Mon, 22 Jul 2024 11:10:11 +0000
Subject: [PATCH] net/gve: fix Tx queue state on queue start
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3caa72d388d77f42c45145c07274295f30de6146 ]

Fixing typo in updating the TX queue state

Fixes: b044845bb015 ("net/gve: support queue start/stop")

Signed-off-by: Tathagat Priyadarshi <tathagat.dpdk@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/gve/gve_tx.c     | 2 +-
 drivers/net/gve/gve_tx_dqo.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/gve/gve_tx.c b/drivers/net/gve/gve_tx.c
index 2e0d001109..bb21b90635 100644
--- a/drivers/net/gve/gve_tx.c
+++ b/drivers/net/gve/gve_tx.c
@@ -681,7 +681,7 @@ gve_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 
 	rte_write32(rte_cpu_to_be_32(GVE_IRQ_MASK), txq->ntfy_addr);
 
-	dev->data->rx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
+	dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
 
 	return 0;
 }
diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c
index 30a1455b20..97d9c6549b 100644
--- a/drivers/net/gve/gve_tx_dqo.c
+++ b/drivers/net/gve/gve_tx_dqo.c
@@ -392,7 +392,7 @@ gve_tx_queue_start_dqo(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 
 	rte_write32(rte_cpu_to_be_32(GVE_IRQ_MASK), txq->ntfy_addr);
 
-	dev->data->rx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
+	dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
 
 	return 0;
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.789687959 +0800
+++ 0135-net-gve-fix-Tx-queue-state-on-queue-start.patch	2024-08-12 20:44:02.545069383 +0800
@@ -1 +1 @@
-From 3caa72d388d77f42c45145c07274295f30de6146 Mon Sep 17 00:00:00 2001
+From b858eb7a55f98bdc92c633cbf7c553ac47ebfe69 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3caa72d388d77f42c45145c07274295f30de6146 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index b1ea36e509..658bfb972b 100644
+index 2e0d001109..bb21b90635 100644
@@ -22 +24 @@
-@@ -690,7 +690,7 @@ gve_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -681,7 +681,7 @@ gve_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
@@ -32 +34 @@
-index a65e6aaf00..1b85557a15 100644
+index 30a1455b20..97d9c6549b 100644

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

* patch 'app/testpmd: fix build on signed comparison' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (134 preceding siblings ...)
  2024-08-12 12:50       ` patch 'net/gve: fix Tx queue state on queue start' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'bus/pci: fix UIO resource mapping in secondary process' " Xueming Li
                         ` (21 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: xuemingl, Raslan Darawsheh, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ca12727f09f74f8524e346d3e9c9c472e6b4dd10

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ca12727f09f74f8524e346d3e9c9c472e6b4dd10 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Mon, 22 Jul 2024 03:52:29 -0700
Subject: [PATCH] app/testpmd: fix build on signed comparison
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1f47f469aac68bc88be24e530b4267d03537de12 ]

Build error:
.../app/test-pmd/config.c: In function 'icmp_echo_config_setup':
.../app/test-pmd/config.c:5159:30:
   error: comparison between signed and unsigned integer expressions
          [-Werror=sign-compare]
  if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)
                              ^
All 'nb_txq', 'nb_fwd_ports' & 'nb_fwd_lcores' are unsigned variables,
but the warning is related to the integer promotion rules of C:
'nb_txq'       -> uint16_t, promoted to 'int'
'nb_fwd_ports' -> uint16_t, promoted to 'int'
(nb_txq * nb_fwd_ports) -> result 'int'
nb_fwd_lcores  -> 'uint32_t'
Ends up comparing 'int' vs 'uint32_t'.

Fixing by adding the casting back which was initially part of the patch.

Fixes: 2bf44dd14fa5 ("app/testpmd: fix lcore ID restriction")

Reported-by: Raslan Darawsheh <rasland@nvidia.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 app/test-pmd/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index a09aa3bb85..40e4e83fb8 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4980,7 +4980,7 @@ icmp_echo_config_setup(void)
 	lcoreid_t lc_id;
 	uint16_t  sm_id;
 
-	if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)
+	if ((lcoreid_t)(nb_txq * nb_fwd_ports) < nb_fwd_lcores)
 		cur_fwd_config.nb_fwd_lcores = (lcoreid_t)
 			(nb_txq * nb_fwd_ports);
 	else
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.811800757 +0800
+++ 0136-app-testpmd-fix-build-on-signed-comparison.patch	2024-08-12 20:44:02.545069383 +0800
@@ -1 +1 @@
-From 1f47f469aac68bc88be24e530b4267d03537de12 Mon Sep 17 00:00:00 2001
+From ca12727f09f74f8524e346d3e9c9c472e6b4dd10 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1f47f469aac68bc88be24e530b4267d03537de12 ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -34 +36 @@
-index 66c3a68c1d..6f0beafa27 100644
+index a09aa3bb85..40e4e83fb8 100644
@@ -37 +39 @@
-@@ -5156,7 +5156,7 @@ icmp_echo_config_setup(void)
+@@ -4980,7 +4980,7 @@ icmp_echo_config_setup(void)

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

* patch 'bus/pci: fix UIO resource mapping in secondary process' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (135 preceding siblings ...)
  2024-08-12 12:50       ` patch 'app/testpmd: fix build on signed comparison' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'bus/pci: fix FD " Xueming Li
                         ` (20 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Zerun Fu
  Cc: xuemingl, Chaoyong He, Long Wu, Peng Zhang, Anatoly Burakov,
	Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c076f02992f0254d0082045607f6a485c10cc250

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c076f02992f0254d0082045607f6a485c10cc250 Mon Sep 17 00:00:00 2001
From: Zerun Fu <zerun.fu@corigine.com>
Date: Tue, 2 Jul 2024 15:40:06 +0800
Subject: [PATCH] bus/pci: fix UIO resource mapping in secondary process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9e0a0e38ecaa7efaca9d349737d0a5ef9ca33a57 ]

For the primary process, the logic loops all BARs and will skip
the map of BAR with an invalid physical address (0), also will
assign 'uio_res->nb_maps' with the real mapped BARs number. But
for the secondary process, instead of loops all BARs, the logic
using the 'uio_res->nb_map' as index. If the device uses continuous
BARs there will be no problem, whereas if it uses discrete BARs,
it will lead to mapping errors.

Fix this problem by also loops all BARs and skip the map of BAR
with an invalid physical address in secondary process.

Fixes: 9b957f378abf ("pci: merge uio functions for linux and bsd")

Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
---
 drivers/bus/pci/pci_common_uio.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index 76c661f054..f44ccdf27c 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -26,7 +26,7 @@ EAL_REGISTER_TAILQ(rte_uio_tailq)
 static int
 pci_uio_map_secondary(struct rte_pci_device *dev)
 {
-	int fd, i, j;
+	int fd, i = 0, j, res_idx;
 	struct mapped_pci_resource *uio_res;
 	struct mapped_pci_res_list *uio_res_list =
 			RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);
@@ -37,7 +37,15 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
 		if (rte_pci_addr_cmp(&uio_res->pci_addr, &dev->addr))
 			continue;
 
-		for (i = 0; i != uio_res->nb_maps; i++) {
+		/* Map all BARs */
+		for (res_idx = 0; res_idx != PCI_MAX_RESOURCE; res_idx++) {
+			/* skip empty BAR */
+			if (dev->mem_resource[res_idx].phys_addr == 0)
+				continue;
+
+			if (i >= uio_res->nb_maps)
+				return -1;
+
 			/*
 			 * open devname, to mmap it
 			 */
@@ -71,7 +79,9 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
 				}
 				return -1;
 			}
-			dev->mem_resource[i].addr = mapaddr;
+			dev->mem_resource[res_idx].addr = mapaddr;
+
+			i++;
 		}
 		return 0;
 	}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.840706855 +0800
+++ 0137-bus-pci-fix-UIO-resource-mapping-in-secondary-proces.patch	2024-08-12 20:44:02.555069385 +0800
@@ -1 +1 @@
-From 9e0a0e38ecaa7efaca9d349737d0a5ef9ca33a57 Mon Sep 17 00:00:00 2001
+From c076f02992f0254d0082045607f6a485c10cc250 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9e0a0e38ecaa7efaca9d349737d0a5ef9ca33a57 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index ff1b02b6bd..65f72b7cc6 100644
+index 76c661f054..f44ccdf27c 100644
@@ -60 +62 @@
-@@ -70,7 +78,9 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
+@@ -71,7 +79,9 @@ pci_uio_map_secondary(struct rte_pci_device *dev)

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

* patch 'bus/pci: fix FD in secondary process' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (136 preceding siblings ...)
  2024-08-12 12:50       ` patch 'bus/pci: fix UIO resource mapping in secondary process' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'dma/hisilicon: remove support for HIP09 platform' " Xueming Li
                         ` (19 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Zerun Fu
  Cc: xuemingl, Chaoyong He, Long Wu, Peng Zhang, Anatoly Burakov,
	Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a5375f449286d4b81e5fc9f4af51054e24aac361

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a5375f449286d4b81e5fc9f4af51054e24aac361 Mon Sep 17 00:00:00 2001
From: Zerun Fu <zerun.fu@corigine.com>
Date: Tue, 2 Jul 2024 15:40:07 +0800
Subject: [PATCH] bus/pci: fix FD in secondary process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 847d78fb9530fff401bf167298aad22766a1f04a ]

In the previous logic the 'fd' was only saved in the primary process,
but for some devices this value is also used in the secondary logic.

For example, the call of 'rte_pci_find_ext_capability()' will fail in
the secondary process.

Fix this problem by getting and saving the value of 'fd' also in the
secondary process logic.

Fixes: 9b957f378abf ("pci: merge uio functions for linux and bsd")

Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
---
 drivers/bus/pci/linux/pci_uio.c  |  5 ++++-
 drivers/bus/pci/pci_common_uio.c | 32 ++++++++++++++++----------------
 2 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c
index 97d740dfe5..4afda97858 100644
--- a/drivers/bus/pci/linux/pci_uio.c
+++ b/drivers/bus/pci/linux/pci_uio.c
@@ -237,7 +237,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
 	}
 	snprintf(devname, sizeof(devname), "/dev/uio%u", uio_num);
 
-	/* save fd if in primary process */
+	/* save fd */
 	fd = open(devname, O_RDWR);
 	if (fd < 0) {
 		RTE_LOG(ERR, EAL, "Cannot open %s: %s\n",
@@ -275,6 +275,9 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
 		}
 	}
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
 	/* allocate the mapping details for secondary processes*/
 	*uio_res = rte_zmalloc("UIO_RES", sizeof(**uio_res), 0);
 	if (*uio_res == NULL) {
diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index f44ccdf27c..a06378b239 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -106,15 +106,15 @@ pci_uio_map_resource(struct rte_pci_device *dev)
 	if (rte_intr_dev_fd_set(dev->intr_handle, -1))
 		return -1;
 
-	/* secondary processes - use already recorded details */
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return pci_uio_map_secondary(dev);
-
 	/* allocate uio resource */
 	ret = pci_uio_alloc_resource(dev, &uio_res);
 	if (ret)
 		return ret;
 
+	/* secondary processes - use already recorded details */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return pci_uio_map_secondary(dev);
+
 	/* Map all BARs */
 	for (i = 0; i != PCI_MAX_RESOURCE; i++) {
 		/* skip empty BAR */
@@ -230,6 +230,18 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
 	if (uio_res == NULL)
 		return;
 
+	/* close fd */
+	if (rte_intr_fd_get(dev->intr_handle) >= 0)
+		close(rte_intr_fd_get(dev->intr_handle));
+	uio_cfg_fd = rte_intr_dev_fd_get(dev->intr_handle);
+	if (uio_cfg_fd >= 0) {
+		close(uio_cfg_fd);
+		rte_intr_dev_fd_set(dev->intr_handle, -1);
+	}
+
+	rte_intr_fd_set(dev->intr_handle, -1);
+	rte_intr_type_set(dev->intr_handle, RTE_INTR_HANDLE_UNKNOWN);
+
 	/* secondary processes - just free maps */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return pci_uio_unmap(uio_res);
@@ -241,16 +253,4 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
 
 	/* free uio resource */
 	rte_free(uio_res);
-
-	/* close fd if in primary process */
-	if (rte_intr_fd_get(dev->intr_handle) >= 0)
-		close(rte_intr_fd_get(dev->intr_handle));
-	uio_cfg_fd = rte_intr_dev_fd_get(dev->intr_handle);
-	if (uio_cfg_fd >= 0) {
-		close(uio_cfg_fd);
-		rte_intr_dev_fd_set(dev->intr_handle, -1);
-	}
-
-	rte_intr_fd_set(dev->intr_handle, -1);
-	rte_intr_type_set(dev->intr_handle, RTE_INTR_HANDLE_UNKNOWN);
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.865533453 +0800
+++ 0138-bus-pci-fix-FD-in-secondary-process.patch	2024-08-12 20:44:02.555069385 +0800
@@ -1 +1 @@
-From 847d78fb9530fff401bf167298aad22766a1f04a Mon Sep 17 00:00:00 2001
+From a5375f449286d4b81e5fc9f4af51054e24aac361 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 847d78fb9530fff401bf167298aad22766a1f04a ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index f7d990d33f..4c1d3327a9 100644
+index 97d740dfe5..4afda97858 100644
@@ -33 +35 @@
-@@ -234,7 +234,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
+@@ -237,7 +237,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
@@ -41,2 +43,2 @@
- 		PCI_LOG(ERR, "Cannot open %s: %s", devname, strerror(errno));
-@@ -270,6 +270,9 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
+ 		RTE_LOG(ERR, EAL, "Cannot open %s: %s\n",
+@@ -275,6 +275,9 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
@@ -53 +55 @@
-index 65f72b7cc6..30503bd23a 100644
+index f44ccdf27c..a06378b239 100644
@@ -56 +58 @@
-@@ -105,15 +105,15 @@ pci_uio_map_resource(struct rte_pci_device *dev)
+@@ -106,15 +106,15 @@ pci_uio_map_resource(struct rte_pci_device *dev)
@@ -76 +78 @@
-@@ -225,6 +225,18 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
+@@ -230,6 +230,18 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
@@ -95 +97 @@
-@@ -236,16 +248,4 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
+@@ -241,16 +253,4 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)

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

* patch 'dma/hisilicon: remove support for HIP09 platform' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (137 preceding siblings ...)
  2024-08-12 12:50       ` patch 'bus/pci: fix FD " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'app/dumpcap: handle SIGTERM and SIGHUP' " Xueming Li
                         ` (18 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=eacf416207f88132c1a51891dddb976ebd740cd5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eacf416207f88132c1a51891dddb976ebd740cd5 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 4 Jul 2024 02:53:17 +0000
Subject: [PATCH] dma/hisilicon: remove support for HIP09 platform
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2a3f42942a5f4df62108679ef44a34d21b4a2553 ]

The DMA for HIP09 is no longer available, so delete it.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 doc/guides/dmadevs/hisilicon.rst    |  1 -
 drivers/dma/hisilicon/hisi_dmadev.c | 40 +----------------------------
 drivers/dma/hisilicon/hisi_dmadev.h | 35 +------------------------
 3 files changed, 2 insertions(+), 74 deletions(-)

diff --git a/doc/guides/dmadevs/hisilicon.rst b/doc/guides/dmadevs/hisilicon.rst
index 8c1f0f8886..974bc49376 100644
--- a/doc/guides/dmadevs/hisilicon.rst
+++ b/doc/guides/dmadevs/hisilicon.rst
@@ -13,7 +13,6 @@ Supported Kunpeng SoCs
 ----------------------
 
 * Kunpeng 920
-* Kunpeng 930
 
 
 Device Setup
diff --git a/drivers/dma/hisilicon/hisi_dmadev.c b/drivers/dma/hisilicon/hisi_dmadev.c
index 0e11ca14cc..4db3b0554c 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.c
+++ b/drivers/dma/hisilicon/hisi_dmadev.c
@@ -39,8 +39,6 @@ hisi_dma_queue_base(struct hisi_dma_dev *hw)
 {
 	if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP08)
 		return HISI_DMA_HIP08_QUEUE_BASE;
-	else if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP09)
-		return HISI_DMA_HIP09_QUEUE_BASE;
 	else
 		return 0;
 }
@@ -216,25 +214,6 @@ hisi_dma_init_hw(struct hisi_dma_dev *hw)
 				HISI_DMA_HIP08_QUEUE_INT_MASK_M, true);
 		hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_INT_MASK_REG,
 				HISI_DMA_HIP08_QUEUE_INT_MASK_M, true);
-	} else if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP09) {
-		hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_CTRL0_REG,
-				HISI_DMA_HIP09_QUEUE_CTRL0_ERR_ABORT_M, false);
-		hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_INT_STATUS_REG,
-				HISI_DMA_HIP09_QUEUE_INT_MASK_M, true);
-		hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_INT_MASK_REG,
-				HISI_DMA_HIP09_QUEUE_INT_MASK_M, true);
-		hisi_dma_update_queue_mbit(hw,
-				HISI_DMA_HIP09_QUEUE_ERR_INT_STATUS_REG,
-				HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_M, true);
-		hisi_dma_update_queue_mbit(hw,
-				HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_REG,
-				HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_M, true);
-		hisi_dma_update_queue_bit(hw, HISI_DMA_QUEUE_CTRL1_REG,
-				HISI_DMA_HIP09_QUEUE_CTRL1_VA_ENABLE_B, true);
-		hisi_dma_update_bit(hw,
-				HISI_DMA_HIP09_QUEUE_CFG_REG(hw->queue_id),
-				HISI_DMA_HIP09_QUEUE_CFG_LINK_DOWN_MASK_B,
-				true);
 	}
 }
 
@@ -256,8 +235,6 @@ hisi_dma_reg_layout(uint8_t revision)
 {
 	if (revision == HISI_DMA_REVISION_HIP08B)
 		return HISI_DMA_REG_LAYOUT_HIP08;
-	else if (revision >= HISI_DMA_REVISION_HIP09A)
-		return HISI_DMA_REG_LAYOUT_HIP09;
 	else
 		return HISI_DMA_REG_LAYOUT_INVALID;
 }
@@ -328,14 +305,11 @@ hisi_dma_info_get(const struct rte_dma_dev *dev,
 		  struct rte_dma_info *dev_info,
 		  uint32_t info_sz)
 {
-	struct hisi_dma_dev *hw = dev->data->dev_private;
+	RTE_SET_USED(dev);
 	RTE_SET_USED(info_sz);
 
 	dev_info->dev_capa = RTE_DMA_CAPA_MEM_TO_MEM |
 			     RTE_DMA_CAPA_OPS_COPY;
-	if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP09)
-		dev_info->dev_capa |= RTE_DMA_CAPA_HANDLES_ERRORS;
-
 	dev_info->max_vchans = 1;
 	dev_info->max_desc = HISI_DMA_MAX_DESC_NUM;
 	dev_info->min_desc = HISI_DMA_MIN_DESC_NUM;
@@ -514,18 +488,6 @@ hisi_dma_dump_common(struct hisi_dma_dev *hw, FILE *f)
 		{ HISI_DMA_REG_LAYOUT_HIP08,
 		  HISI_DMA_HIP08_DUMP_START_REG,
 		  HISI_DMA_HIP08_DUMP_END_REG },
-		{ HISI_DMA_REG_LAYOUT_HIP09,
-		  HISI_DMA_HIP09_DUMP_REGION_A_START_REG,
-		  HISI_DMA_HIP09_DUMP_REGION_A_END_REG },
-		{ HISI_DMA_REG_LAYOUT_HIP09,
-		  HISI_DMA_HIP09_DUMP_REGION_B_START_REG,
-		  HISI_DMA_HIP09_DUMP_REGION_B_END_REG },
-		{ HISI_DMA_REG_LAYOUT_HIP09,
-		  HISI_DMA_HIP09_DUMP_REGION_C_START_REG,
-		  HISI_DMA_HIP09_DUMP_REGION_C_END_REG },
-		{ HISI_DMA_REG_LAYOUT_HIP09,
-		  HISI_DMA_HIP09_DUMP_REGION_D_START_REG,
-		  HISI_DMA_HIP09_DUMP_REGION_D_END_REG },
 	};
 	uint32_t i;
 
diff --git a/drivers/dma/hisilicon/hisi_dmadev.h b/drivers/dma/hisilicon/hisi_dmadev.h
index 5a17f9f69e..a57b5c759a 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.h
+++ b/drivers/dma/hisilicon/hisi_dmadev.h
@@ -25,22 +25,14 @@
 #define HISI_DMA_DEVICE_ID			0xA122
 #define HISI_DMA_PCI_REVISION_ID_REG		0x08
 #define HISI_DMA_REVISION_HIP08B		0x21
-#define HISI_DMA_REVISION_HIP09A		0x30
 
 #define HISI_DMA_MAX_HW_QUEUES			4
 #define HISI_DMA_MAX_DESC_NUM			8192
 #define HISI_DMA_MIN_DESC_NUM			32
 
-/**
- * The HIP08B(HiSilicon IP08) and HIP09B(HiSilicon IP09) are DMA iEPs, they
- * have the same pci device id but different pci revision.
- * Unfortunately, they have different register layouts, so two layout
- * enumerations are defined.
- */
 enum {
 	HISI_DMA_REG_LAYOUT_INVALID = 0,
-	HISI_DMA_REG_LAYOUT_HIP08,
-	HISI_DMA_REG_LAYOUT_HIP09
+	HISI_DMA_REG_LAYOUT_HIP08
 };
 
 /**
@@ -69,9 +61,6 @@ enum {
  * length of queue-region. The global offset for a single queue register is
  * calculated by:
  *     offset = queue-base + (queue-id * queue-region) + reg-offset-in-region.
- *
- * The first part of queue region is basically the same for HIP08 and HIP09
- * register layouts, therefore, HISI_QUEUE_* registers are defined for it.
  */
 #define HISI_DMA_QUEUE_SQ_BASE_L_REG		0x0
 #define HISI_DMA_QUEUE_SQ_BASE_H_REG		0x4
@@ -110,28 +99,6 @@ enum {
 #define HISI_DMA_HIP08_DUMP_START_REG			0x2000
 #define HISI_DMA_HIP08_DUMP_END_REG			0x2280
 
-/**
- * HiSilicon IP09 DMA register and field define:
- */
-#define HISI_DMA_HIP09_QUEUE_BASE			0x2000
-#define HISI_DMA_HIP09_QUEUE_CTRL0_ERR_ABORT_M		GENMASK(31, 28)
-#define HISI_DMA_HIP09_QUEUE_CTRL1_VA_ENABLE_B		2
-#define HISI_DMA_HIP09_QUEUE_INT_MASK_M			0x1
-#define HISI_DMA_HIP09_QUEUE_ERR_INT_STATUS_REG		0x48
-#define HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_REG		0x4C
-#define HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_M		GENMASK(18, 1)
-#define HISI_DMA_HIP09_QUEUE_CFG_REG(queue_id)		(0x800 + \
-							 (queue_id) * 0x20)
-#define HISI_DMA_HIP09_QUEUE_CFG_LINK_DOWN_MASK_B	16
-#define HISI_DMA_HIP09_DUMP_REGION_A_START_REG		0x0
-#define HISI_DMA_HIP09_DUMP_REGION_A_END_REG		0x368
-#define HISI_DMA_HIP09_DUMP_REGION_B_START_REG		0x800
-#define HISI_DMA_HIP09_DUMP_REGION_B_END_REG		0xA08
-#define HISI_DMA_HIP09_DUMP_REGION_C_START_REG		0x1800
-#define HISI_DMA_HIP09_DUMP_REGION_C_END_REG		0x1A4C
-#define HISI_DMA_HIP09_DUMP_REGION_D_START_REG		0x1C00
-#define HISI_DMA_HIP09_DUMP_REGION_D_END_REG		0x1CC4
-
 /**
  * In fact, there are multiple states, but it need to pay attention to
  * the following three states for the driver:
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.895264451 +0800
+++ 0139-dma-hisilicon-remove-support-for-HIP09-platform.patch	2024-08-12 20:44:02.555069385 +0800
@@ -1 +1 @@
-From 2a3f42942a5f4df62108679ef44a34d21b4a2553 Mon Sep 17 00:00:00 2001
+From eacf416207f88132c1a51891dddb976ebd740cd5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
@@ -6 +7 @@
-The DMA for HIP09 is no longer available, so delete it.
+[ upstream commit 2a3f42942a5f4df62108679ef44a34d21b4a2553 ]
@@ -8 +9 @@
-Cc: stable@dpdk.org
+The DMA for HIP09 is no longer available, so delete it.
@@ -12,5 +13,4 @@
- doc/guides/dmadevs/hisilicon.rst       |  1 -
- doc/guides/rel_notes/release_24_07.rst |  5 ++++
- drivers/dma/hisilicon/hisi_dmadev.c    | 40 +-------------------------
- drivers/dma/hisilicon/hisi_dmadev.h    | 35 +---------------------
- 4 files changed, 7 insertions(+), 74 deletions(-)
+ doc/guides/dmadevs/hisilicon.rst    |  1 -
+ drivers/dma/hisilicon/hisi_dmadev.c | 40 +----------------------------
+ drivers/dma/hisilicon/hisi_dmadev.h | 35 +------------------------
+ 3 files changed, 2 insertions(+), 74 deletions(-)
@@ -30,16 +29,0 @@
-diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst
-index 058609b0f3..eb2ed1a55f 100644
---- a/doc/guides/rel_notes/release_24_07.rst
-+++ b/doc/guides/rel_notes/release_24_07.rst
-@@ -204,6 +204,11 @@ Removed Items
-   BPF is not supported and the librte-bpf test fails on 32-bit x86 kernels.
-   So disable the library and the pmd.
- 
-+* **Removed hisilicon DMA support for HIP09 platform.**
-+
-+  The DMA for HIP09 is no longer available,
-+  so the support is removed from hisilicon driver for HIP09 platform.
-+
- 
- API Changes
- -----------
@@ -47 +31 @@
-index e96bc1d654..7cd6ebc1e0 100644
+index 0e11ca14cc..4db3b0554c 100644
@@ -94 +78 @@
-@@ -327,14 +304,11 @@ hisi_dma_info_get(const struct rte_dma_dev *dev,
+@@ -328,14 +305,11 @@ hisi_dma_info_get(const struct rte_dma_dev *dev,
@@ -110 +94 @@
-@@ -513,18 +487,6 @@ hisi_dma_dump_common(struct hisi_dma_dev *hw, FILE *f)
+@@ -514,18 +488,6 @@ hisi_dma_dump_common(struct hisi_dma_dev *hw, FILE *f)

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

* patch 'app/dumpcap: handle SIGTERM and SIGHUP' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (138 preceding siblings ...)
  2024-08-12 12:50       ` patch 'dma/hisilicon: remove support for HIP09 platform' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'app/pdump: " Xueming Li
                         ` (17 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6bed8020a34aae0ff8b59febdc0d0678c8890067

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6bed8020a34aae0ff8b59febdc0d0678c8890067 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 3 Jul 2024 08:45:43 -0700
Subject: [PATCH] app/dumpcap: handle SIGTERM and SIGHUP
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b04d11bdc672cf8afb7a544077303a941a6a2baa ]

If the dumpcap is killed it does not cleanup which leaves
the ring buffer and the memory pool behind.
Until resource are exhausted devices will continue to fill the ring.

Fix by having the application handle SIGTERM, SIGHUP, and SIGPIPE.
These are the same signals handled in same way by the wireshark
dumpcap application.

Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/dumpcap/main.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index d57db0589a..76c7475114 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -939,6 +939,11 @@ int main(int argc, char **argv)
 {
 	struct rte_ring *r;
 	struct rte_mempool *mp;
+	struct sigaction action = {
+		.sa_flags = SA_RESTART,
+		.sa_handler = signal_handler,
+	};
+	struct sigaction origaction;
 	dumpcap_out_t out;
 	char *p;
 
@@ -964,8 +969,13 @@ int main(int argc, char **argv)
 
 	compile_filters();
 
-	signal(SIGINT, signal_handler);
-	signal(SIGPIPE, SIG_IGN);
+	sigemptyset(&action.sa_mask);
+	sigaction(SIGTERM, &action, NULL);
+	sigaction(SIGINT, &action, NULL);
+	sigaction(SIGPIPE, &action, NULL);
+	sigaction(SIGHUP, NULL, &origaction);
+	if (origaction.sa_handler == SIG_DFL)
+		sigaction(SIGHUP, &action, NULL);
 
 	enable_primary_monitor();
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.933993048 +0800
+++ 0140-app-dumpcap-handle-SIGTERM-and-SIGHUP.patch	2024-08-12 20:44:02.555069385 +0800
@@ -1 +1 @@
-From b04d11bdc672cf8afb7a544077303a941a6a2baa Mon Sep 17 00:00:00 2001
+From 6bed8020a34aae0ff8b59febdc0d0678c8890067 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b04d11bdc672cf8afb7a544077303a941a6a2baa ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index b25b95e2fc..ba91ca94d0 100644
+index d57db0589a..76c7475114 100644
@@ -26 +28 @@
-@@ -936,6 +936,11 @@ int main(int argc, char **argv)
+@@ -939,6 +939,11 @@ int main(int argc, char **argv)
@@ -38 +40 @@
-@@ -961,8 +966,13 @@ int main(int argc, char **argv)
+@@ -964,8 +969,13 @@ int main(int argc, char **argv)

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

* patch 'app/pdump: handle SIGTERM and SIGHUP' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (139 preceding siblings ...)
  2024-08-12 12:50       ` patch 'app/dumpcap: handle SIGTERM and SIGHUP' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'power: fix number of uncore frequencies' " Xueming Li
                         ` (16 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=52bf7488c319917236142521b2190d8d23ad225d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 52bf7488c319917236142521b2190d8d23ad225d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 3 Jul 2024 08:45:44 -0700
Subject: [PATCH] app/pdump: handle SIGTERM and SIGHUP
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e1253df666fdc672bc378722db0da2ce3091a8dd ]

The pdump application will leak ring and memory pool if killed
by SIGTERM.  Like dumpcap, the pdump process should cleanup
if process terminates due to being killed or hangup.

Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/pdump/main.c | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index a9205e130b..3592f8a865 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -571,11 +571,9 @@ disable_primary_monitor(void)
 }
 
 static void
-signal_handler(int sig_num)
+signal_handler(int sig_num __rte_unused)
 {
-	if (sig_num == SIGINT) {
-		quit_signal = 1;
-	}
+	quit_signal = 1;
 }
 
 static inline int
@@ -975,6 +973,11 @@ enable_primary_monitor(void)
 int
 main(int argc, char **argv)
 {
+	struct sigaction action = {
+		.sa_flags = SA_RESTART,
+		.sa_handler = signal_handler,
+	};
+	struct sigaction origaction;
 	int diag;
 	int ret;
 	int i;
@@ -983,8 +986,14 @@ main(int argc, char **argv)
 	char mp_flag[] = "--proc-type=secondary";
 	char *argp[argc + 2];
 
-	/* catch ctrl-c so we can print on exit */
-	signal(SIGINT, signal_handler);
+	/* catch ctrl-c so we can cleanup on exit */
+	sigemptyset(&action.sa_mask);
+	sigaction(SIGTERM, &action, NULL);
+	sigaction(SIGINT, &action, NULL);
+	sigaction(SIGPIPE, &action, NULL);
+	sigaction(SIGHUP, NULL, &origaction);
+	if (origaction.sa_handler == SIG_DFL)
+		sigaction(SIGHUP, &action, NULL);
 
 	argp[0] = argv[0];
 	argp[1] = n_flag;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.972453145 +0800
+++ 0141-app-pdump-handle-SIGTERM-and-SIGHUP.patch	2024-08-12 20:44:02.555069385 +0800
@@ -1 +1 @@
-From e1253df666fdc672bc378722db0da2ce3091a8dd Mon Sep 17 00:00:00 2001
+From 52bf7488c319917236142521b2190d8d23ad225d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e1253df666fdc672bc378722db0da2ce3091a8dd ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 3bdbb8dc78..fa85859703 100644
+index a9205e130b..3592f8a865 100644

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

* patch 'power: fix number of uncore frequencies' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (140 preceding siblings ...)
  2024-08-12 12:50       ` patch 'app/pdump: " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'malloc: fix multi-process wait condition handling' " Xueming Li
                         ` (15 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: xuemingl, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b53fb811c0cf187dcf54bd65f32af6deba0eb04b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b53fb811c0cf187dcf54bd65f32af6deba0eb04b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 22 Jul 2024 13:15:22 -0700
Subject: [PATCH] power: fix number of uncore frequencies
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 93db1cfcc36ac1808c4a09ec50a470c6127b859e ]

The number of uncore frequencies was defined in three places,
and two of them were too small leading to test failures.
All places should be using RTE_MAX_UNCORE_FREQS.

Bugzilla ID: 1499
Fixes: 60b8a661a957 ("power: add Intel uncore frequency control")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Hunt <david.hunt@intel.com>
---
 app/test/test_power_intel_uncore.c | 4 +---
 lib/power/power_intel_uncore.c     | 7 +++----
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/app/test/test_power_intel_uncore.c b/app/test/test_power_intel_uncore.c
index 80b45ce46e..049658627d 100644
--- a/app/test/test_power_intel_uncore.c
+++ b/app/test/test_power_intel_uncore.c
@@ -17,14 +17,12 @@ test_power_intel_uncore(void)
 #include <rte_power_uncore.h>
 #include <power_common.h>
 
-#define MAX_UNCORE_FREQS 32
-
 #define VALID_PKG 0
 #define VALID_DIE 0
 #define INVALID_PKG (rte_power_uncore_get_num_pkgs() + 1)
 #define INVALID_DIE (rte_power_uncore_get_num_dies(VALID_PKG) + 1)
 #define VALID_INDEX 1
-#define INVALID_INDEX (MAX_UNCORE_FREQS + 1)
+#define INVALID_INDEX (RTE_MAX_UNCORE_FREQS + 1)
 
 static int check_power_uncore_init(void)
 {
diff --git a/lib/power/power_intel_uncore.c b/lib/power/power_intel_uncore.c
index 688aebc4ee..be174dce44 100644
--- a/lib/power/power_intel_uncore.c
+++ b/lib/power/power_intel_uncore.c
@@ -11,7 +11,6 @@
 #include "power_intel_uncore.h"
 #include "power_common.h"
 
-#define MAX_UNCORE_FREQS 32
 #define MAX_NUMA_DIE 8
 #define BUS_FREQ     100000
 #define FILTER_LENGTH 18
@@ -32,7 +31,7 @@
 struct uncore_power_info {
 	unsigned int die;                  /* Core die id */
 	unsigned int pkg;                  /* Package id */
-	uint32_t freqs[MAX_UNCORE_FREQS];  /* Frequency array */
+	uint32_t freqs[RTE_MAX_UNCORE_FREQS]; /* Frequency array */
 	uint32_t nb_freqs;                 /* Number of available freqs */
 	FILE *f_cur_min;                   /* FD of scaling_min */
 	FILE *f_cur_max;                   /* FD of scaling_max */
@@ -51,7 +50,7 @@ set_uncore_freq_internal(struct uncore_power_info *ui, uint32_t idx)
 	uint32_t target_uncore_freq, curr_max_freq;
 	int ret;
 
-	if (idx >= MAX_UNCORE_FREQS || idx >= ui->nb_freqs) {
+	if (idx >= RTE_MAX_UNCORE_FREQS || idx >= ui->nb_freqs) {
 		RTE_LOG(DEBUG, POWER, "Invalid uncore frequency index %u, which "
 				"should be less than %u\n", idx, ui->nb_freqs);
 		return -1;
@@ -221,7 +220,7 @@ power_get_available_uncore_freqs(struct uncore_power_info *ui)
 	uint32_t i, num_uncore_freqs = 0;
 
 	num_uncore_freqs = (ui->init_max_freq - ui->init_min_freq) / BUS_FREQ + 1;
-	if (num_uncore_freqs >= MAX_UNCORE_FREQS) {
+	if (num_uncore_freqs >= RTE_MAX_UNCORE_FREQS) {
 		RTE_LOG(ERR, POWER, "Too many available uncore frequencies: %d\n",
 				num_uncore_freqs);
 		goto out;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.009532642 +0800
+++ 0142-power-fix-number-of-uncore-frequencies.patch	2024-08-12 20:44:02.555069385 +0800
@@ -1 +1 @@
-From 93db1cfcc36ac1808c4a09ec50a470c6127b859e Mon Sep 17 00:00:00 2001
+From b53fb811c0cf187dcf54bd65f32af6deba0eb04b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 93db1cfcc36ac1808c4a09ec50a470c6127b859e ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -42 +44 @@
-index 9c152e4ed2..4eb9c5900a 100644
+index 688aebc4ee..be174dce44 100644
@@ -54 +56 @@
- struct __rte_cache_aligned uncore_power_info {
+ struct uncore_power_info {
@@ -68,2 +70,2 @@
- 		POWER_LOG(DEBUG, "Invalid uncore frequency index %u, which "
- 				"should be less than %u", idx, ui->nb_freqs);
+ 		RTE_LOG(DEBUG, POWER, "Invalid uncore frequency index %u, which "
+ 				"should be less than %u\n", idx, ui->nb_freqs);
@@ -77 +79 @@
- 		POWER_LOG(ERR, "Too many available uncore frequencies: %d",
+ 		RTE_LOG(ERR, POWER, "Too many available uncore frequencies: %d\n",

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

* patch 'malloc: fix multi-process wait condition handling' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (141 preceding siblings ...)
  2024-08-12 12:50       ` patch 'power: fix number of uncore frequencies' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'bus/vdev: fix device reinitialization' " Xueming Li
                         ` (14 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=971d455e59e6b9d225e56722f1e48e5fecb98765
coverity's

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 971d455e59e6b9d225e56722f1e48e5fecb98765 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 12 Jul 2024 12:41:35 +0100
Subject: [PATCH] malloc: fix multi-process wait condition handling
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 429219adab185909a8127e680d19f7628af62fb2 ]

From coverity's point of view, it is theoretically possible to have an
infinite wait on a wait condition because while we do check for timeout,
we do not check for whether the event we are waiting for has already
occurred by the time we get to the first cond_wait call (in this case,
it's state of memory request list entry's state being set to COMPLETE).

This can't really happen as the only time a wait condition is triggered
is when we are receiving a memory event (so the entry we are waiting on
cannot change before wait condition is triggered because it's protected
by a mutex), so either we receive an event and modify entry state, or we
exit wait on a timeout and do not care about request state. However, it's
better to keep coverity happy.

Coverity issue: 425709
Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/eal/common/malloc_mp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/eal/common/malloc_mp.c b/lib/eal/common/malloc_mp.c
index 4d62397aba..a704eb01d1 100644
--- a/lib/eal/common/malloc_mp.c
+++ b/lib/eal/common/malloc_mp.c
@@ -756,7 +756,8 @@ request_to_primary(struct malloc_mp_req *user_req)
 	do {
 		ret = pthread_cond_timedwait(&entry->cond,
 				&mp_request_list.lock, &ts);
-	} while (ret != 0 && ret != ETIMEDOUT);
+	} while ((ret != 0 && ret != ETIMEDOUT) &&
+			entry->state == REQ_STATE_ACTIVE);
 
 	if (entry->state != REQ_STATE_COMPLETE) {
 		RTE_LOG(ERR, EAL, "Request timed out\n");
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.047283139 +0800
+++ 0143-malloc-fix-multi-process-wait-condition-handling.patch	2024-08-12 20:44:02.555069385 +0800
@@ -1 +1 @@
-From 429219adab185909a8127e680d19f7628af62fb2 Mon Sep 17 00:00:00 2001
+From 971d455e59e6b9d225e56722f1e48e5fecb98765 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 429219adab185909a8127e680d19f7628af62fb2 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index 2d39b0716f..9765277f5d 100644
+index 4d62397aba..a704eb01d1 100644
@@ -41 +43 @@
- 		EAL_LOG(ERR, "Request timed out");
+ 		RTE_LOG(ERR, EAL, "Request timed out\n");

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

* patch 'bus/vdev: fix device reinitialization' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (142 preceding siblings ...)
  2024-08-12 12:50       ` patch 'malloc: fix multi-process wait condition handling' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' " Xueming Li
                         ` (13 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Mingjin Ye; +Cc: xuemingl, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=bef8327055d34e3a4e5f26d443322a2a3d81d273

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bef8327055d34e3a4e5f26d443322a2a3d81d273 Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Tue, 16 Jul 2024 09:53:28 +0000
Subject: [PATCH] bus/vdev: fix device reinitialization
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1bd1ab6fd010837773473d821f9284369b37264c ]

In secondary processes, insert_vdev() may be called multiple times on the
same device due to multi-process hot-plugging of the vdev bus and EAL
parameters to add the same vdev.

In this case, when rte_devargs_insert() is called, the devargs->name
reference will be invalidated because rte_devargs_insert() destroys the
just-allocated devargs and replaces the pointer from the devargs list.
As a result, the reference to devargs->name stored in dev->device.name
will be invalid.

This patch fixes the issue by setting the device name after calling
rte_devargs_insert().

Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/bus/vdev/vdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 14cf856237..dcedd0d4a0 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -307,7 +307,6 @@ insert_vdev(const char *name, const char *args,
 
 	dev->device.bus = &rte_vdev_bus;
 	dev->device.numa_node = SOCKET_ID_ANY;
-	dev->device.name = devargs->name;
 
 	if (find_vdev(name)) {
 		/*
@@ -322,6 +321,7 @@ insert_vdev(const char *name, const char *args,
 	if (init)
 		rte_devargs_insert(&devargs);
 	dev->device.devargs = devargs;
+	dev->device.name = devargs->name;
 	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
 
 	if (p_dev)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.078678436 +0800
+++ 0144-bus-vdev-fix-device-reinitialization.patch	2024-08-12 20:44:02.565069387 +0800
@@ -1 +1 @@
-From 1bd1ab6fd010837773473d821f9284369b37264c Mon Sep 17 00:00:00 2001
+From bef8327055d34e3a4e5f26d443322a2a3d81d273 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1bd1ab6fd010837773473d821f9284369b37264c ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index 38d05a9fe9..ec7abe7cda 100644
+index 14cf856237..dcedd0d4a0 100644
@@ -32 +34 @@
-@@ -288,7 +288,6 @@ insert_vdev(const char *name, const char *args,
+@@ -307,7 +307,6 @@ insert_vdev(const char *name, const char *args,
@@ -40 +42 @@
-@@ -303,6 +302,7 @@ insert_vdev(const char *name, const char *args,
+@@ -322,6 +321,7 @@ insert_vdev(const char *name, const char *args,

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

* patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (143 preceding siblings ...)
  2024-08-12 12:50       ` patch 'bus/vdev: fix device reinitialization' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'examples/l3fwd: fix crash on multiple sockets' " Xueming Li
                         ` (12 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=17082297291439dad25bffee52dba87eee737c02

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 17082297291439dad25bffee52dba87eee737c02 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 2 May 2024 16:28:15 +0100
Subject: [PATCH] examples/l3fwd: fix crash in ACL mode for mixed traffic
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 659ded8eb733315878857f82bc22f0b03be5ce71 ]

When running l3fwd in ACL mode, if we'll have mix of IPv4/IPv6 packets in
the same burst, it will most likely cause a crash.
The reason for that is that we split our burst of packets into 2 arrays -
one for ipv4, another for ipv6 for classify().
But then we try to send all packets as one burst again,
not taking into account that acl_search.res_ipv4[] will be set
only for ipv4 packets.
Same story for ipv6.
The fix is straightforward: use two already split arrays for TX.

Bugzilla ID: 1434
Fixes: 6de0ea50e9b9 ("examples/l3fwd: merge l3fwd-acl example")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
 examples/l3fwd/l3fwd_acl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
index 401692bcec..d9e4ae543f 100644
--- a/examples/l3fwd/l3fwd_acl.c
+++ b/examples/l3fwd/l3fwd_acl.c
@@ -1073,9 +1073,9 @@ acl_main_loop(__rte_unused void *dummy)
 
 					l3fwd_acl_send_packets(
 						qconf,
-						pkts_burst,
+						acl_search.m_ipv4,
 						acl_search.res_ipv4,
-						nb_rx);
+						acl_search.num_ipv4);
 				}
 
 				if (acl_search.num_ipv6) {
@@ -1088,9 +1088,9 @@ acl_main_loop(__rte_unused void *dummy)
 
 					l3fwd_acl_send_packets(
 						qconf,
-						pkts_burst,
+						acl_search.m_ipv6,
 						acl_search.res_ipv6,
-						nb_rx);
+						acl_search.num_ipv6);
 				}
 			}
 		}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.104204634 +0800
+++ 0145-examples-l3fwd-fix-crash-in-ACL-mode-for-mixed-traff.patch	2024-08-12 20:44:02.565069387 +0800
@@ -1 +1 @@
-From 659ded8eb733315878857f82bc22f0b03be5ce71 Mon Sep 17 00:00:00 2001
+From 17082297291439dad25bffee52dba87eee737c02 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 659ded8eb733315878857f82bc22f0b03be5ce71 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org

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

* patch 'examples/l3fwd: fix crash on multiple sockets' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (144 preceding siblings ...)
  2024-08-12 12:50       ` patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'net/hns3: fix uninitialized variable in FEC query' " Xueming Li
                         ` (11 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: xuemingl, Hongbo Li, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5fa2084ac31b33ccaf67c4491b6a7638178d6be4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5fa2084ac31b33ccaf67c4491b6a7638178d6be4 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Wed, 3 Jul 2024 15:50:37 +0800
Subject: [PATCH] examples/l3fwd: fix crash on multiple sockets
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0cf06d7d846523abd48307613d429830bfb45ac9 ]

Setting acl will clear the acl config of other sockets, which
will result in core dump.

This commit will no longer clear the acl config when setting acl.

Fixes: 6de0ea50e9b9 ("examples/l3fwd: merge l3fwd-acl example")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Tested-by: Hongbo Li <hongbox.li@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
 examples/l3fwd/l3fwd_acl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
index d9e4ae543f..a1d87f4a40 100644
--- a/examples/l3fwd/l3fwd_acl.c
+++ b/examples/l3fwd/l3fwd_acl.c
@@ -962,8 +962,6 @@ setup_acl(const int socket_id)
 	acl_log("IPv6 ACL entries %u:\n", acl_num_ipv6);
 	dump_ipv6_rules((struct acl6_rule *)acl_base_ipv6, acl_num_ipv6, 1);
 
-	memset(&acl_config, 0, sizeof(acl_config));
-
 	/* Check sockets a context should be created on */
 	if (socket_id >= NB_SOCKETS) {
 		acl_log("Socket %d is out "
@@ -973,6 +971,9 @@ setup_acl(const int socket_id)
 		return;
 	}
 
+	rte_acl_free(acl_config.acx_ipv4[socket_id]);
+	rte_acl_free(acl_config.acx_ipv6[socket_id]);
+
 	acl_config.acx_ipv4[socket_id] = app_acl_init(route_base_ipv4,
 		acl_base_ipv4, route_num_ipv4, acl_num_ipv4,
 		0, socket_id);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.127427832 +0800
+++ 0146-examples-l3fwd-fix-crash-on-multiple-sockets.patch	2024-08-12 20:44:02.565069387 +0800
@@ -1 +1 @@
-From 0cf06d7d846523abd48307613d429830bfb45ac9 Mon Sep 17 00:00:00 2001
+From 5fa2084ac31b33ccaf67c4491b6a7638178d6be4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0cf06d7d846523abd48307613d429830bfb45ac9 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index ab8222c9db..2109ab0a8c 100644
+index d9e4ae543f..a1d87f4a40 100644
@@ -25 +27 @@
-@@ -950,8 +950,6 @@ setup_acl(const int socket_id)
+@@ -962,8 +962,6 @@ setup_acl(const int socket_id)
@@ -34 +36 @@
-@@ -961,6 +959,9 @@ setup_acl(const int socket_id)
+@@ -973,6 +971,9 @@ setup_acl(const int socket_id)

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

* patch 'net/hns3: fix uninitialized variable in FEC query' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (145 preceding siblings ...)
  2024-08-12 12:50       ` patch 'examples/l3fwd: fix crash on multiple sockets' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'net/ice/base: fix temporary failures reading NVM' " Xueming Li
                         ` (10 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Jie Hai; +Cc: xuemingl, Huisong Li, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=034f533709a55227006c5e98c42a1d73f5e16a69

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 034f533709a55227006c5e98c42a1d73f5e16a69 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Tue, 23 Jul 2024 14:09:00 +0800
Subject: [PATCH] net/hns3: fix uninitialized variable in FEC query
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7dfc8e69aa4286854a0ac893d3828eaffee20347 ]

This patch fixes uninitialized auto_state value when
querying FEC mode of device.

Bugzilla ID: 1498
Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 8e18aaf110..6e72730d75 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6046,7 +6046,7 @@ hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa)
 {
 	struct hns3_sfp_info_cmd *resp;
 	uint32_t tmp_fec_capa;
-	uint8_t auto_state;
+	uint8_t auto_state = 0;
 	struct hns3_cmd_desc desc;
 	int ret;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.151950730 +0800
+++ 0147-net-hns3-fix-uninitialized-variable-in-FEC-query.patch	2024-08-12 20:44:02.565069387 +0800
@@ -1 +1 @@
-From 7dfc8e69aa4286854a0ac893d3828eaffee20347 Mon Sep 17 00:00:00 2001
+From 034f533709a55227006c5e98c42a1d73f5e16a69 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7dfc8e69aa4286854a0ac893d3828eaffee20347 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index ec1251cb7e..8b43d731ac 100644
+index 8e18aaf110..6e72730d75 100644

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

* patch 'net/ice/base: fix temporary failures reading NVM' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (146 preceding siblings ...)
  2024-08-12 12:50       ` patch 'net/hns3: fix uninitialized variable in FEC query' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'examples: fix queue ID restriction' " Xueming Li
                         ` (9 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Zhichao Zeng; +Cc: xuemingl, Bruce Richardson, Song Jiale, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=80da81b6f9695db69d2abf634dc1cdb59401b1b9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 80da81b6f9695db69d2abf634dc1cdb59401b1b9 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Tue, 23 Jul 2024 14:19:15 +0800
Subject: [PATCH] net/ice/base: fix temporary failures reading NVM
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 04de5c7d40b24ef391bd5b51be23994a6cfdd867 ]

Reading NVM fails in some scenarios, so follow the approach taken by
kernel driver and add retries on read failures.

Fixes: 2516684aed7a ("net/ice/base: extract logic of flat NVM read to function")

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
---
 drivers/net/ice/base/ice_nvm.c | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
index 30e603127e..6b0794f562 100644
--- a/drivers/net/ice/base/ice_nvm.c
+++ b/drivers/net/ice/base/ice_nvm.c
@@ -72,6 +72,7 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
 	enum ice_status status;
 	u32 inlen = *length;
 	u32 bytes_read = 0;
+	int retry_cnt = 0;
 	bool last_cmd;
 
 	ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);
@@ -106,11 +107,24 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
 					 offset, (u16)read_size,
 					 data + bytes_read, last_cmd,
 					 read_shadow_ram, NULL);
-		if (status)
-			break;
-
-		bytes_read += read_size;
-		offset += read_size;
+		if (status) {
+			if (hw->adminq.sq_last_status != ICE_AQ_RC_EBUSY ||
+			    retry_cnt > ICE_SQ_SEND_MAX_EXECUTE)
+				break;
+			ice_debug(hw, ICE_DBG_NVM,
+				  "NVM read EBUSY error, retry %d\n",
+				  retry_cnt + 1);
+			ice_release_nvm(hw);
+			msleep(ICE_SQ_SEND_DELAY_TIME_MS);
+			status = ice_acquire_nvm(hw, ICE_RES_READ);
+			if (status)
+				break;
+			retry_cnt++;
+		} else {
+			bytes_read += read_size;
+			offset += read_size;
+			retry_cnt = 0;
+		}
 	} while (!last_cmd);
 
 	*length = bytes_read;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.175503728 +0800
+++ 0148-net-ice-base-fix-temporary-failures-reading-NVM.patch	2024-08-12 20:44:02.575069389 +0800
@@ -1 +1 @@
-From 04de5c7d40b24ef391bd5b51be23994a6cfdd867 Mon Sep 17 00:00:00 2001
+From 80da81b6f9695db69d2abf634dc1cdb59401b1b9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 04de5c7d40b24ef391bd5b51be23994a6cfdd867 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 528489929e..5e982de4b5 100644
+index 30e603127e..6b0794f562 100644
@@ -23,2 +25,2 @@
-@@ -71,6 +71,7 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
- {
+@@ -72,6 +72,7 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
+ 	enum ice_status status;
@@ -29 +30,0 @@
- 	int status;
@@ -30,0 +32 @@
+ 	ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);

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

* patch 'examples: fix queue ID restriction' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (147 preceding siblings ...)
  2024-08-12 12:50       ` patch 'net/ice/base: fix temporary failures reading NVM' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'doc: remove reference to mbuf pkt field' " Xueming Li
                         ` (8 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Sivaprasad Tummala
  Cc: xuemingl, Konstantin Ananyev, Morten Brørup, Ferruh Yigit,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=938afb0ab2bf5e34bcaa6d64e96dee3c6b8c838d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 938afb0ab2bf5e34bcaa6d64e96dee3c6b8c838d Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Tue, 26 Mar 2024 13:55:40 +0100
Subject: [PATCH] examples: fix queue ID restriction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b23c5bd71aa5b428a404aa036b97fa7bb1a3c98a ]

Currently application supports Rx queue IDs up to 255
and max queues of 256 irrespective of device support.
This limits the number of active lcores to 256.

The patch fixes these constraints by increasing
the Rx queue IDs to support up to 65535.

Fixes: af75078fece3 ("first public release")
Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 examples/ipsec-secgw/ipsec-secgw.c  | 19 ++++++-----
 examples/ipsec-secgw/ipsec.h        |  2 +-
 examples/ipsec-secgw/ipsec_worker.c | 10 +++---
 examples/l3fwd-graph/main.c         | 19 +++++------
 examples/l3fwd-power/main.c         | 49 ++++++++++++++---------------
 examples/l3fwd-power/main.h         |  2 +-
 examples/l3fwd-power/perf_core.c    |  8 +++--
 examples/l3fwd/l3fwd.h              |  2 +-
 examples/l3fwd/l3fwd_acl.c          |  4 +--
 examples/l3fwd/l3fwd_em.c           |  4 +--
 examples/l3fwd/l3fwd_event.h        |  2 +-
 examples/l3fwd/l3fwd_fib.c          |  4 +--
 examples/l3fwd/l3fwd_lpm.c          |  5 ++-
 examples/l3fwd/main.c               | 24 +++++++-------
 14 files changed, 76 insertions(+), 78 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 45a303850d..782535f4b5 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -220,7 +220,7 @@ static const char *cfgfile;
 
 struct lcore_params {
 	uint16_t port_id;
-	uint8_t queue_id;
+	uint16_t queue_id;
 	uint8_t lcore_id;
 } __rte_cache_aligned;
 
@@ -695,8 +695,7 @@ ipsec_poll_mode_worker(void)
 	struct rte_mbuf *pkts[MAX_PKT_BURST];
 	uint32_t lcore_id;
 	uint64_t prev_tsc, diff_tsc, cur_tsc;
-	uint16_t i, nb_rx, portid;
-	uint8_t queueid;
+	uint16_t i, nb_rx, portid, queueid;
 	struct lcore_conf *qconf;
 	int32_t rc, socket_id;
 	const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1)
@@ -743,7 +742,7 @@ ipsec_poll_mode_worker(void)
 		portid = rxql[i].port_id;
 		queueid = rxql[i].queue_id;
 		RTE_LOG(INFO, IPSEC,
-			" -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+			" -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
 			lcore_id, portid, queueid);
 	}
 
@@ -788,8 +787,7 @@ int
 check_flow_params(uint16_t fdir_portid, uint8_t fdir_qid)
 {
 	uint16_t i;
-	uint16_t portid;
-	uint8_t queueid;
+	uint16_t portid, queueid;
 
 	for (i = 0; i < nb_lcore_params; ++i) {
 		portid = lcore_params_array[i].port_id;
@@ -851,7 +849,7 @@ check_poll_mode_params(struct eh_conf *eh_conf)
 	return 0;
 }
 
-static uint8_t
+static uint16_t
 get_port_nb_rx_queues(const uint16_t port)
 {
 	int32_t queue = -1;
@@ -862,7 +860,7 @@ get_port_nb_rx_queues(const uint16_t port)
 				lcore_params[i].queue_id > queue)
 			queue = lcore_params[i].queue_id;
 	}
-	return (uint8_t)(++queue);
+	return (uint16_t)(++queue);
 }
 
 static int32_t
@@ -1050,6 +1048,7 @@ parse_config(const char *q_arg)
 	char *str_fld[_NUM_FLD];
 	int32_t i;
 	uint32_t size;
+	uint32_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
 
 	nb_lcore_params = 0;
 
@@ -1070,7 +1069,7 @@ parse_config(const char *q_arg)
 		for (i = 0; i < _NUM_FLD; i++) {
 			errno = 0;
 			int_fld[i] = strtoul(str_fld[i], &end, 0);
-			if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
+			if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i])
 				return -1;
 		}
 		if (nb_lcore_params >= MAX_LCORE_PARAMS) {
@@ -1081,7 +1080,7 @@ parse_config(const char *q_arg)
 		lcore_params_array[nb_lcore_params].port_id =
 			(uint8_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
-			(uint8_t)int_fld[FLD_QUEUE];
+			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
 			(uint8_t)int_fld[FLD_LCORE];
 		++nb_lcore_params;
diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index bdcada1c40..29b9b283f0 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -285,7 +285,7 @@ struct cnt_blk {
 
 struct lcore_rx_queue {
 	uint16_t port_id;
-	uint8_t queue_id;
+	uint16_t queue_id;
 	void *sec_ctx;
 } __rte_cache_aligned;
 
diff --git a/examples/ipsec-secgw/ipsec_worker.c b/examples/ipsec-secgw/ipsec_worker.c
index 8d122e8519..c9c43ebd2b 100644
--- a/examples/ipsec-secgw/ipsec_worker.c
+++ b/examples/ipsec-secgw/ipsec_worker.c
@@ -1598,8 +1598,7 @@ ipsec_poll_mode_wrkr_inl_pr(void)
 	int32_t socket_id;
 	uint32_t lcore_id;
 	int32_t i, nb_rx;
-	uint16_t portid;
-	uint8_t queueid;
+	uint16_t portid, queueid;
 
 	prev_tsc = 0;
 	lcore_id = rte_lcore_id();
@@ -1633,7 +1632,7 @@ ipsec_poll_mode_wrkr_inl_pr(void)
 		portid = rxql[i].port_id;
 		queueid = rxql[i].queue_id;
 		RTE_LOG(INFO, IPSEC,
-			" -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+			" -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
 			lcore_id, portid, queueid);
 	}
 
@@ -1729,8 +1728,7 @@ ipsec_poll_mode_wrkr_inl_pr_ss(void)
 	uint32_t i, nb_rx, j;
 	int32_t socket_id;
 	uint32_t lcore_id;
-	uint16_t portid;
-	uint8_t queueid;
+	uint16_t portid, queueid;
 
 	prev_tsc = 0;
 	lcore_id = rte_lcore_id();
@@ -1764,7 +1762,7 @@ ipsec_poll_mode_wrkr_inl_pr_ss(void)
 		portid = rxql[i].port_id;
 		queueid = rxql[i].queue_id;
 		RTE_LOG(INFO, IPSEC,
-			" -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+			" -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
 			lcore_id, portid, queueid);
 	}
 
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index 96cb1c81ff..4b018d1e78 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -90,7 +90,7 @@ static int pcap_trace_enable;
 
 struct lcore_rx_queue {
 	uint16_t port_id;
-	uint8_t queue_id;
+	uint16_t queue_id;
 	char node_name[RTE_NODE_NAMESIZE];
 };
 
@@ -110,7 +110,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
 
 struct lcore_params {
 	uint16_t port_id;
-	uint8_t queue_id;
+	uint16_t queue_id;
 	uint8_t lcore_id;
 } __rte_cache_aligned;
 
@@ -205,14 +205,14 @@ check_worker_model_params(void)
 static int
 check_lcore_params(void)
 {
-	uint8_t queue, lcore;
+	uint16_t queue, i;
 	int socketid;
-	uint16_t i;
+	uint8_t lcore;
 
 	for (i = 0; i < nb_lcore_params; ++i) {
 		queue = lcore_params[i].queue_id;
 		if (queue >= MAX_RX_QUEUE_PER_PORT) {
-			printf("Invalid queue number: %hhu\n", queue);
+			printf("Invalid queue number: %" PRIu16 "\n", queue);
 			return -1;
 		}
 		lcore = lcore_params[i].lcore_id;
@@ -257,7 +257,7 @@ check_port_config(void)
 	return 0;
 }
 
-static uint8_t
+static uint16_t
 get_port_n_rx_queues(const uint16_t port)
 {
 	int queue = -1;
@@ -275,7 +275,7 @@ get_port_n_rx_queues(const uint16_t port)
 		}
 	}
 
-	return (uint8_t)(++queue);
+	return (uint16_t)(++queue);
 }
 
 static int
@@ -450,7 +450,7 @@ parse_config(const char *q_arg)
 		lcore_params_array[nb_lcore_params].port_id =
 			(uint8_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
-			(uint8_t)int_fld[FLD_QUEUE];
+			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
 			(uint8_t)int_fld[FLD_LCORE];
 		++nb_lcore_params;
@@ -1011,7 +1011,8 @@ main(int argc, char **argv)
 		"ethdev_tx-*",
 		"pkt_drop",
 	};
-	uint8_t nb_rx_queue, queue, socketid;
+	uint8_t socketid;
+	uint16_t nb_rx_queue, queue;
 	struct rte_graph_param graph_conf;
 	struct rte_eth_dev_info dev_info;
 	uint32_t nb_ports, nb_conf = 0;
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 9c0dcd343b..5045d13533 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -213,7 +213,7 @@ enum freq_scale_hint_t
 
 struct lcore_rx_queue {
 	uint16_t port_id;
-	uint8_t queue_id;
+	uint16_t queue_id;
 	enum freq_scale_hint_t freq_up_hint;
 	uint32_t zero_rx_packet_count;
 	uint32_t idle_hint;
@@ -837,7 +837,7 @@ sleep_until_rx_interrupt(int num, int lcore)
 	struct rte_epoll_event event[num];
 	int n, i;
 	uint16_t port_id;
-	uint8_t queue_id;
+	uint16_t queue_id;
 	void *data;
 
 	if (status[lcore].wakeup) {
@@ -849,9 +849,9 @@ sleep_until_rx_interrupt(int num, int lcore)
 	n = rte_epoll_wait(RTE_EPOLL_PER_THREAD, event, num, 10);
 	for (i = 0; i < n; i++) {
 		data = event[i].epdata.data;
-		port_id = ((uintptr_t)data) >> CHAR_BIT;
+		port_id = ((uintptr_t)data) >> (sizeof(uint16_t) * CHAR_BIT);
 		queue_id = ((uintptr_t)data) &
-			RTE_LEN2MASK(CHAR_BIT, uint8_t);
+			RTE_LEN2MASK((sizeof(uint16_t) * CHAR_BIT), uint16_t);
 		RTE_LOG(INFO, L3FWD_POWER,
 			"lcore %u is waked up from rx interrupt on"
 			" port %d queue %d\n",
@@ -866,7 +866,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
 {
 	int i;
 	struct lcore_rx_queue *rx_queue;
-	uint8_t queue_id;
+	uint16_t queue_id;
 	uint16_t port_id;
 
 	for (i = 0; i < qconf->n_rx_queue; ++i) {
@@ -886,7 +886,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
 static int event_register(struct lcore_conf *qconf)
 {
 	struct lcore_rx_queue *rx_queue;
-	uint8_t queueid;
+	uint16_t queueid;
 	uint16_t portid;
 	uint32_t data;
 	int ret;
@@ -896,7 +896,7 @@ static int event_register(struct lcore_conf *qconf)
 		rx_queue = &(qconf->rx_queue_list[i]);
 		portid = rx_queue->port_id;
 		queueid = rx_queue->queue_id;
-		data = portid << CHAR_BIT | queueid;
+		data = portid << (sizeof(uint16_t) * CHAR_BIT) | queueid;
 
 		ret = rte_eth_dev_rx_intr_ctl_q(portid, queueid,
 						RTE_EPOLL_PER_THREAD,
@@ -916,8 +916,7 @@ static int main_intr_loop(__rte_unused void *dummy)
 	unsigned int lcore_id;
 	uint64_t prev_tsc, diff_tsc, cur_tsc;
 	int i, j, nb_rx;
-	uint8_t queueid;
-	uint16_t portid;
+	uint16_t portid, queueid;
 	struct lcore_conf *qconf;
 	struct lcore_rx_queue *rx_queue;
 	uint32_t lcore_rx_idle_count = 0;
@@ -945,7 +944,7 @@ static int main_intr_loop(__rte_unused void *dummy)
 		portid = qconf->rx_queue_list[i].port_id;
 		queueid = qconf->rx_queue_list[i].queue_id;
 		RTE_LOG(INFO, L3FWD_POWER,
-				" -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+				" -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
 				lcore_id, portid, queueid);
 	}
 
@@ -1082,8 +1081,7 @@ main_telemetry_loop(__rte_unused void *dummy)
 	unsigned int lcore_id;
 	uint64_t prev_tsc, diff_tsc, cur_tsc, prev_tel_tsc;
 	int i, j, nb_rx;
-	uint8_t queueid;
-	uint16_t portid;
+	uint16_t portid, queueid;
 	struct lcore_conf *qconf;
 	struct lcore_rx_queue *rx_queue;
 	uint64_t ep_nep[2] = {0}, fp_nfp[2] = {0};
@@ -1113,7 +1111,7 @@ main_telemetry_loop(__rte_unused void *dummy)
 		portid = qconf->rx_queue_list[i].port_id;
 		queueid = qconf->rx_queue_list[i].queue_id;
 		RTE_LOG(INFO, L3FWD_POWER, " -- lcoreid=%u portid=%u "
-			"rxqueueid=%hhu\n", lcore_id, portid, queueid);
+			"rxqueueid=%" PRIu16 "\n", lcore_id, portid, queueid);
 	}
 
 	while (!is_done()) {
@@ -1204,8 +1202,7 @@ main_legacy_loop(__rte_unused void *dummy)
 	uint64_t prev_tsc, diff_tsc, cur_tsc, tim_res_tsc, hz;
 	uint64_t prev_tsc_power = 0, cur_tsc_power, diff_tsc_power;
 	int i, j, nb_rx;
-	uint8_t queueid;
-	uint16_t portid;
+	uint16_t portid, queueid;
 	struct lcore_conf *qconf;
 	struct lcore_rx_queue *rx_queue;
 	enum freq_scale_hint_t lcore_scaleup_hint;
@@ -1233,7 +1230,7 @@ main_legacy_loop(__rte_unused void *dummy)
 		portid = qconf->rx_queue_list[i].port_id;
 		queueid = qconf->rx_queue_list[i].queue_id;
 		RTE_LOG(INFO, L3FWD_POWER, " -- lcoreid=%u portid=%u "
-			"rxqueueid=%hhu\n", lcore_id, portid, queueid);
+			"rxqueueid=%" PRIu16 "\n", lcore_id, portid, queueid);
 	}
 
 	/* add into event wait list */
@@ -1398,14 +1395,14 @@ start_rx:
 static int
 check_lcore_params(void)
 {
-	uint8_t queue, lcore;
-	uint16_t i;
+	uint16_t queue, i;
+	uint8_t lcore;
 	int socketid;
 
 	for (i = 0; i < nb_lcore_params; ++i) {
 		queue = lcore_params[i].queue_id;
 		if (queue >= MAX_RX_QUEUE_PER_PORT) {
-			printf("invalid queue number: %hhu\n", queue);
+			printf("invalid queue number: %" PRIu16 "\n", queue);
 			return -1;
 		}
 		lcore = lcore_params[i].lcore_id;
@@ -1450,7 +1447,7 @@ check_port_config(void)
 	return 0;
 }
 
-static uint8_t
+static uint16_t
 get_port_n_rx_queues(const uint16_t port)
 {
 	int queue = -1;
@@ -1461,7 +1458,7 @@ get_port_n_rx_queues(const uint16_t port)
 				lcore_params[i].queue_id > queue)
 			queue = lcore_params[i].queue_id;
 	}
-	return (uint8_t)(++queue);
+	return (uint16_t)(++queue);
 }
 
 static int
@@ -1660,6 +1657,7 @@ parse_config(const char *q_arg)
 	char *str_fld[_NUM_FLD];
 	int i;
 	unsigned size;
+	unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
 
 	nb_lcore_params = 0;
 
@@ -1679,8 +1677,7 @@ parse_config(const char *q_arg)
 		for (i = 0; i < _NUM_FLD; i++){
 			errno = 0;
 			int_fld[i] = strtoul(str_fld[i], &end, 0);
-			if (errno != 0 || end == str_fld[i] || int_fld[i] >
-									255)
+			if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i])
 				return -1;
 		}
 		if (nb_lcore_params >= MAX_LCORE_PARAMS) {
@@ -1691,7 +1688,7 @@ parse_config(const char *q_arg)
 		lcore_params_array[nb_lcore_params].port_id =
 				(uint8_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
-				(uint8_t)int_fld[FLD_QUEUE];
+				(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
 				(uint8_t)int_fld[FLD_LCORE];
 		++nb_lcore_params;
@@ -2500,8 +2497,8 @@ main(int argc, char **argv)
 	uint64_t hz;
 	uint32_t n_tx_queue, nb_lcores;
 	uint32_t dev_rxq_num, dev_txq_num;
-	uint8_t nb_rx_queue, queue, socketid;
-	uint16_t portid;
+	uint8_t socketid;
+	uint16_t portid, nb_rx_queue, queue;
 	const char *ptr_strings[NUM_TELSTATS];
 
 	/* init EAL */
diff --git a/examples/l3fwd-power/main.h b/examples/l3fwd-power/main.h
index 258de98f5b..40b5194726 100644
--- a/examples/l3fwd-power/main.h
+++ b/examples/l3fwd-power/main.h
@@ -9,7 +9,7 @@
 #define MAX_LCORE_PARAMS 1024
 struct lcore_params {
 	uint16_t port_id;
-	uint8_t queue_id;
+	uint16_t queue_id;
 	uint8_t lcore_id;
 } __rte_cache_aligned;
 
diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c
index 41ef6d0c9a..f34442b9d0 100644
--- a/examples/l3fwd-power/perf_core.c
+++ b/examples/l3fwd-power/perf_core.c
@@ -22,7 +22,7 @@ static uint16_t nb_hp_lcores;
 
 struct perf_lcore_params {
 	uint16_t port_id;
-	uint8_t queue_id;
+	uint16_t queue_id;
 	uint8_t high_perf;
 	uint8_t lcore_idx;
 } __rte_cache_aligned;
@@ -132,6 +132,7 @@ parse_perf_config(const char *q_arg)
 	char *str_fld[_NUM_FLD];
 	int i;
 	unsigned int size;
+	unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255, 255};
 
 	nb_prf_lc_prms = 0;
 
@@ -152,7 +153,8 @@ parse_perf_config(const char *q_arg)
 		for (i = 0; i < _NUM_FLD; i++) {
 			errno = 0;
 			int_fld[i] = strtoul(str_fld[i], &end, 0);
-			if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
+			if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i])
+
 				return -1;
 		}
 		if (nb_prf_lc_prms >= MAX_LCORE_PARAMS) {
@@ -163,7 +165,7 @@ parse_perf_config(const char *q_arg)
 		prf_lc_prms[nb_prf_lc_prms].port_id =
 				(uint8_t)int_fld[FLD_PORT];
 		prf_lc_prms[nb_prf_lc_prms].queue_id =
-				(uint8_t)int_fld[FLD_QUEUE];
+				(uint16_t)int_fld[FLD_QUEUE];
 		prf_lc_prms[nb_prf_lc_prms].high_perf =
 				!!(uint8_t)int_fld[FLD_LCORE_HP];
 		prf_lc_prms[nb_prf_lc_prms].lcore_idx =
diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h
index e7ae0e5834..12c264cb4c 100644
--- a/examples/l3fwd/l3fwd.h
+++ b/examples/l3fwd/l3fwd.h
@@ -74,7 +74,7 @@ struct mbuf_table {
 
 struct lcore_rx_queue {
 	uint16_t port_id;
-	uint8_t queue_id;
+	uint16_t queue_id;
 } __rte_cache_aligned;
 
 struct lcore_conf {
diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
index a1d87f4a40..31798ccb10 100644
--- a/examples/l3fwd/l3fwd_acl.c
+++ b/examples/l3fwd/l3fwd_acl.c
@@ -998,7 +998,7 @@ acl_main_loop(__rte_unused void *dummy)
 	uint64_t prev_tsc, diff_tsc, cur_tsc;
 	int i, nb_rx;
 	uint16_t portid;
-	uint8_t queueid;
+	uint16_t queueid;
 	struct lcore_conf *qconf;
 	int socketid;
 	const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1)
@@ -1021,7 +1021,7 @@ acl_main_loop(__rte_unused void *dummy)
 		portid = qconf->rx_queue_list[i].port_id;
 		queueid = qconf->rx_queue_list[i].queue_id;
 		RTE_LOG(INFO, L3FWD,
-			" -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+			" -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
 			lcore_id, portid, queueid);
 	}
 
diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index 40e102b38a..f18ac0048b 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -586,7 +586,7 @@ em_main_loop(__rte_unused void *dummy)
 	unsigned lcore_id;
 	uint64_t prev_tsc, diff_tsc, cur_tsc;
 	int i, nb_rx;
-	uint8_t queueid;
+	uint16_t queueid;
 	uint16_t portid;
 	struct lcore_conf *qconf;
 	const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
@@ -609,7 +609,7 @@ em_main_loop(__rte_unused void *dummy)
 		portid = qconf->rx_queue_list[i].port_id;
 		queueid = qconf->rx_queue_list[i].queue_id;
 		RTE_LOG(INFO, L3FWD,
-			" -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+			" -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
 			lcore_id, portid, queueid);
 	}
 
diff --git a/examples/l3fwd/l3fwd_event.h b/examples/l3fwd/l3fwd_event.h
index 9aad358003..c6a4a89127 100644
--- a/examples/l3fwd/l3fwd_event.h
+++ b/examples/l3fwd/l3fwd_event.h
@@ -78,8 +78,8 @@ struct l3fwd_event_resources {
 	uint8_t deq_depth;
 	uint8_t has_burst;
 	uint8_t enabled;
-	uint8_t eth_rx_queues;
 	uint8_t vector_enabled;
+	uint16_t eth_rx_queues;
 	uint16_t vector_size;
 	uint64_t vector_tmo_ns;
 };
diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c
index 6a21984415..f38b19af3f 100644
--- a/examples/l3fwd/l3fwd_fib.c
+++ b/examples/l3fwd/l3fwd_fib.c
@@ -186,7 +186,7 @@ fib_main_loop(__rte_unused void *dummy)
 	uint64_t prev_tsc, diff_tsc, cur_tsc;
 	int i, nb_rx;
 	uint16_t portid;
-	uint8_t queueid;
+	uint16_t queueid;
 	struct lcore_conf *qconf;
 	const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
 			US_PER_S * BURST_TX_DRAIN_US;
@@ -208,7 +208,7 @@ fib_main_loop(__rte_unused void *dummy)
 		portid = qconf->rx_queue_list[i].port_id;
 		queueid = qconf->rx_queue_list[i].queue_id;
 		RTE_LOG(INFO, L3FWD,
-				" -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+				" -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
 				lcore_id, portid, queueid);
 	}
 
diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index a484a33089..e8fd95aae9 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -148,8 +148,7 @@ lpm_main_loop(__rte_unused void *dummy)
 	unsigned lcore_id;
 	uint64_t prev_tsc, diff_tsc, cur_tsc;
 	int i, nb_rx;
-	uint16_t portid;
-	uint8_t queueid;
+	uint16_t portid, queueid;
 	struct lcore_conf *qconf;
 	const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
 		US_PER_S * BURST_TX_DRAIN_US;
@@ -171,7 +170,7 @@ lpm_main_loop(__rte_unused void *dummy)
 		portid = qconf->rx_queue_list[i].port_id;
 		queueid = qconf->rx_queue_list[i].queue_id;
 		RTE_LOG(INFO, L3FWD,
-			" -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+			" -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
 			lcore_id, portid, queueid);
 	}
 
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 8d32ae1dd5..039207b06c 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -98,7 +98,7 @@ struct parm_cfg parm_config;
 
 struct lcore_params {
 	uint16_t port_id;
-	uint8_t queue_id;
+	uint16_t queue_id;
 	uint8_t lcore_id;
 } __rte_cache_aligned;
 
@@ -292,14 +292,14 @@ setup_l3fwd_lookup_tables(void)
 static int
 check_lcore_params(void)
 {
-	uint8_t queue, lcore;
-	uint16_t i;
+	uint16_t queue, i;
+	uint8_t lcore;
 	int socketid;
 
 	for (i = 0; i < nb_lcore_params; ++i) {
 		queue = lcore_params[i].queue_id;
 		if (queue >= MAX_RX_QUEUE_PER_PORT) {
-			printf("invalid queue number: %hhu\n", queue);
+			printf("invalid queue number: %" PRIu16 "\n", queue);
 			return -1;
 		}
 		lcore = lcore_params[i].lcore_id;
@@ -336,7 +336,7 @@ check_port_config(void)
 	return 0;
 }
 
-static uint8_t
+static uint16_t
 get_port_n_rx_queues(const uint16_t port)
 {
 	int queue = -1;
@@ -352,7 +352,7 @@ get_port_n_rx_queues(const uint16_t port)
 						lcore_params[i].port_id);
 		}
 	}
-	return (uint8_t)(++queue);
+	return (uint16_t)(++queue);
 }
 
 static int
@@ -500,6 +500,7 @@ parse_config(const char *q_arg)
 	char *str_fld[_NUM_FLD];
 	int i;
 	unsigned size;
+	uint16_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
 
 	nb_lcore_params = 0;
 
@@ -518,7 +519,7 @@ parse_config(const char *q_arg)
 		for (i = 0; i < _NUM_FLD; i++){
 			errno = 0;
 			int_fld[i] = strtoul(str_fld[i], &end, 0);
-			if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
+			if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i])
 				return -1;
 		}
 		if (nb_lcore_params >= MAX_LCORE_PARAMS) {
@@ -529,7 +530,7 @@ parse_config(const char *q_arg)
 		lcore_params_array[nb_lcore_params].port_id =
 			(uint8_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
-			(uint8_t)int_fld[FLD_QUEUE];
+			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
 			(uint8_t)int_fld[FLD_LCORE];
 		++nb_lcore_params;
@@ -630,7 +631,7 @@ parse_event_eth_rx_queues(const char *eth_rx_queues)
 {
 	struct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc();
 	char *end = NULL;
-	uint8_t num_eth_rx_queues;
+	uint16_t num_eth_rx_queues;
 
 	/* parse decimal string */
 	num_eth_rx_queues = strtoul(eth_rx_queues, &end, 10);
@@ -1211,7 +1212,8 @@ config_port_max_pkt_len(struct rte_eth_conf *conf,
 static void
 l3fwd_poll_resource_setup(void)
 {
-	uint8_t nb_rx_queue, queue, socketid;
+	uint8_t socketid;
+	uint16_t nb_rx_queue, queue;
 	struct rte_eth_dev_info dev_info;
 	uint32_t n_tx_queue, nb_lcores;
 	struct rte_eth_txconf *txconf;
@@ -1535,7 +1537,7 @@ main(int argc, char **argv)
 	struct lcore_conf *qconf;
 	uint16_t queueid, portid;
 	unsigned int lcore_id;
-	uint8_t queue;
+	uint16_t queue;
 	int ret;
 
 	/* init EAL */
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.199836826 +0800
+++ 0149-examples-fix-queue-ID-restriction.patch	2024-08-12 20:44:02.585069391 +0800
@@ -1 +1 @@
-From b23c5bd71aa5b428a404aa036b97fa7bb1a3c98a Mon Sep 17 00:00:00 2001
+From 938afb0ab2bf5e34bcaa6d64e96dee3c6b8c838d Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b23c5bd71aa5b428a404aa036b97fa7bb1a3c98a ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -43 +45 @@
-index d7c18bea34..8292a262cd 100644
+index 45a303850d..782535f4b5 100644
@@ -48 +50 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -53 +55 @@
- };
+ } __rte_cache_aligned;
@@ -129 +131 @@
-index 36b6164ab2..6f45fdb166 100644
+index bdcada1c40..29b9b283f0 100644
@@ -134 +136 @@
- struct __rte_cache_aligned lcore_rx_queue {
+ struct lcore_rx_queue {
@@ -139 +141 @@
- };
+ } __rte_cache_aligned;
@@ -184 +186 @@
-index ec4d8c94c5..0866822e93 100644
+index 96cb1c81ff..4b018d1e78 100644
@@ -198 +200 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -203 +205 @@
- };
+ } __rte_cache_aligned;
@@ -261 +263 @@
-index fba11da7ca..74e906cb5d 100644
+index 9c0dcd343b..5045d13533 100644
@@ -264 +266 @@
-@@ -214,7 +214,7 @@ enum freq_scale_hint_t
+@@ -213,7 +213,7 @@ enum freq_scale_hint_t
@@ -266 +268 @@
- struct __rte_cache_aligned lcore_rx_queue {
+ struct lcore_rx_queue {
@@ -273 +275 @@
-@@ -838,7 +838,7 @@ sleep_until_rx_interrupt(int num, int lcore)
+@@ -837,7 +837,7 @@ sleep_until_rx_interrupt(int num, int lcore)
@@ -282 +284 @@
-@@ -850,9 +850,9 @@ sleep_until_rx_interrupt(int num, int lcore)
+@@ -849,9 +849,9 @@ sleep_until_rx_interrupt(int num, int lcore)
@@ -294 +296 @@
-@@ -867,7 +867,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
+@@ -866,7 +866,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
@@ -303 +305 @@
-@@ -887,7 +887,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
+@@ -886,7 +886,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
@@ -312 +314 @@
-@@ -897,7 +897,7 @@ static int event_register(struct lcore_conf *qconf)
+@@ -896,7 +896,7 @@ static int event_register(struct lcore_conf *qconf)
@@ -321 +323 @@
-@@ -917,8 +917,7 @@ static int main_intr_loop(__rte_unused void *dummy)
+@@ -916,8 +916,7 @@ static int main_intr_loop(__rte_unused void *dummy)
@@ -331 +333 @@
-@@ -946,7 +945,7 @@ static int main_intr_loop(__rte_unused void *dummy)
+@@ -945,7 +944,7 @@ static int main_intr_loop(__rte_unused void *dummy)
@@ -340 +342 @@
-@@ -1083,8 +1082,7 @@ main_telemetry_loop(__rte_unused void *dummy)
+@@ -1082,8 +1081,7 @@ main_telemetry_loop(__rte_unused void *dummy)
@@ -350 +352 @@
-@@ -1114,7 +1112,7 @@ main_telemetry_loop(__rte_unused void *dummy)
+@@ -1113,7 +1111,7 @@ main_telemetry_loop(__rte_unused void *dummy)
@@ -359 +361 @@
-@@ -1205,8 +1203,7 @@ main_legacy_loop(__rte_unused void *dummy)
+@@ -1204,8 +1202,7 @@ main_legacy_loop(__rte_unused void *dummy)
@@ -369 +371 @@
-@@ -1234,7 +1231,7 @@ main_legacy_loop(__rte_unused void *dummy)
+@@ -1233,7 +1230,7 @@ main_legacy_loop(__rte_unused void *dummy)
@@ -378 +380 @@
-@@ -1399,14 +1396,14 @@ start_rx:
+@@ -1398,14 +1395,14 @@ start_rx:
@@ -396 +398 @@
-@@ -1451,7 +1448,7 @@ check_port_config(void)
+@@ -1450,7 +1447,7 @@ check_port_config(void)
@@ -405 +407 @@
-@@ -1462,7 +1459,7 @@ get_port_n_rx_queues(const uint16_t port)
+@@ -1461,7 +1458,7 @@ get_port_n_rx_queues(const uint16_t port)
@@ -414 +416 @@
-@@ -1661,6 +1658,7 @@ parse_config(const char *q_arg)
+@@ -1660,6 +1657,7 @@ parse_config(const char *q_arg)
@@ -422 +424 @@
-@@ -1680,8 +1678,7 @@ parse_config(const char *q_arg)
+@@ -1679,8 +1677,7 @@ parse_config(const char *q_arg)
@@ -432 +434 @@
-@@ -1692,7 +1689,7 @@ parse_config(const char *q_arg)
+@@ -1691,7 +1688,7 @@ parse_config(const char *q_arg)
@@ -441 +443 @@
-@@ -2501,8 +2498,8 @@ main(int argc, char **argv)
+@@ -2500,8 +2497,8 @@ main(int argc, char **argv)
@@ -453 +455 @@
-index e85e14bd9d..378f54794c 100644
+index 258de98f5b..40b5194726 100644
@@ -458 +460 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -463 +465 @@
- };
+ } __rte_cache_aligned;
@@ -466 +468 @@
-index c8fc69e6d3..77248889c0 100644
+index 41ef6d0c9a..f34442b9d0 100644
@@ -471 +473 @@
- struct __rte_cache_aligned perf_lcore_params {
+ struct perf_lcore_params {
@@ -477 +479 @@
- };
+ } __rte_cache_aligned;
@@ -506 +508 @@
-index f51da43319..93ce652d02 100644
+index e7ae0e5834..12c264cb4c 100644
@@ -511 +513 @@
- struct __rte_cache_aligned lcore_rx_queue {
+ struct lcore_rx_queue {
@@ -515 +517 @@
- };
+ } __rte_cache_aligned;
@@ -517 +519 @@
- struct __rte_cache_aligned lcore_conf {
+ struct lcore_conf {
@@ -519 +521 @@
-index 2109ab0a8c..b635011ef7 100644
+index a1d87f4a40..31798ccb10 100644
@@ -522 +524 @@
-@@ -1061,7 +1061,7 @@ acl_main_loop(__rte_unused void *dummy)
+@@ -998,7 +998,7 @@ acl_main_loop(__rte_unused void *dummy)
@@ -531 +533 @@
-@@ -1084,7 +1084,7 @@ acl_main_loop(__rte_unused void *dummy)
+@@ -1021,7 +1021,7 @@ acl_main_loop(__rte_unused void *dummy)
@@ -541 +543 @@
-index d98e66ea2c..31a7e05e39 100644
+index 40e102b38a..f18ac0048b 100644
@@ -622 +624 @@
-index ad28ba9d2e..f5f5f1a7fb 100644
+index 8d32ae1dd5..039207b06c 100644
@@ -627 +629 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -632 +634 @@
- };
+ } __rte_cache_aligned;

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

* patch 'doc: remove reference to mbuf pkt field' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (148 preceding siblings ...)
  2024-08-12 12:50       ` patch 'examples: fix queue ID restriction' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'examples/ipsec-secgw: revert SA salt endianness' " Xueming Li
                         ` (7 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8b87ae54ed09a4818d8dd8846777f6e23799c69d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8b87ae54ed09a4818d8dd8846777f6e23799c69d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 3 Jul 2024 18:09:23 -0700
Subject: [PATCH] doc: remove reference to mbuf pkt field
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d9d1be537ea777059711ac313019ecd94840daba ]

The pkt union in mbuf was removed way back in 2014 but there
still was one leftover in the mbuf figure.

Fixes: ea672a8b1655 ("mbuf: remove the rte_pktmbuf structure")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 doc/guides/prog_guide/img/mbuf1.svg | 2 +-
 doc/guides/prog_guide/img/mbuf2.svg | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/guides/prog_guide/img/mbuf1.svg b/doc/guides/prog_guide/img/mbuf1.svg
index a08bf3b6c0..111a874c00 100644
--- a/doc/guides/prog_guide/img/mbuf1.svg
+++ b/doc/guides/prog_guide/img/mbuf1.svg
@@ -487,7 +487,7 @@
          sodipodi:role="line"
          id="tspan5256"
          x="59.842155"
-         y="282.37683">m-&gt;pkt.next = NULL</tspan></text>
+         y="282.37683">m-&gt;next = NULL</tspan></text>
     <text
        xml:space="preserve"
        style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
diff --git a/doc/guides/prog_guide/img/mbuf2.svg b/doc/guides/prog_guide/img/mbuf2.svg
index f6fdb54002..6a80cbc200 100644
--- a/doc/guides/prog_guide/img/mbuf2.svg
+++ b/doc/guides/prog_guide/img/mbuf2.svg
@@ -1074,7 +1074,7 @@
          sodipodi:role="line"
          id="tspan5256-8"
          x="527.19458"
-         y="628.45935">m-&gt;pkt.next = NULL</tspan></text>
+         y="628.45935">m-&gt;next = NULL</tspan></text>
     <text
        xml:space="preserve"
        style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
@@ -1084,7 +1084,7 @@
          sodipodi:role="line"
          id="tspan5256-8-3"
          x="330.50363"
-         y="628.45935">m-&gt;pkt.next = mseg3</tspan></text>
+         y="628.45935">m-&gt;next = mseg3</tspan></text>
     <text
        xml:space="preserve"
        style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
@@ -1094,7 +1094,7 @@
          sodipodi:role="line"
          id="tspan5256-8-3-4"
          x="144.79388"
-         y="628.45935">m-&gt;pkt.next = mseg2</tspan></text>
+         y="628.45935">m-&gt;next = mseg2</tspan></text>
     <text
        xml:space="preserve"
        style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.236479224 +0800
+++ 0150-doc-remove-reference-to-mbuf-pkt-field.patch	2024-08-12 20:44:02.585069391 +0800
@@ -1 +1 @@
-From d9d1be537ea777059711ac313019ecd94840daba Mon Sep 17 00:00:00 2001
+From 8b87ae54ed09a4818d8dd8846777f6e23799c69d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d9d1be537ea777059711ac313019ecd94840daba ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'examples/ipsec-secgw: revert SA salt endianness' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (149 preceding siblings ...)
  2024-08-12 12:50       ` patch 'doc: remove reference to mbuf pkt field' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'doc: fix mbuf flags' " Xueming Li
                         ` (6 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: xuemingl, Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=613a4879b46c4171b7b63458c81937de20487831

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 613a4879b46c4171b7b63458c81937de20487831 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 29 Jul 2024 12:57:54 +0000
Subject: [PATCH] examples/ipsec-secgw: revert SA salt endianness
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 ]

The previous commit swapped the bytes of SA salt which
led to incorrect work of the ipsec-secgw application.
This patch reverts the previous commit and changes
the type of the salt field in the ipsec_sa structure.

Fixes: e6bfd9676109 ("examples/ipsec-secgw: fix SA salt endianness")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/ipsec-secgw/ipsec.h |  2 +-
 examples/ipsec-secgw/sa.c    | 13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index 29b9b283f0..649fb36871 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -117,7 +117,7 @@ struct ipsec_sa {
 	uint32_t spi;
 	struct cdev_qp *cqp[RTE_MAX_LCORE];
 	uint64_t seq;
-	uint32_t salt;
+	rte_be32_t salt;
 	uint32_t fallback_sessions;
 	enum rte_crypto_cipher_algorithm cipher_algo;
 	enum rte_crypto_auth_algorithm auth_algo;
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 7a90acaec2..6ae0e49fd7 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -374,7 +374,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 	uint32_t ti; /*token index*/
 	uint32_t *ri /*rule index*/;
 	struct ipsec_sa_cnt *sa_cnt;
-	rte_be32_t salt; /*big-endian salt*/
 	uint32_t cipher_algo_p = 0;
 	uint32_t auth_algo_p = 0;
 	uint32_t aead_algo_p = 0;
@@ -509,8 +508,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 			if (algo->algo == RTE_CRYPTO_CIPHER_AES_CTR) {
 				key_len -= 4;
 				rule->cipher_key_len = key_len;
-				memcpy(&salt, &rule->cipher_key[key_len], 4);
-				rule->salt = rte_be_to_cpu_32(salt);
+				memcpy(&rule->salt,
+					&rule->cipher_key[key_len], 4);
 			}
 
 			cipher_algo_p = 1;
@@ -574,8 +573,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 				key_len -= 4;
 				rule->auth_key_len = key_len;
 				rule->iv_len = algo->iv_len;
-				memcpy(&salt, &rule->auth_key[key_len], 4);
-				rule->salt = rte_be_to_cpu_32(salt);
+				memcpy(&rule->salt,
+					&rule->auth_key[key_len], 4);
 			}
 
 			auth_algo_p = 1;
@@ -633,8 +632,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 
 			key_len -= 4;
 			rule->cipher_key_len = key_len;
-			memcpy(&salt, &rule->cipher_key[key_len], 4);
-			rule->salt = rte_be_to_cpu_32(salt);
+			memcpy(&rule->salt,
+				&rule->cipher_key[key_len], 4);
 
 			aead_algo_p = 1;
 			continue;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.260847122 +0800
+++ 0151-examples-ipsec-secgw-revert-SA-salt-endianness.patch	2024-08-12 20:44:02.585069391 +0800
@@ -1 +1 @@
-From 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 Mon Sep 17 00:00:00 2001
+From 613a4879b46c4171b7b63458c81937de20487831 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index a83fd2283b..1fe6b97168 100644
+index 29b9b283f0..649fb36871 100644
@@ -25 +27 @@
-@@ -117,7 +117,7 @@ struct __rte_cache_aligned ipsec_sa {
+@@ -117,7 +117,7 @@ struct ipsec_sa {
@@ -35 +37 @@
-index 8aa9aca739..c4bac17cd7 100644
+index 7a90acaec2..6ae0e49fd7 100644

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

* patch 'doc: fix mbuf flags' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (150 preceding siblings ...)
  2024-08-12 12:50       ` patch 'examples/ipsec-secgw: revert SA salt endianness' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'doc: add power uncore in API index' " Xueming Li
                         ` (5 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Yingming Mao; +Cc: xuemingl, Shuo Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=09ccd86606e789f163f6106078e6129250f8da86

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 09ccd86606e789f163f6106078e6129250f8da86 Mon Sep 17 00:00:00 2001
From: Yingming Mao <maoyingming@baidu.com>
Date: Thu, 18 Apr 2024 14:20:25 +0800
Subject: [PATCH] doc: fix mbuf flags
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1d9077d101b5c9ac2f841a82187ef5ced0fc7f43 ]

Fixes: 2542ad53d867 ("doc: add description of the offload API")
Fixes: ae2c2cb60635 ("net/cnxk: avoid command copy from Tx queue")

Signed-off-by: Yingming Mao <maoyingming@baidu.com>
Reviewed-by: Shuo Li <lishuo02@baidu.com>
---
 .mailmap                           | 3 ++-
 doc/guides/prog_guide/mbuf_lib.rst | 8 ++++----
 drivers/net/cnxk/cn10k_tx.h        | 2 +-
 drivers/net/cnxk/cn9k_tx.h         | 2 +-
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/.mailmap b/.mailmap
index bea129355d..f2883144f3 100644
--- a/.mailmap
+++ b/.mailmap
@@ -868,7 +868,6 @@ Manish Chopra <manishc@marvell.com>
 Manish Kurup <manish.kurup@broadcom.com>
 Manish Tomar <manish.tomar@nxp.com>
 Mao Jiang <maox.jiang@intel.com>
-Mao YingMing <maoyingming@baidu.com>
 Marcel Apfelbaum <marcel@redhat.com>
 Marcel Cornu <marcel.d.cornu@intel.com>
 Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
@@ -1330,6 +1329,7 @@ Shuki Katzenelson <shuki@lightbitslabs.com>
 Shun Hao <shunh@nvidia.com>
 Shu Shen <shu.shen@radisys.com>
 Shujing Dong <shujing.dong@corigine.com>
+Shuo Li <lishuo02@baidu.com>
 Shweta Choudaha <shweta.choudaha@att.com>
 Shyam Kumar Shrivastav <shrivastav.shyam@gmail.com>
 Shy Shyman <shys@nvidia.com> <shys@mellanox.com>
@@ -1635,6 +1635,7 @@ Yi Lu <luyi68@live.com>
 Yilun Xu <yilun.xu@intel.com>
 Yinan Wang <yinan.wang@intel.com>
 Ying A Wang <ying.a.wang@intel.com>
+Yingming Mao <maoyingming@baidu.com>
 Yingya Han <yingyax.han@intel.com>
 Yinjun Zhang <yinjun.zhang@corigine.com>
 Yipeng Wang <yipeng1.wang@intel.com>
diff --git a/doc/guides/prog_guide/mbuf_lib.rst b/doc/guides/prog_guide/mbuf_lib.rst
index 049357c755..749f9c97a8 100644
--- a/doc/guides/prog_guide/mbuf_lib.rst
+++ b/doc/guides/prog_guide/mbuf_lib.rst
@@ -134,7 +134,7 @@ a vxlan-encapsulated tcp packet:
 
     mb->l2_len = len(out_eth)
     mb->l3_len = len(out_ip)
-    mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM
+    mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM
     set out_ip checksum to 0 in the packet
 
   This is supported on hardware advertising RTE_ETH_TX_OFFLOAD_IPV4_CKSUM.
@@ -143,7 +143,7 @@ a vxlan-encapsulated tcp packet:
 
     mb->l2_len = len(out_eth)
     mb->l3_len = len(out_ip)
-    mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM | RTE_MBUF_F_TX_UDP_CKSUM
+    mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_UDP_CKSUM
     set out_ip checksum to 0 in the packet
     set out_udp checksum to pseudo header using rte_ipv4_phdr_cksum()
 
@@ -154,7 +154,7 @@ a vxlan-encapsulated tcp packet:
 
     mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)
     mb->l3_len = len(in_ip)
-    mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM
+    mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM
     set in_ip checksum to 0 in the packet
 
   This is similar to case 1), but l2_len is different. It is supported
@@ -165,7 +165,7 @@ a vxlan-encapsulated tcp packet:
 
     mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)
     mb->l3_len = len(in_ip)
-    mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM | RTE_MBUF_F_TX_TCP_CKSUM
+    mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_TCP_CKSUM
     set in_ip checksum to 0 in the packet
     set in_tcp checksum to pseudo header using rte_ipv4_phdr_cksum()
 
diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index 0a2ad08f1f..c84154ee84 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -1293,7 +1293,7 @@ cn10k_nix_xmit_prepare_tstamp(struct cn10k_eth_txq *txq, uintptr_t lmt_addr,
 		struct nix_send_mem_s *send_mem;
 
 		send_mem = (struct nix_send_mem_s *)(lmt + off);
-		/* Packets for which PKT_TX_IEEE1588_TMST is not set, tx tstamp
+		/* Packets for which RTE_MBUF_F_TX_IEEE1588_TMST is not set, Tx tstamp
 		 * should not be recorded, hence changing the alg type to
 		 * NIX_SENDMEMALG_SUB and also changing send mem addr field to
 		 * next 8 bytes as it corrupts the actual Tx tstamp registered
diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
index 636eb1f765..4715bf8a65 100644
--- a/drivers/net/cnxk/cn9k_tx.h
+++ b/drivers/net/cnxk/cn9k_tx.h
@@ -560,7 +560,7 @@ cn9k_nix_xmit_prepare_tstamp(struct cn9k_eth_txq *txq, uint64_t *cmd,
 
 		send_mem = (struct nix_send_mem_s *)(cmd + off);
 
-		/* Packets for which PKT_TX_IEEE1588_TMST is not set, tx tstamp
+		/* Packets for which RTE_MBUF_F_TX_IEEE1588_TMST is not set, Tx tstamp
 		 * should not be recorded, hence changing the alg type to
 		 * NIX_SENDMEMALG_SUB and also changing send mem addr field to
 		 * next 8 bytes as it corrupts the actual Tx tstamp registered
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.285982420 +0800
+++ 0152-doc-fix-mbuf-flags.patch	2024-08-12 20:44:02.595069393 +0800
@@ -1 +1 @@
-From 1d9077d101b5c9ac2f841a82187ef5ced0fc7f43 Mon Sep 17 00:00:00 2001
+From 09ccd86606e789f163f6106078e6129250f8da86 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1d9077d101b5c9ac2f841a82187ef5ced0fc7f43 ]
@@ -8 +10,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 8aef1c59a4..4a508bafad 100644
+index bea129355d..f2883144f3 100644
@@ -23 +25 @@
-@@ -893,7 +893,6 @@ Manish Chopra <manishc@marvell.com>
+@@ -868,7 +868,6 @@ Manish Chopra <manishc@marvell.com>
@@ -31 +33 @@
-@@ -1371,6 +1370,7 @@ Shuki Katzenelson <shuki@lightbitslabs.com>
+@@ -1330,6 +1329,7 @@ Shuki Katzenelson <shuki@lightbitslabs.com>
@@ -39 +41 @@
-@@ -1684,6 +1684,7 @@ Yi Lu <luyi68@live.com>
+@@ -1635,6 +1635,7 @@ Yi Lu <luyi68@live.com>
@@ -88 +90 @@
-index 84b08403c0..7d9b259a5f 100644
+index 0a2ad08f1f..c84154ee84 100644
@@ -91 +93 @@
-@@ -1242,7 +1242,7 @@ cn10k_nix_xmit_prepare_tstamp(struct cn10k_eth_txq *txq, uintptr_t lmt_addr,
+@@ -1293,7 +1293,7 @@ cn10k_nix_xmit_prepare_tstamp(struct cn10k_eth_txq *txq, uintptr_t lmt_addr,
@@ -101 +103 @@
-index b56881c561..9370985864 100644
+index 636eb1f765..4715bf8a65 100644

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

* patch 'doc: add power uncore in API index' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (151 preceding siblings ...)
  2024-08-12 12:50       ` patch 'doc: fix mbuf flags' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'doc: describe mlx5 HWS actions order' " Xueming Li
                         ` (4 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: xuemingl, Vipin Varghese, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=1ef309709477acf1dfc5c6a47a099592376bc57a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1ef309709477acf1dfc5c6a47a099592376bc57a Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Tue, 30 Apr 2024 19:57:14 +0100
Subject: [PATCH] doc: add power uncore in API index
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 57cf5b6d7df87864274750d21b5e7e440d11467e ]

Add missing power uncore API documentation.

Fixes: ac1edcb6621a ("power: refactor uncore power management API")

Reported-by: Vipin Varghese <vipin.varghese@amd.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 doc/api/doxy-api-index.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index a6a768bd7c..29eaad6523 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -102,6 +102,7 @@ The public API headers are grouped by topics:
   [service cores](@ref rte_service.h),
   [keepalive](@ref rte_keepalive.h),
   [power/freq](@ref rte_power.h),
+  [power/uncore](@ref rte_power_uncore.h),
   [PMD power](@ref rte_power_pmd_mgmt.h)
 
 - **layers**:
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.313327917 +0800
+++ 0153-doc-add-power-uncore-in-API-index.patch	2024-08-12 20:44:02.595069393 +0800
@@ -1 +1 @@
-From 57cf5b6d7df87864274750d21b5e7e440d11467e Mon Sep 17 00:00:00 2001
+From 1ef309709477acf1dfc5c6a47a099592376bc57a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 57cf5b6d7df87864274750d21b5e7e440d11467e ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index f9283154f8..f9f0300126 100644
+index a6a768bd7c..29eaad6523 100644
@@ -21 +23 @@
-@@ -103,6 +103,7 @@ The public API headers are grouped by topics:
+@@ -102,6 +102,7 @@ The public API headers are grouped by topics:

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

* patch 'doc: describe mlx5 HWS actions order' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (152 preceding siblings ...)
  2024-08-12 12:50       ` patch 'doc: add power uncore in API index' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'doc: fix DMA performance test invocation' " Xueming Li
                         ` (3 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Maayan Kashani; +Cc: xuemingl, Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d01561713d129d848444e764430c4be1fb133d17

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d01561713d129d848444e764430c4be1fb133d17 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Wed, 24 Jul 2024 10:36:16 +0300
Subject: [PATCH] doc: describe mlx5 HWS actions order
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 88596e96f0efbe1bde4eeeb1cc196fd0d8627885 ]

Add actions order supported in mlx5 PMD
when HW steering flow engine is used.
This limitation existed since HW Steering flow engine was introduced.

Fixes: 22681deead3e ("net/mlx5/hws: enable hardware steering")

Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 doc/guides/nics/mlx5.rst | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index d0ebc101b4..2c59b24d78 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -245,6 +245,26 @@ Limitations
   - Matching on ICMP6 following IPv6 routing extension header,
     should match ``ipv6_routing_ext_next_hdr`` instead of ICMP6.
 
+  - The supported actions order is as below::
+
+          MARK (a)
+          *_DECAP (b)
+          OF_POP_VLAN
+          COUNT | AGE
+          METER_MARK | CONNTRACK
+          OF_PUSH_VLAN
+          MODIFY_FIELD
+          *_ENCAP (c)
+          JUMP | DROP | RSS (a) | QUEUE (a) | REPRESENTED_PORT (d)
+
+    a. Only supported on ingress.
+    b. Any decapsulation action, including the combination of RAW_ENCAP and RAW_DECAP actions
+       which results in L3 decapsulation.
+       Not supported on egress.
+    c. Any encapsulation action, including the combination of RAW_ENCAP and RAW_DECAP actions
+       which results in L3 encap.
+    d. Only in transfer (switchdev) mode.
+
 - When using Verbs flow engine (``dv_flow_en`` = 0), flow pattern without any
   specific VLAN will match for VLAN packets as well:
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.338984715 +0800
+++ 0154-doc-describe-mlx5-HWS-actions-order.patch	2024-08-12 20:44:02.595069393 +0800
@@ -1 +1 @@
-From 88596e96f0efbe1bde4eeeb1cc196fd0d8627885 Mon Sep 17 00:00:00 2001
+From d01561713d129d848444e764430c4be1fb133d17 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 88596e96f0efbe1bde4eeeb1cc196fd0d8627885 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 43fc181d8d..1dccdaad50 100644
+index d0ebc101b4..2c59b24d78 100644
@@ -23,3 +25,3 @@
-@@ -251,6 +251,26 @@ Limitations
-     IPv6 routing extension matching is not supported in flow template relaxed
-     matching mode (see ``struct rte_flow_pattern_template_attr::relaxed_matching``).
+@@ -245,6 +245,26 @@ Limitations
+   - Matching on ICMP6 following IPv6 routing extension header,
+     should match ``ipv6_routing_ext_next_hdr`` instead of ICMP6.

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

* patch 'doc: fix DMA performance test invocation' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (153 preceding siblings ...)
  2024-08-12 12:50       ` patch 'doc: describe mlx5 HWS actions order' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'doc: add baseline mode in l3fwd-power guide' " Xueming Li
                         ` (2 subsequent siblings)
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Amit Prakash Shukla; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8437250f9f1834b9f5989f10523b582777dff5c9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8437250f9f1834b9f5989f10523b582777dff5c9 Mon Sep 17 00:00:00 2001
From: Amit Prakash Shukla <amitprakashs@marvell.com>
Date: Thu, 25 Jul 2024 23:17:56 +0530
Subject: [PATCH] doc: fix DMA performance test invocation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1dc27d1805777bf69b34fc6c49debef44125f51d ]

Fixing typo in command line arguments for DMA perf application.

Fixes: 623dc9364dc6 ("app/dma-perf: introduce DMA performance test")

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
---
 doc/guides/tools/dmaperf.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/tools/dmaperf.rst b/doc/guides/tools/dmaperf.rst
index 9e3e78a6b7..9fc77ca943 100644
--- a/doc/guides/tools/dmaperf.rst
+++ b/doc/guides/tools/dmaperf.rst
@@ -119,7 +119,7 @@ Typical command-line invocation to execute the application:
 
 .. code-block:: console
 
-   dpdk-test-dma-perf --config=./config_dma.ini --result=./res_dma.csv
+   dpdk-test-dma-perf --config ./config_dma.ini --result ./res_dma.csv
 
 Where ``config_dma.ini`` is the configuration file,
 and ``res_dma.csv`` will be the generated result file.
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.366373013 +0800
+++ 0155-doc-fix-DMA-performance-test-invocation.patch	2024-08-12 20:44:02.595069393 +0800
@@ -1 +1 @@
-From 1dc27d1805777bf69b34fc6c49debef44125f51d Mon Sep 17 00:00:00 2001
+From 8437250f9f1834b9f5989f10523b582777dff5c9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1dc27d1805777bf69b34fc6c49debef44125f51d ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 6f85fceb8a..f68353b920 100644
+index 9e3e78a6b7..9fc77ca943 100644

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

* patch 'doc: add baseline mode in l3fwd-power guide' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (154 preceding siblings ...)
  2024-08-12 12:50       ` patch 'doc: fix DMA performance test invocation' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'examples: fix lcore ID restriction' " Xueming Li
  2024-08-12 12:50       ` patch 'examples: fix port " Xueming Li
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Karen Kelly; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=776c4e37ee822b79fb21db97b1c491a58123c158

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 776c4e37ee822b79fb21db97b1c491a58123c158 Mon Sep 17 00:00:00 2001
From: Karen Kelly <karen.kelly@intel.com>
Date: Tue, 16 Apr 2024 15:20:35 +0200
Subject: [PATCH] doc: add baseline mode in l3fwd-power guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 40b46770b0fc5c39b4987067780a6e92e1b30ea8 ]

Updating PMD Power Management Mode section of the l3fwd-power
sample app to add baseline option as this was missing from the
original commit.

Fixes: a9ea60702ecb ("examples/l3fwd-power: add baseline PMD management mode")

Signed-off-by: Karen Kelly <karen.kelly@intel.com>
---
 doc/guides/sample_app_ug/l3_forward_power_man.rst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/guides/sample_app_ug/l3_forward_power_man.rst b/doc/guides/sample_app_ug/l3_forward_power_man.rst
index 4a6f33bf4f..9c9684fea7 100644
--- a/doc/guides/sample_app_ug/l3_forward_power_man.rst
+++ b/doc/guides/sample_app_ug/l3_forward_power_man.rst
@@ -280,6 +280,9 @@ will use automatic PMD power management.
 This mode is limited to one queue per core,
 and has three available power management schemes:
 
+``baseline``
+  This mode will not enable any power saving features.
+
 ``monitor``
   This will use ``rte_power_monitor()`` function to enter
   a power-optimized state (subject to platform support).
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.388832111 +0800
+++ 0156-doc-add-baseline-mode-in-l3fwd-power-guide.patch	2024-08-12 20:44:02.595069393 +0800
@@ -1 +1 @@
-From 40b46770b0fc5c39b4987067780a6e92e1b30ea8 Mon Sep 17 00:00:00 2001
+From 776c4e37ee822b79fb21db97b1c491a58123c158 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 40b46770b0fc5c39b4987067780a6e92e1b30ea8 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'examples: fix lcore ID restriction' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (155 preceding siblings ...)
  2024-08-12 12:50       ` patch 'doc: add baseline mode in l3fwd-power guide' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  2024-08-12 12:50       ` patch 'examples: fix port " Xueming Li
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Sivaprasad Tummala
  Cc: xuemingl, Konstantin Ananyev, Morten Brørup, Ferruh Yigit,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3fc9eb2f4f24243c993862e92b1390025f0e16e6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3fc9eb2f4f24243c993862e92b1390025f0e16e6 Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Tue, 26 Mar 2024 13:55:44 +0100
Subject: [PATCH] examples: fix lcore ID restriction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4b978938168b219346775ff877ac31649a36cba7 ]

Currently the config option allows lcore IDs up to 255,
irrespective of RTE_MAX_LCORES and needs to be fixed.

The patch fixes these constraints by allowing all
lcore IDs up to RTE_MAX_LCORES.

Fixes: af75078fece3 ("first public release")
Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")
Fixes: 0e8f47491f09 ("examples/vm_power: add command to query CPU frequency")
Fixes: de3cfa2c9823 ("sched: initial import")
Cc: stable@dpdk.org

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 examples/ipsec-secgw/event_helper.h           |  2 +-
 examples/ipsec-secgw/ipsec-secgw.c            | 21 ++++++++++++-------
 examples/ipsec-secgw/ipsec.c                  |  2 +-
 examples/ipsec-secgw/ipsec.h                  |  4 ++--
 examples/l3fwd-graph/main.c                   | 14 ++++++-------
 examples/l3fwd-power/main.c                   | 18 +++++++++-------
 examples/l3fwd-power/main.h                   |  2 +-
 examples/l3fwd-power/perf_core.c              | 11 +++++++---
 examples/l3fwd/main.c                         | 20 +++++++++++-------
 examples/qos_sched/args.c                     |  6 +++---
 .../guest_cli/vm_power_cli_guest.c            |  4 ++--
 11 files changed, 61 insertions(+), 43 deletions(-)

diff --git a/examples/ipsec-secgw/event_helper.h b/examples/ipsec-secgw/event_helper.h
index dfb81bfcf1..be635685b4 100644
--- a/examples/ipsec-secgw/event_helper.h
+++ b/examples/ipsec-secgw/event_helper.h
@@ -102,7 +102,7 @@ struct eh_event_link_info {
 		/**< Event port ID */
 	uint8_t eventq_id;
 		/**< Event queue to be linked to the port */
-	uint8_t lcore_id;
+	uint32_t lcore_id;
 		/**< Lcore to be polling on this port */
 };
 
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 782535f4b5..2d004d82fd 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -221,7 +221,7 @@ static const char *cfgfile;
 struct lcore_params {
 	uint16_t port_id;
 	uint16_t queue_id;
-	uint8_t lcore_id;
+	uint32_t lcore_id;
 } __rte_cache_aligned;
 
 static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS];
@@ -807,7 +807,7 @@ check_flow_params(uint16_t fdir_portid, uint8_t fdir_qid)
 static int32_t
 check_poll_mode_params(struct eh_conf *eh_conf)
 {
-	uint8_t lcore;
+	uint32_t lcore;
 	uint16_t portid;
 	uint16_t i;
 	int32_t socket_id;
@@ -826,13 +826,13 @@ check_poll_mode_params(struct eh_conf *eh_conf)
 	for (i = 0; i < nb_lcore_params; ++i) {
 		lcore = lcore_params[i].lcore_id;
 		if (!rte_lcore_is_enabled(lcore)) {
-			printf("error: lcore %hhu is not enabled in "
+			printf("error: lcore %u is not enabled in "
 				"lcore mask\n", lcore);
 			return -1;
 		}
 		socket_id = rte_lcore_to_socket_id(lcore);
 		if (socket_id != 0 && numa_on == 0) {
-			printf("warning: lcore %hhu is on socket %d "
+			printf("warning: lcore %u is on socket %d "
 				"with numa off\n",
 				lcore, socket_id);
 		}
@@ -867,7 +867,7 @@ static int32_t
 init_lcore_rx_queues(void)
 {
 	uint16_t i, nb_rx_queue;
-	uint8_t lcore;
+	uint32_t lcore;
 
 	for (i = 0; i < nb_lcore_params; ++i) {
 		lcore = lcore_params[i].lcore_id;
@@ -1048,7 +1048,11 @@ parse_config(const char *q_arg)
 	char *str_fld[_NUM_FLD];
 	int32_t i;
 	uint32_t size;
-	uint32_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
+	uint32_t max_fld[_NUM_FLD] = {
+		255,
+		RTE_MAX_QUEUES_PER_PORT,
+		RTE_MAX_LCORE
+	};
 
 	nb_lcore_params = 0;
 
@@ -1082,7 +1086,7 @@ parse_config(const char *q_arg)
 		lcore_params_array[nb_lcore_params].queue_id =
 			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
-			(uint8_t)int_fld[FLD_LCORE];
+			(uint32_t)int_fld[FLD_LCORE];
 		++nb_lcore_params;
 	}
 	lcore_params = lcore_params_array;
@@ -1918,7 +1922,8 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads,
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_txconf *txconf;
 	uint16_t nb_tx_queue, nb_rx_queue;
-	uint16_t tx_queueid, rx_queueid, queue, lcore_id;
+	uint16_t tx_queueid, rx_queueid, queue;
+	uint32_t lcore_id;
 	int32_t ret, socket_id;
 	struct lcore_conf *qconf;
 	struct rte_ether_addr ethaddr;
diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index c321108119..b52b0ffc3d 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -259,7 +259,7 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[],
 			continue;
 
 		/* Looking for cryptodev, which can handle this SA */
-		key.lcore_id = (uint8_t)lcore_id;
+		key.lcore_id = lcore_id;
 		key.cipher_algo = (uint8_t)sa->cipher_algo;
 		key.auth_algo = (uint8_t)sa->auth_algo;
 		key.aead_algo = (uint8_t)sa->aead_algo;
diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index 649fb36871..d4ecfdf08d 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -256,11 +256,11 @@ extern struct offloads tx_offloads;
  * (hash key calculation reads 8 bytes if this struct is size 5 bytes).
  */
 struct cdev_key {
-	uint16_t lcore_id;
+	uint32_t lcore_id;
 	uint8_t cipher_algo;
 	uint8_t auth_algo;
 	uint8_t aead_algo;
-	uint8_t padding[3]; /* padding to 8-byte size should be zeroed */
+	uint8_t padding; /* padding to 8-byte size should be zeroed */
 };
 
 struct socket_ctx {
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index 4b018d1e78..dbc36362c3 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -111,7 +111,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
 struct lcore_params {
 	uint16_t port_id;
 	uint16_t queue_id;
-	uint8_t lcore_id;
+	uint32_t lcore_id;
 } __rte_cache_aligned;
 
 static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS];
@@ -207,7 +207,7 @@ check_lcore_params(void)
 {
 	uint16_t queue, i;
 	int socketid;
-	uint8_t lcore;
+	uint32_t lcore;
 
 	for (i = 0; i < nb_lcore_params; ++i) {
 		queue = lcore_params[i].queue_id;
@@ -217,7 +217,7 @@ check_lcore_params(void)
 		}
 		lcore = lcore_params[i].lcore_id;
 		if (!rte_lcore_is_enabled(lcore)) {
-			printf("Error: lcore %hhu is not enabled in lcore mask\n",
+			printf("Error: lcore %u is not enabled in lcore mask\n",
 			       lcore);
 			return -1;
 		}
@@ -228,7 +228,7 @@ check_lcore_params(void)
 		}
 		socketid = rte_lcore_to_socket_id(lcore);
 		if ((socketid != 0) && (numa_on == 0)) {
-			printf("Warning: lcore %hhu is on socket %d with numa off\n",
+			printf("Warning: lcore %u is on socket %d with numa off\n",
 			       lcore, socketid);
 		}
 	}
@@ -282,7 +282,7 @@ static int
 init_lcore_rx_queues(void)
 {
 	uint16_t i, nb_rx_queue;
-	uint8_t lcore;
+	uint32_t lcore;
 
 	for (i = 0; i < nb_lcore_params; ++i) {
 		lcore = lcore_params[i].lcore_id;
@@ -290,7 +290,7 @@ init_lcore_rx_queues(void)
 		if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) {
 			printf("Error: too many queues (%u) for lcore: %u\n",
 			       (unsigned int)nb_rx_queue + 1,
-			       (unsigned int)lcore);
+			       lcore);
 			return -1;
 		}
 
@@ -452,7 +452,7 @@ parse_config(const char *q_arg)
 		lcore_params_array[nb_lcore_params].queue_id =
 			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
-			(uint8_t)int_fld[FLD_LCORE];
+			(uint32_t)int_fld[FLD_LCORE];
 		++nb_lcore_params;
 	}
 	lcore_params = lcore_params_array;
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 5045d13533..baf2bf64b2 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1396,7 +1396,7 @@ static int
 check_lcore_params(void)
 {
 	uint16_t queue, i;
-	uint8_t lcore;
+	uint32_t lcore;
 	int socketid;
 
 	for (i = 0; i < nb_lcore_params; ++i) {
@@ -1407,13 +1407,13 @@ check_lcore_params(void)
 		}
 		lcore = lcore_params[i].lcore_id;
 		if (!rte_lcore_is_enabled(lcore)) {
-			printf("error: lcore %hhu is not enabled in lcore "
+			printf("error: lcore %u is not enabled in lcore "
 							"mask\n", lcore);
 			return -1;
 		}
 		if ((socketid = rte_lcore_to_socket_id(lcore) != 0) &&
 							(numa_on == 0)) {
-			printf("warning: lcore %hhu is on socket %d with numa "
+			printf("warning: lcore %u is on socket %d with numa "
 						"off\n", lcore, socketid);
 		}
 		if (app_mode == APP_MODE_TELEMETRY && lcore == rte_lcore_id()) {
@@ -1465,14 +1465,14 @@ static int
 init_lcore_rx_queues(void)
 {
 	uint16_t i, nb_rx_queue;
-	uint8_t lcore;
+	uint32_t lcore;
 
 	for (i = 0; i < nb_lcore_params; ++i) {
 		lcore = lcore_params[i].lcore_id;
 		nb_rx_queue = lcore_conf[lcore].n_rx_queue;
 		if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) {
 			printf("error: too many queues (%u) for lcore: %u\n",
-				(unsigned)nb_rx_queue + 1, (unsigned)lcore);
+				(unsigned int)nb_rx_queue + 1, lcore);
 			return -1;
 		} else {
 			lcore_conf[lcore].rx_queue_list[nb_rx_queue].port_id =
@@ -1657,7 +1657,11 @@ parse_config(const char *q_arg)
 	char *str_fld[_NUM_FLD];
 	int i;
 	unsigned size;
-	unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
+	unsigned int max_fld[_NUM_FLD] = {
+		255,
+		RTE_MAX_QUEUES_PER_PORT,
+		RTE_MAX_LCORE
+	};
 
 	nb_lcore_params = 0;
 
@@ -1690,7 +1694,7 @@ parse_config(const char *q_arg)
 		lcore_params_array[nb_lcore_params].queue_id =
 				(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
-				(uint8_t)int_fld[FLD_LCORE];
+				(uint32_t)int_fld[FLD_LCORE];
 		++nb_lcore_params;
 	}
 	lcore_params = lcore_params_array;
diff --git a/examples/l3fwd-power/main.h b/examples/l3fwd-power/main.h
index 40b5194726..194bd82102 100644
--- a/examples/l3fwd-power/main.h
+++ b/examples/l3fwd-power/main.h
@@ -10,7 +10,7 @@
 struct lcore_params {
 	uint16_t port_id;
 	uint16_t queue_id;
-	uint8_t lcore_id;
+	uint32_t lcore_id;
 } __rte_cache_aligned;
 
 extern struct lcore_params *lcore_params;
diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c
index f34442b9d0..fbd7864cb9 100644
--- a/examples/l3fwd-power/perf_core.c
+++ b/examples/l3fwd-power/perf_core.c
@@ -24,7 +24,7 @@ struct perf_lcore_params {
 	uint16_t port_id;
 	uint16_t queue_id;
 	uint8_t high_perf;
-	uint8_t lcore_idx;
+	uint32_t lcore_idx;
 } __rte_cache_aligned;
 
 static struct perf_lcore_params prf_lc_prms[MAX_LCORE_PARAMS];
@@ -132,7 +132,12 @@ parse_perf_config(const char *q_arg)
 	char *str_fld[_NUM_FLD];
 	int i;
 	unsigned int size;
-	unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255, 255};
+	unsigned int max_fld[_NUM_FLD] = {
+		255,
+		RTE_MAX_QUEUES_PER_PORT,
+		255,
+		RTE_MAX_LCORE
+	};
 
 	nb_prf_lc_prms = 0;
 
@@ -169,7 +174,7 @@ parse_perf_config(const char *q_arg)
 		prf_lc_prms[nb_prf_lc_prms].high_perf =
 				!!(uint8_t)int_fld[FLD_LCORE_HP];
 		prf_lc_prms[nb_prf_lc_prms].lcore_idx =
-				(uint8_t)int_fld[FLD_LCORE_IDX];
+				(uint32_t)int_fld[FLD_LCORE_IDX];
 		++nb_prf_lc_prms;
 	}
 
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 039207b06c..47baf464e2 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -99,7 +99,7 @@ struct parm_cfg parm_config;
 struct lcore_params {
 	uint16_t port_id;
 	uint16_t queue_id;
-	uint8_t lcore_id;
+	uint32_t lcore_id;
 } __rte_cache_aligned;
 
 static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS];
@@ -293,7 +293,7 @@ static int
 check_lcore_params(void)
 {
 	uint16_t queue, i;
-	uint8_t lcore;
+	uint32_t lcore;
 	int socketid;
 
 	for (i = 0; i < nb_lcore_params; ++i) {
@@ -304,12 +304,12 @@ check_lcore_params(void)
 		}
 		lcore = lcore_params[i].lcore_id;
 		if (!rte_lcore_is_enabled(lcore)) {
-			printf("error: lcore %hhu is not enabled in lcore mask\n", lcore);
+			printf("error: lcore %u is not enabled in lcore mask\n", lcore);
 			return -1;
 		}
 		if ((socketid = rte_lcore_to_socket_id(lcore) != 0) &&
 			(numa_on == 0)) {
-			printf("warning: lcore %hhu is on socket %d with numa off \n",
+			printf("warning: lcore %u is on socket %d with numa off\n",
 				lcore, socketid);
 		}
 	}
@@ -359,14 +359,14 @@ static int
 init_lcore_rx_queues(void)
 {
 	uint16_t i, nb_rx_queue;
-	uint8_t lcore;
+	uint32_t lcore;
 
 	for (i = 0; i < nb_lcore_params; ++i) {
 		lcore = lcore_params[i].lcore_id;
 		nb_rx_queue = lcore_conf[lcore].n_rx_queue;
 		if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) {
 			printf("error: too many queues (%u) for lcore: %u\n",
-				(unsigned)nb_rx_queue + 1, (unsigned)lcore);
+				(unsigned int)nb_rx_queue + 1, lcore);
 			return -1;
 		} else {
 			lcore_conf[lcore].rx_queue_list[nb_rx_queue].port_id =
@@ -500,7 +500,11 @@ parse_config(const char *q_arg)
 	char *str_fld[_NUM_FLD];
 	int i;
 	unsigned size;
-	uint16_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
+	uint16_t max_fld[_NUM_FLD] = {
+		255,
+		RTE_MAX_QUEUES_PER_PORT,
+		RTE_MAX_LCORE
+	};
 
 	nb_lcore_params = 0;
 
@@ -532,7 +536,7 @@ parse_config(const char *q_arg)
 		lcore_params_array[nb_lcore_params].queue_id =
 			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
-			(uint8_t)int_fld[FLD_LCORE];
+			(uint32_t)int_fld[FLD_LCORE];
 		++nb_lcore_params;
 	}
 	lcore_params = lcore_params_array;
diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
index 8d61d3e454..886542b3c1 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -184,10 +184,10 @@ app_parse_flow_conf(const char *conf_str)
 
 	pconf->rx_port = vals[0];
 	pconf->tx_port = vals[1];
-	pconf->rx_core = (uint8_t)vals[2];
-	pconf->wt_core = (uint8_t)vals[3];
+	pconf->rx_core = vals[2];
+	pconf->wt_core = vals[3];
 	if (ret == 5)
-		pconf->tx_core = (uint8_t)vals[4];
+		pconf->tx_core = vals[4];
 	else
 		pconf->tx_core = pconf->wt_core;
 
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index 94bfbbaf78..5eddb47847 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -401,7 +401,7 @@ check_response_cmd(unsigned int lcore_id, int *result)
 
 struct cmd_set_cpu_freq_result {
 	cmdline_fixed_string_t set_cpu_freq;
-	uint8_t lcore_id;
+	uint32_t lcore_id;
 	cmdline_fixed_string_t cmd;
 };
 
@@ -444,7 +444,7 @@ cmdline_parse_token_string_t cmd_set_cpu_freq =
 			set_cpu_freq, "set_cpu_freq");
 cmdline_parse_token_num_t cmd_set_cpu_freq_core_num =
 	TOKEN_NUM_INITIALIZER(struct cmd_set_cpu_freq_result,
-			lcore_id, RTE_UINT8);
+			lcore_id, RTE_UINT32);
 cmdline_parse_token_string_t cmd_set_cpu_freq_cmd_cmd =
 	TOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result,
 			cmd, "up#down#min#max#enable_turbo#disable_turbo");
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.412427710 +0800
+++ 0157-examples-fix-lcore-ID-restriction.patch	2024-08-12 20:44:02.605069395 +0800
@@ -1 +1 @@
-From 4b978938168b219346775ff877ac31649a36cba7 Mon Sep 17 00:00:00 2001
+From 3fc9eb2f4f24243c993862e92b1390025f0e16e6 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4b978938168b219346775ff877ac31649a36cba7 ]
@@ -55 +58 @@
-index 8292a262cd..5a7e1b220f 100644
+index 782535f4b5..2d004d82fd 100644
@@ -59 +62 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -64 +67 @@
- };
+ } __rte_cache_aligned;
@@ -147 +150 @@
-index 6f45fdb166..a83fd2283b 100644
+index 649fb36871..d4ecfdf08d 100644
@@ -165 +168 @@
-index 0866822e93..4396e2bb3c 100644
+index 4b018d1e78..dbc36362c3 100644
@@ -169 +172 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -174 +177 @@
- };
+ } __rte_cache_aligned;
@@ -232 +235 @@
-index 74e906cb5d..2976058425 100644
+index 5045d13533..baf2bf64b2 100644
@@ -235 +238 @@
-@@ -1397,7 +1397,7 @@ static int
+@@ -1396,7 +1396,7 @@ static int
@@ -244 +247 @@
-@@ -1408,13 +1408,13 @@ check_lcore_params(void)
+@@ -1407,13 +1407,13 @@ check_lcore_params(void)
@@ -260 +263 @@
-@@ -1466,14 +1466,14 @@ static int
+@@ -1465,14 +1465,14 @@ static int
@@ -277 +280 @@
-@@ -1658,7 +1658,11 @@ parse_config(const char *q_arg)
+@@ -1657,7 +1657,11 @@ parse_config(const char *q_arg)
@@ -290 +293 @@
-@@ -1691,7 +1695,7 @@ parse_config(const char *q_arg)
+@@ -1690,7 +1694,7 @@ parse_config(const char *q_arg)
@@ -300 +303 @@
-index 378f54794c..2461ab8da7 100644
+index 40b5194726..194bd82102 100644
@@ -304 +307 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -309 +312 @@
- };
+ } __rte_cache_aligned;
@@ -313 +316 @@
-index 77248889c0..a0112b57ff 100644
+index f34442b9d0..fbd7864cb9 100644
@@ -316 +319 @@
-@@ -24,7 +24,7 @@ struct __rte_cache_aligned perf_lcore_params {
+@@ -24,7 +24,7 @@ struct perf_lcore_params {
@@ -322 +325 @@
- };
+ } __rte_cache_aligned;
@@ -349 +352 @@
-index f5f5f1a7fb..ba7083d4f3 100644
+index 039207b06c..47baf464e2 100644
@@ -353 +356 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -358 +361 @@
- };
+ } __rte_cache_aligned;

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

* patch 'examples: fix port ID restriction' has been queued to stable release 23.11.2
  2024-08-12 12:47     ` patch " Xueming Li
                         ` (156 preceding siblings ...)
  2024-08-12 12:50       ` patch 'examples: fix lcore ID restriction' " Xueming Li
@ 2024-08-12 12:50       ` Xueming Li
  157 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-08-12 12:50 UTC (permalink / raw)
  To: Sivaprasad Tummala
  Cc: xuemingl, Konstantin Ananyev, Morten Brørup, Ferruh Yigit,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=729e0848b79b9f119d33066a915e34439d7f8597

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 729e0848b79b9f119d33066a915e34439d7f8597 Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Tue, 26 Mar 2024 13:55:50 +0100
Subject: [PATCH] examples: fix port ID restriction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 548de9091c85467bd8f05cecf6d32315869d1461 ]

Currently application supports port IDs up to 255
irrespective of RTE_MAX_ETHPORTS.

The patch fixes these constraints by allowing port
IDs up to RTE_MAX_ETHPORTS.

Fixes: af75078fece3 ("first public release")
Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")
Cc: stable@dpdk.org

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 4 ++--
 examples/l3fwd-graph/main.c        | 2 +-
 examples/l3fwd-power/main.c        | 4 ++--
 examples/l3fwd-power/perf_core.c   | 4 ++--
 examples/l3fwd/main.c              | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 2d004d82fd..761b9cf396 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1049,7 +1049,7 @@ parse_config(const char *q_arg)
 	int32_t i;
 	uint32_t size;
 	uint32_t max_fld[_NUM_FLD] = {
-		255,
+		RTE_MAX_ETHPORTS,
 		RTE_MAX_QUEUES_PER_PORT,
 		RTE_MAX_LCORE
 	};
@@ -1082,7 +1082,7 @@ parse_config(const char *q_arg)
 			return -1;
 		}
 		lcore_params_array[nb_lcore_params].port_id =
-			(uint8_t)int_fld[FLD_PORT];
+			(uint16_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
 			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index dbc36362c3..4ded69b4a0 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -448,7 +448,7 @@ parse_config(const char *q_arg)
 		}
 
 		lcore_params_array[nb_lcore_params].port_id =
-			(uint8_t)int_fld[FLD_PORT];
+			(uint16_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
 			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index baf2bf64b2..996ac6dc56 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1658,7 +1658,7 @@ parse_config(const char *q_arg)
 	int i;
 	unsigned size;
 	unsigned int max_fld[_NUM_FLD] = {
-		255,
+		RTE_MAX_ETHPORTS,
 		RTE_MAX_QUEUES_PER_PORT,
 		RTE_MAX_LCORE
 	};
@@ -1690,7 +1690,7 @@ parse_config(const char *q_arg)
 			return -1;
 		}
 		lcore_params_array[nb_lcore_params].port_id =
-				(uint8_t)int_fld[FLD_PORT];
+				(uint16_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
 				(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c
index fbd7864cb9..e4bdb62121 100644
--- a/examples/l3fwd-power/perf_core.c
+++ b/examples/l3fwd-power/perf_core.c
@@ -133,7 +133,7 @@ parse_perf_config(const char *q_arg)
 	int i;
 	unsigned int size;
 	unsigned int max_fld[_NUM_FLD] = {
-		255,
+		RTE_MAX_ETHPORTS,
 		RTE_MAX_QUEUES_PER_PORT,
 		255,
 		RTE_MAX_LCORE
@@ -168,7 +168,7 @@ parse_perf_config(const char *q_arg)
 			return -1;
 		}
 		prf_lc_prms[nb_prf_lc_prms].port_id =
-				(uint8_t)int_fld[FLD_PORT];
+				(uint16_t)int_fld[FLD_PORT];
 		prf_lc_prms[nb_prf_lc_prms].queue_id =
 				(uint16_t)int_fld[FLD_QUEUE];
 		prf_lc_prms[nb_prf_lc_prms].high_perf =
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 47baf464e2..a239869ada 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -501,7 +501,7 @@ parse_config(const char *q_arg)
 	int i;
 	unsigned size;
 	uint16_t max_fld[_NUM_FLD] = {
-		255,
+		RTE_MAX_ETHPORTS,
 		RTE_MAX_QUEUES_PER_PORT,
 		RTE_MAX_LCORE
 	};
@@ -532,7 +532,7 @@ parse_config(const char *q_arg)
 			return -1;
 		}
 		lcore_params_array[nb_lcore_params].port_id =
-			(uint8_t)int_fld[FLD_PORT];
+			(uint16_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
 			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:07.443026207 +0800
+++ 0158-examples-fix-port-ID-restriction.patch	2024-08-12 20:44:02.615069397 +0800
@@ -1 +1 @@
-From 548de9091c85467bd8f05cecf6d32315869d1461 Mon Sep 17 00:00:00 2001
+From 729e0848b79b9f119d33066a915e34439d7f8597 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 548de9091c85467bd8f05cecf6d32315869d1461 ]
@@ -34 +37 @@
-index 5a7e1b220f..e98ad2572e 100644
+index 2d004d82fd..761b9cf396 100644
@@ -56 +59 @@
-index 4396e2bb3c..a13dc01138 100644
+index dbc36362c3..4ded69b4a0 100644
@@ -69 +72 @@
-index 2976058425..2bb6b092c3 100644
+index baf2bf64b2..996ac6dc56 100644
@@ -72 +75 @@
-@@ -1659,7 +1659,7 @@ parse_config(const char *q_arg)
+@@ -1658,7 +1658,7 @@ parse_config(const char *q_arg)
@@ -81 +84 @@
-@@ -1691,7 +1691,7 @@ parse_config(const char *q_arg)
+@@ -1690,7 +1690,7 @@ parse_config(const char *q_arg)
@@ -91 +94 @@
-index a0112b57ff..6c0f7ea213 100644
+index fbd7864cb9..e4bdb62121 100644
@@ -113 +116 @@
-index ba7083d4f3..01b763e5ba 100644
+index 47baf464e2..a239869ada 100644

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

* Re: patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2
  2024-07-17  2:21     ` Ye, MingjinX
  2024-07-17  9:17       ` Xueming Li
@ 2024-08-31 14:51       ` Xueming Li
  2024-09-02  2:01         ` Jiang, YuX
  1 sibling, 1 reply; 271+ messages in thread
From: Xueming Li @ 2024-08-31 14:51 UTC (permalink / raw)
  To: Ye, MingjinX, Xu, HailinX; +Cc: dpdk stable

[-- Attachment #1: Type: text/plain, Size: 4853 bytes --]

Hi Hailin,

This patch was originally queued to 23.11.2 list, but removed per Mingjin's request. If we do need the fix, let's schedule it to 23.11.3.

Regards,
Xueming
________________________________
From: Ye, MingjinX <mingjinx.ye@intel.com>
Sent: Wednesday, July 17, 2024 10:21 AM
To: Xueming Li <xuemingl@nvidia.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: RE: patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2

Hi,

Please not backport this revert commit. DPDK 23.11.2 does not need to do anything.

Thanks,
Mingjin

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com>
> Sent: Friday, July 12, 2024 7:02 PM
> To: Ye, MingjinX <mingjinx.ye@intel.com>
> Cc: dpdk stable <stable@dpdk.org>
> Subject: patch 'bus/vdev: revert fix devargs in secondary process' has been
> queued to stable release 23.11.2
>
> Hi,
>
> FYI, your patch has been queued to stable release 23.11.2
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 07/14/24. So please shout if
> anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Queued patches are on a temporary branch at:
> https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
>
> This queued commit can be viewed at:
> https://git.dpdk.org/dpdk-stable/commit/?h=23.11-
> staging&id=8b75cfb86f90c816bdda28b8696beb18d553fd2b
>
> Thanks.
>
> Xueming Li <xuemingl@nvidia.com>
>
> ---
> From 8b75cfb86f90c816bdda28b8696beb18d553fd2b Mon Sep 17 00:00:00
> 2001
> From: Mingjin Ye <mingjinx.ye@intel.com>
> Date: Thu, 14 Mar 2024 09:36:28 +0000
> Subject: [PATCH] bus/vdev: revert fix devargs in secondary process
> Cc: Xueming Li <xuemingl@nvidia.com>
>
> [ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
>
> The ASan tool detected a memory leak in the vdev driver alloc_devargs. The
> previous commit was that when inserting a vdev device, the primary process
> alloc devargs and the secondary process looks for devargs. This causes the
> device to not be created if the secondary process does not initialise the vdev
> device. And, this is not the root cause.
>
> Therefore the following commit was reverted accordingly.
>
> After restoring this commit, the memory leak still exists.
>
> Bugzilla ID: 1450
> Fixes: 6666628362c9 ("bus/vdev: fix devargs in secondary process")
>
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
> ---
>  drivers/bus/vdev/vdev.c | 21 +--------------------
>  1 file changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index
> 14cf856237..38d05a9fe9 100644
> --- a/drivers/bus/vdev/vdev.c
> +++ b/drivers/bus/vdev/vdev.c
> @@ -263,22 +263,6 @@ alloc_devargs(const char *name, const char *args)
>        return devargs;
>  }
>
> -static struct rte_devargs *
> -vdev_devargs_lookup(const char *name)
> -{
> -     struct rte_devargs *devargs;
> -     char dev_name[32];
> -
> -     RTE_EAL_DEVARGS_FOREACH("vdev", devargs) {
> -             devargs->bus->parse(devargs->name, &dev_name);
> -             if (strcmp(dev_name, name) == 0) {
> -                     VDEV_LOG(INFO, "devargs matched %s", dev_name);
> -                     return devargs;
> -             }
> -     }
> -     return NULL;
> -}
> -
>  static int
>  insert_vdev(const char *name, const char *args,
>                struct rte_vdev_device **p_dev,
> @@ -291,10 +275,7 @@ insert_vdev(const char *name, const char *args,
>        if (name == NULL)
>                return -EINVAL;
>
> -     if (rte_eal_process_type() == RTE_PROC_PRIMARY)
> -             devargs = alloc_devargs(name, args);
> -     else
> -             devargs = vdev_devargs_lookup(name);
> +     devargs = alloc_devargs(name, args);
>
>        if (!devargs)
>                return -ENOMEM;
> --
> 2.34.1
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- - 2024-07-12 18:40:18.570682691 +0800
> +++ 0100-bus-vdev-revert-fix-devargs-in-secondary-process.patch       2024-
> 07-12 18:40:14.356594197 +0800
> @@ -1 +1 @@
> -From 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 Mon Sep 17 00:00:00
> 2001
> +From 8b75cfb86f90c816bdda28b8696beb18d553fd2b Mon Sep 17 00:00:00
> 2001
> @@ -4,0 +5,3 @@
> +Cc: Xueming Li <xuemingl@nvidia.com>
> +
> +[ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
> @@ -20 +22,0 @@
> -Cc: stable@dpdk.org

[-- Attachment #2: Type: text/html, Size: 8760 bytes --]

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

* RE: patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2
  2024-08-31 14:51       ` Xueming Li
@ 2024-09-02  2:01         ` Jiang, YuX
  2024-09-02  7:11           ` Xueming Li
  0 siblings, 1 reply; 271+ messages in thread
From: Jiang, YuX @ 2024-09-02  2:01 UTC (permalink / raw)
  To: Xueming Li, Ye, MingjinX, Xu, HailinX; +Cc: dpdk stable

[-- Attachment #1: Type: text/plain, Size: 7039 bytes --]

Hi Xueming,

Yes, we need the fix.
It should be backporting to 23.11.x, since the previous commit "bus/vdev: fix devargs in secondary process" which is also backporting to 23.11.1 that cause bug 1450 - Regression: vdev device not setup in secondary process (dpdk.org)<https://bugs.dpdk.org/show_bug.cgi?id=1450> exists in 23.11 stable branch.
This bug's resolution is the fix (http://git.dpdk.org/dpdk/commit/?id=22ce39b3aa) in main branch, so pls schedule this fix patch to 23.11.3.

root@virtio-tester-217:~/jiangyu/LTS/dpdk# git show 6148604a43
commit 6148604a438aad21e5d74f414976666b370582c1
Author: Mingjin Ye mingjinx.ye@intel.com<mailto:mingjinx.ye@intel.com>
Date:   Fri Sep 1 07:24:09 2023 +0000

    bus/vdev: fix devargs in secondary process

    [ upstream commit 6666628362c94a0b567a39a0177539c12c97d999 ]

    When a device is created by a secondary process, an empty devargs is
    temporarily generated and bound to it. This causes the device to not
    be associated with the correct devargs, and the empty devargs are not
    released when the resource is freed.

    This patch fixes the issue by matching the devargs when inserting a
    device in secondary process.

    Fixes: dda987315ca2 ("vdev: make virtual bus use its device struct")
    Fixes: a16040453968 ("eal: extract vdev infra")

    Signed-off-by: Mingjin Ye mingjinx.ye@intel.com<mailto:mingjinx.ye@intel.com>
    Acked-by: Anatoly Burakov anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>

Best regards,
Yu Jiang

From: Xueming Li <xuemingl@nvidia.com>
Sent: Saturday, August 31, 2024 10:51 PM
To: Ye, MingjinX <mingjinx.ye@intel.com>; Xu, HailinX <hailinx.xu@intel.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: Re: patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2

Hi Hailin,

This patch was originally queued to 23.11.2 list, but removed per Mingjin's request. If we do need the fix, let's schedule it to 23.11.3.

Regards,
Xueming
________________________________
From: Ye, MingjinX <mingjinx.ye@intel.com<mailto:mingjinx.ye@intel.com>>
Sent: Wednesday, July 17, 2024 10:21 AM
To: Xueming Li <xuemingl@nvidia.com<mailto:xuemingl@nvidia.com>>
Cc: dpdk stable <stable@dpdk.org<mailto:stable@dpdk.org>>
Subject: RE: patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2

Hi,

Please not backport this revert commit. DPDK 23.11.2 does not need to do anything.

Thanks,
Mingjin

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com<mailto:xuemingl@nvidia.com>>
> Sent: Friday, July 12, 2024 7:02 PM
> To: Ye, MingjinX <mingjinx.ye@intel.com<mailto:mingjinx.ye@intel.com>>
> Cc: dpdk stable <stable@dpdk.org<mailto:stable@dpdk.org>>
> Subject: patch 'bus/vdev: revert fix devargs in secondary process' has been
> queued to stable release 23.11.2
>
> Hi,
>
> FYI, your patch has been queued to stable release 23.11.2
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 07/14/24. So please shout if
> anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Queued patches are on a temporary branch at:
> https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
>
> This queued commit can be viewed at:
> https://git.dpdk.org/dpdk-stable/commit/?h=23.11-
> staging&id=8b75cfb86f90c816bdda28b8696beb18d553fd2b
>
> Thanks.
>
> Xueming Li <xuemingl@nvidia.com<mailto:xuemingl@nvidia.com>>
>
> ---
> From 8b75cfb86f90c816bdda28b8696beb18d553fd2b Mon Sep 17 00:00:00
> 2001
> From: Mingjin Ye <mingjinx.ye@intel.com<mailto:mingjinx.ye@intel.com>>
> Date: Thu, 14 Mar 2024 09:36:28 +0000
> Subject: [PATCH] bus/vdev: revert fix devargs in secondary process
> Cc: Xueming Li <xuemingl@nvidia.com<mailto:xuemingl@nvidia.com>>
>
> [ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
>
> The ASan tool detected a memory leak in the vdev driver alloc_devargs. The
> previous commit was that when inserting a vdev device, the primary process
> alloc devargs and the secondary process looks for devargs. This causes the
> device to not be created if the secondary process does not initialise the vdev
> device. And, this is not the root cause.
>
> Therefore the following commit was reverted accordingly.
>
> After restoring this commit, the memory leak still exists.
>
> Bugzilla ID: 1450
> Fixes: 6666628362c9 ("bus/vdev: fix devargs in secondary process")
>
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com<mailto:mingjinx.ye@intel.com>>
> ---
>  drivers/bus/vdev/vdev.c | 21 +--------------------
>  1 file changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index
> 14cf856237..38d05a9fe9 100644
> --- a/drivers/bus/vdev/vdev.c
> +++ b/drivers/bus/vdev/vdev.c
> @@ -263,22 +263,6 @@ alloc_devargs(const char *name, const char *args)
>        return devargs;
>  }
>
> -static struct rte_devargs *
> -vdev_devargs_lookup(const char *name)
> -{
> -     struct rte_devargs *devargs;
> -     char dev_name[32];
> -
> -     RTE_EAL_DEVARGS_FOREACH("vdev", devargs) {
> -             devargs->bus->parse(devargs->name, &dev_name);
> -             if (strcmp(dev_name, name) == 0) {
> -                     VDEV_LOG(INFO, "devargs matched %s", dev_name);
> -                     return devargs;
> -             }
> -     }
> -     return NULL;
> -}
> -
>  static int
>  insert_vdev(const char *name, const char *args,
>                struct rte_vdev_device **p_dev,
> @@ -291,10 +275,7 @@ insert_vdev(const char *name, const char *args,
>        if (name == NULL)
>                return -EINVAL;
>
> -     if (rte_eal_process_type() == RTE_PROC_PRIMARY)
> -             devargs = alloc_devargs(name, args);
> -     else
> -             devargs = vdev_devargs_lookup(name);
> +     devargs = alloc_devargs(name, args);
>
>        if (!devargs)
>                return -ENOMEM;
> --
> 2.34.1
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- - 2024-07-12 18:40:18.570682691 +0800
> +++ 0100-bus-vdev-revert-fix-devargs-in-secondary-process.patch       2024-
> 07-12 18:40:14.356594197 +0800
> @@ -1 +1 @@
> -From 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 Mon Sep 17 00:00:00
> 2001
> +From 8b75cfb86f90c816bdda28b8696beb18d553fd2b Mon Sep 17 00:00:00
> 2001
> @@ -4,0 +5,3 @@
> +Cc: Xueming Li <xuemingl@nvidia.com<mailto:xuemingl@nvidia.com>>
> +
> +[ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
> @@ -20 +22,0 @@
> -Cc: stable@dpdk.org<mailto:stable@dpdk.org>

[-- Attachment #2: Type: text/html, Size: 17345 bytes --]

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

* Re: patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2
  2024-09-02  2:01         ` Jiang, YuX
@ 2024-09-02  7:11           ` Xueming Li
  0 siblings, 0 replies; 271+ messages in thread
From: Xueming Li @ 2024-09-02  7:11 UTC (permalink / raw)
  To: Jiang, YuX, Ye, MingjinX, Xu, HailinX; +Cc: dpdk stable

[-- Attachment #1: Type: text/plain, Size: 7581 bytes --]

Thanks for clarifying, patch queued to 23.11.3.

Best regards,
Xueming
________________________________
From: Jiang, YuX <yux.jiang@intel.com>
Sent: Monday, September 2, 2024 10:01 AM
To: Xueming Li <xuemingl@nvidia.com>; Ye, MingjinX <mingjinx.ye@intel.com>; Xu, HailinX <hailinx.xu@intel.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: RE: patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2


Hi Xueming,



Yes, we need the fix.

It should be backporting to 23.11.x, since the previous commit “bus/vdev: fix devargs in secondary process” which is also backporting to 23.11.1 that cause bug 1450 – Regression: vdev device not setup in secondary process (dpdk.org)<https://bugs.dpdk.org/show_bug.cgi?id=1450> exists in 23.11 stable branch.

This bug’s resolution is the fix (http://git.dpdk.org/dpdk/commit/?id=22ce39b3aa) in main branch, so pls schedule this fix patch to 23.11.3.



root@virtio-tester-217:~/jiangyu/LTS/dpdk# git show 6148604a43

commit 6148604a438aad21e5d74f414976666b370582c1

Author: Mingjin Ye mingjinx.ye@intel.com<mailto:mingjinx.ye@intel.com>

Date:   Fri Sep 1 07:24:09 2023 +0000



    bus/vdev: fix devargs in secondary process



    [ upstream commit 6666628362c94a0b567a39a0177539c12c97d999 ]



    When a device is created by a secondary process, an empty devargs is

    temporarily generated and bound to it. This causes the device to not

    be associated with the correct devargs, and the empty devargs are not

    released when the resource is freed.



    This patch fixes the issue by matching the devargs when inserting a

    device in secondary process.



    Fixes: dda987315ca2 ("vdev: make virtual bus use its device struct")

    Fixes: a16040453968 ("eal: extract vdev infra")



    Signed-off-by: Mingjin Ye mingjinx.ye@intel.com<mailto:mingjinx.ye@intel.com>

    Acked-by: Anatoly Burakov anatoly.burakov@intel.com<mailto:anatoly.burakov@intel.com>



Best regards,

Yu Jiang



From: Xueming Li <xuemingl@nvidia.com>
Sent: Saturday, August 31, 2024 10:51 PM
To: Ye, MingjinX <mingjinx.ye@intel.com>; Xu, HailinX <hailinx.xu@intel.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: Re: patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2



Hi Hailin,



This patch was originally queued to 23.11.2 list, but removed per Mingjin's request. If we do need the fix, let's schedule it to 23.11.3.



Regards,

Xueming

________________________________

From: Ye, MingjinX <mingjinx.ye@intel.com<mailto:mingjinx.ye@intel.com>>
Sent: Wednesday, July 17, 2024 10:21 AM
To: Xueming Li <xuemingl@nvidia.com<mailto:xuemingl@nvidia.com>>
Cc: dpdk stable <stable@dpdk.org<mailto:stable@dpdk.org>>
Subject: RE: patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 23.11.2



Hi,

Please not backport this revert commit. DPDK 23.11.2 does not need to do anything.

Thanks,
Mingjin

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com<mailto:xuemingl@nvidia.com>>
> Sent: Friday, July 12, 2024 7:02 PM
> To: Ye, MingjinX <mingjinx.ye@intel.com<mailto:mingjinx.ye@intel.com>>
> Cc: dpdk stable <stable@dpdk.org<mailto:stable@dpdk.org>>
> Subject: patch 'bus/vdev: revert fix devargs in secondary process' has been
> queued to stable release 23.11.2
>
> Hi,
>
> FYI, your patch has been queued to stable release 23.11.2
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 07/14/24. So please shout if
> anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Queued patches are on a temporary branch at:
> https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
>
> This queued commit can be viewed at:
> https://git.dpdk.org/dpdk-stable/commit/?h=23.11-
> staging&id=8b75cfb86f90c816bdda28b8696beb18d553fd2b
>
> Thanks.
>
> Xueming Li <xuemingl@nvidia.com<mailto:xuemingl@nvidia.com>>
>
> ---
> From 8b75cfb86f90c816bdda28b8696beb18d553fd2b Mon Sep 17 00:00:00
> 2001
> From: Mingjin Ye <mingjinx.ye@intel.com<mailto:mingjinx.ye@intel.com>>
> Date: Thu, 14 Mar 2024 09:36:28 +0000
> Subject: [PATCH] bus/vdev: revert fix devargs in secondary process
> Cc: Xueming Li <xuemingl@nvidia.com<mailto:xuemingl@nvidia.com>>
>
> [ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
>
> The ASan tool detected a memory leak in the vdev driver alloc_devargs. The
> previous commit was that when inserting a vdev device, the primary process
> alloc devargs and the secondary process looks for devargs. This causes the
> device to not be created if the secondary process does not initialise the vdev
> device. And, this is not the root cause.
>
> Therefore the following commit was reverted accordingly.
>
> After restoring this commit, the memory leak still exists.
>
> Bugzilla ID: 1450
> Fixes: 6666628362c9 ("bus/vdev: fix devargs in secondary process")
>
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com<mailto:mingjinx.ye@intel.com>>
> ---
>  drivers/bus/vdev/vdev.c | 21 +--------------------
>  1 file changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index
> 14cf856237..38d05a9fe9 100644
> --- a/drivers/bus/vdev/vdev.c
> +++ b/drivers/bus/vdev/vdev.c
> @@ -263,22 +263,6 @@ alloc_devargs(const char *name, const char *args)
>        return devargs;
>  }
>
> -static struct rte_devargs *
> -vdev_devargs_lookup(const char *name)
> -{
> -     struct rte_devargs *devargs;
> -     char dev_name[32];
> -
> -     RTE_EAL_DEVARGS_FOREACH("vdev", devargs) {
> -             devargs->bus->parse(devargs->name, &dev_name);
> -             if (strcmp(dev_name, name) == 0) {
> -                     VDEV_LOG(INFO, "devargs matched %s", dev_name);
> -                     return devargs;
> -             }
> -     }
> -     return NULL;
> -}
> -
>  static int
>  insert_vdev(const char *name, const char *args,
>                struct rte_vdev_device **p_dev,
> @@ -291,10 +275,7 @@ insert_vdev(const char *name, const char *args,
>        if (name == NULL)
>                return -EINVAL;
>
> -     if (rte_eal_process_type() == RTE_PROC_PRIMARY)
> -             devargs = alloc_devargs(name, args);
> -     else
> -             devargs = vdev_devargs_lookup(name);
> +     devargs = alloc_devargs(name, args);
>
>        if (!devargs)
>                return -ENOMEM;
> --
> 2.34.1
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- - 2024-07-12 18:40:18.570682691 +0800
> +++ 0100-bus-vdev-revert-fix-devargs-in-secondary-process.patch       2024-
> 07-12 18:40:14.356594197 +0800
> @@ -1 +1 @@
> -From 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 Mon Sep 17 00:00:00
> 2001
> +From 8b75cfb86f90c816bdda28b8696beb18d553fd2b Mon Sep 17 00:00:00
> 2001
> @@ -4,0 +5,3 @@
> +Cc: Xueming Li <xuemingl@nvidia.com<mailto:xuemingl@nvidia.com>>
> +
> +[ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
> @@ -20 +22,0 @@
> -Cc: stable@dpdk.org<mailto:stable@dpdk.org>

[-- Attachment #2: Type: text/html, Size: 17402 bytes --]

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

end of thread, other threads:[~2024-09-02  7:11 UTC | newest]

Thread overview: 271+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-12 10:43 patch has been queued to stable release 23.11.2 Xueming Li
2024-07-12 10:43 ` patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' " Xueming Li
2024-07-12 10:43 ` patch 'eal: fix type in destructor macro for MSVC' " Xueming Li
2024-07-12 10:43 ` patch 'eal/unix: support ZSTD compression for firmware' " Xueming Li
2024-07-12 11:05   ` David Marchand
2024-07-13  0:04     ` Xueming Li
2024-07-12 10:43 ` patch 'pcapng: add memcpy check' " Xueming Li
2024-07-12 10:43 ` patch 'net/virtio-user: " Xueming Li
2024-07-12 10:43 ` patch 'eal/windows: install sched.h file' " Xueming Li
2024-07-12 10:43 ` patch 'latencystats: fix literal float suffix' " Xueming Li
2024-07-12 10:43 ` patch 'net/nfp: fix representor port queue release' " Xueming Li
2024-07-12 10:43 ` patch 'net/bonding: fix failover time of LACP with mode 4' " Xueming Li
2024-07-12 10:43 ` patch 'app/testpmd: fix indirect action flush' " Xueming Li
2024-07-12 10:43 ` patch 'net/hns3: fix offload flag of IEEE 1588' " Xueming Li
2024-07-12 10:43 ` patch 'net/hns3: fix Rx timestamp flag' " Xueming Li
2024-07-12 10:43 ` patch 'net/hns3: fix double free for Rx/Tx queue' " Xueming Li
2024-07-12 10:44 ` patch 'net/hns3: fix variable overflow' " Xueming Li
2024-07-12 10:44 ` patch 'net/hns3: disable SCTP verification tag for RSS hash input' " Xueming Li
2024-07-12 10:44 ` patch 'doc: fix AF_XDP device plugin howto' " Xueming Li
2024-07-12 10:44 ` patch 'net/af_xdp: fix multi-interface support for k8s' " Xueming Li
2024-07-12 10:44 ` patch 'ethdev: fix strict aliasing in link up' " Xueming Li
2024-07-12 10:44 ` patch 'net/vmxnet3: add missing register command' " Xueming Li
2024-07-12 10:44 ` patch 'net/af_packet: align Rx/Tx structs to cache line' " Xueming Li
2024-07-12 10:44 ` patch 'doc: fix testpmd ring size command' " Xueming Li
2024-07-12 10:44 ` patch 'net/af_xdp: fix port ID in Rx mbuf' " Xueming Li
2024-07-12 10:44 ` patch 'net/af_xdp: count mbuf allocation failures' " Xueming Li
2024-07-12 10:44 ` patch 'net/af_xdp: fix stats reset' " Xueming Li
2024-07-12 10:44 ` patch 'net/af_xdp: remove unused local statistic' " Xueming Li
2024-07-12 10:44 ` patch 'net/nfp: fix resource leak in secondary process' " Xueming Li
2024-07-12 10:44 ` patch 'net/nfp: fix configuration BAR' " Xueming Li
2024-07-12 10:44 ` patch 'net/tap: fix file descriptor check in isolated flow' " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: reset link when link never comes back' " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: update DMA coherency values' " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: disable interrupts during device removal' " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: disable RRC for yellow carp devices' " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: enable PLL control for fixed PHY modes only' " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: fix SFP codes check for DAC cables' " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: fix connection for SFP+ active " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: check only minimum speed for " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: fix Tx flow on 30H HW' " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: delay AN timeout during KR training' " Xueming Li
2024-07-12 10:44 ` patch 'net/axgbe: fix linkup in PHY status' " Xueming Li
2024-07-12 10:44 ` patch 'net/ice: fix check for outer UDP checksum offload' " Xueming Li
2024-07-12 10:44 ` patch 'app/testpmd: fix outer IP " Xueming Li
2024-07-12 10:44 ` patch 'net: fix outer UDP checksum in Intel prepare helper' " Xueming Li
2024-07-12 10:44 ` patch 'net/i40e: fix outer UDP checksum offload for X710' " Xueming Li
2024-07-12 10:44 ` patch 'net/iavf: remove outer UDP checksum offload for X710 VF' " Xueming Li
2024-07-12 10:44 ` patch 'app/testpmd: fix lcore ID restriction' " Xueming Li
2024-07-12 10:44 ` patch 'net/nfp: fix xstats for multi PF firmware' " Xueming Li
2024-07-12 10:44 ` patch 'hash: fix return code description in Doxygen' " Xueming Li
2024-07-12 10:44 ` patch 'hash: check name when creating a hash' " Xueming Li
2024-07-12 10:44 ` patch 'vhost: fix build with GCC 13' " Xueming Li
2024-07-12 10:44 ` patch 'vhost: cleanup resubmit info before inflight setup' " Xueming Li
2024-07-12 10:44 ` patch 'net/virtio-user: fix control queue destruction' " Xueming Li
2024-07-12 10:44 ` patch 'net/virtio-user: fix shadow control queue notification init' " Xueming Li
2024-07-12 10:44 ` patch 'net/virtio-user: fix control queue allocation' " Xueming Li
2024-07-12 10:44 ` patch 'net/virtio: fix MAC table update' " Xueming Li
2024-07-12 10:44 ` patch 'baseband/acc: fix memory barrier' " Xueming Li
2024-07-12 10:44 ` patch 'event/sw: fix warning from useless snprintf' " Xueming Li
2024-07-12 10:44 ` patch 'eventdev/crypto: fix opaque field handling' " Xueming Li
2024-07-12 10:44 ` patch 'net/iavf: fix VF reset when using DCF' " Xueming Li
2024-07-12 10:44 ` patch 'net/fm10k: fix cleanup during init failure' " Xueming Li
2024-07-12 10:44 ` patch 'net/ice: fix VLAN stripping in double VLAN mode' " Xueming Li
2024-07-12 10:44 ` patch 'net/ixgbe: do not update link status in secondary process' " Xueming Li
2024-07-12 10:44 ` patch 'net/ixgbe: do not create delayed interrupt handler twice' " Xueming Li
2024-07-12 10:44 ` patch 'net/e1000/base: fix link power down' " Xueming Li
2024-07-12 10:44 ` patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' " Xueming Li
2024-07-12 10:44 ` patch 'net/ixgbe/base: fix 5G link speed reported on VF' " Xueming Li
2024-07-12 10:44 ` patch 'net/ixgbe/base: fix PHY ID for X550' " Xueming Li
2024-07-12 10:44 ` patch 'net/cnxk: fix RSS config' " Xueming Li
2024-07-12 10:44 ` patch 'common/cnxk: fix flow aging cleanup' " Xueming Li
2024-07-12 10:44 ` patch 'common/cnxk: fix segregation of logs based on module' " Xueming Li
2024-07-12 10:44 ` patch 'net/cnxk: fix extbuf handling for multisegment packet' " Xueming Li
2024-07-12 10:44 ` patch 'net/cnxk: update SA userdata and keep original cookie' " Xueming Li
2024-07-12 10:45 ` patch 'net/cnxk: fix outbound security with higher packet burst' " Xueming Li
2024-07-12 10:45 ` patch 'net/cnxk: fix promiscuous state after MAC change' " Xueming Li
2024-07-12 10:45 ` patch 'graph: fix ID collisions' " Xueming Li
2024-07-12 10:45 ` patch 'graph: fix stats retrieval while destroying a graph' " Xueming Li
2024-07-12 10:45 ` patch 'bpf: disable on 32-bit x86' " Xueming Li
2024-07-12 10:45 ` patch 'hash: fix RCU reclamation size' " Xueming Li
2024-07-12 11:01 ` patch 'common/mlx5: fix unsigned/signed mismatch' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5/hws: decrease log level for creation failure' " Xueming Li
2024-07-12 11:01   ` patch 'common/mlx5: fix PRM structs' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5/hws: fix function comment' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5/hws: fix spinlock release on context open' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5/hws: add template match none flag' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5/hws: extend tag saving for match and jumbo' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5/hws: set default miss when replacing table' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5/hws: fix action template dump' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5: fix indexed pool with invalid index' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5: fix hash Rx queue release in flow sample' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5: fix flow template indirect action failure' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5: break flow resource release loop' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5: fix access to flow template operations' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5: support jump in meter hierarchy' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5: fix crash on counter pool destroy' " Xueming Li
2024-07-12 11:01   ` patch 'net/mlx5/hws: fix matcher reconnect' " Xueming Li
2024-07-12 11:01   ` patch 'test/crypto: fix RSA cases in QAT suite' " Xueming Li
2024-07-12 11:01   ` patch 'test/crypto: fix enqueue/dequeue callback case' " Xueming Li
2024-07-12 11:01   ` patch 'telemetry: lower log level on socket error' " Xueming Li
2024-07-13 13:38     ` David Marchand
2024-07-15  6:59       ` Xueming Li
2024-07-12 11:01   ` patch 'bus/vdev: revert fix devargs in secondary process' " Xueming Li
2024-07-17  2:21     ` Ye, MingjinX
2024-07-17  9:17       ` Xueming Li
2024-08-31 14:51       ` Xueming Li
2024-09-02  2:01         ` Jiang, YuX
2024-09-02  7:11           ` Xueming Li
2024-07-12 11:01   ` patch 'doc: fix link to hugepage mapping from Linux guide' " Xueming Li
2024-07-12 11:01   ` patch 'v23.11.2-rc1' " Xueming Li
2024-08-12 12:47     ` patch " Xueming Li
2024-08-12 12:47       ` patch 'config: fix warning for cross build with meson >= 1.3.0' " Xueming Li
2024-08-12 12:47       ` patch 'build: use builtin helper for python dependencies' " Xueming Li
2024-08-12 12:48       ` patch 'app/bbdev: fix TB logic' " Xueming Li
2024-08-12 12:48       ` patch 'app/bbdev: fix MLD output size computation' " Xueming Li
2024-08-12 12:48       ` patch 'app/bbdev: fix interrupt tests' " Xueming Li
2024-08-12 12:48       ` patch 'common/cnxk: fix flow aging on application exit' " Xueming Li
2024-08-12 12:48       ` patch 'dmadev: fix structure alignment' " Xueming Li
2024-08-12 12:48       ` patch 'vdpa/sfc: remove dead code' " Xueming Li
2024-08-12 12:48       ` patch 'graph: fix mcore dispatch walk' " Xueming Li
2024-08-12 12:48       ` patch 'mbuf: fix dynamic fields copy' " Xueming Li
2024-08-12 12:48       ` patch 'bpf: fix MOV instruction evaluation' " Xueming Li
2024-08-12 12:48       ` patch 'bpf: fix load hangs with six IPv6 addresses' " Xueming Li
2024-08-12 12:48       ` patch 'telemetry: fix connection parameter parsing' " Xueming Li
2024-08-12 12:48       ` patch 'baseband/la12xx: forbid secondary process' " Xueming Li
2024-08-12 12:48       ` patch 'net/virtio-user: fix control queue allocation for non-vDPA' " Xueming Li
2024-08-12 12:48       ` patch 'crypto/cnxk: fix out-of-bound access' " Xueming Li
2024-08-12 12:48       ` patch 'crypto/cnxk: fix ECDH public key verification' " Xueming Li
2024-08-12 12:48       ` patch 'app/crypto-perf: remove redundant local variable' " Xueming Li
2024-08-12 12:48       ` patch 'app/crypto-perf: fix result for asymmetric' " Xueming Li
2024-08-12 12:48       ` patch 'test/crypto: validate modex from first non-zero' " Xueming Li
2024-08-12 12:48       ` patch 'crypto/cnxk: fix minimal input normalization' " Xueming Li
2024-08-12 12:48       ` patch 'cryptodev: fix build without crypto callbacks' " Xueming Li
2024-08-12 12:48       ` patch 'cryptodev: validate crypto callbacks from next node' " Xueming Li
2024-08-12 12:48       ` patch 'examples/fips_validation: fix dereference and out-of-bound' " Xueming Li
2024-08-12 12:48       ` patch 'crypto/openssl: fix GCM and CCM thread unsafe contexts' " Xueming Li
2024-08-12 12:48       ` patch 'crypto/openssl: optimize 3DES-CTR context init' " Xueming Li
2024-08-12 12:48       ` patch 'crypto/openssl: make per-QP cipher context clones' " Xueming Li
2024-08-12 12:48       ` patch 'crypto/openssl: set cipher padding once' " Xueming Li
2024-08-12 12:48       ` patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' " Xueming Li
2024-08-12 12:48       ` patch 'common/dpaax/caamflib: fix PDCP AES-AES " Xueming Li
2024-08-12 12:48       ` patch 'crypto/dpaa_sec: fix IPsec descriptor' " Xueming Li
2024-08-12 12:48       ` patch 'crypto/dpaa2_sec: fix event queue user context' " Xueming Li
2024-08-12 12:48       ` patch 'examples/ipsec-secgw: fix SA salt endianness' " Xueming Li
2024-08-12 12:48       ` patch 'fbarray: fix incorrect lookahead behavior' " Xueming Li
2024-08-12 12:48       ` patch 'fbarray: fix incorrect lookbehind " Xueming Li
2024-08-12 12:48       ` patch 'fbarray: fix lookahead ignore mask handling' " Xueming Li
2024-08-12 12:48       ` patch 'fbarray: fix lookbehind " Xueming Li
2024-08-12 12:48       ` patch 'devtools: fix symbol listing' " Xueming Li
2024-08-12 12:48       ` patch 'eal/linux: lower log level on allocation attempt failure' " Xueming Li
2024-08-12 12:48       ` patch 'dma/idxd: fix setup with Ubuntu 24.04' " Xueming Li
2024-08-12 12:48       ` patch 'app/testpmd: fix help string of BPF load command' " Xueming Li
2024-08-12 12:48       ` patch 'bus/dpaa: fix bus scan for DMA devices' " Xueming Li
2024-08-12 12:48       ` patch 'bus/dpaa: fix memory leak in bus scan' " Xueming Li
2024-08-12 12:48       ` patch 'common/dpaax: fix IOVA table cleanup' " Xueming Li
2024-08-12 12:48       ` patch 'common/dpaax: fix node array overrun' " Xueming Li
2024-08-12 12:48       ` patch 'bus/dpaa: remove redundant file descriptor check' " Xueming Li
2024-08-12 12:48       ` patch 'net/dpaa: forbid MTU configuration for shared interface' " Xueming Li
2024-08-12 12:48       ` patch 'net/mlx5: fix start without duplicate flow patterns' " Xueming Li
2024-08-12 12:48       ` patch 'fbarray: fix finding for unaligned length' " Xueming Li
2024-08-12 12:48       ` patch 'buildtools: fix build with clang 17 and ASan' " Xueming Li
2024-08-12 12:48       ` patch 'net/ice/base: fix pointer to variable outside scope' " Xueming Li
2024-08-12 12:48       ` patch 'net/ice/base: fix memory leak in firmware version check' " Xueming Li
2024-08-12 12:48       ` patch 'net/ice/base: fix resource leak' " Xueming Li
2024-08-12 12:48       ` patch 'net/ice/base: fix sign extension' " Xueming Li
2024-08-12 12:48       ` patch 'net/ice/base: fix size when allocating children arrays' " Xueming Li
2024-08-12 12:48       ` patch 'net/ice/base: fix GCS descriptor field offsets' " Xueming Li
2024-08-12 12:48       ` patch 'net/ice/base: fix return type of bitmap hamming weight' " Xueming Li
2024-08-12 12:48       ` patch 'net/ice/base: fix check for existing switch rule' " Xueming Li
2024-08-12 12:48       ` patch 'net/ice/base: fix potential TLV length overflow' " Xueming Li
2024-08-12 12:48       ` patch 'net/ice/base: fix board type definition' " Xueming Li
2024-08-12 12:48       ` patch 'net/ice/base: fix masking when reading context' " Xueming Li
2024-08-12 12:48       ` patch 'common/idpf: fix flex descriptor mask' " Xueming Li
2024-08-12 12:49       ` patch 'common/idpf: fix PTP message validation' " Xueming Li
2024-08-12 12:49       ` patch 'net/cpfl: add checks on control queue messages' " Xueming Li
2024-08-12 12:49       ` patch 'net/cpfl: fix 32-bit build' " Xueming Li
2024-08-12 12:49       ` patch 'app/testpmd: handle IEEE1588 init failure' " Xueming Li
2024-08-12 12:49       ` patch 'doc: remove empty section from testpmd guide' " Xueming Li
2024-08-12 12:49       ` patch 'app/testpmd: fix parsing for connection tracking item' " Xueming Li
2024-08-12 12:49       ` patch 'net/mana: fix uninitialized return value' " Xueming Li
2024-08-12 12:49       ` patch 'net/txgbe: fix tunnel packet parsing' " Xueming Li
2024-08-12 12:49       ` patch 'net/txgbe: fix flow filters in VT mode' " Xueming Li
2024-08-12 12:49       ` patch 'net/txgbe: fix Tx hang on queue disable' " Xueming Li
2024-08-12 12:49       ` patch 'net/txgbe: restrict configuration of VLAN strip offload' " Xueming Li
2024-08-12 12:49       ` patch 'net/txgbe: reconfigure more MAC Rx registers' " Xueming Li
2024-08-12 12:49       ` patch 'net/txgbe: fix VF promiscuous and allmulticast' " Xueming Li
2024-08-12 12:49       ` patch 'net/ngbe: add special config for YT8531SH-CA PHY' " Xueming Li
2024-08-12 12:49       ` patch 'net/ngbe: keep PHY power down while device probing' " Xueming Li
2024-08-12 12:49       ` patch 'net/txgbe: fix hotplug remove' " Xueming Li
2024-08-12 12:49       ` patch 'net/ngbe: " Xueming Li
2024-08-12 12:49       ` patch 'net/txgbe: fix MTU range' " Xueming Li
2024-08-12 12:49       ` patch 'net/ngbe: " Xueming Li
2024-08-12 12:49       ` patch 'net/txgbe: fix memory leaks' " Xueming Li
2024-08-12 12:49       ` patch 'net/ngbe: " Xueming Li
2024-08-12 12:49       ` patch 'net/txgbe: fix Rx interrupt' " Xueming Li
2024-08-12 12:49       ` patch 'net/vmxnet3: fix init logs' " Xueming Li
2024-08-12 12:49       ` patch 'net/nfp: fix IPv6 TTL and DSCP flow action' " Xueming Li
2024-08-12 12:49       ` patch 'net/netvsc: fix MTU set' " Xueming Li
2024-08-12 12:49       ` patch 'net/nfp: fix allocation of switch domain' " Xueming Li
2024-08-12 12:49       ` patch 'net/nfp: fix flow mask table entry' " Xueming Li
2024-08-12 12:49       ` patch 'net/ionic: fix mbuf double-free when emptying array' " Xueming Li
2024-08-12 12:49       ` patch 'net/nfp: disable ctrl VNIC queues on close' " Xueming Li
2024-08-12 12:49       ` patch 'net/nfp: fix dereference of null pointer' " Xueming Li
2024-08-12 12:49       ` patch 'net/nfp: fix repeat disable port' " Xueming Li
2024-08-12 12:49       ` patch 'net/ena: fix bad checksum handling' " Xueming Li
2024-08-12 12:49       ` patch 'net/ena: fix return value check' " Xueming Li
2024-08-12 12:49       ` patch 'net/ena: fix checksum handling' " Xueming Li
2024-08-12 12:49       ` patch 'net/gve: fix RSS hash endianness in DQO format' " Xueming Li
2024-08-12 12:49       ` patch 'net/nfp: remove redundant function call' " Xueming Li
2024-08-12 12:49       ` patch 'net/nfp: fix getting firmware version' " Xueming Li
2024-08-12 12:49       ` patch 'doc: update metadata description in nfp guide' " Xueming Li
2024-08-12 12:49       ` patch 'net/nfp: remove unneeded logic for VLAN layer' " Xueming Li
2024-08-12 12:49       ` patch 'net/nfp: adapt reverse sequence card' " Xueming Li
2024-08-12 12:49       ` patch 'doc: update AF_XDP device plugin repository' " Xueming Li
2024-08-12 12:49       ` patch 'net/nfp: fix disabling 32-bit build' " Xueming Li
2024-08-12 12:49       ` patch 'crypto/qat: fix GEN4 write' " Xueming Li
2024-08-12 12:49       ` patch 'crypto/ipsec_mb: fix function comment' " Xueming Li
2024-08-12 12:49       ` patch 'test/crypto: fix allocation " Xueming Li
2024-08-12 12:49       ` patch 'crypto/qat: fix log message typo' " Xueming Li
2024-08-12 12:49       ` patch 'doc: fix typo in l2fwd-crypto guide' " Xueming Li
2024-08-12 12:49       ` patch 'test/crypto: remove unused stats in setup' " Xueming Li
2024-08-12 12:49       ` patch 'test/crypto: fix asymmetric capability test' " Xueming Li
2024-08-12 12:49       ` patch 'test/crypto: fix modex comparison' " Xueming Li
2024-08-12 12:49       ` patch 'crypto/qat: fix placement of OOP offset' " Xueming Li
2024-08-12 12:49       ` patch 'common/cnxk: fix integer overflow' " Xueming Li
2024-08-12 12:49       ` patch 'net/ice: fix memory leaks in raw pattern parsing' " Xueming Li
2024-08-12 12:49       ` patch 'net/ice: fix return value for " Xueming Li
2024-08-12 12:49       ` patch 'net/mlx5: fix shared Rx queue data access race' " Xueming Li
2024-08-12 12:49       ` patch 'net/mlx5: fix Arm build with GCC 9.1' " Xueming Li
2024-08-12 12:49       ` patch 'net/mlx5: fix MTU configuration' " Xueming Li
2024-08-12 12:49       ` patch 'net/mlx5/hws: fix memory leak in modify header' " Xueming Li
2024-08-12 12:49       ` patch 'net/mlx5/hws: fix check of range templates' " Xueming Li
2024-08-12 12:49       ` patch 'net/mlx5/hws: fix deletion of action vport' " Xueming Li
2024-08-12 12:50       ` patch 'net/mlx5/hws: fix port ID on root item convert' " Xueming Li
2024-08-12 12:50       ` patch 'net/mlx5/hws: remove unused variable' " Xueming Li
2024-08-12 12:50       ` patch 'net/mlx5: fix end condition of reading xstats' " Xueming Li
2024-08-12 12:50       ` patch 'net/mlx5: fix uplink port probing in bonding mode' " Xueming Li
2024-08-12 12:50       ` patch 'common/mlx5: remove unneeded field when modify RQ table' " Xueming Li
2024-08-12 12:50       ` patch 'net/mlx5: fix disabling E-Switch default flow rules' " Xueming Li
2024-08-12 12:50       ` patch 'net/hns3: check Rx DMA address alignmnent' " Xueming Li
2024-08-12 12:50       ` patch 'net/ark: fix index arithmetic' " Xueming Li
2024-08-12 12:50       ` patch 'ethdev: fix GENEVE option item conversion' " Xueming Li
2024-08-12 12:50       ` patch 'net/netvsc: use ethdev API to set VF MTU' " Xueming Li
2024-08-12 12:50       ` patch 'app/testpmd: add postpone option to async flow destroy' " Xueming Li
2024-08-12 12:50       ` patch 'ethdev: fix device init without socket-local memory' " Xueming Li
2024-08-12 12:50       ` patch 'net/gve: fix Tx queue state on queue start' " Xueming Li
2024-08-12 12:50       ` patch 'app/testpmd: fix build on signed comparison' " Xueming Li
2024-08-12 12:50       ` patch 'bus/pci: fix UIO resource mapping in secondary process' " Xueming Li
2024-08-12 12:50       ` patch 'bus/pci: fix FD " Xueming Li
2024-08-12 12:50       ` patch 'dma/hisilicon: remove support for HIP09 platform' " Xueming Li
2024-08-12 12:50       ` patch 'app/dumpcap: handle SIGTERM and SIGHUP' " Xueming Li
2024-08-12 12:50       ` patch 'app/pdump: " Xueming Li
2024-08-12 12:50       ` patch 'power: fix number of uncore frequencies' " Xueming Li
2024-08-12 12:50       ` patch 'malloc: fix multi-process wait condition handling' " Xueming Li
2024-08-12 12:50       ` patch 'bus/vdev: fix device reinitialization' " Xueming Li
2024-08-12 12:50       ` patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' " Xueming Li
2024-08-12 12:50       ` patch 'examples/l3fwd: fix crash on multiple sockets' " Xueming Li
2024-08-12 12:50       ` patch 'net/hns3: fix uninitialized variable in FEC query' " Xueming Li
2024-08-12 12:50       ` patch 'net/ice/base: fix temporary failures reading NVM' " Xueming Li
2024-08-12 12:50       ` patch 'examples: fix queue ID restriction' " Xueming Li
2024-08-12 12:50       ` patch 'doc: remove reference to mbuf pkt field' " Xueming Li
2024-08-12 12:50       ` patch 'examples/ipsec-secgw: revert SA salt endianness' " Xueming Li
2024-08-12 12:50       ` patch 'doc: fix mbuf flags' " Xueming Li
2024-08-12 12:50       ` patch 'doc: add power uncore in API index' " Xueming Li
2024-08-12 12:50       ` patch 'doc: describe mlx5 HWS actions order' " Xueming Li
2024-08-12 12:50       ` patch 'doc: fix DMA performance test invocation' " Xueming Li
2024-08-12 12:50       ` patch 'doc: add baseline mode in l3fwd-power guide' " Xueming Li
2024-08-12 12:50       ` patch 'examples: fix lcore ID restriction' " Xueming Li
2024-08-12 12:50       ` patch 'examples: fix port " Xueming Li

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