patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch has been queued to stable release 20.11.6
@ 2022-06-21  8:01 Xueming Li
  2022-06-21  8:01 ` patch 'crypto/ipsec_mb: fix length and offset settings' " Xueming Li
                   ` (115 more replies)
  0 siblings, 116 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Xueming Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/40b12a05613e84f38acffcfc2965b752edc3c7b9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 40b12a05613e84f38acffcfc2965b752edc3c7b9 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Tue, 21 Jun 2022 15:37:48 +0800
Subject: [PATCH] patch has been queued to stable release 20.11.6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>



Ben Magistro (1):
  mbuf: dump outer VLAN

Chengwen Feng (8):
  ethdev: clarify null location case in xstats get
  net/hns3: fix xstats get return if xstats is null
  net/ipn3ke: fix xstats get return if xstats is null
  net/mvpp2: fix xstats get return if xstats is null
  net/axgbe: fix xstats get return if xstats is null
  ethdev: fix memory leak in xstats telemetry
  ethdev: fix possible null pointer access
  examples/dma: fix Tx drop statistics

Ciara Power (1):
  test/crypto: fix null check for ZUC authentication

Dariusz Sosnowski (2):
  net/mlx5: fix GTP handling in header modify action
  net/mlx5: fix RSS hash types adjustment

David Marchand (8):
  eal/windows: add missing C++ include guards
  net/nfp: remove unneeded header inclusion
  net/virtio: restore some optimisations with AVX512
  eal/freebsd: fix use of newer cpuset macros
  devtools: fix null test for NUMA systems
  app/testpmd: remove useless pointer checks
  net/bnxt: fix compatibility with some old firmwares
  vhost: fix async access

Deepak Khandelwal (1):
  mem: skip attaching external memory in secondary process

Dmitry Kozlyuk (4):
  net/mlx5: fix Tx when inlining is impossible
  doc: fix API index Markdown syntax
  ethdev: prohibit polling stopped queue
  app/testpmd: do not poll stopped queues

Gagandeep Singh (7):
  crypto/dpaa_sec: fix digest size
  crypto/dpaa2_sec: fix fle buffer leak
  crypto/dpaa2_sec: fix buffer pool ID check
  crypto/dpaa2_sec: fix operation status for simple FD
  common/dpaax: fix short MAC-I IV calculation for ZUC
  net/dpaa: fix event queue detach
  doc: add missing auth algo for IPsec example

Harry van Haaren (1):
  doc: fix formatting and link in BPF library guide

Heinrich Schuchardt (1):
  drivers/crypto: fix warnings for OpenSSL version

Huisong Li (6):
  net/bonding: fix stopping non-active slaves
  net/bonding: fix slave stop and remove on port close
  net/hns3: fix RSS disable
  net/hns3: fix rollback on RSS hash update
  net/hns3: remove redundant RSS tuple field
  net/hns3: remove unnecessary RSS switch

Jeff Daly (1):
  net/ixgbe: add option for link up check on pin SDP3

Jiawen Wu (1):
  net/txgbe: fix max number of queues for SR-IOV

Jiri Slaby (1):
  kni: fix build with Linux 5.18

Joyce Kong (1):
  net/memif: fix overwriting of head segment

Kalesh AP (9):
  net/bnxt: remove unused macro
  net/bnxt: fix device capability reporting
  net/bnxt: fix Rx configuration
  net/bnxt: avoid unnecessary endianness conversion
  net/bnxt: fix speed autonegotiation
  net/bnxt: force PHY update on certain configurations
  net/bnxt: fix link status when port is stopped
  net/bnxt: recheck FW readiness if in reset process
  net/bnxt: fix tunnel stateless offloads

Ke Zhang (6):
  net/bonding: fix RSS key config with extended key length
  net/iavf: fix mbuf release in multi-process
  net/iavf: fix Rx queue interrupt setting
  app/testpmd: fix multicast address pool leak
  kni: use dedicated function to set random MAC address
  kni: use dedicated function to set MAC address

Kevin Liu (1):
  net/ice: fix MTU info for DCF

Konstantin Ananyev (1):
  acl: fix rules with 8-byte field size

Long Li (1):
  net/netvsc: fix calculation of checksums based on mbuf flag

Luc Pelletier (1):
  eal/x86: fix unaligned access for small memcpy

Mattias Rönnblom (1):
  examples/bond: fix invalid use of trylock

Maxime Coquelin (2):
  net/vhost: fix TSO feature default disablement
  vhost: fix missing virtqueue lock protection

Mike Pattrick (1):
  net/i40e: populate error in flow director parser

Min Hu (Connor) (4):
  app/testpmd: check statistics query before printing
  net/bonding: fix mbuf fast free usage
  ethdev: fix port state when stop
  ethdev: fix port close in secondary process

Mingxia Liu (1):
  app/testpmd: replace hardcoded min mbuf number with macro

Nithin Dabilpuram (1):
  examples/ipsec-secgw: fix promiscuous mode option

Pablo de Lara (2):
  crypto/ipsec_mb: fix length and offset settings
  crypto/ipsec_mb: fix GMAC parameters setting

Peng Zhang (1):
  net/nfp: fix disabling VLAN stripping

Qiming Yang (4):
  doc: update matching versions in ice guide
  net/iavf: fix queue start exception handling
  doc: update matching versions in i40e guide
  net/iavf: increase reset complete wait count

Rahul Lakkireddy (2):
  net/cxgbe: fix port ID in Rx mbuf
  net/cxgbe: fix Tx queue stuck with mbuf chain coalescing

Raja Zidane (4):
  net/mlx5: fix Rx/Tx stats concurrency
  examples/l2fwd-crypto: fix stats refresh rate
  net/mlx5: fix Tx recovery
  app/testpmd: fix packet segment allocation

Rakesh Kudurumalla (1):
  test: avoid hang if queues are full and Tx fails

Romain Delhomel (1):
  bus/fslmc: fix VFIO setup

Ruifeng Wang (1):
  net/bnxt: fix reordering in NEON Rx

Shun Hao (1):
  app/testpmd: fix metering and policing command for RFC4115

Somnath Kotur (2):
  net/bnxt: fix ring group on Rx restart
  net/bnxt: fix freeing VNIC filters

Stanislaw Kardach (3):
  test/hash: report non HTM numbers for single thread
  examples/l3fwd: fix scalar LPM
  test/ring: remove excessive inlining

Stephen Hemminger (1):
  rib: fix traversal with /32 route

Steve Yang (1):
  net/iavf: fix HW ring scan method selection

Tianhao Chai (1):
  eal: fix C++ include for device event and DMA

Tyler Retzlaff (1):
  eal/windows: fix data race when creating threads

Vanshika Shukla (1):
  crypto/dpaa_sec: fix secondary process probing

Vladimir Medvedkin (1):
  test/table: fix buffer overflow on lpm entry

Volodymyr Fialko (1):
  examples/ipsec-secgw: fix uninitialized memory access

Wei Huang (2):
  raw/ifpga: unregister interrupt on close
  raw/ifpga: remove virtual devices on close

Wenjing Qiao (1):
  net/ice: fix outer L4 checksum in scalar Rx

Wenjun Wu (1):
  net/ice/base: fix getting sched node from ID type

Wenwu Ma (2):
  app/testpmd: perform SW IP checksum for GRO/GSO packets
  vhost: fix deadlock when message handling failed

Wenxuan Wu (1):
  net/i40e: fix max frame size config at port level

Xuan Ding (1):
  doc: fix vhost multi-queue reconnection

Xueming Li (2):
  vdpa/mlx5: fix interrupt trash that leads to crash
  vdpa/mlx5: fix dead loop when process interrupted

Yiding Zhou (1):
  net/iavf: fix data path selection

Yuan Wang (2):
  net/vhost: fix access to freed memory
  examples/vhost: fix crash when no VMDq

 app/test-pmd/5tswap.c                        |  13 +
 app/test-pmd/cmdline.c                       |  46 ++-
 app/test-pmd/cmdline_flow.c                  |   6 +-
 app/test-pmd/config.c                        |  33 +-
 app/test-pmd/csumonly.c                      |  39 +++
 app/test-pmd/flowgen.c                       |  13 +
 app/test-pmd/icmpecho.c                      |  13 +
 app/test-pmd/ieee1588fwd.c                   |  13 +
 app/test-pmd/iofwd.c                         |  13 +
 app/test-pmd/macfwd.c                        |  13 +
 app/test-pmd/macswap.c                       |  13 +
 app/test-pmd/noisy_vnf.c                     |  13 +
 app/test-pmd/parameters.c                    |   5 +-
 app/test-pmd/rxonly.c                        |   8 +
 app/test-pmd/testpmd.c                       | 104 ++++--
 app/test-pmd/testpmd.h                       |  22 +-
 app/test-pmd/txonly.c                        |   8 +
 app/test/test_cryptodev.c                    |   2 +-
 app/test/test_hash_readwrite.c               |   8 +-
 app/test/test_pmd_perf.c                     |  12 +
 app/test/test_ring.h                         |   6 +-
 app/test/test_table_tables.c                 |  10 +-
 devtools/test-null.sh                        |   3 +-
 doc/api/doxy-api-index.md                    | 344 +++++++++----------
 doc/guides/nics/i40e.rst                     |  23 ++
 doc/guides/nics/ice.rst                      |   2 +
 doc/guides/nics/ixgbe.rst                    |  17 +
 doc/guides/prog_guide/bpf_lib.rst            |   8 +-
 doc/guides/rel_notes/known_issues.rst        |   7 +-
 doc/guides/sample_app_ug/ipsec_secgw.rst     |   4 +-
 drivers/bus/fslmc/fslmc_vfio.c               |  10 +-
 drivers/common/dpaax/caamflib/desc/pdcp.h    |   2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c   | 141 ++++++--
 drivers/crypto/ccp/ccp_crypto.c              |   2 +
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c  |  46 ++-
 drivers/crypto/dpaa_sec/dpaa_sec.c           |  24 +-
 drivers/crypto/dpaa_sec/dpaa_sec.h           |   4 +-
 drivers/crypto/openssl/rte_openssl_pmd.c     |   2 +
 drivers/crypto/openssl/rte_openssl_pmd_ops.c |   2 +
 drivers/crypto/qat/qat_sym.c                 |   2 +
 drivers/crypto/qat/qat_sym_session.c         |   2 +
 drivers/net/axgbe/axgbe_ethdev.c             |   8 +-
 drivers/net/bnxt/bnxt.h                      |  30 +-
 drivers/net/bnxt/bnxt_ethdev.c               |  56 +--
 drivers/net/bnxt/bnxt_filter.c               |   2 +
 drivers/net/bnxt/bnxt_hwrm.c                 |  23 +-
 drivers/net/bnxt/bnxt_hwrm.h                 |  20 ++
 drivers/net/bnxt/bnxt_reps.c                 |   6 +-
 drivers/net/bnxt/bnxt_rxq.c                  |  75 ++--
 drivers/net/bnxt/bnxt_rxq.h                  |   1 +
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c        |  17 +-
 drivers/net/bnxt/bnxt_txq.c                  |  30 ++
 drivers/net/bnxt/bnxt_txq.h                  |   1 +
 drivers/net/bnxt/hsi_struct_def_dpdk.h       |  74 +++-
 drivers/net/bonding/rte_eth_bond_pmd.c       |  49 ++-
 drivers/net/cxgbe/sge.c                      |  40 ++-
 drivers/net/dpaa/dpaa_ethdev.c               |  14 +-
 drivers/net/hns3/hns3_ethdev.c               |   3 -
 drivers/net/hns3/hns3_ethdev.h               |   1 -
 drivers/net/hns3/hns3_ethdev_vf.c            |   2 -
 drivers/net/hns3/hns3_flow.c                 |  11 +-
 drivers/net/hns3/hns3_rss.c                  | 122 ++-----
 drivers/net/hns3/hns3_rss.h                  |   5 +-
 drivers/net/hns3/hns3_stats.c                |   9 +-
 drivers/net/i40e/i40e_ethdev.c               |  20 +-
 drivers/net/i40e/i40e_flow.c                 |   7 +-
 drivers/net/iavf/iavf.h                      |   2 +-
 drivers/net/iavf/iavf_ethdev.c               |  32 +-
 drivers/net/iavf/iavf_rxtx.c                 |  62 +++-
 drivers/net/iavf/iavf_rxtx.h                 |  11 +
 drivers/net/iavf/iavf_rxtx_vec_avx512.c      |   8 +-
 drivers/net/iavf/iavf_rxtx_vec_sse.c         |  16 +-
 drivers/net/ice/base/ice_sched.c             |   4 +-
 drivers/net/ice/ice_dcf_ethdev.c             |   2 +
 drivers/net/ice/ice_rxtx.c                   |   4 +-
 drivers/net/ipn3ke/ipn3ke_representor.c      |   3 -
 drivers/net/ixgbe/ixgbe_ethdev.c             |  39 ++-
 drivers/net/ixgbe/ixgbe_ethdev.h             |   3 +
 drivers/net/memif/rte_eth_memif.c            |   2 +-
 drivers/net/mlx5/linux/mlx5_verbs.c          |   5 +-
 drivers/net/mlx5/mlx5_flow_dv.c              |  12 +-
 drivers/net/mlx5/mlx5_rxtx.c                 |   3 +-
 drivers/net/mlx5/mlx5_rxtx.h                 |   2 +
 drivers/net/mlx5/mlx5_stats.c                |  41 ++-
 drivers/net/mvpp2/mrvl_ethdev.c              |  11 +-
 drivers/net/netvsc/hn_rxtx.c                 |  13 +-
 drivers/net/nfp/nfp_net.c                    |  25 +-
 drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c   |   3 -
 drivers/net/txgbe/txgbe_pf.c                 |   2 +-
 drivers/net/vhost/rte_eth_vhost.c            |  23 +-
 drivers/net/virtio/meson.build               |   6 +-
 drivers/raw/ifpga/ifpga_rawdev.c             | 196 ++++++++---
 drivers/raw/ifpga/ifpga_rawdev.h             |   8 +
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c          |  24 +-
 examples/bond/main.c                         |  14 +-
 examples/ioat/ioatfwd.c                      |  27 +-
 examples/ipsec-secgw/flow.c                  |   2 +-
 examples/ipsec-secgw/ipsec-secgw.c           |   2 +-
 examples/ipsec-secgw/ipsec.c                 |   2 +-
 examples/l2fwd-crypto/main.c                 |  16 +-
 examples/l3fwd/l3fwd_lpm.c                   |  24 +-
 examples/vhost/main.c                        |   4 +
 kernel/linux/kni/compat.h                    |   8 +
 kernel/linux/kni/kni_misc.c                  |  13 +-
 kernel/linux/kni/kni_net.c                   |   8 +
 lib/librte_acl/acl_bld.c                     |  14 +-
 lib/librte_eal/freebsd/eal_memory.c          |   4 +-
 lib/librte_eal/freebsd/include/rte_os.h      |  17 +-
 lib/librte_eal/freebsd/meson.build           |  11 +
 lib/librte_eal/include/rte_common.h          |   5 +
 lib/librte_eal/include/rte_dev.h             |   8 +-
 lib/librte_eal/linux/eal_memory.c            |   4 +-
 lib/librte_eal/windows/eal_thread.c          |   7 +-
 lib/librte_eal/windows/include/rte_windows.h |   8 +
 lib/librte_eal/x86/include/rte_memcpy.h      | 133 +++----
 lib/librte_ethdev/rte_ethdev.c               |  19 +-
 lib/librte_ethdev/rte_ethdev.h               |  15 +-
 lib/librte_ethdev/rte_ethdev_driver.h        |   7 -
 lib/librte_mbuf/rte_mbuf.c                   |   3 +
 lib/librte_rib/rte_rib.c                     |   2 +
 lib/librte_vhost/vhost.c                     |  31 +-
 lib/librte_vhost/vhost_user.c                |  10 +-
 122 files changed, 1702 insertions(+), 962 deletions(-)

-- 
2.35.1


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

* patch 'crypto/ipsec_mb: fix length and offset settings' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'crypto/ipsec_mb: fix GMAC parameters setting' " Xueming Li
                   ` (114 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0fb580b1c018649febad807b13f3bcba2efc1b21

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0fb580b1c018649febad807b13f3bcba2efc1b21 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 22 Mar 2022 13:39:09 +0000
Subject: [PATCH] crypto/ipsec_mb: fix length and offset settings
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a501609ea6466ed8526c0dfadedee332a4d4a451 ]

KASUMI, SNOW3G and ZUC require lengths and offsets to
be set in bits or bytes depending on the algorithm.
There were some algorithms that were mixing these two,
so this commit is fixing this issue.

Fixes: ae8e085c608d ("crypto/aesni_mb: support KASUMI F8/F9")
Fixes: 6c42e0cf4d12 ("crypto/aesni_mb: support SNOW3G-UEA2/UIA2")
Fixes: fd8df85487c4 ("crypto/aesni_mb: support ZUC-EEA3/EIA3")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 126 +++++++++++++++------
 1 file changed, 90 insertions(+), 36 deletions(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index f4ffb21e10..ab9864739d 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -1057,7 +1057,9 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
 
 static inline uint64_t
 auth_start_offset(struct rte_crypto_op *op, struct aesni_mb_session *session,
-		uint32_t oop)
+		uint32_t oop, const uint32_t auth_offset,
+		const uint32_t cipher_offset, const uint32_t auth_length,
+		const uint32_t cipher_length)
 {
 	struct rte_mbuf *m_src, *m_dst;
 	uint8_t *p_src, *p_dst;
@@ -1066,7 +1068,7 @@ auth_start_offset(struct rte_crypto_op *op, struct aesni_mb_session *session,
 
 	/* Only cipher then hash needs special calculation. */
 	if (!oop || session->chain_order != CIPHER_HASH)
-		return op->sym->auth.data.offset;
+		return auth_offset;
 
 	m_src = op->sym->m_src;
 	m_dst = op->sym->m_dst;
@@ -1074,24 +1076,23 @@ auth_start_offset(struct rte_crypto_op *op, struct aesni_mb_session *session,
 	p_src = rte_pktmbuf_mtod(m_src, uint8_t *);
 	p_dst = rte_pktmbuf_mtod(m_dst, uint8_t *);
 	u_src = (uintptr_t)p_src;
-	u_dst = (uintptr_t)p_dst + op->sym->auth.data.offset;
+	u_dst = (uintptr_t)p_dst + auth_offset;
 
 	/**
 	 * Copy the content between cipher offset and auth offset for generating
 	 * correct digest.
 	 */
-	if (op->sym->cipher.data.offset > op->sym->auth.data.offset)
-		memcpy(p_dst + op->sym->auth.data.offset,
-				p_src + op->sym->auth.data.offset,
-				op->sym->cipher.data.offset -
-				op->sym->auth.data.offset);
-
+	if (cipher_offset > auth_offset)
+		memcpy(p_dst + auth_offset,
+				p_src + auth_offset,
+				cipher_offset -
+				auth_offset);
 	/**
 	 * Copy the content between (cipher offset + length) and (auth offset +
 	 * length) for generating correct digest
 	 */
-	cipher_end = op->sym->cipher.data.offset + op->sym->cipher.data.length;
-	auth_end = op->sym->auth.data.offset + op->sym->auth.data.length;
+	cipher_end = cipher_offset + cipher_length;
+	auth_end = auth_offset + auth_length;
 	if (cipher_end < auth_end)
 		memcpy(p_dst + cipher_end, p_src + cipher_end,
 				auth_end - cipher_end);
@@ -1246,7 +1247,12 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
 	struct rte_mbuf *m_src = op->sym->m_src, *m_dst;
 	struct aesni_mb_session *session;
 	uint32_t m_offset, oop;
-
+#if IMB_VERSION(0, 53, 3) <= IMB_VERSION_NUM
+	uint32_t auth_off_in_bytes;
+	uint32_t ciph_off_in_bytes;
+	uint32_t auth_len_in_bytes;
+	uint32_t ciph_len_in_bytes;
+#endif
 	session = get_session(qp, op);
 	if (session == NULL) {
 		op->status = RTE_CRYPTO_OP_STATUS_INVALID_SESSION;
@@ -1362,6 +1368,7 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
 	if (job->cipher_mode == IMB_CIPHER_ZUC_EEA3) {
 		job->aes_enc_key_expanded = session->cipher.zuc_cipher_key;
 		job->aes_dec_key_expanded = session->cipher.zuc_cipher_key;
+		m_offset >>= 3;
 	} else if (job->cipher_mode == IMB_CIPHER_SNOW3G_UEA2_BITLEN) {
 		job->enc_keys = &session->cipher.pKeySched_snow3g_cipher;
 		m_offset = 0;
@@ -1418,9 +1425,6 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
 
 	switch (job->hash_alg) {
 	case AES_CCM:
-		job->cipher_start_src_offset_in_bytes =
-				op->sym->aead.data.offset;
-		job->msg_len_to_cipher_in_bytes = op->sym->aead.data.length;
 		job->hash_start_src_offset_in_bytes = op->sym->aead.data.offset;
 		job->msg_len_to_hash_in_bytes = op->sym->aead.data.length;
 
@@ -1430,19 +1434,11 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
 
 	case AES_GMAC:
 		if (session->cipher.mode == GCM) {
-			job->cipher_start_src_offset_in_bytes =
-					op->sym->aead.data.offset;
 			job->hash_start_src_offset_in_bytes =
 					op->sym->aead.data.offset;
-			job->msg_len_to_cipher_in_bytes =
-					op->sym->aead.data.length;
 			job->msg_len_to_hash_in_bytes =
 					op->sym->aead.data.length;
 		} else {
-			job->cipher_start_src_offset_in_bytes =
-					op->sym->auth.data.offset;
-			job->hash_start_src_offset_in_bytes =
-					op->sym->auth.data.offset;
 			job->msg_len_to_cipher_in_bytes = 0;
 			job->msg_len_to_hash_in_bytes = 0;
 		}
@@ -1453,10 +1449,7 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
 
 #if IMB_VERSION(0, 54, 3) <= IMB_VERSION_NUM
 	case IMB_AUTH_CHACHA20_POLY1305:
-		job->cipher_start_src_offset_in_bytes = op->sym->aead.data.offset;
 		job->hash_start_src_offset_in_bytes = op->sym->aead.data.offset;
-		job->msg_len_to_cipher_in_bytes =
-				op->sym->aead.data.length;
 		job->msg_len_to_hash_in_bytes =
 					op->sym->aead.data.length;
 
@@ -1464,26 +1457,87 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
 				session->iv.offset);
 		break;
 #endif
-	default:
-		/* For SNOW3G, length and offsets are already in bits */
-		job->cipher_start_src_offset_in_bytes =
-				op->sym->cipher.data.offset;
-		job->msg_len_to_cipher_in_bytes = op->sym->cipher.data.length;
+#if IMB_VERSION(0, 53, 3) <= IMB_VERSION_NUM
+	/* ZUC and SNOW3G require length in bits and offset in bytes */
+	case IMB_AUTH_ZUC_EIA3_BITLEN:
+	case IMB_AUTH_SNOW3G_UIA2_BITLEN:
+		auth_off_in_bytes = op->sym->auth.data.offset >> 3;
+		ciph_off_in_bytes = op->sym->cipher.data.offset >> 3;
+		auth_len_in_bytes = op->sym->auth.data.length >> 3;
+		ciph_len_in_bytes = op->sym->cipher.data.length >> 3;
 
 		job->hash_start_src_offset_in_bytes = auth_start_offset(op,
-				session, oop);
+				session, oop, auth_off_in_bytes,
+				ciph_off_in_bytes, auth_len_in_bytes,
+				ciph_len_in_bytes);
+		job->msg_len_to_hash_in_bits = op->sym->auth.data.length;
+
+		job->iv = rte_crypto_op_ctod_offset(op, uint8_t *,
+			session->iv.offset);
+		break;
+
+	/* KASUMI requires lengths and offset in bytes */
+	case IMB_AUTH_KASUMI_UIA1:
+		auth_off_in_bytes = op->sym->auth.data.offset >> 3;
+		ciph_off_in_bytes = op->sym->cipher.data.offset >> 3;
+		auth_len_in_bytes = op->sym->auth.data.length >> 3;
+		ciph_len_in_bytes = op->sym->cipher.data.length >> 3;
+
+		job->hash_start_src_offset_in_bytes = auth_start_offset(op,
+				session, oop, auth_off_in_bytes,
+				ciph_off_in_bytes, auth_len_in_bytes,
+				ciph_len_in_bytes);
+		job->msg_len_to_hash_in_bytes = auth_len_in_bytes;
+
+		job->iv = rte_crypto_op_ctod_offset(op, uint8_t *,
+			session->iv.offset);
+		break;
+#endif
+
+	default:
+		job->hash_start_src_offset_in_bytes = auth_start_offset(op,
+				session, oop, op->sym->auth.data.offset,
+				op->sym->cipher.data.offset,
+				op->sym->auth.data.length,
+				op->sym->cipher.data.length);
 		job->msg_len_to_hash_in_bytes = op->sym->auth.data.length;
 
 		job->iv = rte_crypto_op_ctod_offset(op, uint8_t *,
 			session->iv.offset);
 	}
 
+	switch (job->cipher_mode) {
 #if IMB_VERSION(0, 53, 3) <= IMB_VERSION_NUM
-	if (job->cipher_mode == IMB_CIPHER_ZUC_EEA3)
-		job->msg_len_to_cipher_in_bytes >>= 3;
-	else if (job->hash_alg == IMB_AUTH_KASUMI_UIA1)
-		job->msg_len_to_hash_in_bytes >>= 3;
+	/* ZUC requires length and offset in bytes */
+	case IMB_CIPHER_ZUC_EEA3:
+		job->cipher_start_src_offset_in_bytes =
+					op->sym->cipher.data.offset >> 3;
+		job->msg_len_to_cipher_in_bytes =
+					op->sym->cipher.data.length >> 3;
+		break;
+	/* ZUC and SNOW3G require length and offset in bits */
+	case IMB_CIPHER_SNOW3G_UEA2_BITLEN:
+	case IMB_CIPHER_KASUMI_UEA1_BITLEN:
+		job->cipher_start_src_offset_in_bits =
+					op->sym->cipher.data.offset;
+		job->msg_len_to_cipher_in_bits =
+					op->sym->cipher.data.length;
+		break;
+#endif
+	case CCM:
+	case GCM:
+#if IMB_VERSION(0, 54, 3) <= IMB_VERSION_NUM
+	case IMB_CIPHER_CHACHA20_POLY1305:
 #endif
+		job->cipher_start_src_offset_in_bytes =
+				op->sym->aead.data.offset;
+		job->msg_len_to_cipher_in_bytes = op->sym->aead.data.length;
+		break;
+	default:
+		job->cipher_start_src_offset_in_bytes =
+					op->sym->cipher.data.offset;
+		job->msg_len_to_cipher_in_bytes = op->sym->cipher.data.length;
+	}
 
 	/* Set user data to be crypto operation data struct */
 	job->user_data = op;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.365082886 +0800
+++ 0001-crypto-ipsec_mb-fix-length-and-offset-settings.patch	2022-06-21 15:37:48.951117611 +0800
@@ -1 +1 @@
-From a501609ea6466ed8526c0dfadedee332a4d4a451 Mon Sep 17 00:00:00 2001
+From 0fb580b1c018649febad807b13f3bcba2efc1b21 Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Wed, 23 Feb 2022 16:01:16 +0000
+Date: Tue, 22 Mar 2022 13:39:09 +0000
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a501609ea6466ed8526c0dfadedee332a4d4a451 ]
@@ -14,2 +16,0 @@
-Fixes: 8c835018de84 ("crypto/ipsec_mb: support ZUC-256 for aesni_mb")
-Cc: stable@dpdk.org
@@ -19,2 +20,2 @@
- drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 122 +++++++++++++++++--------
- 1 file changed, 86 insertions(+), 36 deletions(-)
+ drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 126 +++++++++++++++------
+ 1 file changed, 90 insertions(+), 36 deletions(-)
@@ -22,5 +23,5 @@
-diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
-index 0111c6f540..c974886032 100644
---- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
-+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
-@@ -930,7 +930,9 @@ error_exit:
+diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+index f4ffb21e10..ab9864739d 100644
+--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
++++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+@@ -1057,7 +1057,9 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
@@ -37 +38 @@
-@@ -939,7 +941,7 @@ auth_start_offset(struct rte_crypto_op *op, struct aesni_mb_session *session,
+@@ -1066,7 +1068,7 @@ auth_start_offset(struct rte_crypto_op *op, struct aesni_mb_session *session,
@@ -40 +41 @@
- 	if (!oop || session->chain_order != IMB_ORDER_CIPHER_HASH)
+ 	if (!oop || session->chain_order != CIPHER_HASH)
@@ -46 +47 @@
-@@ -947,24 +949,24 @@ auth_start_offset(struct rte_crypto_op *op, struct aesni_mb_session *session,
+@@ -1074,24 +1076,23 @@ auth_start_offset(struct rte_crypto_op *op, struct aesni_mb_session *session,
@@ -61,0 +63 @@
+-
@@ -67 +68,0 @@
- 
@@ -79,2 +80,2 @@
-@@ -1111,6 +1113,10 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,
- 	struct aesni_mb_qp_data *qp_data = ipsec_mb_get_qp_private_data(qp);
+@@ -1246,7 +1247,12 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
+ 	struct rte_mbuf *m_src = op->sym->m_src, *m_dst;
@@ -82,0 +84,2 @@
+-
++#if IMB_VERSION(0, 53, 3) <= IMB_VERSION_NUM
@@ -87,2 +90,2 @@
- 
- 	session = ipsec_mb_get_session_private(qp, op);
++#endif
+ 	session = get_session(qp, op);
@@ -90 +93,2 @@
-@@ -1219,6 +1225,7 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,
+ 		op->status = RTE_CRYPTO_OP_STATUS_INVALID_SESSION;
+@@ -1362,6 +1368,7 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
@@ -92,2 +96,2 @@
- 		job->enc_keys = session->cipher.zuc_cipher_key;
- 		job->dec_keys = session->cipher.zuc_cipher_key;
+ 		job->aes_enc_key_expanded = session->cipher.zuc_cipher_key;
+ 		job->aes_dec_key_expanded = session->cipher.zuc_cipher_key;
@@ -98 +102 @@
-@@ -1276,9 +1283,6 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,
+@@ -1418,9 +1425,6 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
@@ -101 +105 @@
- 	case IMB_AUTH_AES_CCM:
+ 	case AES_CCM:
@@ -108 +112 @@
-@@ -1288,19 +1292,11 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,
+@@ -1430,19 +1434,11 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
@@ -110,2 +114,2 @@
- 	case IMB_AUTH_AES_GMAC:
- 		if (session->cipher.mode == IMB_CIPHER_GCM) {
+ 	case AES_GMAC:
+ 		if (session->cipher.mode == GCM) {
@@ -128,2 +132 @@
-@@ -1310,43 +1306,97 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,
- 		break;
+@@ -1453,10 +1449,7 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
@@ -130,0 +134 @@
+ #if IMB_VERSION(0, 54, 3) <= IMB_VERSION_NUM
@@ -132,4 +136,2 @@
--		job->cipher_start_src_offset_in_bytes =
--			op->sym->aead.data.offset;
- 		job->hash_start_src_offset_in_bytes =
- 			op->sym->aead.data.offset;
+-		job->cipher_start_src_offset_in_bytes = op->sym->aead.data.offset;
+ 		job->hash_start_src_offset_in_bytes = op->sym->aead.data.offset;
@@ -141 +143 @@
- 		job->iv = rte_crypto_op_ctod_offset(op, uint8_t *,
+@@ -1464,26 +1457,87 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
@@ -143,0 +146 @@
+ #endif
@@ -148,0 +152 @@
++#if IMB_VERSION(0, 53, 3) <= IMB_VERSION_NUM
@@ -151 +154,0 @@
-+	case IMB_AUTH_ZUC256_EIA3_BITLEN:
@@ -157,2 +160,3 @@
-+
-+		job->hash_start_src_offset_in_bytes = auth_start_offset(op,
+ 
+ 		job->hash_start_src_offset_in_bytes = auth_start_offset(op,
+-				session, oop);
@@ -174,3 +178,2 @@
- 
- 		job->hash_start_src_offset_in_bytes = auth_start_offset(op,
--				session, oop);
++
++		job->hash_start_src_offset_in_bytes = auth_start_offset(op,
@@ -184,0 +188 @@
++#endif
@@ -198,0 +203,5 @@
+ #if IMB_VERSION(0, 53, 3) <= IMB_VERSION_NUM
+-	if (job->cipher_mode == IMB_CIPHER_ZUC_EEA3)
+-		job->msg_len_to_cipher_in_bytes >>= 3;
+-	else if (job->hash_alg == IMB_AUTH_KASUMI_UIA1)
+-		job->msg_len_to_hash_in_bytes >>= 3;
@@ -214,2 +223,4 @@
-+	case IMB_CIPHER_CCM:
-+	case IMB_CIPHER_GCM:
++#endif
++	case CCM:
++	case GCM:
++#if IMB_VERSION(0, 54, 3) <= IMB_VERSION_NUM
@@ -216,0 +228 @@
+ #endif
@@ -226,6 +237,0 @@
-+
- 	if (job->cipher_mode == IMB_CIPHER_NULL && oop) {
- 		memcpy(job->dst + job->cipher_start_src_offset_in_bytes,
- 			job->src + job->cipher_start_src_offset_in_bytes,
- 			job->msg_len_to_cipher_in_bytes);
- 	}
@@ -233,5 +238,0 @@
--	if (job->cipher_mode == IMB_CIPHER_ZUC_EEA3)
--		job->msg_len_to_cipher_in_bytes >>= 3;
--	else if (job->hash_alg == IMB_AUTH_KASUMI_UIA1)
--		job->msg_len_to_hash_in_bytes >>= 3;
--
@@ -240 +240,0 @@
- 

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

* patch 'crypto/ipsec_mb: fix GMAC parameters setting' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
  2022-06-21  8:01 ` patch 'crypto/ipsec_mb: fix length and offset settings' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'eal/windows: fix data race when creating threads' " Xueming Li
                   ` (113 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Fan Zhang, Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3a9281f20e36c3ccf49ad421ac99a28a650f220c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3a9281f20e36c3ccf49ad421ac99a28a650f220c Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 22 Mar 2022 13:39:10 +0000
Subject: [PATCH] crypto/ipsec_mb: fix GMAC parameters setting
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 837269c2e5c5a8813adfcf59f23b80569048ddeb ]
AES-GMAC requires plaintext length to be 0 when using AES-GCM,
so only AAD data is used.

Fixes: a501609ea646 ("crypto/ipsec_mb: fix length and offset settings")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Tested-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index ab9864739d..94055d8177 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -1438,9 +1438,9 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
 					op->sym->aead.data.offset;
 			job->msg_len_to_hash_in_bytes =
 					op->sym->aead.data.length;
-		} else {
-			job->msg_len_to_cipher_in_bytes = 0;
+		} else { /* AES-GMAC only, only AAD used */
 			job->msg_len_to_hash_in_bytes = 0;
+			job->hash_start_src_offset_in_bytes = 0;
 		}
 
 		job->iv = rte_crypto_op_ctod_offset(op, uint8_t *,
@@ -1524,8 +1524,19 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
 					op->sym->cipher.data.length;
 		break;
 #endif
-	case CCM:
 	case GCM:
+		if (session->cipher.mode == NULL_CIPHER) {
+			/* AES-GMAC only (only AAD used) */
+			job->msg_len_to_cipher_in_bytes = 0;
+			job->cipher_start_src_offset_in_bytes = 0;
+		} else {
+			job->cipher_start_src_offset_in_bytes =
+					op->sym->aead.data.offset;
+			job->msg_len_to_cipher_in_bytes =
+					op->sym->aead.data.length;
+		}
+		break;
+	case CCM:
 #if IMB_VERSION(0, 54, 3) <= IMB_VERSION_NUM
 	case IMB_CIPHER_CHACHA20_POLY1305:
 #endif
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.407352537 +0800
+++ 0002-crypto-ipsec_mb-fix-GMAC-parameters-setting.patch	2022-06-21 15:37:48.954450956 +0800
@@ -1 +1 @@
-From 837269c2e5c5a8813adfcf59f23b80569048ddeb Mon Sep 17 00:00:00 2001
+From 3a9281f20e36c3ccf49ad421ac99a28a650f220c Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Wed, 9 Mar 2022 10:45:14 +0000
+Date: Tue, 22 Mar 2022 13:39:10 +0000
@@ -4,0 +5 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
@@ -5,0 +7 @@
+[ upstream commit 837269c2e5c5a8813adfcf59f23b80569048ddeb ]
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 16 +++++++++++++---
- 1 file changed, 13 insertions(+), 3 deletions(-)
+ drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
@@ -20,5 +21,5 @@
-diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
-index c974886032..afa0b6e3a4 100644
---- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
-+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
-@@ -1296,9 +1296,9 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,
+diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+index ab9864739d..94055d8177 100644
+--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
++++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+@@ -1438,9 +1438,9 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
@@ -36,2 +37 @@
-@@ -1378,8 +1378,18 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,
- 		job->msg_len_to_cipher_in_bits =
+@@ -1524,8 +1524,19 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
@@ -40,3 +40,4 @@
--	case IMB_CIPHER_CCM:
- 	case IMB_CIPHER_GCM:
-+		if (session->cipher.mode == IMB_CIPHER_NULL) {
+ #endif
+-	case CCM:
+ 	case GCM:
++		if (session->cipher.mode == NULL_CIPHER) {
@@ -49 +50,2 @@
-+			job->msg_len_to_cipher_in_bytes = op->sym->aead.data.length;
++			job->msg_len_to_cipher_in_bytes =
++					op->sym->aead.data.length;
@@ -52 +54,2 @@
-+	case IMB_CIPHER_CCM:
++	case CCM:
+ #if IMB_VERSION(0, 54, 3) <= IMB_VERSION_NUM
@@ -54,2 +57 @@
- 		job->cipher_start_src_offset_in_bytes =
- 				op->sym->aead.data.offset;
+ #endif

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

* patch 'eal/windows: fix data race when creating threads' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
  2022-06-21  8:01 ` patch 'crypto/ipsec_mb: fix length and offset settings' " Xueming Li
  2022-06-21  8:01 ` patch 'crypto/ipsec_mb: fix GMAC parameters setting' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'eal/windows: add missing C++ include guards' " Xueming Li
                   ` (112 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: Dmitry Kozlyuk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5888f84ccdd65e87ec47082aac86a5a699efe9eb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5888f84ccdd65e87ec47082aac86a5a699efe9eb Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Wed, 9 Mar 2022 23:35:08 -0800
Subject: [PATCH] eal/windows: fix data race when creating threads
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e4e983b975df700474309605b6adb5f2c6d83e2f ]

eal_thread_loop() uses lcore_config[i].thread_id,
which is stored upon the return from CreateThread().
Per documentation, eal_thread_loop() can start
before CreateThread() returns and the ID is stored.

Create lcore worker threads suspended and then subsequently resume to
allow &lcore_config[i].thread_id be stored before eal_thread_loop
execution.

Fixes: 53ffd9f080fc ("eal/windows: add minimum viable code")

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/librte_eal/windows/eal_thread.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c
index df1df5d02c..b40498c0d6 100644
--- a/lib/librte_eal/windows/eal_thread.c
+++ b/lib/librte_eal/windows/eal_thread.c
@@ -132,13 +132,18 @@ eal_thread_create(pthread_t *thread)
 
 	th = CreateThread(NULL, 0,
 		(LPTHREAD_START_ROUTINE)(ULONG_PTR)eal_thread_loop,
-						NULL, 0, (LPDWORD)thread);
+						NULL, CREATE_SUSPENDED, (LPDWORD)thread);
 	if (!th)
 		return -1;
 
 	SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
 	SetThreadPriority(th, THREAD_PRIORITY_NORMAL);
 
+	if (ResumeThread(th) == (DWORD)-1) {
+		(void)CloseHandle(th);
+		return -1;
+	}
+
 	return 0;
 }
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.448484905 +0800
+++ 0003-eal-windows-fix-data-race-when-creating-threads.patch	2022-06-21 15:37:48.954450956 +0800
@@ -1 +1 @@
-From e4e983b975df700474309605b6adb5f2c6d83e2f Mon Sep 17 00:00:00 2001
+From 5888f84ccdd65e87ec47082aac86a5a699efe9eb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e4e983b975df700474309605b6adb5f2c6d83e2f ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
- lib/eal/windows/eal_thread.c | 7 ++++++-
+ lib/librte_eal/windows/eal_thread.c | 7 ++++++-
@@ -24,5 +26,5 @@
-diff --git a/lib/eal/windows/eal_thread.c b/lib/eal/windows/eal_thread.c
-index 54fa93fa62..ff84cb42af 100644
---- a/lib/eal/windows/eal_thread.c
-+++ b/lib/eal/windows/eal_thread.c
-@@ -150,13 +150,18 @@ eal_thread_create(pthread_t *thread)
+diff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c
+index df1df5d02c..b40498c0d6 100644
+--- a/lib/librte_eal/windows/eal_thread.c
++++ b/lib/librte_eal/windows/eal_thread.c
+@@ -132,13 +132,18 @@ eal_thread_create(pthread_t *thread)

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

* patch 'eal/windows: add missing C++ include guards' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (2 preceding siblings ...)
  2022-06-21  8:01 ` patch 'eal/windows: fix data race when creating threads' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'examples/bond: fix invalid use of trylock' " Xueming Li
                   ` (111 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: David Marchand; +Cc: Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9526e5c4a55acd42dc83221b6d6dc14fcf683041

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9526e5c4a55acd42dc83221b6d6dc14fcf683041 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 5 Apr 2022 15:48:58 +0200
Subject: [PATCH] eal/windows: add missing C++ include guards
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1e230b9be8866939ef7ce9f7f16b8c8369b7bc28 ]

Add missing 'extern "C"' to file.

Fixes: 1db72630da0c ("eal/windows: do not expose private facilities")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/librte_eal/windows/include/rte_windows.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/librte_eal/windows/include/rte_windows.h b/lib/librte_eal/windows/include/rte_windows.h
index b82af34f6d..422c989966 100644
--- a/lib/librte_eal/windows/include/rte_windows.h
+++ b/lib/librte_eal/windows/include/rte_windows.h
@@ -5,6 +5,10 @@
 #ifndef _RTE_WINDOWS_H_
 #define _RTE_WINDOWS_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @file Windows-specific facilities
  *
@@ -42,4 +46,8 @@
 		RTE_FMT_HEAD(__VA_ARGS__,) "\n", GetLastError(), \
 		RTE_FMT_TAIL(__VA_ARGS__,)))
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_WINDOWS_H_ */
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.489980831 +0800
+++ 0004-eal-windows-add-missing-C-include-guards.patch	2022-06-21 15:37:48.954450956 +0800
@@ -1 +1 @@
-From 1e230b9be8866939ef7ce9f7f16b8c8369b7bc28 Mon Sep 17 00:00:00 2001
+From 9526e5c4a55acd42dc83221b6d6dc14fcf683041 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1e230b9be8866939ef7ce9f7f16b8c8369b7bc28 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -14 +16 @@
- lib/eal/windows/include/rte_windows.h | 8 ++++++++
+ lib/librte_eal/windows/include/rte_windows.h | 8 ++++++++
@@ -17,4 +19,4 @@
-diff --git a/lib/eal/windows/include/rte_windows.h b/lib/eal/windows/include/rte_windows.h
-index 0063b5d78c..83730c3d2e 100644
---- a/lib/eal/windows/include/rte_windows.h
-+++ b/lib/eal/windows/include/rte_windows.h
+diff --git a/lib/librte_eal/windows/include/rte_windows.h b/lib/librte_eal/windows/include/rte_windows.h
+index b82af34f6d..422c989966 100644
+--- a/lib/librte_eal/windows/include/rte_windows.h
++++ b/lib/librte_eal/windows/include/rte_windows.h
@@ -32 +34 @@
-@@ -48,4 +52,8 @@
+@@ -42,4 +46,8 @@

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

* patch 'examples/bond: fix invalid use of trylock' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (3 preceding siblings ...)
  2022-06-21  8:01 ` patch 'eal/windows: add missing C++ include guards' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/iavf: fix HW ring scan method selection' " Xueming Li
                   ` (110 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Mattias Rönnblom
  Cc: Bruce Richardson, Min Hu, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/faca6823330d436338bd7e3a8b0a79d32ca23d5c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From faca6823330d436338bd7e3a8b0a79d32ca23d5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Mon, 11 Apr 2022 17:15:59 +0200
Subject: [PATCH] examples/bond: fix invalid use of trylock
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 03382cf4115019e6a82d6fca51a16a34a0824a90 ]

The conditional rte_spinlock_trylock() was used as if it is an
unconditional lock operation in a number of places.

Fixes: cc7e8ae84faa ("examples/bond: add example application for link bonding mode 6")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 examples/bond/main.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/examples/bond/main.c b/examples/bond/main.c
index a6763bce47..43d5df83ae 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -376,7 +376,7 @@ static int lcore_main(__rte_unused void *arg1)
 	bond_ip = BOND_IP_1 | (BOND_IP_2 << 8) |
 				(BOND_IP_3 << 16) | (BOND_IP_4 << 24);
 
-	rte_spinlock_trylock(&global_flag_stru_p->lock);
+	rte_spinlock_lock(&global_flag_stru_p->lock);
 
 	while (global_flag_stru_p->LcoreMainIsRunning) {
 		rte_spinlock_unlock(&global_flag_stru_p->lock);
@@ -457,7 +457,7 @@ static int lcore_main(__rte_unused void *arg1)
 			if (is_free == 0)
 				rte_pktmbuf_free(pkts[i]);
 		}
-		rte_spinlock_trylock(&global_flag_stru_p->lock);
+		rte_spinlock_lock(&global_flag_stru_p->lock);
 	}
 	rte_spinlock_unlock(&global_flag_stru_p->lock);
 	printf("BYE lcore_main\n");
@@ -572,7 +572,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result,
 {
 	int worker_core_id = rte_lcore_id();
 
-	rte_spinlock_trylock(&global_flag_stru_p->lock);
+	rte_spinlock_lock(&global_flag_stru_p->lock);
 	if (global_flag_stru_p->LcoreMainIsRunning == 0) {
 		if (rte_eal_get_lcore_state(global_flag_stru_p->LcoreMainCore)
 		    != WAIT) {
@@ -592,7 +592,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result,
 	if ((worker_core_id >= RTE_MAX_LCORE) || (worker_core_id == 0))
 		return;
 
-	rte_spinlock_trylock(&global_flag_stru_p->lock);
+	rte_spinlock_lock(&global_flag_stru_p->lock);
 	global_flag_stru_p->LcoreMainIsRunning = 1;
 	rte_spinlock_unlock(&global_flag_stru_p->lock);
 	cmdline_printf(cl,
@@ -660,7 +660,7 @@ static void cmd_stop_parsed(__rte_unused void *parsed_result,
 			    struct cmdline *cl,
 			    __rte_unused void *data)
 {
-	rte_spinlock_trylock(&global_flag_stru_p->lock);
+	rte_spinlock_lock(&global_flag_stru_p->lock);
 	if (global_flag_stru_p->LcoreMainIsRunning == 0)	{
 		cmdline_printf(cl,
 					"lcore_main not running on core:%d\n",
@@ -701,7 +701,7 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result,
 			    struct cmdline *cl,
 			    __rte_unused void *data)
 {
-	rte_spinlock_trylock(&global_flag_stru_p->lock);
+	rte_spinlock_lock(&global_flag_stru_p->lock);
 	if (global_flag_stru_p->LcoreMainIsRunning == 0)	{
 		cmdline_printf(cl,
 					"lcore_main not running on core:%d\n",
@@ -763,7 +763,7 @@ static void cmd_show_parsed(__rte_unused void *parsed_result,
 		printf("\n");
 	}
 
-	rte_spinlock_trylock(&global_flag_stru_p->lock);
+	rte_spinlock_lock(&global_flag_stru_p->lock);
 	cmdline_printf(cl,
 			"Active_slaves:%d "
 			"packets received:Tot:%d Arp:%d IPv4:%d\n",
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.529792596 +0800
+++ 0005-examples-bond-fix-invalid-use-of-trylock.patch	2022-06-21 15:37:48.954450956 +0800
@@ -1 +1 @@
-From 03382cf4115019e6a82d6fca51a16a34a0824a90 Mon Sep 17 00:00:00 2001
+From faca6823330d436338bd7e3a8b0a79d32ca23d5c Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 03382cf4115019e6a82d6fca51a16a34a0824a90 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 335bde5c8d..4efebb3902 100644
+index a6763bce47..43d5df83ae 100644
@@ -27 +29 @@
-@@ -373,7 +373,7 @@ static int lcore_main(__rte_unused void *arg1)
+@@ -376,7 +376,7 @@ static int lcore_main(__rte_unused void *arg1)
@@ -36 +38 @@
-@@ -456,7 +456,7 @@ static int lcore_main(__rte_unused void *arg1)
+@@ -457,7 +457,7 @@ static int lcore_main(__rte_unused void *arg1)
@@ -45 +47 @@
-@@ -571,7 +571,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result,
+@@ -572,7 +572,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result,
@@ -54 +56 @@
-@@ -591,7 +591,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result,
+@@ -592,7 +592,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result,
@@ -63 +65 @@
-@@ -659,7 +659,7 @@ static void cmd_stop_parsed(__rte_unused void *parsed_result,
+@@ -660,7 +660,7 @@ static void cmd_stop_parsed(__rte_unused void *parsed_result,
@@ -72 +74 @@
-@@ -700,7 +700,7 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result,
+@@ -701,7 +701,7 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result,
@@ -81 +83 @@
-@@ -762,7 +762,7 @@ static void cmd_show_parsed(__rte_unused void *parsed_result,
+@@ -763,7 +763,7 @@ static void cmd_show_parsed(__rte_unused void *parsed_result,

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

* patch 'net/iavf: fix HW ring scan method selection' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (4 preceding siblings ...)
  2022-06-21  8:01 ` patch 'examples/bond: fix invalid use of trylock' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/i40e: populate error in flow director parser' " Xueming Li
                   ` (109 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Steve Yang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/236835c94ff7bf830e2f75c8c8f00ab0a0779c35

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 236835c94ff7bf830e2f75c8c8f00ab0a0779c35 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 14 Mar 2022 09:31:46 +0000
Subject: [PATCH] net/iavf: fix HW ring scan method selection
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 070ef4e6c815bf7f4647070acf1ed4025e0512e9 ]

When setup Rx queue, the rxdid would be changed if it's
"IAVF_RXDID_LEGACY_0/1", that caused the scan HW ring used the wrong
function 'iavf_rx_scan_hw_ring_flex_rxd()'.

Ignore the rxdid changed when equals "IAVF_RXDID_LEGACY_0/1".

Fixes: 0ed16e01313e ("net/iavf: fix function pointer in multi-process")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index c8fa912b99..7554ce3593 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -441,6 +441,8 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
 
 static const
 iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields_ops[IAVF_RXDID_LAST + 1] = {
+	[IAVF_RXDID_LEGACY_0] = iavf_rxd_to_pkt_fields_by_comms_ovs,
+	[IAVF_RXDID_LEGACY_1] = iavf_rxd_to_pkt_fields_by_comms_ovs,
 	[IAVF_RXDID_COMMS_AUX_VLAN] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
 	[IAVF_RXDID_COMMS_AUX_IPV4] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
 	[IAVF_RXDID_COMMS_AUX_IPV6] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
@@ -479,6 +481,8 @@ iavf_select_rxd_to_pkt_fields_handler(struct iavf_rx_queue *rxq, uint32_t rxdid)
 			rte_pmd_ifd_dynflag_proto_xtr_ip_offset_mask;
 		break;
 	case IAVF_RXDID_COMMS_OVS_1:
+	case IAVF_RXDID_LEGACY_0:
+	case IAVF_RXDID_LEGACY_1:
 		break;
 	default:
 		/* update this according to the RXDID for FLEX_DESC_NONE */
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.570923702 +0800
+++ 0006-net-iavf-fix-HW-ring-scan-method-selection.patch	2022-06-21 15:37:48.957784301 +0800
@@ -1 +1 @@
-From 070ef4e6c815bf7f4647070acf1ed4025e0512e9 Mon Sep 17 00:00:00 2001
+From 236835c94ff7bf830e2f75c8c8f00ab0a0779c35 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 070ef4e6c815bf7f4647070acf1ed4025e0512e9 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index d2cc3ed4bd..764218ace0 100644
+index c8fa912b99..7554ce3593 100644
@@ -25 +27 @@
-@@ -477,6 +477,8 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
+@@ -441,6 +441,8 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
@@ -34,2 +36,2 @@
-@@ -521,6 +523,8 @@ iavf_select_rxd_to_pkt_fields_handler(struct iavf_rx_queue *rxq, uint32_t rxdid)
- 			rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask;
+@@ -479,6 +481,8 @@ iavf_select_rxd_to_pkt_fields_handler(struct iavf_rx_queue *rxq, uint32_t rxdid)
+ 			rte_pmd_ifd_dynflag_proto_xtr_ip_offset_mask;

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

* patch 'net/i40e: populate error in flow director parser' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (5 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/iavf: fix HW ring scan method selection' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/netvsc: fix calculation of checksums based on mbuf flag' " Xueming Li
                   ` (108 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Mike Pattrick; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4d6996d25a365a8ae49a1a66a06220b9acd58915

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4d6996d25a365a8ae49a1a66a06220b9acd58915 Mon Sep 17 00:00:00 2001
From: Mike Pattrick <mkp@redhat.com>
Date: Mon, 21 Mar 2022 23:19:37 -0400
Subject: [PATCH] net/i40e: populate error in flow director parser
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 87063aaff3752470af21f3b80b257262d9d4a314 ]

Errors from i40e_flow_parse_fdir_pattern() can bubble up to
rte_flow_create. If rte_flow_error is not initialized a caller may
dereference error->message. This may be uninitialized memory, leading
to a segemntation fault.

Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow validate")

Signed-off-by: Mike Pattrick <mkp@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/i40e/i40e_flow.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 599b5f123d..b41a1fd3ca 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -3142,8 +3142,11 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 		/* Check if the input set is valid */
 		if (i40e_validate_input_set(pctype, RTE_ETH_FILTER_FDIR,
 						input_set) != 0) {
-			PMD_DRV_LOG(ERR, "Invalid input set");
-			return -EINVAL;
+			rte_flow_error_set(error, EINVAL,
+					   RTE_FLOW_ERROR_TYPE_ITEM,
+					   item,
+					   "Invalid input set");
+			return -rte_errno;
 		}
 
 		filter->input.flow_ext.input_set = input_set;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.613329797 +0800
+++ 0007-net-i40e-populate-error-in-flow-director-parser.patch	2022-06-21 15:37:48.961117647 +0800
@@ -1 +1 @@
-From 87063aaff3752470af21f3b80b257262d9d4a314 Mon Sep 17 00:00:00 2001
+From 4d6996d25a365a8ae49a1a66a06220b9acd58915 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 87063aaff3752470af21f3b80b257262d9d4a314 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index e0cf996200..4f3808cb5f 100644
+index 599b5f123d..b41a1fd3ca 100644

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

* patch 'net/netvsc: fix calculation of checksums based on mbuf flag' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (6 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/i40e: populate error in flow director parser' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/mlx5: fix Tx when inlining is impossible' " Xueming Li
                   ` (107 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Long Li; +Cc: Stephen Hemminger, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a61bd9df25dc6bb7d3d2d0e2b2a3fb1ee5266947

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a61bd9df25dc6bb7d3d2d0e2b2a3fb1ee5266947 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Thu, 24 Mar 2022 10:46:08 -0700
Subject: [PATCH] net/netvsc: fix calculation of checksums based on mbuf flag
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 559a1f2eeaaddccc83e1668a8ee375c34699e48b ]

The netvsc should use RTE_MBUF_F_TX_L4_MASK and check the masked value
to decide the correct way to calculate checksums.

Not checking for RTE_MBUF_F_TX_L4_MASK results in incorrect RNDIS
packets sent to VSP and incorrect checksums calculated by the VSP.

Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device")

Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 drivers/net/netvsc/hn_rxtx.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 94ca3af20a..44a8eb4c0e 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -1348,8 +1348,11 @@ static void hn_encap(struct rndis_packet_msg *pkt,
 			*pi_data = NDIS_LSO2_INFO_MAKEIPV4(hlen,
 							   m->tso_segsz);
 		}
-	} else if (m->ol_flags &
-		   (PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM | PKT_TX_IP_CKSUM)) {
+	} else if ((m->ol_flags & PKT_TX_L4_MASK) ==
+			PKT_TX_TCP_CKSUM ||
+		   (m->ol_flags & PKT_TX_L4_MASK) ==
+			PKT_TX_UDP_CKSUM ||
+		   (m->ol_flags & PKT_TX_IP_CKSUM)) {
 		pi_data = hn_rndis_pktinfo_append(pkt, NDIS_TXCSUM_INFO_SIZE,
 						  NDIS_PKTINFO_TYPE_CSUM);
 		*pi_data = 0;
@@ -1363,9 +1366,11 @@ static void hn_encap(struct rndis_packet_msg *pkt,
 				*pi_data |= NDIS_TXCSUM_INFO_IPCS;
 		}
 
-		if (m->ol_flags & PKT_TX_TCP_CKSUM)
+		if ((m->ol_flags & PKT_TX_L4_MASK) ==
+				PKT_TX_TCP_CKSUM)
 			*pi_data |= NDIS_TXCSUM_INFO_MKTCPCS(hlen);
-		else if (m->ol_flags & PKT_TX_UDP_CKSUM)
+		else if ((m->ol_flags & PKT_TX_L4_MASK) ==
+				PKT_TX_UDP_CKSUM)
 			*pi_data |= NDIS_TXCSUM_INFO_MKUDPCS(hlen);
 	}
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.656804844 +0800
+++ 0008-net-netvsc-fix-calculation-of-checksums-based-on-mbu.patch	2022-06-21 15:37:48.961117647 +0800
@@ -1 +1 @@
-From 559a1f2eeaaddccc83e1668a8ee375c34699e48b Mon Sep 17 00:00:00 2001
+From a61bd9df25dc6bb7d3d2d0e2b2a3fb1ee5266947 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 559a1f2eeaaddccc83e1668a8ee375c34699e48b ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 3e3488f1b8..1afc14f280 100644
+index 94ca3af20a..44a8eb4c0e 100644
@@ -26 +28 @@
-@@ -1346,8 +1346,11 @@ static void hn_encap(struct rndis_packet_msg *pkt,
+@@ -1348,8 +1348,11 @@ static void hn_encap(struct rndis_packet_msg *pkt,
@@ -31,6 +33,6 @@
--		   (RTE_MBUF_F_TX_TCP_CKSUM | RTE_MBUF_F_TX_UDP_CKSUM | RTE_MBUF_F_TX_IP_CKSUM)) {
-+	} else if ((m->ol_flags & RTE_MBUF_F_TX_L4_MASK) ==
-+			RTE_MBUF_F_TX_TCP_CKSUM ||
-+		   (m->ol_flags & RTE_MBUF_F_TX_L4_MASK) ==
-+			RTE_MBUF_F_TX_UDP_CKSUM ||
-+		   (m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM)) {
+-		   (PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM | PKT_TX_IP_CKSUM)) {
++	} else if ((m->ol_flags & PKT_TX_L4_MASK) ==
++			PKT_TX_TCP_CKSUM ||
++		   (m->ol_flags & PKT_TX_L4_MASK) ==
++			PKT_TX_UDP_CKSUM ||
++		   (m->ol_flags & PKT_TX_IP_CKSUM)) {
@@ -40 +42 @@
-@@ -1361,9 +1364,11 @@ static void hn_encap(struct rndis_packet_msg *pkt,
+@@ -1363,9 +1366,11 @@ static void hn_encap(struct rndis_packet_msg *pkt,
@@ -44,3 +46,3 @@
--		if (m->ol_flags & RTE_MBUF_F_TX_TCP_CKSUM)
-+		if ((m->ol_flags & RTE_MBUF_F_TX_L4_MASK) ==
-+				RTE_MBUF_F_TX_TCP_CKSUM)
+-		if (m->ol_flags & PKT_TX_TCP_CKSUM)
++		if ((m->ol_flags & PKT_TX_L4_MASK) ==
++				PKT_TX_TCP_CKSUM)
@@ -48,3 +50,3 @@
--		else if (m->ol_flags & RTE_MBUF_F_TX_UDP_CKSUM)
-+		else if ((m->ol_flags & RTE_MBUF_F_TX_L4_MASK) ==
-+				RTE_MBUF_F_TX_UDP_CKSUM)
+-		else if (m->ol_flags & PKT_TX_UDP_CKSUM)
++		else if ((m->ol_flags & PKT_TX_L4_MASK) ==
++				PKT_TX_UDP_CKSUM)

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

* patch 'net/mlx5: fix Tx when inlining is impossible' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (7 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/netvsc: fix calculation of checksums based on mbuf flag' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/mlx5: fix GTP handling in header modify action' " Xueming Li
                   ` (106 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e8995a254012b4cfde71e0df98eea81741ab4695

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e8995a254012b4cfde71e0df98eea81741ab4695 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Thu, 31 Mar 2022 17:38:41 +0300
Subject: [PATCH] net/mlx5: fix Tx when inlining is impossible
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e2259f93ef455c75bfeda9a7349689b7e9be5981 ]

When txq_inline_max is too large and an mbuf is multi-segment
it may be impossible to inline data and build a valid WQE,
because WQE length would be larger then HW can represent.
It is impossible to detect misconfiguration at startup,
because the condition depends on the mbuf composition.
The check on the data path to prevent the error
treated the length limit as expressed in 64B units,
while the calculated length and limit are in 16B units.
Fix the condition to avoid subsequent TxQ failure and recovery.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 34611ceaec..734c462a09 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -3553,7 +3553,7 @@ do_build:
 	if (unlikely(loc->wqe_free < ((ds + 3) / 4)))
 		return MLX5_TXCMP_CODE_EXIT;
 	/* Check for maximal WQE size. */
-	if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ((ds + 3) / 4)))
+	if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds))
 		return MLX5_TXCMP_CODE_ERROR;
 #ifdef MLX5_PMD_SOFT_COUNTERS
 	/* Update sent data bytes/packets counters. */
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.697769027 +0800
+++ 0009-net-mlx5-fix-Tx-when-inlining-is-impossible.patch	2022-06-21 15:37:48.964450992 +0800
@@ -1 +1 @@
-From e2259f93ef455c75bfeda9a7349689b7e9be5981 Mon Sep 17 00:00:00 2001
+From e8995a254012b4cfde71e0df98eea81741ab4695 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e2259f93ef455c75bfeda9a7349689b7e9be5981 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
- drivers/net/mlx5/mlx5_tx.h | 2 +-
+ drivers/net/mlx5/mlx5_rxtx.c | 2 +-
@@ -25,5 +27,5 @@
-diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
-index 89dac0c65a..dfa04612ff 100644
---- a/drivers/net/mlx5/mlx5_tx.h
-+++ b/drivers/net/mlx5/mlx5_tx.h
-@@ -2070,7 +2070,7 @@ do_build:
+diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
+index 34611ceaec..734c462a09 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.c
++++ b/drivers/net/mlx5/mlx5_rxtx.c
+@@ -3553,7 +3553,7 @@ do_build:

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

* patch 'net/mlx5: fix GTP handling in header modify action' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (8 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/mlx5: fix Tx when inlining is impossible' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/mlx5: fix Rx/Tx stats concurrency' " Xueming Li
                   ` (105 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8a2529276af81ff7508122abfc9b7c171959b048

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8a2529276af81ff7508122abfc9b7c171959b048 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Wed, 13 Apr 2022 11:18:31 +0000
Subject: [PATCH] net/mlx5: fix GTP handling in header modify action
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 26f22fa64e9fd66fbdba560c177ea5c9baacba5c ]

GTP items were ignored during conversion of modify header actions. This
caused modify TTL action to generate a wrong modify header command when
tunnel and inner headers used different IP versions.

This patch adds GTP item handling to modify header action conversion.

Fixes: 04233f36c712 ("net/mlx5: fix layer type in header modify action")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 2d0e239d4d..aa22e85f6a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -132,6 +132,7 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr,
 		case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
 		case RTE_FLOW_ITEM_TYPE_GENEVE:
 		case RTE_FLOW_ITEM_TYPE_MPLS:
+		case RTE_FLOW_ITEM_TYPE_GTP:
 			if (tunnel_decap)
 				attr->attr = 0;
 			break;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.740609666 +0800
+++ 0010-net-mlx5-fix-GTP-handling-in-header-modify-action.patch	2022-06-21 15:37:48.971117682 +0800
@@ -1 +1 @@
-From 26f22fa64e9fd66fbdba560c177ea5c9baacba5c Mon Sep 17 00:00:00 2001
+From 8a2529276af81ff7508122abfc9b7c171959b048 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 26f22fa64e9fd66fbdba560c177ea5c9baacba5c ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 1e9bd63635..da2ddd58cd 100644
+index 2d0e239d4d..aa22e85f6a 100644
@@ -25 +27 @@
-@@ -162,6 +162,7 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr,
+@@ -132,6 +132,7 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr,

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

* patch 'net/mlx5: fix Rx/Tx stats concurrency' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (9 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/mlx5: fix GTP handling in header modify action' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'test/table: fix buffer overflow on lpm entry' " Xueming Li
                   ` (104 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c4d51b3f05b56efe4e435187e67d698a07e30b94

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c4d51b3f05b56efe4e435187e67d698a07e30b94 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Wed, 20 Apr 2022 18:32:17 +0300
Subject: [PATCH] net/mlx5: fix Rx/Tx stats concurrency
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 773a7de21a984bb7bdb6396a659ccc585a44a806 ]

Queue statistics are being continuously updated in Rx/Tx burst
routines while handling traffic. In addition to that, statistics
can be reset (written with zeroes) on statistics reset in other
threads, causing a race condition, which in turn could result in
wrong stats.

The patch provides an approach with reference values, allowing
the actual counters to be writable within Rx/Tx burst threads
only, and updating reference values on stats reset.

Fixes: 87011737b715 ("mlx5: add software counters")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx.c  |  1 +
 drivers/net/mlx5/mlx5_rxtx.h  |  2 ++
 drivers/net/mlx5/mlx5_stats.c | 41 ++++++++++++++++++++---------------
 3 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 734c462a09..edabe229d4 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -78,6 +78,7 @@ static uint16_t mlx5_tx_burst_##func(void *txq, \
 }
 
 #define MLX5_TXOFF_INFO(func, olx) {mlx5_tx_burst_##func, olx},
+	struct mlx5_txq_stats stats_reset; /* stats on last reset. */
 
 static __rte_always_inline uint32_t
 rxq_cq_to_pkt_type(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 237a7faa5c..8760ab78f7 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -153,6 +153,7 @@ struct mlx5_rxq_data {
 	struct mlx5_dev_ctx_shared *sh; /* Shared context. */
 	uint16_t idx; /* Queue index. */
 	struct mlx5_rxq_stats stats;
+	struct mlx5_rxq_stats stats_reset; /* stats on last reset. */
 	rte_xmm_t mbuf_initializer; /* Default rearm/flags for vectorized Rx. */
 	struct rte_mbuf fake_mbuf; /* elts padding for vectorized Rx. */
 	void *cq_uar; /* Verbs CQ user access region. */
@@ -271,6 +272,7 @@ struct mlx5_txq_data {
 	int32_t ts_offset; /* Timestamp field dynamic offset. */
 	struct mlx5_dev_ctx_shared *sh; /* Shared context. */
 	struct mlx5_txq_stats stats; /* TX queue counters. */
+	struct mlx5_txq_stats stats_reset; /* stats on last reset. */
 #ifndef RTE_ARCH_64
 	rte_spinlock_t *uar_lock;
 	/* UAR access lock required for 32bit implementations */
diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 82d4d4a745..450037aea0 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -113,18 +113,23 @@ mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		idx = rxq->idx;
 		if (idx < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
 #ifdef MLX5_PMD_SOFT_COUNTERS
-			tmp.q_ipackets[idx] += rxq->stats.ipackets;
-			tmp.q_ibytes[idx] += rxq->stats.ibytes;
+			tmp.q_ipackets[idx] += rxq->stats.ipackets -
+				rxq->stats_reset.ipackets;
+			tmp.q_ibytes[idx] += rxq->stats.ibytes -
+				rxq->stats_reset.ibytes;
 #endif
 			tmp.q_errors[idx] += (rxq->stats.idropped +
-					      rxq->stats.rx_nombuf);
+					      rxq->stats.rx_nombuf) -
+					      (rxq->stats_reset.idropped +
+					      rxq->stats_reset.rx_nombuf);
 		}
 #ifdef MLX5_PMD_SOFT_COUNTERS
-		tmp.ipackets += rxq->stats.ipackets;
-		tmp.ibytes += rxq->stats.ibytes;
+		tmp.ipackets += rxq->stats.ipackets - rxq->stats_reset.ipackets;
+		tmp.ibytes += rxq->stats.ibytes - rxq->stats_reset.ibytes;
 #endif
-		tmp.ierrors += rxq->stats.idropped;
-		tmp.rx_nombuf += rxq->stats.rx_nombuf;
+		tmp.ierrors += rxq->stats.idropped - rxq->stats_reset.idropped;
+		tmp.rx_nombuf += rxq->stats.rx_nombuf -
+					rxq->stats_reset.rx_nombuf;
 	}
 	for (i = 0; (i != priv->txqs_n); ++i) {
 		struct mlx5_txq_data *txq = (*priv->txqs)[i];
@@ -134,15 +139,17 @@ mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		idx = txq->idx;
 		if (idx < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
 #ifdef MLX5_PMD_SOFT_COUNTERS
-			tmp.q_opackets[idx] += txq->stats.opackets;
-			tmp.q_obytes[idx] += txq->stats.obytes;
+			tmp.q_opackets[idx] += txq->stats.opackets -
+						txq->stats_reset.opackets;
+			tmp.q_obytes[idx] += txq->stats.obytes -
+						txq->stats_reset.obytes;
 #endif
 		}
 #ifdef MLX5_PMD_SOFT_COUNTERS
-		tmp.opackets += txq->stats.opackets;
-		tmp.obytes += txq->stats.obytes;
+		tmp.opackets += txq->stats.opackets - txq->stats_reset.opackets;
+		tmp.obytes += txq->stats.obytes - txq->stats_reset.obytes;
 #endif
-		tmp.oerrors += txq->stats.oerrors;
+		tmp.oerrors += txq->stats.oerrors - txq->stats_reset.oerrors;
 	}
 	ret = mlx5_os_read_dev_stat(priv, "out_of_buffer", &tmp.imissed);
 	if (ret == 0) {
@@ -182,14 +189,14 @@ mlx5_stats_reset(struct rte_eth_dev *dev)
 	for (i = 0; (i != priv->rxqs_n); ++i) {
 		if ((*priv->rxqs)[i] == NULL)
 			continue;
-		memset(&(*priv->rxqs)[i]->stats, 0,
-		       sizeof(struct mlx5_rxq_stats));
+		(*priv->rxqs)[i]->stats_reset = (*priv->rxqs)[i]->stats;
 	}
 	for (i = 0; (i != priv->txqs_n); ++i) {
-		if ((*priv->txqs)[i] == NULL)
+		struct mlx5_txq_data *txq_data = (*priv->txqs)[i];
+
+		if (txq_data == NULL)
 			continue;
-		memset(&(*priv->txqs)[i]->stats, 0,
-		       sizeof(struct mlx5_txq_stats));
+		txq_data->stats_reset = txq_data->stats;
 	}
 	mlx5_os_read_dev_stat(priv, "out_of_buffer", &stats_ctrl->imissed_base);
 	stats_ctrl->imissed = 0;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.793124379 +0800
+++ 0011-net-mlx5-fix-Rx-Tx-stats-concurrency.patch	2022-06-21 15:37:48.977784372 +0800
@@ -1 +1 @@
-From 773a7de21a984bb7bdb6396a659ccc585a44a806 Mon Sep 17 00:00:00 2001
+From c4d51b3f05b56efe4e435187e67d698a07e30b94 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 773a7de21a984bb7bdb6396a659ccc585a44a806 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -22,10 +24,22 @@
- drivers/net/mlx5/mlx5_rx.h    |  1 +
- drivers/net/mlx5/mlx5_stats.c | 40 +++++++++++++++++++++--------------
- drivers/net/mlx5/mlx5_tx.h    |  1 +
- 3 files changed, 26 insertions(+), 16 deletions(-)
-
-diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
-index 5bf88b6181..e715ed6b62 100644
---- a/drivers/net/mlx5/mlx5_rx.h
-+++ b/drivers/net/mlx5/mlx5_rx.h
-@@ -126,6 +126,7 @@ struct mlx5_rxq_data {
+ drivers/net/mlx5/mlx5_rxtx.c  |  1 +
+ drivers/net/mlx5/mlx5_rxtx.h  |  2 ++
+ drivers/net/mlx5/mlx5_stats.c | 41 ++++++++++++++++++++---------------
+ 3 files changed, 27 insertions(+), 17 deletions(-)
+
+diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
+index 734c462a09..edabe229d4 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.c
++++ b/drivers/net/mlx5/mlx5_rxtx.c
+@@ -78,6 +78,7 @@ static uint16_t mlx5_tx_burst_##func(void *txq, \
+ }
+ 
+ #define MLX5_TXOFF_INFO(func, olx) {mlx5_tx_burst_##func, olx},
++	struct mlx5_txq_stats stats_reset; /* stats on last reset. */
+ 
+ static __rte_always_inline uint32_t
+ rxq_cq_to_pkt_type(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
+diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
+index 237a7faa5c..8760ab78f7 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.h
++++ b/drivers/net/mlx5/mlx5_rxtx.h
+@@ -153,6 +153,7 @@ struct mlx5_rxq_data {
@@ -38 +52,9 @@
- 	struct mlx5_uar_data uar_data; /* CQ doorbell. */
+ 	void *cq_uar; /* Verbs CQ user access region. */
+@@ -271,6 +272,7 @@ struct mlx5_txq_data {
+ 	int32_t ts_offset; /* Timestamp field dynamic offset. */
+ 	struct mlx5_dev_ctx_shared *sh; /* Shared context. */
+ 	struct mlx5_txq_stats stats; /* TX queue counters. */
++	struct mlx5_txq_stats stats_reset; /* stats on last reset. */
+ #ifndef RTE_ARCH_64
+ 	rte_spinlock_t *uar_lock;
+ 	/* UAR access lock required for 32bit implementations */
@@ -40 +62 @@
-index 732775954a..f64fa3587b 100644
+index 82d4d4a745..450037aea0 100644
@@ -43 +65 @@
-@@ -114,18 +114,23 @@ mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -113,18 +113,23 @@ mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -74 +96 @@
-@@ -135,15 +140,17 @@ mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -134,15 +139,17 @@ mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -97,3 +119,3 @@
-@@ -185,13 +192,14 @@ mlx5_stats_reset(struct rte_eth_dev *dev)
- 
- 		if (rxq_data == NULL)
+@@ -182,14 +189,14 @@ mlx5_stats_reset(struct rte_eth_dev *dev)
+ 	for (i = 0; (i != priv->rxqs_n); ++i) {
+ 		if ((*priv->rxqs)[i] == NULL)
@@ -101,2 +123,3 @@
--		memset(&rxq_data->stats, 0, sizeof(struct mlx5_rxq_stats));
-+		rxq_data->stats_reset = rxq_data->stats;
+-		memset(&(*priv->rxqs)[i]->stats, 0,
+-		       sizeof(struct mlx5_rxq_stats));
++		(*priv->rxqs)[i]->stats_reset = (*priv->rxqs)[i]->stats;
@@ -116,12 +138,0 @@
-diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
-index dfa04612ff..20776919c2 100644
---- a/drivers/net/mlx5/mlx5_tx.h
-+++ b/drivers/net/mlx5/mlx5_tx.h
-@@ -164,6 +164,7 @@ struct mlx5_txq_data {
- 	int32_t ts_offset; /* Timestamp field dynamic offset. */
- 	struct mlx5_dev_ctx_shared *sh; /* Shared context. */
- 	struct mlx5_txq_stats stats; /* TX queue counters. */
-+	struct mlx5_txq_stats stats_reset; /* stats on last reset. */
- 	struct mlx5_uar_data uar_data;
- 	struct rte_mbuf *elts[0];
- 	/* Storage for queued packets, must be the last field. */

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

* patch 'test/table: fix buffer overflow on lpm entry' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (10 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/mlx5: fix Rx/Tx stats concurrency' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'mem: skip attaching external memory in secondary process' " Xueming Li
                   ` (103 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/072f7ee4708dc63b66fbb3d9c9589d9e1a0f26bc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 072f7ee4708dc63b66fbb3d9c9589d9e1a0f26bc Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Thu, 21 Apr 2022 17:35:27 +0000
Subject: [PATCH] test/table: fix buffer overflow on lpm entry
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a6699a6eb22a763ad4bc7498ca53cf89ab9917dd ]

This patch fixes stack buffer overflow reported by ASan.

Bugzilla ID: 820
Fixes: 5205954791cb ("app/test: packet framework unit tests")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 app/test/test_table_tables.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c
index 4ff6ab16aa..494fb6ffaa 100644
--- a/app/test/test_table_tables.c
+++ b/app/test/test_table_tables.c
@@ -290,10 +290,10 @@ test_table_lpm(void)
 	struct rte_mbuf *mbufs[RTE_PORT_IN_BURST_SIZE_MAX];
 	void *table;
 	char *entries[RTE_PORT_IN_BURST_SIZE_MAX];
-	char entry;
+	uint64_t entry;
 	void *entry_ptr;
 	int key_found;
-	uint32_t entry_size = 1;
+	uint32_t entry_size = sizeof(entry);
 
 	/* Initialize params and create tables */
 	struct rte_table_lpm_params lpm_params = {
@@ -355,7 +355,7 @@ test_table_lpm(void)
 	struct rte_table_lpm_key lpm_key;
 	lpm_key.ip = 0xadadadad;
 
-	table = rte_table_lpm_ops.f_create(&lpm_params, 0, 1);
+	table = rte_table_lpm_ops.f_create(&lpm_params, 0, entry_size);
 	if (table == NULL)
 		return -9;
 
@@ -456,10 +456,10 @@ test_table_lpm_ipv6(void)
 	struct rte_mbuf *mbufs[RTE_PORT_IN_BURST_SIZE_MAX];
 	void *table;
 	char *entries[RTE_PORT_IN_BURST_SIZE_MAX];
-	char entry;
+	uint64_t entry;
 	void *entry_ptr;
 	int key_found;
-	uint32_t entry_size = 1;
+	uint32_t entry_size = sizeof(entry);
 
 	/* Initialize params and create tables */
 	struct rte_table_lpm_ipv6_params lpm_params = {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.841197546 +0800
+++ 0012-test-table-fix-buffer-overflow-on-lpm-entry.patch	2022-06-21 15:37:48.977784372 +0800
@@ -1 +1 @@
-From a6699a6eb22a763ad4bc7498ca53cf89ab9917dd Mon Sep 17 00:00:00 2001
+From 072f7ee4708dc63b66fbb3d9c9589d9e1a0f26bc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a6699a6eb22a763ad4bc7498ca53cf89ab9917dd ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index d5c5a426bc..010dd5a794 100644
+index 4ff6ab16aa..494fb6ffaa 100644
@@ -22 +24 @@
-@@ -292,10 +292,10 @@ test_table_lpm(void)
+@@ -290,10 +290,10 @@ test_table_lpm(void)
@@ -35 +37 @@
-@@ -357,7 +357,7 @@ test_table_lpm(void)
+@@ -355,7 +355,7 @@ test_table_lpm(void)
@@ -44 +46 @@
-@@ -458,10 +458,10 @@ test_table_lpm_ipv6(void)
+@@ -456,10 +456,10 @@ test_table_lpm_ipv6(void)

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

* patch 'mem: skip attaching external memory in secondary process' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (11 preceding siblings ...)
  2022-06-21  8:01 ` patch 'test/table: fix buffer overflow on lpm entry' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'eal: fix C++ include for device event and DMA' " Xueming Li
                   ` (102 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Deepak Khandelwal; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ae1ed789dc3c7d9cfc0d8ca5e4e35e60dc11c19f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ae1ed789dc3c7d9cfc0d8ca5e4e35e60dc11c19f Mon Sep 17 00:00:00 2001
From: Deepak Khandelwal <deepak.khandelwal@intel.com>
Date: Thu, 21 Apr 2022 14:41:21 +0530
Subject: [PATCH] mem: skip attaching external memory in secondary process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 90bf3f89ed33f78e9f41818caf123e13e508dee7 ]

Currently, EAL init in secondary processes will attach all fbarrays
in the memconfig to have access to the primary process's page tables.
However, fbarrays corresponding to external memory segments should
not be attached at initialization, because this will happen as part
of `rte_extmem_attach` [1] or `rte_malloc_heap_memory_attach` [2] calls.

1: https://doc.dpdk.org/api/rte__memory_8h.html#a2796da68de6825f8edf53759f8e4d230
2: https://doc.dpdk.org/api/rte__malloc_8h.html#af6360dea35bdf162feeb2b62cf149fd3

Fixes: ff3619d6244b ("malloc: allow attaching to external memory chunks")

Suggested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Deepak Khandelwal <deepak.khandelwal@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/freebsd/eal_memory.c | 4 ++--
 lib/librte_eal/linux/eal_memory.c   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/freebsd/eal_memory.c b/lib/librte_eal/freebsd/eal_memory.c
index 78ac142b82..17ab10e0ca 100644
--- a/lib/librte_eal/freebsd/eal_memory.c
+++ b/lib/librte_eal/freebsd/eal_memory.c
@@ -446,8 +446,8 @@ memseg_secondary_init(void)
 
 		msl = &mcfg->memsegs[msl_idx];
 
-		/* skip empty memseg lists */
-		if (msl->memseg_arr.len == 0)
+		/* skip empty and external memseg lists */
+		if (msl->memseg_arr.len == 0 || msl->external)
 			continue;
 
 		if (rte_fbarray_attach(&msl->memseg_arr)) {
diff --git a/lib/librte_eal/linux/eal_memory.c b/lib/librte_eal/linux/eal_memory.c
index 03a4f2dd2d..fda6a159d5 100644
--- a/lib/librte_eal/linux/eal_memory.c
+++ b/lib/librte_eal/linux/eal_memory.c
@@ -1883,8 +1883,8 @@ memseg_secondary_init(void)
 
 		msl = &mcfg->memsegs[msl_idx];
 
-		/* skip empty memseg lists */
-		if (msl->memseg_arr.len == 0)
+		/* skip empty and external memseg lists */
+		if (msl->memseg_arr.len == 0 || msl->external)
 			continue;
 
 		if (rte_fbarray_attach(&msl->memseg_arr)) {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.888119184 +0800
+++ 0013-mem-skip-attaching-external-memory-in-secondary-proc.patch	2022-06-21 15:37:48.981117718 +0800
@@ -1 +1 @@
-From 90bf3f89ed33f78e9f41818caf123e13e508dee7 Mon Sep 17 00:00:00 2001
+From ae1ed789dc3c7d9cfc0d8ca5e4e35e60dc11c19f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 90bf3f89ed33f78e9f41818caf123e13e508dee7 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +24,2 @@
- lib/eal/freebsd/eal_memory.c | 4 ++--
- lib/eal/linux/eal_memory.c   | 4 ++--
+ lib/librte_eal/freebsd/eal_memory.c | 4 ++--
+ lib/librte_eal/linux/eal_memory.c   | 4 ++--
@@ -26 +28 @@
-diff --git a/lib/eal/freebsd/eal_memory.c b/lib/eal/freebsd/eal_memory.c
+diff --git a/lib/librte_eal/freebsd/eal_memory.c b/lib/librte_eal/freebsd/eal_memory.c
@@ -28,2 +30,2 @@
---- a/lib/eal/freebsd/eal_memory.c
-+++ b/lib/eal/freebsd/eal_memory.c
+--- a/lib/librte_eal/freebsd/eal_memory.c
++++ b/lib/librte_eal/freebsd/eal_memory.c
@@ -41,5 +43,5 @@
-diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
-index ee1a9e6800..c890c42106 100644
---- a/lib/eal/linux/eal_memory.c
-+++ b/lib/eal/linux/eal_memory.c
-@@ -1874,8 +1874,8 @@ memseg_secondary_init(void)
+diff --git a/lib/librte_eal/linux/eal_memory.c b/lib/librte_eal/linux/eal_memory.c
+index 03a4f2dd2d..fda6a159d5 100644
+--- a/lib/librte_eal/linux/eal_memory.c
++++ b/lib/librte_eal/linux/eal_memory.c
+@@ -1883,8 +1883,8 @@ memseg_secondary_init(void)

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

* patch 'eal: fix C++ include for device event and DMA' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (12 preceding siblings ...)
  2022-06-21  8:01 ` patch 'mem: skip attaching external memory in secondary process' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'crypto/dpaa_sec: fix digest size' " Xueming Li
                   ` (101 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Tianhao Chai; +Cc: Bruce Richardson, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c1d1c4fdc321979bfbc671c19347d2586c981df9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c1d1c4fdc321979bfbc671c19347d2586c981df9 Mon Sep 17 00:00:00 2001
From: Tianhao Chai <cth451@gmail.com>
Date: Wed, 4 May 2022 23:39:35 -0500
Subject: [PATCH] eal: fix C++ include for device event and DMA
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 28c5d600723a9bb384a4b2f79bf6af8c40950bba ]

Currently the "extern C" section ends right before rte_dev_dma_unmap
and other DMA function declarations, causing some C++ compilers to
produce C++ mangled symbols to rte_dev_dma_unmap instead of C symbols.
This leads to build failures later when linking a final executable
against this object.

Fixes: a753e53d517b ("eal: add device event monitor framework")

Signed-off-by: Tianhao Chai <cth451@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/librte_eal/include/rte_dev.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/include/rte_dev.h b/lib/librte_eal/include/rte_dev.h
index ef3ce849be..616192cdc4 100644
--- a/lib/librte_eal/include/rte_dev.h
+++ b/lib/librte_eal/include/rte_dev.h
@@ -327,10 +327,6 @@ rte_dev_iterator_next(struct rte_dev_iterator *it);
 	     dev != NULL; \
 	     dev = rte_dev_iterator_next(it))
 
-#ifdef __cplusplus
-}
-#endif
-
 /**
  * @warning
  * @b EXPERIMENTAL: this API may change without prior notice
@@ -503,4 +499,8 @@ int
 rte_dev_dma_unmap(struct rte_device *dev, void *addr, uint64_t iova,
 		  size_t len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_DEV_H_ */
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.933522817 +0800
+++ 0014-eal-fix-C-include-for-device-event-and-DMA.patch	2022-06-21 15:37:48.981117718 +0800
@@ -1 +1 @@
-From 28c5d600723a9bb384a4b2f79bf6af8c40950bba Mon Sep 17 00:00:00 2001
+From c1d1c4fdc321979bfbc671c19347d2586c981df9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 28c5d600723a9bb384a4b2f79bf6af8c40950bba ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/eal/include/rte_dev.h | 8 ++++----
+ lib/librte_eal/include/rte_dev.h | 8 ++++----
@@ -22,5 +24,5 @@
-diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h
-index 448a41cb0e..e6ff1218f9 100644
---- a/lib/eal/include/rte_dev.h
-+++ b/lib/eal/include/rte_dev.h
-@@ -320,10 +320,6 @@ rte_dev_iterator_next(struct rte_dev_iterator *it);
+diff --git a/lib/librte_eal/include/rte_dev.h b/lib/librte_eal/include/rte_dev.h
+index ef3ce849be..616192cdc4 100644
+--- a/lib/librte_eal/include/rte_dev.h
++++ b/lib/librte_eal/include/rte_dev.h
+@@ -327,10 +327,6 @@ rte_dev_iterator_next(struct rte_dev_iterator *it);
@@ -37 +39 @@
-@@ -496,4 +492,8 @@ int
+@@ -503,4 +499,8 @@ int

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

* patch 'crypto/dpaa_sec: fix digest size' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (13 preceding siblings ...)
  2022-06-21  8:01 ` patch 'eal: fix C++ include for device event and DMA' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'crypto/dpaa2_sec: fix fle buffer leak' " Xueming Li
                   ` (100 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8856e5ecd7f133dcfa6d9e46729073f7dd0e95d5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8856e5ecd7f133dcfa6d9e46729073f7dd0e95d5 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Thu, 17 Mar 2022 14:25:58 +0530
Subject: [PATCH] crypto/dpaa_sec: fix digest size
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 841147ef973b415e8e21b6521e93361001ee2fc1 ]

DPAA crypto driver can support 64 bytes size digest size
for SHA512-HMAC.
This patch changes the value of macro max supported digest size to
64.

Fixes: c3e85bdcc6e6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h
index 368699678b..2af33a8fad 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  *
- *   Copyright 2016-2020 NXP
+ *   Copyright 2016-2022 NXP
  *
  */
 
@@ -208,7 +208,7 @@ struct dpaa_sec_job {
 	struct qm_sg_entry sg[MAX_JOB_SG_ENTRIES];
 };
 
-#define DPAA_MAX_NB_MAX_DIGEST	32
+#define DPAA_MAX_NB_MAX_DIGEST	64
 struct dpaa_sec_op_ctx {
 	struct dpaa_sec_job job;
 	struct rte_crypto_op *op;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:49.976324256 +0800
+++ 0015-crypto-dpaa_sec-fix-digest-size.patch	2022-06-21 15:37:48.981117718 +0800
@@ -1 +1 @@
-From 841147ef973b415e8e21b6521e93361001ee2fc1 Mon Sep 17 00:00:00 2001
+From 8856e5ecd7f133dcfa6d9e46729073f7dd0e95d5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 841147ef973b415e8e21b6521e93361001ee2fc1 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 7890687828..b3f2258ead 100644
+index 368699678b..2af33a8fad 100644
@@ -26 +28 @@
-- *   Copyright 2016-2021 NXP
+- *   Copyright 2016-2020 NXP
@@ -31 +33 @@
-@@ -231,7 +231,7 @@ struct dpaa_sec_job {
+@@ -208,7 +208,7 @@ struct dpaa_sec_job {
@@ -39 +41 @@
- 	union {
+ 	struct rte_crypto_op *op;

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

* patch 'crypto/dpaa2_sec: fix fle buffer leak' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (14 preceding siblings ...)
  2022-06-21  8:01 ` patch 'crypto/dpaa_sec: fix digest size' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'crypto/dpaa2_sec: fix buffer pool ID check' " Xueming Li
                   ` (99 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2a680bbbc72df42818ae33007df4e82aaa2fee5f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2a680bbbc72df42818ae33007df4e82aaa2fee5f Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Thu, 28 Apr 2022 17:17:20 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix fle buffer leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6a2b01a4106402be0aa50e3e3b1e5098e3a9b646 ]

Driver allocates a fle buffer for each packet
before enqueue and free the buffer on dequeue. But in case if
there are enqueue failures, then code should free the fle buffers.

Fixes: 4562de326d30 ("crypto/dpaa2_sec: support ordered queue")
Fixes: 3ffce51a1f04 ("crypto/dpaa2_sec: add enqueue retry timeout")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 29 ++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 7e728d1cf7..c9e378d467 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  *
  *   Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
- *   Copyright 2016-2020 NXP
+ *   Copyright 2016-2022 NXP
  *
  */
 
@@ -59,6 +59,27 @@
 
 static uint8_t cryptodev_driver_id;
 
+static inline void
+free_fle(const struct qbman_fd *fd)
+{
+	struct qbman_fle *fle;
+	struct rte_crypto_op *op;
+	struct ctxt_priv *priv;
+
+#ifdef RTE_LIB_SECURITY
+	if (DPAA2_FD_GET_FORMAT(fd) == qbman_fd_single)
+		return;
+#endif
+	fle = (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd));
+	op = (struct rte_crypto_op *)DPAA2_GET_FLE_ADDR((fle - 1));
+	/* free the fle memory */
+	if (likely(rte_pktmbuf_is_contiguous(op->sym->m_src))) {
+		priv = (struct ctxt_priv *)(size_t)DPAA2_GET_FLE_CTXT(fle - 1);
+		rte_mempool_put(priv->fle_pool, (void *)(fle-1));
+	} else
+		rte_free((void *)(fle-1));
+}
+
 #ifdef RTE_LIB_SECURITY
 static inline int
 build_proto_compound_sg_fd(dpaa2_sec_session *sess,
@@ -1508,6 +1529,12 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
 				if (retry_count > DPAA2_MAX_TX_RETRY_COUNT) {
 					num_tx += loop;
 					nb_ops -= loop;
+					DPAA2_SEC_DP_DEBUG("Enqueue fail\n");
+					/* freeing the fle buffers */
+					while (loop < frames_to_send) {
+						free_fle(&fd_arr[loop]);
+						loop++;
+					}
 					goto skip_tx;
 				}
 			} else {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.022687811 +0800
+++ 0016-crypto-dpaa2_sec-fix-fle-buffer-leak.patch	2022-06-21 15:37:48.984451063 +0800
@@ -1 +1 @@
-From 6a2b01a4106402be0aa50e3e3b1e5098e3a9b646 Mon Sep 17 00:00:00 2001
+From 2a680bbbc72df42818ae33007df4e82aaa2fee5f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6a2b01a4106402be0aa50e3e3b1e5098e3a9b646 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +19,2 @@
- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 35 ++++++++++++++++++++-
- 1 file changed, 34 insertions(+), 1 deletion(-)
+ drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 29 ++++++++++++++++++++-
+ 1 file changed, 28 insertions(+), 1 deletion(-)
@@ -21 +23 @@
-index e62d04852b..03fef5e500 100644
+index 7e728d1cf7..c9e378d467 100644
@@ -28 +30 @@
-- *   Copyright 2016-2021 NXP
+- *   Copyright 2016-2020 NXP
@@ -33,3 +35,3 @@
-@@ -64,6 +64,27 @@ enum dpaa2_sec_dump_levels {
- uint8_t cryptodev_driver_id;
- uint8_t dpaa2_sec_dp_dump = DPAA2_SEC_DP_ERR_DUMP;
+@@ -59,6 +59,27 @@
+ 
+ static uint8_t cryptodev_driver_id;
@@ -61,14 +63 @@
-@@ -1513,6 +1534,12 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
- 				if (retry_count > DPAA2_MAX_TX_RETRY_COUNT) {
- 					num_tx += loop;
- 					nb_ops -= loop;
-+					DPAA2_SEC_DP_DEBUG("Enqueue fail\n");
-+					/* freeing the fle buffers */
-+					while (loop < frames_to_send) {
-+						free_fle(&fd_arr[loop]);
-+						loop++;
-+					}
- 					goto skip_tx;
- 				}
- 			} else {
-@@ -1854,6 +1881,12 @@ dpaa2_sec_enqueue_burst_ordered(void *qp, struct rte_crypto_op **ops,
+@@ -1508,6 +1529,12 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,

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

* patch 'crypto/dpaa2_sec: fix buffer pool ID check' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (15 preceding siblings ...)
  2022-06-21  8:01 ` patch 'crypto/dpaa2_sec: fix fle buffer leak' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'crypto/dpaa_sec: fix secondary process probing' " Xueming Li
                   ` (98 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/faf1c3baa87e275829adee1889f6277f4e1b1d2b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From faf1c3baa87e275829adee1889f6277f4e1b1d2b Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Thu, 28 Apr 2022 17:17:21 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix buffer pool ID check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e2b70a309f901b6aa947087a318ba0be3ea8782b ]

Simple fd rely on bpid of the buffers whereas
other FD types can support buffers without bpid
of pool.

So moving the bpid check to simple fd to mbuf
conversion function.

Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index c9e378d467..de0cf0fbc4 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1561,6 +1561,10 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
 	int16_t diff = 0;
 	dpaa2_sec_session *sess_priv __rte_unused;
 
+	if (unlikely(DPAA2_GET_FD_IVP(fd))) {
+		DPAA2_SEC_ERR("error: non inline buffer");
+		return NULL;
+	}
 	struct rte_mbuf *mbuf = DPAA2_INLINE_MBUF_FROM_BUF(
 		DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)),
 		rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size);
@@ -1607,11 +1611,6 @@ sec_fd_to_mbuf(const struct qbman_fd *fd)
 	 * We can have a better approach to use the inline Mbuf
 	 */
 
-	if (unlikely(DPAA2_GET_FD_IVP(fd))) {
-		/* TODO complete it. */
-		DPAA2_SEC_ERR("error: non inline buffer");
-		return NULL;
-	}
 	op = (struct rte_crypto_op *)DPAA2_GET_FLE_ADDR((fle - 1));
 
 	/* Prefeth op */
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.068993449 +0800
+++ 0017-crypto-dpaa2_sec-fix-buffer-pool-ID-check.patch	2022-06-21 15:37:48.987784408 +0800
@@ -1 +1 @@
-From e2b70a309f901b6aa947087a318ba0be3ea8782b Mon Sep 17 00:00:00 2001
+From faf1c3baa87e275829adee1889f6277f4e1b1d2b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e2b70a309f901b6aa947087a318ba0be3ea8782b ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 03fef5e500..2374d67978 100644
+index c9e378d467..de0cf0fbc4 100644
@@ -26 +28 @@
-@@ -1566,6 +1566,10 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
+@@ -1561,6 +1561,10 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
@@ -37 +39 @@
-@@ -1612,11 +1616,6 @@ sec_fd_to_mbuf(const struct qbman_fd *fd)
+@@ -1607,11 +1611,6 @@ sec_fd_to_mbuf(const struct qbman_fd *fd)

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

* patch 'crypto/dpaa_sec: fix secondary process probing' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (16 preceding siblings ...)
  2022-06-21  8:01 ` patch 'crypto/dpaa2_sec: fix buffer pool ID check' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'crypto/dpaa2_sec: fix operation status for simple FD' " Xueming Li
                   ` (97 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Vanshika Shukla; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/45650937b46a7218fdd113942ef628dc91a0d8a3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 45650937b46a7218fdd113942ef628dc91a0d8a3 Mon Sep 17 00:00:00 2001
From: Vanshika Shukla <vanshika.shukla@nxp.com>
Date: Thu, 28 Apr 2022 17:17:27 +0530
Subject: [PATCH] crypto/dpaa_sec: fix secondary process probing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 96ec64f12db163b47c4a69613c7e7347919ff54f ]

DPAA hardware supports non-i/o performing secondary
applications only. So we do not have to probe crypto
devices in secondary applications.

Fixes: c3e85bdcc6e6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")

Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 9179cccf83..0ce99eecc7 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -3445,23 +3445,24 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
 
 	int retval;
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
 	snprintf(cryptodev_name, sizeof(cryptodev_name), "%s", dpaa_dev->name);
 
 	cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());
 	if (cryptodev == NULL)
 		return -ENOMEM;
 
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
-		cryptodev->data->dev_private = rte_zmalloc_socket(
-					"cryptodev private structure",
-					sizeof(struct dpaa_sec_dev_private),
-					RTE_CACHE_LINE_SIZE,
-					rte_socket_id());
+	cryptodev->data->dev_private = rte_zmalloc_socket(
+				"cryptodev private structure",
+				sizeof(struct dpaa_sec_dev_private),
+				RTE_CACHE_LINE_SIZE,
+				rte_socket_id());
 
-		if (cryptodev->data->dev_private == NULL)
-			rte_panic("Cannot allocate memzone for private "
-					"device data");
-	}
+	if (cryptodev->data->dev_private == NULL)
+		rte_panic("Cannot allocate memzone for private "
+				"device data");
 
 	dpaa_dev->crypto_dev = cryptodev;
 	cryptodev->device = &dpaa_dev->device;
@@ -3501,8 +3502,7 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
 	retval = -ENXIO;
 out:
 	/* In case of error, cleanup is done */
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-		rte_free(cryptodev->data->dev_private);
+	rte_free(cryptodev->data->dev_private);
 
 	rte_cryptodev_pmd_release_device(cryptodev);
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.114169075 +0800
+++ 0018-crypto-dpaa_sec-fix-secondary-process-probing.patch	2022-06-21 15:37:48.987784408 +0800
@@ -1 +1 @@
-From 96ec64f12db163b47c4a69613c7e7347919ff54f Mon Sep 17 00:00:00 2001
+From 45650937b46a7218fdd113942ef628dc91a0d8a3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 96ec64f12db163b47c4a69613c7e7347919ff54f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 23a94d7e41..6f2b4baf57 100644
+index 9179cccf83..0ce99eecc7 100644
@@ -23 +25 @@
-@@ -3766,23 +3766,24 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
+@@ -3445,23 +3445,24 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
@@ -58 +60 @@
-@@ -3824,8 +3825,7 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
+@@ -3501,8 +3502,7 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,

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

* patch 'crypto/dpaa2_sec: fix operation status for simple FD' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (17 preceding siblings ...)
  2022-06-21  8:01 ` patch 'crypto/dpaa_sec: fix secondary process probing' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'common/dpaax: fix short MAC-I IV calculation for ZUC' " Xueming Li
                   ` (96 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6b38d08f0c9e77acb5ff7d8550489e852f3318d7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6b38d08f0c9e77acb5ff7d8550489e852f3318d7 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Thu, 28 Apr 2022 17:17:30 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix operation status for simple FD
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 04408e461e9dde8c921c851e0ad1611b178ce630 ]

Driver is not filling the operation status on dequeue
in case the FD is simple.

So setting the status as per the results.

Fixes: 0a23d4b6f4c2 ("crypto/dpaa2_sec: support protocol offload IPsec")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index de0cf0fbc4..64ee56e7c9 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1583,6 +1583,14 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
 	else
 		mbuf->data_off += SEC_FLC_DHR_INBOUND;
 
+	if (unlikely(fd->simple.frc)) {
+		DPAA2_SEC_ERR("SEC returned Error - %x",
+				fd->simple.frc);
+		op->status = RTE_CRYPTO_OP_STATUS_ERROR;
+	} else {
+		op->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
+	}
+
 	return op;
 }
 #endif
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.159030844 +0800
+++ 0019-crypto-dpaa2_sec-fix-operation-status-for-simple-FD.patch	2022-06-21 15:37:48.991117753 +0800
@@ -1 +1 @@
-From 04408e461e9dde8c921c851e0ad1611b178ce630 Mon Sep 17 00:00:00 2001
+From 6b38d08f0c9e77acb5ff7d8550489e852f3318d7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 04408e461e9dde8c921c851e0ad1611b178ce630 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 9f2b384af9..8444f1a795 100644
+index de0cf0fbc4..64ee56e7c9 100644
@@ -24 +26 @@
-@@ -1591,6 +1591,14 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
+@@ -1583,6 +1583,14 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)

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

* patch 'common/dpaax: fix short MAC-I IV calculation for ZUC' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (18 preceding siblings ...)
  2022-06-21  8:01 ` patch 'crypto/dpaa2_sec: fix operation status for simple FD' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'examples/l2fwd-crypto: fix stats refresh rate' " Xueming Li
                   ` (95 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/25165ac2415b369d76ee05f4ea3e43ddda646ec9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 25165ac2415b369d76ee05f4ea3e43ddda646ec9 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Thu, 28 Apr 2022 17:17:33 +0530
Subject: [PATCH] common/dpaax: fix short MAC-I IV calculation for ZUC
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c54fb3f7f77fa919673966227fd8964dbfbb3781 ]

Fixing the IV calculation for ZUC based short MAC-I
as per the HW security engine guidelines.

Fixes: 73a24060cd70 ("crypto/dpaa2_sec: add sample PDCP descriptor APIs")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/common/dpaax/caamflib/desc/pdcp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 51d40b5dd9..6dd1122e15 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -3790,7 +3790,7 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,
 			return -ENOTSUP;
 		}
 		iv[0] = 0xFFFFFFFF;
-		iv[1] = swap ? swab32(0xFC000000) : 0xFC000000;
+		iv[1] = swab32(0xFC000000);
 		iv[2] = 0x00000000; /* unused */
 
 		KEY(p, KEY2, authdata->key_enc_flags, authdata->key,
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.204556318 +0800
+++ 0020-common-dpaax-fix-short-MAC-I-IV-calculation-for-ZUC.patch	2022-06-21 15:37:48.994451098 +0800
@@ -1 +1 @@
-From c54fb3f7f77fa919673966227fd8964dbfbb3781 Mon Sep 17 00:00:00 2001
+From 25165ac2415b369d76ee05f4ea3e43ddda646ec9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c54fb3f7f77fa919673966227fd8964dbfbb3781 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 46153b9c29..289ee2a7d5 100644
+index 51d40b5dd9..6dd1122e15 100644
@@ -22,3 +24,3 @@
-@@ -3066,7 +3066,7 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,
- 
- 	case PDCP_AUTH_TYPE_ZUC:
+@@ -3790,7 +3790,7 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,
+ 			return -ENOTSUP;
+ 		}

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

* patch 'examples/l2fwd-crypto: fix stats refresh rate' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (19 preceding siblings ...)
  2022-06-21  8:01 ` patch 'common/dpaax: fix short MAC-I IV calculation for ZUC' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'test/hash: report non HTM numbers for single thread' " Xueming Li
                   ` (94 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Matan Azrad, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c29b05c2168877a7045ea3d5ffedfcdcdbf212d5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c29b05c2168877a7045ea3d5ffedfcdcdbf212d5 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Thu, 7 Apr 2022 14:42:49 +0300
Subject: [PATCH] examples/l2fwd-crypto: fix stats refresh rate
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit af676be9e6671b25c69af2aa5fc2d40d562137f6 ]

TIMER_MILLISECOND is defined as the number of cpu cycles per millisecond,
current definition is correct for cores with frequency of 2GHZ, for cores
with different frequency, it caused different periods between refresh,
(i.e. the definition is about 14ms on ARM cores).
The devarg that stated the period between stats print was not used,
instead, it was always defaulted to 10 seconds (on 2GHZ core).

Use DPDK API to get CPU frequency, to define TIMER_MILLISECOND.
Use the refresh period devarg instead of defaulting to 10s always.

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/l2fwd-crypto/main.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index c1e26f5dd4..755a28f341 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -252,11 +252,9 @@ struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS];
 struct l2fwd_crypto_statistics crypto_statistics[RTE_CRYPTO_MAX_DEVS];
 
 /* A tsc-based timer responsible for triggering statistics printout */
-#define TIMER_MILLISECOND 2000000ULL /* around 1ms at 2 Ghz */
+#define TIMER_MILLISECOND (rte_get_tsc_hz() / 1000)
 #define MAX_TIMER_PERIOD 86400UL /* 1 day max */
-
-/* default period is 10 seconds */
-static int64_t timer_period = 10 * TIMER_MILLISECOND * 1000;
+#define DEFAULT_TIMER_PERIOD 10UL
 
 /* Print out statistics on packets dropped */
 static void
@@ -879,18 +877,17 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options)
 			}
 
 			/* if timer is enabled */
-			if (timer_period > 0) {
+			if (options->refresh_period > 0) {
 
 				/* advance the timer */
 				timer_tsc += diff_tsc;
 
 				/* if timer has reached its timeout */
 				if (unlikely(timer_tsc >=
-						(uint64_t)timer_period)) {
+						options->refresh_period)) {
 
 					/* do this only on main core */
-					if (lcore_id == rte_get_main_lcore()
-						&& options->refresh_period) {
+					if (lcore_id == rte_get_main_lcore()) {
 						print_stats();
 						timer_tsc = 0;
 					}
@@ -1451,7 +1448,8 @@ l2fwd_crypto_default_options(struct l2fwd_crypto_options *options)
 {
 	options->portmask = 0xffffffff;
 	options->nb_ports_per_lcore = 1;
-	options->refresh_period = 10000;
+	options->refresh_period = DEFAULT_TIMER_PERIOD *
+					TIMER_MILLISECOND * 1000;
 	options->single_lcore = 0;
 	options->sessionless = 0;
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.262673845 +0800
+++ 0021-examples-l2fwd-crypto-fix-stats-refresh-rate.patch	2022-06-21 15:37:48.994451098 +0800
@@ -1 +1 @@
-From af676be9e6671b25c69af2aa5fc2d40d562137f6 Mon Sep 17 00:00:00 2001
+From c29b05c2168877a7045ea3d5ffedfcdcdbf212d5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit af676be9e6671b25c69af2aa5fc2d40d562137f6 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index bbdb263143..b1e2613ccf 100644
+index c1e26f5dd4..755a28f341 100644
@@ -44 +46 @@
-@@ -894,18 +892,17 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options)
+@@ -879,18 +877,17 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options)
@@ -66 +68 @@
-@@ -1481,7 +1478,8 @@ l2fwd_crypto_default_options(struct l2fwd_crypto_options *options)
+@@ -1451,7 +1448,8 @@ l2fwd_crypto_default_options(struct l2fwd_crypto_options *options)

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

* patch 'test/hash: report non HTM numbers for single thread' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (20 preceding siblings ...)
  2022-06-21  8:01 ` patch 'examples/l2fwd-crypto: fix stats refresh rate' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/nfp: remove unneeded header inclusion' " Xueming Li
                   ` (93 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Stanislaw Kardach; +Cc: Yipeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/23bfe0031f9ef749bf66cb623de15396dbb586ef

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 23bfe0031f9ef749bf66cb623de15396dbb586ef Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Tue, 10 May 2022 13:57:34 +0200
Subject: [PATCH] test/hash: report non HTM numbers for single thread
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit af0892af4227802a184d111a86db82924c220979 ]

In hash_readwrite_perf_autotest a single read and write operation is
benchmarked for both HTM and non HTM cases. However the result summary
only shows the HTM value. Therefore add the non HTM value for
completeness.

Fixes: 0eb3726ebcf1 ("test/hash: add test for read/write concurrency")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
---
 app/test/test_hash_readwrite.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/test/test_hash_readwrite.c b/app/test/test_hash_readwrite.c
index 4860768a64..f40fec74dd 100644
--- a/app/test/test_hash_readwrite.c
+++ b/app/test/test_hash_readwrite.c
@@ -670,8 +670,12 @@ test_hash_rw_perf_main(void)
 	printf("Results summary:\n");
 	printf("================\n");
 
-	printf("single read: %u\n", htm_results.single_read);
-	printf("single write: %u\n", htm_results.single_write);
+	printf("HTM:\n");
+	printf("  single read: %u\n", htm_results.single_read);
+	printf("  single write: %u\n", htm_results.single_write);
+	printf("non HTM:\n");
+	printf("  single read: %u\n", non_htm_results.single_read);
+	printf("  single write: %u\n", non_htm_results.single_write);
 	for (i = 0; i < NUM_TEST; i++) {
 		printf("+++ core_cnt: %u +++\n", core_cnt[i]);
 		printf("HTM:\n");
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.336100868 +0800
+++ 0022-test-hash-report-non-HTM-numbers-for-single-thread.patch	2022-06-21 15:37:48.997784443 +0800
@@ -1 +1 @@
-From af0892af4227802a184d111a86db82924c220979 Mon Sep 17 00:00:00 2001
+From 23bfe0031f9ef749bf66cb623de15396dbb586ef Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit af0892af4227802a184d111a86db82924c220979 ]
@@ -20 +23 @@
-index 9b192f2b5e..6373e62d33 100644
+index 4860768a64..f40fec74dd 100644
@@ -23 +26 @@
-@@ -664,8 +664,12 @@ test_hash_rw_perf_main(void)
+@@ -670,8 +670,12 @@ test_hash_rw_perf_main(void)

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

* patch 'net/nfp: remove unneeded header inclusion' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (21 preceding siblings ...)
  2022-06-21  8:01 ` patch 'test/hash: report non HTM numbers for single thread' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bonding: fix RSS key config with extended key length' " Xueming Li
                   ` (92 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: David Marchand; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/72144a630e4b6b10691a4061b190fdc71f623ad2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 72144a630e4b6b10691a4061b190fdc71f623ad2 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 8 Apr 2022 11:41:16 +0200
Subject: [PATCH] net/nfp: remove unneeded header inclusion
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a866966bdf7080ad2bd18465dfd5585e1bc535d6 ]

Looking at this driver history, there was never a need for including
execinfo.h.

Fixes: bdbf45c24b07 ("net/nfp: fix build with musl libc")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
index 36725d69ab..69f6b165da 100644
--- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
+++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
@@ -16,9 +16,6 @@
 
 #include <assert.h>
 #include <stdio.h>
-#if defined(RTE_BACKTRACE)
-#include <execinfo.h>
-#endif
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdint.h>
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.385971977 +0800
+++ 0023-net-nfp-remove-unneeded-header-inclusion.patch	2022-06-21 15:37:48.997784443 +0800
@@ -1 +1 @@
-From a866966bdf7080ad2bd18465dfd5585e1bc535d6 Mon Sep 17 00:00:00 2001
+From 72144a630e4b6b10691a4061b190fdc71f623ad2 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a866966bdf7080ad2bd18465dfd5585e1bc535d6 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index bad80a5a1c..08bc4e8ef2 100644
+index 36725d69ab..69f6b165da 100644

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

* patch 'net/bonding: fix RSS key config with extended key length' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (22 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/nfp: remove unneeded header inclusion' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/cxgbe: fix port ID in Rx mbuf' " Xueming Li
                   ` (91 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5e7c16ee766246345f034695536598baa0b0c739

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5e7c16ee766246345f034695536598baa0b0c739 Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Mon, 11 Apr 2022 05:40:03 +0000
Subject: [PATCH] net/bonding: fix RSS key config with extended key length
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 94d9c7d45b43fd44af718b621fa52e556028aa3d ]

When creating a bonding device, if the slave device's
RSS key length = standard_rss_key length + extended_hash_key length,
then bonding device will be same as slave,
in function bond_ethdev_configure(), the default_rss_key length is 40,
it is not matched, so it should calculate a new key for bonding device
if the default key could not be used.

Fixes: 6b1a001ec546 ("net/bonding: fix RSS key length")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index d7bc0f0875..5fc759d3e8 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3597,13 +3597,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 			       internals->rss_key_len);
 		} else {
 			if (internals->rss_key_len > sizeof(default_rss_key)) {
-				RTE_BOND_LOG(ERR,
-				       "There is no suitable default hash key");
-				return -EINVAL;
+				/*
+				 * If the rss_key includes standard_rss_key and
+				 * extended_hash_key, the rss key length will be
+				 * larger than default rss key length, so it should
+				 * re-calculate the hash key.
+				 */
+				for (i = 0; i < internals->rss_key_len; i++)
+					internals->rss_key[i] = (uint8_t)rte_rand();
+			} else {
+				memcpy(internals->rss_key, default_rss_key,
+					internals->rss_key_len);
 			}
-
-			memcpy(internals->rss_key, default_rss_key,
-			       internals->rss_key_len);
 		}
 
 		for (i = 0; i < RTE_DIM(internals->reta_conf); i++) {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.431908924 +0800
+++ 0024-net-bonding-fix-RSS-key-config-with-extended-key-len.patch	2022-06-21 15:37:49.001117789 +0800
@@ -1 +1 @@
-From 94d9c7d45b43fd44af718b621fa52e556028aa3d Mon Sep 17 00:00:00 2001
+From 5e7c16ee766246345f034695536598baa0b0c739 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 94d9c7d45b43fd44af718b621fa52e556028aa3d ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index b305b6a35b..5cbe89031b 100644
+index d7bc0f0875..5fc759d3e8 100644
@@ -26 +28 @@
-@@ -3617,13 +3617,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3597,13 +3597,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev)

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

* patch 'net/cxgbe: fix port ID in Rx mbuf' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (23 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bonding: fix RSS key config with extended key length' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/cxgbe: fix Tx queue stuck with mbuf chain coalescing' " Xueming Li
                   ` (90 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/063ce7b91c245bf132d4d4f86c3175724e37fde6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 063ce7b91c245bf132d4d4f86c3175724e37fde6 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Tue, 19 Apr 2022 03:54:18 +0530
Subject: [PATCH] net/cxgbe: fix port ID in Rx mbuf
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 86b4d566467d06c66dd5ed2474e12bb17d8861f2 ]

Fill the correct DPDK ethdev port_id, instead of local adapter
physical port_id in mbufs allocated for Rx.

Fixes: 78fc1a716ae8 ("cxgbe: improve Rx performance")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/sge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index e76e5a97f0..c18ea7c248 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -1913,7 +1913,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
 	iq->stat = (void *)&iq->desc[iq->size * 8];
 	iq->eth_dev = eth_dev;
 	iq->handler = hnd;
-	iq->port_id = pi->pidx;
+	iq->port_id = eth_dev->data->port_id;
 	iq->mb_pool = mp;
 
 	/* set offset to -1 to distinguish ingress queues without FL */
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.479105778 +0800
+++ 0025-net-cxgbe-fix-port-ID-in-Rx-mbuf.patch	2022-06-21 15:37:49.001117789 +0800
@@ -1 +1 @@
-From 86b4d566467d06c66dd5ed2474e12bb17d8861f2 Mon Sep 17 00:00:00 2001
+From 063ce7b91c245bf132d4d4f86c3175724e37fde6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 86b4d566467d06c66dd5ed2474e12bb17d8861f2 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 1c76b8e4d0..5c176004f9 100644
+index e76e5a97f0..c18ea7c248 100644
@@ -21 +23 @@
-@@ -1910,7 +1910,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
+@@ -1913,7 +1913,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,

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

* patch 'net/cxgbe: fix Tx queue stuck with mbuf chain coalescing' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (24 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/cxgbe: fix port ID in Rx mbuf' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/vhost: fix access to freed memory' " Xueming Li
                   ` (89 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/730c2afc40bc64bb590c545b0221dfb94fef0425

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 730c2afc40bc64bb590c545b0221dfb94fef0425 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Tue, 19 Apr 2022 03:54:19 +0530
Subject: [PATCH] net/cxgbe: fix Tx queue stuck with mbuf chain coalescing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 151e828f6427667faf3fdfaa00d14a65c7f57cd6 ]

When trying to coalesce mbufs with chain on Tx side, it is possible
to get stuck during queue wrap around. When coalescing this mbuf
chain fails, the Tx path returns EBUSY and when the same packet
is retried again, it couldn't get coalesced again, and the loop
repeats. Fix by pushing the packet through the normal Tx path.
Also use FW_ETH_TX_PKTS_WR to handle mbufs with chain for FW
to optimize.

Fixes: 6c2809628cd5 ("net/cxgbe: improve latency for slow traffic")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/sge.c | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)

diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index c18ea7c248..0998864269 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -793,9 +793,9 @@ static inline void txq_advance(struct sge_txq *q, unsigned int n)
 
 #define MAX_COALESCE_LEN 64000
 
-static inline int wraps_around(struct sge_txq *q, int ndesc)
+static inline bool wraps_around(struct sge_txq *q, int ndesc)
 {
-	return (q->pidx + ndesc) > q->size ? 1 : 0;
+	return (q->pidx + ndesc) > q->size ? true : false;
 }
 
 static void tx_timer_cb(void *data)
@@ -846,7 +846,6 @@ static inline void ship_tx_pkt_coalesce_wr(struct adapter *adap,
 
 	/* fill the pkts WR header */
 	wr = (void *)&q->desc[q->pidx];
-	wr->op_pkd = htonl(V_FW_WR_OP(FW_ETH_TX_PKTS2_WR));
 	vmwr = (void *)&q->desc[q->pidx];
 
 	wr_mid = V_FW_WR_LEN16(DIV_ROUND_UP(q->coalesce.flits, 2));
@@ -856,8 +855,11 @@ static inline void ship_tx_pkt_coalesce_wr(struct adapter *adap,
 	wr->npkt = q->coalesce.idx;
 	wr->r3 = 0;
 	if (is_pf4(adap)) {
-		wr->op_pkd = htonl(V_FW_WR_OP(FW_ETH_TX_PKTS2_WR));
 		wr->type = q->coalesce.type;
+		if (likely(wr->type != 0))
+			wr->op_pkd = htonl(V_FW_WR_OP(FW_ETH_TX_PKTS2_WR));
+		else
+			wr->op_pkd = htonl(V_FW_WR_OP(FW_ETH_TX_PKTS_WR));
 	} else {
 		wr->op_pkd = htonl(V_FW_WR_OP(FW_ETH_TX_PKTS_VM_WR));
 		vmwr->r4 = 0;
@@ -936,13 +938,16 @@ static inline int should_tx_packet_coalesce(struct sge_eth_txq *txq,
 		ndesc = DIV_ROUND_UP(q->coalesce.flits + flits, 8);
 		credits = txq_avail(q) - ndesc;
 
+		if (unlikely(wraps_around(q, ndesc)))
+			return 0;
+
 		/* If we are wrapping or this is last mbuf then, send the
 		 * already coalesced mbufs and let the non-coalesce pass
 		 * handle the mbuf.
 		 */
-		if (unlikely(credits < 0 || wraps_around(q, ndesc))) {
+		if (unlikely(credits < 0)) {
 			ship_tx_pkt_coalesce_wr(adap, txq);
-			return 0;
+			return -EBUSY;
 		}
 
 		/* If the max coalesce len or the max WR len is reached
@@ -966,8 +971,12 @@ new:
 	ndesc = flits_to_desc(q->coalesce.flits + flits);
 	credits = txq_avail(q) - ndesc;
 
-	if (unlikely(credits < 0 || wraps_around(q, ndesc)))
+	if (unlikely(wraps_around(q, ndesc)))
 		return 0;
+
+	if (unlikely(credits < 0))
+		return -EBUSY;
+
 	q->coalesce.flits += wr_size / sizeof(__be64);
 	q->coalesce.type = type;
 	q->coalesce.ptr = (unsigned char *)&q->desc[q->pidx] +
@@ -1110,7 +1119,7 @@ int t4_eth_xmit(struct sge_eth_txq *txq, struct rte_mbuf *mbuf,
 	unsigned int flits, ndesc, cflits;
 	int l3hdr_len, l4hdr_len, eth_xtra_len;
 	int len, last_desc;
-	int credits;
+	int should_coal, credits;
 	u32 wr_mid;
 	u64 cntrl, *end;
 	bool v6;
@@ -1141,9 +1150,9 @@ out_free:
 	/* align the end of coalesce WR to a 512 byte boundary */
 	txq->q.coalesce.max = (8 - (txq->q.pidx & 7)) * 8;
 
-	if (!((m->ol_flags & PKT_TX_TCP_SEG) ||
-			m->pkt_len > RTE_ETHER_MAX_LEN)) {
-		if (should_tx_packet_coalesce(txq, mbuf, &cflits, adap)) {
+	if ((m->ol_flags & PKT_TX_TCP_SEG) == 0) {
+		should_coal = should_tx_packet_coalesce(txq, mbuf, &cflits, adap);
+		if (should_coal > 0) {
 			if (unlikely(map_mbuf(mbuf, addr) < 0)) {
 				dev_warn(adap, "%s: mapping err for coalesce\n",
 					 __func__);
@@ -1152,8 +1161,8 @@ out_free:
 			}
 			return tx_do_packet_coalesce(txq, mbuf, cflits, adap,
 						     pi, addr, nb_pkts);
-		} else {
-			return -EBUSY;
+		} else if (should_coal < 0) {
+			return should_coal;
 		}
 	}
 
@@ -1200,8 +1209,7 @@ out_free:
 		end = (u64 *)vmwr + flits;
 	}
 
-	len = 0;
-	len += sizeof(*cpl);
+	len = sizeof(*cpl);
 
 	/* Coalescing skipped and we send through normal path */
 	if (!(m->ol_flags & PKT_TX_TCP_SEG)) {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.523416752 +0800
+++ 0026-net-cxgbe-fix-Tx-queue-stuck-with-mbuf-chain-coalesc.patch	2022-06-21 15:37:49.004451134 +0800
@@ -1 +1 @@
-From 151e828f6427667faf3fdfaa00d14a65c7f57cd6 Mon Sep 17 00:00:00 2001
+From 730c2afc40bc64bb590c545b0221dfb94fef0425 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 151e828f6427667faf3fdfaa00d14a65c7f57cd6 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 5c176004f9..566cd48406 100644
+index c18ea7c248..0998864269 100644
@@ -26 +28 @@
-@@ -789,9 +789,9 @@ static inline void txq_advance(struct sge_txq *q, unsigned int n)
+@@ -793,9 +793,9 @@ static inline void txq_advance(struct sge_txq *q, unsigned int n)
@@ -38 +40 @@
-@@ -842,7 +842,6 @@ static inline void ship_tx_pkt_coalesce_wr(struct adapter *adap,
+@@ -846,7 +846,6 @@ static inline void ship_tx_pkt_coalesce_wr(struct adapter *adap,
@@ -46 +48 @@
-@@ -852,8 +851,11 @@ static inline void ship_tx_pkt_coalesce_wr(struct adapter *adap,
+@@ -856,8 +855,11 @@ static inline void ship_tx_pkt_coalesce_wr(struct adapter *adap,
@@ -59 +61 @@
-@@ -932,13 +934,16 @@ static inline int should_tx_packet_coalesce(struct sge_eth_txq *txq,
+@@ -936,13 +938,16 @@ static inline int should_tx_packet_coalesce(struct sge_eth_txq *txq,
@@ -78 +80 @@
-@@ -962,8 +967,12 @@ new:
+@@ -966,8 +971,12 @@ new:
@@ -92 +94 @@
-@@ -1106,7 +1115,7 @@ int t4_eth_xmit(struct sge_eth_txq *txq, struct rte_mbuf *mbuf,
+@@ -1110,7 +1119,7 @@ int t4_eth_xmit(struct sge_eth_txq *txq, struct rte_mbuf *mbuf,
@@ -101 +103 @@
-@@ -1138,9 +1147,9 @@ out_free:
+@@ -1141,9 +1150,9 @@ out_free:
@@ -105 +107 @@
--	if (!((m->ol_flags & RTE_MBUF_F_TX_TCP_SEG) ||
+-	if (!((m->ol_flags & PKT_TX_TCP_SEG) ||
@@ -108 +110 @@
-+	if ((m->ol_flags & RTE_MBUF_F_TX_TCP_SEG) == 0) {
++	if ((m->ol_flags & PKT_TX_TCP_SEG) == 0) {
@@ -114 +116 @@
-@@ -1149,8 +1158,8 @@ out_free:
+@@ -1152,8 +1161,8 @@ out_free:
@@ -125 +127 @@
-@@ -1197,8 +1206,7 @@ out_free:
+@@ -1200,8 +1209,7 @@ out_free:
@@ -134 +136 @@
- 	if (!(m->ol_flags & RTE_MBUF_F_TX_TCP_SEG)) {
+ 	if (!(m->ol_flags & PKT_TX_TCP_SEG)) {

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

* patch 'net/vhost: fix access to freed memory' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (25 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/cxgbe: fix Tx queue stuck with mbuf chain coalescing' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/virtio: restore some optimisations with AVX512' " Xueming Li
                   ` (88 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Yuan Wang; +Cc: Wei Ling, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e4729f10d06291d8ab915e316bea1f0330ee656e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e4729f10d06291d8ab915e316bea1f0330ee656e Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Sat, 12 Mar 2022 00:35:12 +0800
Subject: [PATCH] net/vhost: fix access to freed memory
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9dc6bb06824f3c5887f0436ddba5ab9116cb277e ]

This patch fixes heap-use-after-free reported by ASan.

It is possible for the rte_vhost_dequeue_burst() to access the vq
is freed when numa_realloc() gets called in the device running state.
The control plane will set the vq->access_lock to protected the vq
from the data plane. Unfortunately the lock will fail at the moment
the vq is freed, allowing the rte_vhost_dequeue_burst() to access
the fields of the vq, which will trigger a heap-use-after-free error.

In the case of multiple queues, the vhost pmd can access other queues
that are not ready when the first queue is ready, which makes no sense
and also allows numa_realloc() and rte_vhost_dequeue_burst() access to
vq to happen at the same time. By controlling vq->allow_queuing we can make
the pmd access only the queues that are ready.

Fixes: 1ce3c7fe149 ("net/vhost: emulate device start/stop behavior")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 5845bb15f3..0778dfbd13 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -719,6 +719,7 @@ update_queuing_status(struct rte_eth_dev *dev)
 {
 	struct pmd_internal *internal = dev->data->dev_private;
 	struct vhost_queue *vq;
+	struct rte_vhost_vring_state *state;
 	unsigned int i;
 	int allow_queuing = 1;
 
@@ -729,12 +730,17 @@ update_queuing_status(struct rte_eth_dev *dev)
 	    rte_atomic32_read(&internal->dev_attached) == 0)
 		allow_queuing = 0;
 
+	state = vring_states[dev->data->port_id];
+
 	/* Wait until rx/tx_pkt_burst stops accessing vhost device */
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
 		vq = dev->data->rx_queues[i];
 		if (vq == NULL)
 			continue;
-		rte_atomic32_set(&vq->allow_queuing, allow_queuing);
+		if (allow_queuing && state->cur[vq->virtqueue_id])
+			rte_atomic32_set(&vq->allow_queuing, 1);
+		else
+			rte_atomic32_set(&vq->allow_queuing, 0);
 		while (rte_atomic32_read(&vq->while_queuing))
 			rte_pause();
 	}
@@ -743,7 +749,10 @@ update_queuing_status(struct rte_eth_dev *dev)
 		vq = dev->data->tx_queues[i];
 		if (vq == NULL)
 			continue;
-		rte_atomic32_set(&vq->allow_queuing, allow_queuing);
+		if (allow_queuing && state->cur[vq->virtqueue_id])
+			rte_atomic32_set(&vq->allow_queuing, 1);
+		else
+			rte_atomic32_set(&vq->allow_queuing, 0);
 		while (rte_atomic32_read(&vq->while_queuing))
 			rte_pause();
 	}
@@ -963,6 +972,8 @@ vring_state_changed(int vid, uint16_t vring, int enable)
 	state->max_vring = RTE_MAX(vring, state->max_vring);
 	rte_spinlock_unlock(&state->lock);
 
+	update_queuing_status(eth_dev);
+
 	VHOST_LOG(INFO, "vring%u is %s\n",
 			vring, enable ? "enabled" : "disabled");
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.567724958 +0800
+++ 0027-net-vhost-fix-access-to-freed-memory.patch	2022-06-21 15:37:49.004451134 +0800
@@ -1 +1 @@
-From 9dc6bb06824f3c5887f0436ddba5ab9116cb277e Mon Sep 17 00:00:00 2001
+From e4729f10d06291d8ab915e316bea1f0330ee656e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9dc6bb06824f3c5887f0436ddba5ab9116cb277e ]
@@ -31 +34 @@
-index 070f0e6dfd..8a6595504a 100644
+index 5845bb15f3..0778dfbd13 100644
@@ -34 +37 @@
-@@ -720,6 +720,7 @@ update_queuing_status(struct rte_eth_dev *dev)
+@@ -719,6 +719,7 @@ update_queuing_status(struct rte_eth_dev *dev)
@@ -42 +45 @@
-@@ -730,12 +731,17 @@ update_queuing_status(struct rte_eth_dev *dev)
+@@ -729,12 +730,17 @@ update_queuing_status(struct rte_eth_dev *dev)
@@ -61 +64 @@
-@@ -744,7 +750,10 @@ update_queuing_status(struct rte_eth_dev *dev)
+@@ -743,7 +749,10 @@ update_queuing_status(struct rte_eth_dev *dev)
@@ -73 +76 @@
-@@ -967,6 +976,8 @@ vring_state_changed(int vid, uint16_t vring, int enable)
+@@ -963,6 +972,8 @@ vring_state_changed(int vid, uint16_t vring, int enable)

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

* patch 'net/virtio: restore some optimisations with AVX512' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (26 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/vhost: fix access to freed memory' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/vhost: fix TSO feature default disablement' " Xueming Li
                   ` (87 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: David Marchand; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/15d4339cfd9888fca7629a8f231d23805d9c287f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 15d4339cfd9888fca7629a8f231d23805d9c287f Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 11 Apr 2022 17:04:20 +0200
Subject: [PATCH] net/virtio: restore some optimisations with AVX512
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 86ce14412286fe19dcaf2fc19856be70fe27a090 ]

Those optimisations were only enabled with make builds, fix the meson
part.

Fixes: 77d66da83834 ("net/virtio: add vectorized packed ring Rx")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/meson.build | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build
index 59073fa336..eff90489a2 100644
--- a/drivers/net/virtio/meson.build
+++ b/drivers/net/virtio/meson.build
@@ -20,11 +20,11 @@ if arch_subdir == 'x86'
 					      c_args: [cflags, '-mavx512f', '-mavx512bw', '-mavx512vl'])
 			objs += virtio_avx512_lib.extract_objects('virtio_rxtx_packed_avx.c')
 			if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
-				cflags += '-DVHOST_GCC_UNROLL_PRAGMA'
+				cflags += '-DVIRTIO_GCC_UNROLL_PRAGMA'
 			elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0'))
-				cflags += '-DVHOST_CLANG_UNROLL_PRAGMA'
+				cflags += '-DVIRTIO_CLANG_UNROLL_PRAGMA'
 			elif (toolchain == 'icc' and cc.version().version_compare('>=16.0.0'))
-				cflags += '-DVHOST_ICC_UNROLL_PRAGMA'
+				cflags += '-DVIRTIO_ICC_UNROLL_PRAGMA'
 			endif
 		endif
 	endif
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.612677109 +0800
+++ 0028-net-virtio-restore-some-optimisations-with-AVX512.patch	2022-06-21 15:37:49.004451134 +0800
@@ -1 +1 @@
-From 86ce14412286fe19dcaf2fc19856be70fe27a090 Mon Sep 17 00:00:00 2001
+From 15d4339cfd9888fca7629a8f231d23805d9c287f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 86ce14412286fe19dcaf2fc19856be70fe27a090 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 01a333ada2..d78b8278c6 100644
+index 59073fa336..eff90489a2 100644
@@ -22,15 +24,15 @@
-@@ -30,11 +30,11 @@ if arch_subdir == 'x86'
-                           c_args: [cflags, '-mavx512f', '-mavx512bw', '-mavx512vl'])
-             objs += virtio_avx512_lib.extract_objects('virtio_rxtx_packed.c')
-             if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
--                cflags += '-DVHOST_GCC_UNROLL_PRAGMA'
-+                cflags += '-DVIRTIO_GCC_UNROLL_PRAGMA'
-             elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0'))
--                cflags += '-DVHOST_CLANG_UNROLL_PRAGMA'
-+                cflags += '-DVIRTIO_CLANG_UNROLL_PRAGMA'
-             elif (toolchain == 'icc' and cc.version().version_compare('>=16.0.0'))
--                cflags += '-DVHOST_ICC_UNROLL_PRAGMA'
-+                cflags += '-DVIRTIO_ICC_UNROLL_PRAGMA'
-             endif
-         endif
-     endif
+@@ -20,11 +20,11 @@ if arch_subdir == 'x86'
+ 					      c_args: [cflags, '-mavx512f', '-mavx512bw', '-mavx512vl'])
+ 			objs += virtio_avx512_lib.extract_objects('virtio_rxtx_packed_avx.c')
+ 			if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
+-				cflags += '-DVHOST_GCC_UNROLL_PRAGMA'
++				cflags += '-DVIRTIO_GCC_UNROLL_PRAGMA'
+ 			elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0'))
+-				cflags += '-DVHOST_CLANG_UNROLL_PRAGMA'
++				cflags += '-DVIRTIO_CLANG_UNROLL_PRAGMA'
+ 			elif (toolchain == 'icc' and cc.version().version_compare('>=16.0.0'))
+-				cflags += '-DVHOST_ICC_UNROLL_PRAGMA'
++				cflags += '-DVIRTIO_ICC_UNROLL_PRAGMA'
+ 			endif
+ 		endif
+ 	endif

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

* patch 'net/vhost: fix TSO feature default disablement' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (27 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/virtio: restore some optimisations with AVX512' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'vhost: fix missing virtqueue lock protection' " Xueming Li
                   ` (86 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/45f14afcf9b88b23c9aed9c42c103713438e6e7b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 45f14afcf9b88b23c9aed9c42c103713438e6e7b Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 22 Apr 2022 11:35:43 +0200
Subject: [PATCH] net/vhost: fix TSO feature default disablement
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6d7046215a3da334bac77d2b06e5ae1c208f3ca4 ]

By default, TSO feature should be disabled because it requires
application's support to be functional as mentioned in the
documentation.

However, if "tso" devarg was not specified, the feature did
not get disabled.

This patch fixes this issue, so that TSO is disabled, even if
"tso=0" is not passed as devarg.

Fixes: e289400669d5 ("net/vhost: support TSO disabling")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 0778dfbd13..2df516ec21 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1604,11 +1604,11 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
 				&open_int, &tso);
 		if (ret < 0)
 			goto out_free;
+	}
 
-		if (tso == 0) {
-			disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO4);
-			disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO6);
-		}
+	if (tso == 0) {
+		disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO4);
+		disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO6);
 	}
 
 	if (rte_kvargs_count(kvlist, ETH_VHOST_LINEAR_BUF) == 1) {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.655500148 +0800
+++ 0029-net-vhost-fix-TSO-feature-default-disablement.patch	2022-06-21 15:37:49.007784479 +0800
@@ -1 +1 @@
-From 6d7046215a3da334bac77d2b06e5ae1c208f3ca4 Mon Sep 17 00:00:00 2001
+From 45f14afcf9b88b23c9aed9c42c103713438e6e7b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6d7046215a3da334bac77d2b06e5ae1c208f3ca4 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 8a6595504a..a248a65df4 100644
+index 0778dfbd13..2df516ec21 100644
@@ -29 +31 @@
-@@ -1654,11 +1654,11 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
+@@ -1604,11 +1604,11 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)

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

* patch 'vhost: fix missing virtqueue lock protection' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (28 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/vhost: fix TSO feature default disablement' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'vdpa/mlx5: fix interrupt trash that leads to crash' " Xueming Li
                   ` (85 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3763af6f3ee69851064034bb9c052893a2f9cdd5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3763af6f3ee69851064034bb9c052893a2f9cdd5 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 24 Mar 2022 13:46:34 +0100
Subject: [PATCH] vhost: fix missing virtqueue lock protection
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c5736998305def298e26f8fa73b9995f184fc983 ]

This patch ensures virtqueue metadata are not being
modified while rte_vhost_vring_call() is executed.

Fixes: 6c299bb7322f ("vhost: introduce vring call API")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_vhost/vhost.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 1a7c240492..e76929d81b 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -1265,11 +1265,15 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)
 	if (!vq)
 		return -1;
 
+	rte_spinlock_lock(&vq->access_lock);
+
 	if (vq_is_packed(dev))
 		vhost_vring_call_packed(dev, vq);
 	else
 		vhost_vring_call_split(dev, vq);
 
+	rte_spinlock_unlock(&vq->access_lock);
+
 	return 0;
 }
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.698252861 +0800
+++ 0030-vhost-fix-missing-virtqueue-lock-protection.patch	2022-06-21 15:37:49.007784479 +0800
@@ -1 +1 @@
-From c5736998305def298e26f8fa73b9995f184fc983 Mon Sep 17 00:00:00 2001
+From 3763af6f3ee69851064034bb9c052893a2f9cdd5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c5736998305def298e26f8fa73b9995f184fc983 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -15 +17 @@
- lib/vhost/vhost.c | 4 ++++
+ lib/librte_vhost/vhost.c | 4 ++++
@@ -18,5 +20,5 @@
-diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
-index cf4bac277a..df0bb9d043 100644
---- a/lib/vhost/vhost.c
-+++ b/lib/vhost/vhost.c
-@@ -1291,11 +1291,15 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)
+diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
+index 1a7c240492..e76929d81b 100644
+--- a/lib/librte_vhost/vhost.c
++++ b/lib/librte_vhost/vhost.c
+@@ -1265,11 +1265,15 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)

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

* patch 'vdpa/mlx5: fix interrupt trash that leads to crash' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (29 preceding siblings ...)
  2022-06-21  8:01 ` patch 'vhost: fix missing virtqueue lock protection' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'vdpa/mlx5: fix dead loop when process interrupted' " Xueming Li
                   ` (84 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Xueming Li; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e8971ff299aa5167879e6c995b6da935e62194ee

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e8971ff299aa5167879e6c995b6da935e62194ee Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Sun, 8 May 2022 17:25:48 +0300
Subject: [PATCH] vdpa/mlx5: fix interrupt trash that leads to crash
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 66a439c5d7c166347adc799fcc928058e16ac23d ]

Disable interrupt unregister timeout to avoid invalid FD caused
interrupt thread segment fault.

Fixes: 62c813706e41 ("vdpa/mlx5: map doorbell")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index 3d19cf5edb..c8c615054a 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -17,7 +17,7 @@
 
 
 static void
-mlx5_vdpa_virtq_handler(void *cb_arg)
+mlx5_vdpa_virtq_kick_handler(void *cb_arg)
 {
 	struct mlx5_vdpa_virtq *virtq = cb_arg;
 	struct mlx5_vdpa_priv *priv = virtq->priv;
@@ -55,19 +55,16 @@ static int
 mlx5_vdpa_virtq_unset(struct mlx5_vdpa_virtq *virtq)
 {
 	unsigned int i;
-	int retries = MLX5_VDPA_INTR_RETRIES;
 	int ret = -EAGAIN;
 
-	if (virtq->intr_handle.fd != -1) {
-		while (retries-- && ret == -EAGAIN) {
+	if (virtq->intr_handle.fd >= 0) {
+		while (ret == -EAGAIN) {
 			ret = rte_intr_callback_unregister(&virtq->intr_handle,
-							mlx5_vdpa_virtq_handler,
-							virtq);
+					mlx5_vdpa_virtq_kick_handler, virtq);
 			if (ret == -EAGAIN) {
-				DRV_LOG(DEBUG, "Try again to unregister fd %d "
-					"of virtq %d interrupt, retries = %d.",
+				DRV_LOG(DEBUG, "Try again to unregister fd %d of virtq %hu interrupt",
 					virtq->intr_handle.fd,
-					(int)virtq->index, retries);
+					virtq->index);
 				usleep(MLX5_VDPA_INTR_RETRIES_USEC);
 			}
 		}
@@ -340,7 +337,7 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)
 	} else {
 		virtq->intr_handle.type = RTE_INTR_HANDLE_EXT;
 		if (rte_intr_callback_register(&virtq->intr_handle,
-					       mlx5_vdpa_virtq_handler,
+					       mlx5_vdpa_virtq_kick_handler,
 					       virtq)) {
 			virtq->intr_handle.fd = -1;
 			DRV_LOG(ERR, "Failed to register virtq %d interrupt.",
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.740757735 +0800
+++ 0031-vdpa-mlx5-fix-interrupt-trash-that-leads-to-crash.patch	2022-06-21 15:37:49.007784479 +0800
@@ -1 +1 @@
-From 66a439c5d7c166347adc799fcc928058e16ac23d Mon Sep 17 00:00:00 2001
+From e8971ff299aa5167879e6c995b6da935e62194ee Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 66a439c5d7c166347adc799fcc928058e16ac23d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +17,2 @@
- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 20 ++++++++------------
- 1 file changed, 8 insertions(+), 12 deletions(-)
+ drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 17 +++++++----------
+ 1 file changed, 7 insertions(+), 10 deletions(-)
@@ -19 +21 @@
-index 3416797d28..2e517beda2 100644
+index 3d19cf5edb..c8c615054a 100644
@@ -31 +33 @@
-@@ -59,20 +59,16 @@ static int
+@@ -55,19 +55,16 @@ static int
@@ -38 +40 @@
--	if (rte_intr_fd_get(virtq->intr_handle) != -1) {
+-	if (virtq->intr_handle.fd != -1) {
@@ -40 +42 @@
-+	if (rte_intr_fd_get(virtq->intr_handle) >= 0) {
++	if (virtq->intr_handle.fd >= 0) {
@@ -42 +44 @@
- 			ret = rte_intr_callback_unregister(virtq->intr_handle,
+ 			ret = rte_intr_callback_unregister(&virtq->intr_handle,
@@ -48,4 +50 @@
--				"of virtq %d interrupt, retries = %d.",
--				rte_intr_fd_get(virtq->intr_handle),
--				(int)virtq->index, retries);
--
+-					"of virtq %d interrupt, retries = %d.",
@@ -53 +52,2 @@
-+					rte_intr_fd_get(virtq->intr_handle),
+ 					virtq->intr_handle.fd,
+-					(int)virtq->index, retries);
@@ -58,4 +58,4 @@
-@@ -359,7 +355,7 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)
- 			goto error;
- 
- 		if (rte_intr_callback_register(virtq->intr_handle,
+@@ -340,7 +337,7 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)
+ 	} else {
+ 		virtq->intr_handle.type = RTE_INTR_HANDLE_EXT;
+ 		if (rte_intr_callback_register(&virtq->intr_handle,
@@ -65 +65 @@
- 			rte_intr_fd_set(virtq->intr_handle, -1);
+ 			virtq->intr_handle.fd = -1;

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

* patch 'vdpa/mlx5: fix dead loop when process interrupted' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (30 preceding siblings ...)
  2022-06-21  8:01 ` patch 'vdpa/mlx5: fix interrupt trash that leads to crash' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/dpaa: fix event queue detach' " Xueming Li
                   ` (83 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Xueming Li; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6111eb8b88a84f181d9c70e5de22a82df355d2f1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6111eb8b88a84f181d9c70e5de22a82df355d2f1 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Sun, 8 May 2022 17:25:49 +0300
Subject: [PATCH] vdpa/mlx5: fix dead loop when process interrupted
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 301ef4a18586ae1763206d7e75d9eddb58a7d05e ]

In Ctrl+C handling, sometimes kick handling thread gets endless EGAIN
error and fall into dead lock.

Kick happens frequently in real system due to busy traffic or retry
mechanism. This patch simplifies kick firmware anyway and skip setting
hardware notifier due to potential device error, notifier could be set
in next successful kick request.

Fixes: 62c813706e41 ("vdpa/mlx5: map doorbell")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index c8c615054a..0d31e1d957 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -23,8 +23,9 @@ mlx5_vdpa_virtq_kick_handler(void *cb_arg)
 	struct mlx5_vdpa_priv *priv = virtq->priv;
 	uint64_t buf;
 	int nbytes;
+	int retry;
 
-	do {
+	for (retry = 0; retry < 3; ++retry) {
 		nbytes = read(virtq->intr_handle.fd, &buf, 8);
 		if (nbytes < 0) {
 			if (errno == EINTR ||
@@ -35,7 +36,9 @@ mlx5_vdpa_virtq_kick_handler(void *cb_arg)
 				virtq->index, strerror(errno));
 		}
 		break;
-	} while (1);
+	}
+	if (nbytes < 0)
+		return;
 	rte_write32(virtq->index, priv->virtq_db_addr);
 	if (virtq->notifier_state == MLX5_VDPA_NOTIFIER_STATE_DISABLED) {
 		if (rte_vhost_host_notifier_ctrl(priv->vid, virtq->index, true))
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.782973610 +0800
+++ 0032-vdpa-mlx5-fix-dead-loop-when-process-interrupted.patch	2022-06-21 15:37:49.007784479 +0800
@@ -1 +1 @@
-From 301ef4a18586ae1763206d7e75d9eddb58a7d05e Mon Sep 17 00:00:00 2001
+From 6111eb8b88a84f181d9c70e5de22a82df355d2f1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 301ef4a18586ae1763206d7e75d9eddb58a7d05e ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -20,2 +22,2 @@
- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
+ drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
@@ -24 +26 @@
-index 2e517beda2..2696d54b41 100644
+index c8c615054a..0d31e1d957 100644
@@ -27 +29 @@
-@@ -23,11 +23,11 @@ mlx5_vdpa_virtq_kick_handler(void *cb_arg)
+@@ -23,8 +23,9 @@ mlx5_vdpa_virtq_kick_handler(void *cb_arg)
@@ -33,3 +34,0 @@
- 	if (rte_intr_fd_get(virtq->intr_handle) < 0)
- 		return;
--
@@ -38,2 +37 @@
- 		nbytes = read(rte_intr_fd_get(virtq->intr_handle), &buf,
- 			      8);
+ 		nbytes = read(virtq->intr_handle.fd, &buf, 8);
@@ -41 +39,2 @@
-@@ -39,7 +39,9 @@ mlx5_vdpa_virtq_kick_handler(void *cb_arg)
+ 			if (errno == EINTR ||
+@@ -35,7 +36,9 @@ mlx5_vdpa_virtq_kick_handler(void *cb_arg)

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

* patch 'net/dpaa: fix event queue detach' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (31 preceding siblings ...)
  2022-06-21  8:01 ` patch 'vdpa/mlx5: fix dead loop when process interrupted' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'doc: update matching versions in ice guide' " Xueming Li
                   ` (82 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ad18b9f42d753edbf03371016e5c80fcc0f18da0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ad18b9f42d753edbf03371016e5c80fcc0f18da0 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Fri, 22 Apr 2022 10:27:29 +0530
Subject: [PATCH] net/dpaa: fix event queue detach
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ee6647e0169bae7bb3d3a53c309cd280e4740e11 ]

Calling the correct qman queue free APIs to de-attach the queue.

Fixes: 5e7455931442 ("net/dpaa: support Rx queue configurations with eventdev")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 71560d295d..a792c55b85 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -1207,23 +1207,17 @@ int
 dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id)
 {
-	struct qm_mcc_initfq opts;
+	struct qm_mcc_initfq opts = {0};
 	int ret;
 	u32 flags = 0;
 	struct dpaa_if *dpaa_intf = dev->data->dev_private;
 	struct qman_fq *rxq = &dpaa_intf->rx_queues[eth_rx_queue_id];
 
-	dpaa_poll_queue_default_config(&opts);
-
-	if (dpaa_intf->cgr_rx) {
-		opts.we_mask |= QM_INITFQ_WE_CGID;
-		opts.fqd.cgid = dpaa_intf->cgr_rx[eth_rx_queue_id].cgrid;
-		opts.fqd.fq_ctrl |= QM_FQCTRL_CGE;
-	}
-
+	qman_retire_fq(rxq, NULL);
+	qman_oos_fq(rxq);
 	ret = qman_init_fq(rxq, flags, &opts);
 	if (ret) {
-		DPAA_PMD_ERR("init rx fqid %d failed with ret: %d",
+		DPAA_PMD_ERR("detach rx fqid %d failed with ret: %d",
 			     rxq->fqid, ret);
 	}
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.824815017 +0800
+++ 0033-net-dpaa-fix-event-queue-detach.patch	2022-06-21 15:37:49.011117824 +0800
@@ -1 +1 @@
-From ee6647e0169bae7bb3d3a53c309cd280e4740e11 Mon Sep 17 00:00:00 2001
+From ad18b9f42d753edbf03371016e5c80fcc0f18da0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ee6647e0169bae7bb3d3a53c309cd280e4740e11 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index bddb3bb15c..e5a072cf49 100644
+index 71560d295d..a792c55b85 100644
@@ -21 +23 @@
-@@ -1211,23 +1211,17 @@ int
+@@ -1207,23 +1207,17 @@ int

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

* patch 'doc: update matching versions in ice guide' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (32 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/dpaa: fix event queue detach' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bonding: fix stopping non-active slaves' " Xueming Li
                   ` (81 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d18ed4ab862361af18b4c76447c19755f5df2066

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d18ed4ab862361af18b4c76447c19755f5df2066 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Tue, 26 Apr 2022 13:36:29 +0800
Subject: [PATCH] doc: update matching versions in ice guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 93866b3b68beafae69818d02d2fecec209ef18c8 ]

Add recommended matching list for ice PMD in DPDK 22.03.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 doc/guides/nics/ice.rst | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst
index 2df7ceceb3..1cbaf5a399 100644
--- a/doc/guides/nics/ice.rst
+++ b/doc/guides/nics/ice.rst
@@ -47,6 +47,8 @@ The detailed information can refer to chapter Tested Platforms/Tested NICs in re
    +-----------+---------------+-----------------+-----------+--------------+-----------+
    |    21.11  |     1.7.16    |      1.3.27     |  1.3.31   |    1.3.7     |    3.1    |
    +-----------+---------------+-----------------+-----------+--------------+-----------+
+   |    22.03  |     1.8.3     |      1.3.28     |  1.3.35   |    1.3.8     |    3.2    |
+   +-----------+---------------+-----------------+-----------+--------------+-----------+
 
 Pre-Installation Configuration
 ------------------------------
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.868012616 +0800
+++ 0034-doc-update-matching-versions-in-ice-guide.patch	2022-06-21 15:37:49.011117824 +0800
@@ -1 +1 @@
-From 93866b3b68beafae69818d02d2fecec209ef18c8 Mon Sep 17 00:00:00 2001
+From d18ed4ab862361af18b4c76447c19755f5df2066 Mon Sep 17 00:00:00 2001
@@ -4,0 +5 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
@@ -6 +7 @@
-Add recommended matching list for ice PMD in DPDK 22.03.
+[ upstream commit 93866b3b68beafae69818d02d2fecec209ef18c8 ]
@@ -8 +9 @@
-Cc: stable@dpdk.org
+Add recommended matching list for ice PMD in DPDK 22.03.
@@ -17 +18 @@
-index a1780c46c3..6b903b9bbc 100644
+index 2df7ceceb3..1cbaf5a399 100644
@@ -20 +21 @@
-@@ -62,6 +62,8 @@ The detailed information can refer to chapter Tested Platforms/Tested NICs in re
+@@ -47,6 +47,8 @@ The detailed information can refer to chapter Tested Platforms/Tested NICs in re

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

* patch 'net/bonding: fix stopping non-active slaves' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (33 preceding siblings ...)
  2022-06-21  8:01 ` patch 'doc: update matching versions in ice guide' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bonding: fix slave stop and remove on port close' " Xueming Li
                   ` (80 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5f9aca077fd48ec3b24327b594ba8411be8b7496

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5f9aca077fd48ec3b24327b594ba8411be8b7496 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 3 May 2022 18:02:13 +0800
Subject: [PATCH] net/bonding: fix stopping non-active slaves
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f5e72e8e8d57b331baf1a86d15eb7fae921f57fb ]

When stopping a bonded port, all slaves should be stopped. But only
active slaves are stopped.
So fix by stopping all slave ports and later do "deactivate_slave()" for
active slaves.

Fixes: 0911d4ec0183 ("net/bonding: fix crash when stopping mode 4 port")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 5fc759d3e8..bda69c9e4f 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2100,18 +2100,20 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
 	internals->link_status_polling_enabled = 0;
 	for (i = 0; i < internals->slave_count; i++) {
 		uint16_t slave_id = internals->slaves[i].port_id;
+
+		internals->slaves[i].last_link_status = 0;
+		ret = rte_eth_dev_stop(slave_id);
+		if (ret != 0) {
+			RTE_BOND_LOG(ERR, "Failed to stop device on port %u",
+				     slave_id);
+			return ret;
+		}
+
+		/* active slaves need to be deactivated. */
 		if (find_slave_by_id(internals->active_slaves,
 				internals->active_slave_count, slave_id) !=
-						internals->active_slave_count) {
-			internals->slaves[i].last_link_status = 0;
-			ret = rte_eth_dev_stop(slave_id);
-			if (ret != 0) {
-				RTE_BOND_LOG(ERR, "Failed to stop device on port %u",
-					     slave_id);
-				return ret;
-			}
+					internals->active_slave_count)
 			deactivate_slave(eth_dev, slave_id);
-		}
 	}
 
 	return 0;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.909532202 +0800
+++ 0035-net-bonding-fix-stopping-non-active-slaves.patch	2022-06-21 15:37:49.014451169 +0800
@@ -1 +1 @@
-From f5e72e8e8d57b331baf1a86d15eb7fae921f57fb Mon Sep 17 00:00:00 2001
+From 5f9aca077fd48ec3b24327b594ba8411be8b7496 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f5e72e8e8d57b331baf1a86d15eb7fae921f57fb ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 5cbe89031b..605fc2ffb5 100644
+index 5fc759d3e8..bda69c9e4f 100644
@@ -24 +26 @@
-@@ -2118,18 +2118,20 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
+@@ -2100,18 +2100,20 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)

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

* patch 'net/bonding: fix slave stop and remove on port close' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (34 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bonding: fix stopping non-active slaves' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/hns3: fix RSS disable' " Xueming Li
                   ` (79 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4997f02390d39b1e5867fa6257fdcd7eb9e8c3f9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4997f02390d39b1e5867fa6257fdcd7eb9e8c3f9 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 3 May 2022 18:02:14 +0800
Subject: [PATCH] net/bonding: fix slave stop and remove on port close
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1c5c6cd85f8cab2af92d265b6c7671df0b82e6fb ]

All slaves will be stopped and removed when closing a bonded port.
But the while loop can not end if both rte_eth_dev_stop and
rte_eth_bond_slave_remove fails, runs infinitely.
This is because the skipped slave port counted in both function failures
but it should be counted only one.

Fixing by not continue to process in the loop after first failure.

Fixes: fb0379bc5db3 ("net/bonding: check stop call status")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index bda69c9e4f..259651a0c5 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2138,6 +2138,7 @@ bond_ethdev_close(struct rte_eth_dev *dev)
 			RTE_BOND_LOG(ERR, "Failed to stop device on port %u",
 				     port_id);
 			skipped++;
+			continue;
 		}
 
 		if (rte_eth_bond_slave_remove(bond_port_id, port_id) != 0) {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:50.955349523 +0800
+++ 0036-net-bonding-fix-slave-stop-and-remove-on-port-close.patch	2022-06-21 15:37:49.017784514 +0800
@@ -1 +1 @@
-From 1c5c6cd85f8cab2af92d265b6c7671df0b82e6fb Mon Sep 17 00:00:00 2001
+From 4997f02390d39b1e5867fa6257fdcd7eb9e8c3f9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1c5c6cd85f8cab2af92d265b6c7671df0b82e6fb ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 605fc2ffb5..f0668a636f 100644
+index bda69c9e4f..259651a0c5 100644
@@ -27 +29 @@
-@@ -2156,6 +2156,7 @@ bond_ethdev_close(struct rte_eth_dev *dev)
+@@ -2138,6 +2138,7 @@ bond_ethdev_close(struct rte_eth_dev *dev)

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

* patch 'net/hns3: fix RSS disable' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (35 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bonding: fix slave stop and remove on port close' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/hns3: fix rollback on RSS hash update' " Xueming Li
                   ` (78 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9bf4eb4b1a35e9d6874359f2d33b8b7e443f567a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9bf4eb4b1a35e9d6874359f2d33b8b7e443f567a Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 5 May 2022 20:27:05 +0800
Subject: [PATCH] net/hns3: fix RSS disable
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 75ccc3f3d7fa06901d5b768448be4dc9f31f550a ]

Currently, hns3 PMD disable RSS by resetting redirection table when user
set rss_hf to 0 so as to all packets go to queue 0. The implementation
may cause following problems:
1) the same type packet may go to different queue on the case of
   disabling all tuples and partial tuples. The problem is determined by
   hardware design.
2) affect the configuration of redirection table and user experience.

For hns3 hardware, the packets with RSS disabled are always go to the
queue corresponding to first entry of the redirection table. Generally,
disable RSS should be implemented by disabling all tuples, This patch
fix the implementation.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c |  1 -
 drivers/net/hns3/hns3_flow.c   |  6 +--
 drivers/net/hns3/hns3_rss.c    | 93 +++++++---------------------------
 3 files changed, 18 insertions(+), 82 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index b2ff59ef62..8a19a77f81 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2391,7 +2391,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 			goto cfg_err;
 	}
 
-	/* When RSS is not configured, redirect the packet queue 0 */
 	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
 		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 		rss_conf = conf->rx_adv_conf.rss_conf;
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 8d9c2ef530..703e96e6fa 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1413,13 +1413,9 @@ hns3_disable_rss(struct hns3_hw *hw)
 {
 	int ret;
 
-	/* Redirected the redirection table to queue 0 */
-	ret = hns3_rss_reset_indir_table(hw);
+	ret = hns3_set_rss_tuple_by_rss_hf(hw, &hw->rss_info.rss_tuple_sets, 0);
 	if (ret)
 		return ret;
-
-	/* Disable RSS */
-	hw->rss_info.conf.types = 0;
 	hw->rss_dis_flag = true;
 
 	return 0;
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 2e9ac328c1..7d104d59d5 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -237,31 +237,6 @@ hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key)
 	return 0;
 }
 
-/*
- * Used to configure the tuple selection for RSS hash input.
- */
-static int
-hns3_set_rss_input_tuple(struct hns3_hw *hw)
-{
-	struct hns3_rss_conf *rss_config = &hw->rss_info;
-	struct hns3_rss_input_tuple_cmd *req;
-	struct hns3_cmd_desc desc_tuple;
-	int ret;
-
-	hns3_cmd_setup_basic_desc(&desc_tuple, HNS3_OPC_RSS_INPUT_TUPLE, false);
-
-	req = (struct hns3_rss_input_tuple_cmd *)desc_tuple.data;
-
-	req->tuple_field =
-		rte_cpu_to_le_64(rss_config->rss_tuple_sets.rss_tuple_fields);
-
-	ret = hns3_cmd_send(hw, &desc_tuple, 1);
-	if (ret)
-		hns3_err(hw, "Configure RSS input tuple mode failed %d", ret);
-
-	return ret;
-}
-
 /*
  * rss_indirection_table command function, opcode:0x0D07.
  * Used to configure the indirection table of rss.
@@ -382,6 +357,8 @@ hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw,
 	}
 
 	tuple->rss_tuple_fields = rte_le_to_cpu_64(req->tuple_field);
+	/* Update supported flow types when set tuple success */
+	hw->rss_info.conf.types = rss_hf;
 
 	return 0;
 }
@@ -402,7 +379,6 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 	struct hns3_rss_tuple_cfg *tuple = &hw->rss_info.rss_tuple_sets;
-	struct hns3_rss_conf *rss_cfg = &hw->rss_info;
 	uint8_t key_len = rss_conf->rss_key_len;
 	uint64_t rss_hf = rss_conf->rss_hf;
 	uint8_t *key = rss_conf->rss_key;
@@ -416,22 +392,6 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 	if (ret)
 		goto conf_err;
 
-	if (rss_cfg->conf.types && rss_hf == 0) {
-		/* Disable RSS, reset indirection table by local variable */
-		ret = hns3_rss_reset_indir_table(hw);
-		if (ret)
-			goto conf_err;
-	} else if (rss_hf && rss_cfg->conf.types == 0) {
-		/* Enable RSS, restore indirection table by hw's config */
-		ret = hns3_set_rss_indir_table(hw, rss_cfg->rss_indirection_tbl,
-					       hw->rss_ind_tbl_size);
-		if (ret)
-			goto conf_err;
-	}
-
-	/* Update supported flow types when set tuple success */
-	rss_cfg->conf.types = rss_hf;
-
 	if (key) {
 		if (key_len != HNS3_RSS_KEY_SIZE) {
 			hns3_err(hw, "The hash key len(%u) is invalid",
@@ -702,7 +662,8 @@ hns3_config_rss(struct hns3_adapter *hns)
 	struct hns3_hw *hw = &hns->hw;
 	struct hns3_rss_conf *rss_cfg = &hw->rss_info;
 	uint8_t *hash_key = rss_cfg->key;
-	int ret, ret1;
+	uint64_t rss_hf;
+	int ret;
 
 	enum rte_eth_rx_mq_mode mq_mode = hw->data->dev_conf.rxmode.mq_mode;
 
@@ -718,51 +679,31 @@ hns3_config_rss(struct hns3_adapter *hns)
 		break;
 	}
 
-	/* When RSS is off, redirect the packet queue 0 */
-	if (((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) == 0)
-		hns3_rss_uninit(hns);
-
 	/* Configure RSS hash algorithm and hash key offset */
 	ret = hns3_set_rss_algo_key(hw, hash_key);
 	if (ret)
 		return ret;
 
-	/* Configure the tuple selection for RSS hash input */
-	ret = hns3_set_rss_input_tuple(hw);
+	ret = hns3_set_rss_indir_table(hw, rss_cfg->rss_indirection_tbl,
+				       hw->rss_ind_tbl_size);
 	if (ret)
 		return ret;
 
-	/*
-	 * When RSS is off, it doesn't need to configure rss redirection table
-	 * to hardware.
-	 */
-	if (((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG)) {
-		ret = hns3_set_rss_indir_table(hw, rss_cfg->rss_indirection_tbl,
-					       hw->rss_ind_tbl_size);
-		if (ret)
-			goto rss_tuple_uninit;
-	}
-
 	ret = hns3_set_rss_tc_mode(hw);
 	if (ret)
-		goto rss_indir_table_uninit;
-
-	return ret;
-
-rss_indir_table_uninit:
-	if (((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG)) {
-		ret1 = hns3_rss_reset_indir_table(hw);
-		if (ret1 != 0)
-			return ret;
-	}
-
-rss_tuple_uninit:
-	hns3_rss_tuple_uninit(hw);
+		return ret;
 
-	/* Disable RSS */
-	hw->rss_info.conf.types = 0;
+	/*
+	 * When muli-queue RSS mode flag is not set or unsupported tuples are
+	 * set, disable all tuples.
+	 */
+	rss_hf = hw->rss_info.conf.types;
+	if (!((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) ||
+	    !(rss_hf & HNS3_ETH_RSS_SUPPORT))
+		rss_hf = 0;
 
-	return ret;
+	return hns3_set_rss_tuple_by_rss_hf(hw, &hw->rss_info.rss_tuple_sets,
+					    rss_hf);
 }
 
 /*
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.000637451 +0800
+++ 0037-net-hns3-fix-RSS-disable.patch	2022-06-21 15:37:49.021117859 +0800
@@ -1 +1 @@
-From 75ccc3f3d7fa06901d5b768448be4dc9f31f550a Mon Sep 17 00:00:00 2001
+From 9bf4eb4b1a35e9d6874359f2d33b8b7e443f567a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 75ccc3f3d7fa06901d5b768448be4dc9f31f550a ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index 1d9b19d83e..4d5a595aab 100644
+index b2ff59ef62..8a19a77f81 100644
@@ -34 +36 @@
-@@ -2015,7 +2015,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2391,7 +2391,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -39,2 +41,2 @@
- 	if ((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
- 		conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
+ 	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
+ 		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
@@ -43 +45 @@
-index aba07aaa6f..feabac9f41 100644
+index 8d9c2ef530..703e96e6fa 100644
@@ -46 +48 @@
-@@ -1446,13 +1446,9 @@ hns3_disable_rss(struct hns3_hw *hw)
+@@ -1413,13 +1413,9 @@ hns3_disable_rss(struct hns3_hw *hw)
@@ -62 +64 @@
-index 1493b10f96..1c703952b9 100644
+index 2e9ac328c1..7d104d59d5 100644
@@ -65 +67 @@
-@@ -237,31 +237,6 @@ hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key)
+@@ -237,31 +237,6 @@ hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key)
@@ -73 +75 @@
--hns3_rss_set_input_tuple(struct hns3_hw *hw)
+-hns3_set_rss_input_tuple(struct hns3_hw *hw)
@@ -137 +139 @@
-@@ -697,7 +657,8 @@ hns3_config_rss(struct hns3_adapter *hns)
+@@ -702,7 +662,8 @@ hns3_config_rss(struct hns3_adapter *hns)
@@ -147 +149 @@
-@@ -713,51 +674,31 @@ hns3_config_rss(struct hns3_adapter *hns)
+@@ -718,51 +679,31 @@ hns3_config_rss(struct hns3_adapter *hns)
@@ -152 +154 @@
--	if (((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) == 0)
+-	if (((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) == 0)
@@ -156 +158 @@
- 	ret = hns3_rss_set_algo_key(hw, hash_key);
+ 	ret = hns3_set_rss_algo_key(hw, hash_key);
@@ -161 +163 @@
--	ret = hns3_rss_set_input_tuple(hw);
+-	ret = hns3_set_rss_input_tuple(hw);
@@ -171 +173 @@
--	if (((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG)) {
+-	if (((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG)) {
@@ -185 +187 @@
--	if (((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG)) {
+-	if (((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG)) {
@@ -202 +204 @@
-+	if (!((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) ||
++	if (!((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) ||

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

* patch 'net/hns3: fix rollback on RSS hash update' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (36 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/hns3: fix RSS disable' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/hns3: remove redundant RSS tuple field' " Xueming Li
                   ` (77 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7bce9bbfb8909f703238dbb031834a8f267dfba1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7bce9bbfb8909f703238dbb031834a8f267dfba1 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 5 May 2022 20:27:06 +0800
Subject: [PATCH] net/hns3: fix rollback on RSS hash update
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 07f64b5f576a779c8c3df4ba45ad70c306dcb562 ]

The RSS tuple isn't restored when RSS key length is invalid or setting
algo key failed. This patch fixes it.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rss.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 7d104d59d5..df25a33e06 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -376,9 +376,9 @@ int
 hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 			 struct rte_eth_rss_conf *rss_conf)
 {
-	struct hns3_adapter *hns = dev->data->dev_private;
-	struct hns3_hw *hw = &hns->hw;
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct hns3_rss_tuple_cfg *tuple = &hw->rss_info.rss_tuple_sets;
+	uint64_t rss_hf_bk = hw->rss_info.conf.types;
 	uint8_t key_len = rss_conf->rss_key_len;
 	uint64_t rss_hf = rss_conf->rss_hf;
 	uint8_t *key = rss_conf->rss_key;
@@ -387,27 +387,29 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 	if (hw->rss_dis_flag)
 		return -EINVAL;
 
+	if (key && key_len != HNS3_RSS_KEY_SIZE) {
+		hns3_err(hw, "the hash key len(%u) is invalid, must be %u",
+			 key_len, HNS3_RSS_KEY_SIZE);
+		return -EINVAL;
+	}
+
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf);
 	if (ret)
-		goto conf_err;
+		goto set_tuple_fail;
 
 	if (key) {
-		if (key_len != HNS3_RSS_KEY_SIZE) {
-			hns3_err(hw, "The hash key len(%u) is invalid",
-				 key_len);
-			ret = -EINVAL;
-			goto conf_err;
-		}
 		ret = hns3_set_rss_algo_key(hw, key);
 		if (ret)
-			goto conf_err;
+			goto set_algo_key_fail;
 	}
 	rte_spinlock_unlock(&hw->lock);
 
 	return 0;
 
-conf_err:
+set_algo_key_fail:
+	(void)hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf_bk);
+set_tuple_fail:
 	rte_spinlock_unlock(&hw->lock);
 	return ret;
 }
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.049397422 +0800
+++ 0038-net-hns3-fix-rollback-on-RSS-hash-update.patch	2022-06-21 15:37:49.024451205 +0800
@@ -1 +1 @@
-From 07f64b5f576a779c8c3df4ba45ad70c306dcb562 Mon Sep 17 00:00:00 2001
+From 7bce9bbfb8909f703238dbb031834a8f267dfba1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 07f64b5f576a779c8c3df4ba45ad70c306dcb562 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 1c703952b9..4b2c24ace4 100644
+index 7d104d59d5..df25a33e06 100644
@@ -57 +59 @@
- 		ret = hns3_rss_set_algo_key(hw, key);
+ 		ret = hns3_set_rss_algo_key(hw, key);

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

* patch 'net/hns3: remove redundant RSS tuple field' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (37 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/hns3: fix rollback on RSS hash update' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/hns3: remove unnecessary RSS switch' " Xueming Li
                   ` (76 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/21c2dd60110b93d9c3bceb35bb9ae8f9610a3edd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 21c2dd60110b93d9c3bceb35bb9ae8f9610a3edd Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 5 May 2022 20:27:07 +0800
Subject: [PATCH] net/hns3: remove redundant RSS tuple field
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bfd0b54dc84f06183c8a13f75539f0f1dacb3c3e ]

The 'rss_tuple_fields' in struct struct hns3_rss_conf::rss_tuple_sets is
redundant. Because the enabled RSS tuple in PMD is already managed by
the 'types' in struct hns3_rss_conf::conf. This patch removes this
redundant variable.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_flow.c |  6 ++----
 drivers/net/hns3/hns3_rss.c  | 12 ++++--------
 drivers/net/hns3/hns3_rss.h  |  5 +----
 3 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 703e96e6fa..3fbaa5f1c5 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1413,7 +1413,7 @@ hns3_disable_rss(struct hns3_hw *hw)
 {
 	int ret;
 
-	ret = hns3_set_rss_tuple_by_rss_hf(hw, &hw->rss_info.rss_tuple_sets, 0);
+	ret = hns3_set_rss_tuple_by_rss_hf(hw, 0);
 	if (ret)
 		return ret;
 	hw->rss_dis_flag = true;
@@ -1463,7 +1463,6 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function *func,
 static int
 hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
 {
-	struct hns3_rss_tuple_cfg *tuple;
 	int ret;
 
 	hns3_parse_rss_key(hw, rss_config);
@@ -1479,8 +1478,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
 
 	hw->rss_info.conf.func = rss_config->func;
 
-	tuple = &hw->rss_info.rss_tuple_sets;
-	ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_config->types);
+	ret = hns3_set_rss_tuple_by_rss_hf(hw, rss_config->types);
 	if (ret)
 		hns3_err(hw, "Update RSS tuples by rss hf failed %d", ret);
 
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index df25a33e06..e38de80eec 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -310,8 +310,7 @@ hns3_rss_reset_indir_table(struct hns3_hw *hw)
 }
 
 int
-hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw,
-			     struct hns3_rss_tuple_cfg *tuple, uint64_t rss_hf)
+hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf)
 {
 	struct hns3_rss_input_tuple_cmd *req;
 	struct hns3_cmd_desc desc;
@@ -356,7 +355,6 @@ hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw,
 		return ret;
 	}
 
-	tuple->rss_tuple_fields = rte_le_to_cpu_64(req->tuple_field);
 	/* Update supported flow types when set tuple success */
 	hw->rss_info.conf.types = rss_hf;
 
@@ -377,7 +375,6 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 			 struct rte_eth_rss_conf *rss_conf)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct hns3_rss_tuple_cfg *tuple = &hw->rss_info.rss_tuple_sets;
 	uint64_t rss_hf_bk = hw->rss_info.conf.types;
 	uint8_t key_len = rss_conf->rss_key_len;
 	uint64_t rss_hf = rss_conf->rss_hf;
@@ -394,7 +391,7 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 	}
 
 	rte_spinlock_lock(&hw->lock);
-	ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf);
+	ret = hns3_set_rss_tuple_by_rss_hf(hw, rss_hf);
 	if (ret)
 		goto set_tuple_fail;
 
@@ -408,7 +405,7 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 	return 0;
 
 set_algo_key_fail:
-	(void)hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf_bk);
+	(void)hns3_set_rss_tuple_by_rss_hf(hw, rss_hf_bk);
 set_tuple_fail:
 	rte_spinlock_unlock(&hw->lock);
 	return ret;
@@ -704,8 +701,7 @@ hns3_config_rss(struct hns3_adapter *hns)
 	    !(rss_hf & HNS3_ETH_RSS_SUPPORT))
 		rss_hf = 0;
 
-	return hns3_set_rss_tuple_by_rss_hf(hw, &hw->rss_info.rss_tuple_sets,
-					    rss_hf);
+	return hns3_set_rss_tuple_by_rss_hf(hw, rss_hf);
 }
 
 /*
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 6f61541387..685d76491e 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -43,7 +43,6 @@ struct hns3_rss_conf {
 	struct rte_flow_action_rss conf;
 	uint8_t hash_algo; /* hash function type defined by hardware */
 	uint8_t key[HNS3_RSS_KEY_SIZE];  /* Hash key */
-	struct hns3_rss_tuple_cfg rss_tuple_sets;
 	uint16_t rss_indirection_tbl[HNS3_RSS_IND_TBL_SIZE_MAX];
 	uint16_t queue[HNS3_RSS_QUEUES_BUFFER_NUM]; /* Queues indices to use */
 	bool valid; /* check if RSS rule is valid */
@@ -107,9 +106,7 @@ int hns3_set_rss_indir_table(struct hns3_hw *hw, uint16_t *indir,
 int hns3_rss_reset_indir_table(struct hns3_hw *hw);
 int hns3_config_rss(struct hns3_adapter *hns);
 void hns3_rss_uninit(struct hns3_adapter *hns);
-int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw,
-				 struct hns3_rss_tuple_cfg *tuple,
-				 uint64_t rss_hf);
+int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf);
 int hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key);
 int hns3_restore_rss_filter(struct rte_eth_dev *dev);
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.091614632 +0800
+++ 0039-net-hns3-remove-redundant-RSS-tuple-field.patch	2022-06-21 15:37:49.024451205 +0800
@@ -1 +1 @@
-From bfd0b54dc84f06183c8a13f75539f0f1dacb3c3e Mon Sep 17 00:00:00 2001
+From 21c2dd60110b93d9c3bceb35bb9ae8f9610a3edd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bfd0b54dc84f06183c8a13f75539f0f1dacb3c3e ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index feabac9f41..317f91fc71 100644
+index 703e96e6fa..3fbaa5f1c5 100644
@@ -26 +28 @@
-@@ -1446,7 +1446,7 @@ hns3_disable_rss(struct hns3_hw *hw)
+@@ -1413,7 +1413,7 @@ hns3_disable_rss(struct hns3_hw *hw)
@@ -35 +37 @@
-@@ -1496,7 +1496,6 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function *func,
+@@ -1463,7 +1463,6 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function *func,
@@ -42,2 +44,2 @@
- 	hns3_adjust_rss_key(hw, rss_config);
-@@ -1512,8 +1511,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
+ 	hns3_parse_rss_key(hw, rss_config);
+@@ -1479,8 +1478,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
@@ -54 +56 @@
-index 4b2c24ace4..e149c16bfe 100644
+index df25a33e06..e38de80eec 100644
@@ -101 +103 @@
-@@ -699,8 +696,7 @@ hns3_config_rss(struct hns3_adapter *hns)
+@@ -704,8 +701,7 @@ hns3_config_rss(struct hns3_adapter *hns)
@@ -112 +114 @@
-index c4121207aa..55d5718ffc 100644
+index 6f61541387..685d76491e 100644
@@ -131 +133 @@
- int hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key);
+ int hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key);

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

* patch 'net/hns3: remove unnecessary RSS switch' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (38 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/hns3: remove redundant RSS tuple field' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'app/testpmd: check statistics query before printing' " Xueming Li
                   ` (75 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c72194a754339c9ce03b1ee109c48c19f63d8f06

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c72194a754339c9ce03b1ee109c48c19f63d8f06 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 6 Apr 2022 14:57:01 +0800
Subject: [PATCH] net/hns3: remove unnecessary RSS switch
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ec1691494273ef4f9cb60ed24099196de1ce0cc4 ]

Whether the RSS is enabled depends on RTE_ETH_MQ_RX_RSS_FLAG and packet
tuple are enabled. So the RSS switch is unnecessary.

Fixes: 5e782bc2570c ("net/hns3: fix configuring RSS hash when rules are flushed")
Fixes: fd8196838763 ("net/hns3: fix configuring device with RSS enabled")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 2 --
 drivers/net/hns3/hns3_ethdev.h    | 1 -
 drivers/net/hns3/hns3_ethdev_vf.c | 2 --
 drivers/net/hns3/hns3_flow.c      | 1 -
 drivers/net/hns3/hns3_rss.c       | 3 ---
 5 files changed, 9 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 8a19a77f81..ee436ff5ec 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2394,7 +2394,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
 		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 		rss_conf = conf->rx_adv_conf.rss_conf;
-		hw->rss_dis_flag = false;
 		if (rss_conf.rss_key == NULL) {
 			rss_conf.rss_key = rss_cfg->key;
 			rss_conf.rss_key_len = HNS3_RSS_KEY_SIZE;
@@ -3160,7 +3159,6 @@ hns3_get_board_configuration(struct hns3_hw *hw)
 
 	hw->mac.media_type = cfg.media_type;
 	hw->rss_size_max = cfg.rss_size_max;
-	hw->rss_dis_flag = false;
 	memcpy(hw->mac.mac_addr, cfg.mac_addr, RTE_ETHER_ADDR_LEN);
 	hw->mac.phy_addr = cfg.phy_addr;
 	hw->num_tx_desc = cfg.tqp_desc_num;
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 5717f54441..de0084c352 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -450,7 +450,6 @@ struct hns3_hw {
 
 	/* The configuration info of RSS */
 	struct hns3_rss_conf rss_info;
-	bool rss_dis_flag; /* disable rss flag. true: disable, false: enable */
 	uint16_t rss_ind_tbl_size;
 	uint16_t rss_key_size;
 
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index b0db01993b..c1cf7a8c60 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -816,7 +816,6 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
 	/* When RSS is not configured, redirect the packet queue 0 */
 	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
 		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
-		hw->rss_dis_flag = false;
 		rss_conf = conf->rx_adv_conf.rss_conf;
 		if (rss_conf.rss_key == NULL) {
 			rss_conf.rss_key = rss_cfg->key;
@@ -1395,7 +1394,6 @@ hns3vf_get_configuration(struct hns3_hw *hw)
 	int ret;
 
 	hw->mac.media_type = HNS3_MEDIA_TYPE_NONE;
-	hw->rss_dis_flag = false;
 
 	/* Get device capability */
 	ret = hns3vf_get_capability(hw);
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 3fbaa5f1c5..3d30070ee3 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1416,7 +1416,6 @@ hns3_disable_rss(struct hns3_hw *hw)
 	ret = hns3_set_rss_tuple_by_rss_hf(hw, 0);
 	if (ret)
 		return ret;
-	hw->rss_dis_flag = true;
 
 	return 0;
 }
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index e38de80eec..50c4f21da3 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -381,9 +381,6 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 	uint8_t *key = rss_conf->rss_key;
 	int ret;
 
-	if (hw->rss_dis_flag)
-		return -EINVAL;
-
 	if (key && key_len != HNS3_RSS_KEY_SIZE) {
 		hns3_err(hw, "the hash key len(%u) is invalid, must be %u",
 			 key_len, HNS3_RSS_KEY_SIZE);
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.135612187 +0800
+++ 0040-net-hns3-remove-unnecessary-RSS-switch.patch	2022-06-21 15:37:49.034451240 +0800
@@ -1 +1 @@
-From ec1691494273ef4f9cb60ed24099196de1ce0cc4 Mon Sep 17 00:00:00 2001
+From c72194a754339c9ce03b1ee109c48c19f63d8f06 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ec1691494273ef4f9cb60ed24099196de1ce0cc4 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 4d5a595aab..0b565a5614 100644
+index 8a19a77f81..ee436ff5ec 100644
@@ -27,3 +29,3 @@
-@@ -2018,7 +2018,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
- 	if ((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
- 		conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
+@@ -2394,7 +2394,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+ 	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
+ 		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
@@ -32,4 +34,4 @@
- 		ret = hns3_dev_rss_hash_update(dev, &rss_conf);
- 		if (ret)
- 			goto cfg_err;
-@@ -2824,7 +2823,6 @@ hns3_get_board_configuration(struct hns3_hw *hw)
+ 		if (rss_conf.rss_key == NULL) {
+ 			rss_conf.rss_key = rss_cfg->key;
+ 			rss_conf.rss_key_len = HNS3_RSS_KEY_SIZE;
+@@ -3160,7 +3159,6 @@ hns3_get_board_configuration(struct hns3_hw *hw)
@@ -42 +44 @@
- 	hw->dcb_info.num_pg = 1;
+ 	hw->num_tx_desc = cfg.tqp_desc_num;
@@ -44 +46 @@
-index bb6ddd97ba..5e8a746514 100644
+index 5717f54441..de0084c352 100644
@@ -47 +49 @@
-@@ -526,7 +526,6 @@ struct hns3_hw {
+@@ -450,7 +450,6 @@ struct hns3_hw {
@@ -56 +58 @@
-index f641e0dc36..589de0ab3a 100644
+index b0db01993b..c1cf7a8c60 100644
@@ -59 +61 @@
-@@ -495,7 +495,6 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+@@ -816,7 +816,6 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
@@ -61,2 +63,2 @@
- 	if ((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
- 		conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
+ 	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
+ 		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
@@ -65,3 +67,3 @@
- 		ret = hns3_dev_rss_hash_update(dev, &rss_conf);
- 		if (ret)
-@@ -997,7 +996,6 @@ hns3vf_get_configuration(struct hns3_hw *hw)
+ 		if (rss_conf.rss_key == NULL) {
+ 			rss_conf.rss_key = rss_cfg->key;
+@@ -1395,7 +1394,6 @@ hns3vf_get_configuration(struct hns3_hw *hw)
@@ -76 +78 @@
-index 317f91fc71..86ebbf69b6 100644
+index 3fbaa5f1c5..3d30070ee3 100644
@@ -79 +81 @@
-@@ -1449,7 +1449,6 @@ hns3_disable_rss(struct hns3_hw *hw)
+@@ -1416,7 +1416,6 @@ hns3_disable_rss(struct hns3_hw *hw)
@@ -88 +90 @@
-index e149c16bfe..d376486a1d 100644
+index e38de80eec..50c4f21da3 100644

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

* patch 'app/testpmd: check statistics query before printing' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (39 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/hns3: remove unnecessary RSS switch' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bnxt: fix reordering in NEON Rx' " Xueming Li
                   ` (74 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/472844ca06b0e59bcdb7dc3956cfcb73e0a596d6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 472844ca06b0e59bcdb7dc3956cfcb73e0a596d6 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 6 Apr 2022 16:45:36 +0800
Subject: [PATCH] app/testpmd: check statistics query before printing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit baef6bbfad1b9596c7051f5c1fcc308310296342 ]

In function 'fwd_stats_display', if function 'rte_eth_stats_get' fails,
'stats' is uncertainty value. The display result will be abnormal.

This patch check the return value of 'rte_eth_stats_get' to avoid
display abnormal stats.

Fixes: 53324971a14e ("app/testpmd: display/clear forwarding stats on demand")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/config.c  | 10 ++++++++--
 app/test-pmd/testpmd.c | 16 ++++++++++++++--
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index abe2cc394c..d6b43baaf4 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -183,14 +183,20 @@ nic_stats_display(portid_t port_id)
 								diff_ns;
 	uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;
 	struct rte_eth_stats stats;
-
 	static const char *nic_stats_border = "########################";
+	int ret;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN)) {
 		print_valid_ports();
 		return;
 	}
-	rte_eth_stats_get(port_id, &stats);
+	ret = rte_eth_stats_get(port_id, &stats);
+	if (ret != 0) {
+		fprintf(stderr,
+			"%s: Error: failed to get stats (port %u): %d",
+			__func__, port_id, ret);
+		return;
+	}
 	printf("\n  %s NIC statistics for port %-2d %s\n",
 	       nic_stats_border, port_id, nic_stats_border);
 
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 1a7488d8dc..5da22fab57 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1815,6 +1815,7 @@ fwd_stats_display(void)
 	struct rte_port *port;
 	streamid_t sm_id;
 	portid_t pt_id;
+	int ret;
 	int i;
 
 	memset(ports_stats, 0, sizeof(ports_stats));
@@ -1844,7 +1845,13 @@ fwd_stats_display(void)
 		pt_id = fwd_ports_ids[i];
 		port = &ports[pt_id];
 
-		rte_eth_stats_get(pt_id, &stats);
+		ret = rte_eth_stats_get(pt_id, &stats);
+		if (ret != 0) {
+			fprintf(stderr,
+				"%s: Error: failed to get stats (port %u): %d",
+				__func__, pt_id, ret);
+			continue;
+		}
 		stats.ipackets -= port->stats.ipackets;
 		stats.opackets -= port->stats.opackets;
 		stats.ibytes -= port->stats.ibytes;
@@ -1936,11 +1943,16 @@ fwd_stats_reset(void)
 {
 	streamid_t sm_id;
 	portid_t pt_id;
+	int ret;
 	int i;
 
 	for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
 		pt_id = fwd_ports_ids[i];
-		rte_eth_stats_get(pt_id, &ports[pt_id].stats);
+		ret = rte_eth_stats_get(pt_id, &ports[pt_id].stats);
+		if (ret != 0)
+			fprintf(stderr,
+				"%s: Error: failed to clear stats (port %u):%d",
+				__func__, pt_id, ret);
 	}
 	for (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) {
 		struct fwd_stream *fs = fwd_streams[sm_id];
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.184509091 +0800
+++ 0041-app-testpmd-check-statistics-query-before-printing.patch	2022-06-21 15:37:49.037784585 +0800
@@ -1 +1 @@
-From baef6bbfad1b9596c7051f5c1fcc308310296342 Mon Sep 17 00:00:00 2001
+From 472844ca06b0e59bcdb7dc3956cfcb73e0a596d6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit baef6bbfad1b9596c7051f5c1fcc308310296342 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index cc8e7aa138..bd689f9f86 100644
+index abe2cc394c..d6b43baaf4 100644
@@ -26 +28 @@
-@@ -249,14 +249,20 @@ nic_stats_display(portid_t port_id)
+@@ -183,14 +183,20 @@ nic_stats_display(portid_t port_id)
@@ -50 +52 @@
-index fe2ce19f99..79bb23264b 100644
+index 1a7488d8dc..5da22fab57 100644
@@ -53 +55 @@
-@@ -1982,6 +1982,7 @@ fwd_stats_display(void)
+@@ -1815,6 +1815,7 @@ fwd_stats_display(void)
@@ -61 +63 @@
-@@ -2013,7 +2014,13 @@ fwd_stats_display(void)
+@@ -1844,7 +1845,13 @@ fwd_stats_display(void)
@@ -76 +78 @@
-@@ -2108,11 +2115,16 @@ fwd_stats_reset(void)
+@@ -1936,11 +1943,16 @@ fwd_stats_reset(void)

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

* patch 'net/bnxt: fix reordering in NEON Rx' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (40 preceding siblings ...)
  2022-06-21  8:01 ` patch 'app/testpmd: check statistics query before printing' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bnxt: remove unused macro' " Xueming Li
                   ` (73 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1dc7ed3e26af939e3138183affef017962d613e4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1dc7ed3e26af939e3138183affef017962d613e4 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Wed, 13 Apr 2022 18:31:56 +0800
Subject: [PATCH] net/bnxt: fix reordering in NEON Rx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e7f2effc9220dc5d71b0bb550bcc903badc7bac4 ]

Rx descriptor contains a valid bit which indicates readiness of the rest
of descriptor words. Hence, the word contains valid bit must be read
prior to other words.

In NEON vector path, two contiguous 8B descriptor are loaded to a single
NEON register. Given vector load ensures no 16B atomicity, read of the
word that includes valid bit could be reordered after read of other words.
In this case, data could be invalid.

Reloaded lower 64b after read barrier. This ensures what fetched is
correct.

Also fixed comments that not pertains to Arm platform architecture.

Fixes: deae85145c64 ("net/bnxt: handle multiple packets per loop in vector Rx")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
index 3cb94926fe..858e91bb9d 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
@@ -225,25 +225,38 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		}
 
 		/*
-		 * Load the four current descriptors into SSE registers in
-		 * reverse order to ensure consistent state.
+		 * Load the four current descriptors into NEON registers.
+		 * IO barriers are used to ensure consistent state.
 		 */
 		rxcmp1[3] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 7]);
 		rte_io_rmb();
+		/* Reload lower 64b of descriptors to make it ordered after info3_v. */
+		rxcmp1[3] = vreinterpretq_u32_u64(vld1q_lane_u64
+				((void *)&cpr->cp_desc_ring[cons + 7],
+				vreinterpretq_u64_u32(rxcmp1[3]), 0));
 		rxcmp[3] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 6]);
 
 		rxcmp1[2] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 5]);
 		rte_io_rmb();
+		rxcmp1[2] = vreinterpretq_u32_u64(vld1q_lane_u64
+				((void *)&cpr->cp_desc_ring[cons + 5],
+				vreinterpretq_u64_u32(rxcmp1[2]), 0));
 		rxcmp[2] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 4]);
 
 		t1 = vreinterpretq_u64_u32(vzip2q_u32(rxcmp1[2], rxcmp1[3]));
 
 		rxcmp1[1] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 3]);
 		rte_io_rmb();
+		rxcmp1[1] = vreinterpretq_u32_u64(vld1q_lane_u64
+				((void *)&cpr->cp_desc_ring[cons + 3],
+				vreinterpretq_u64_u32(rxcmp1[1]), 0));
 		rxcmp[1] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 2]);
 
 		rxcmp1[0] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 1]);
 		rte_io_rmb();
+		rxcmp1[0] = vreinterpretq_u32_u64(vld1q_lane_u64
+				((void *)&cpr->cp_desc_ring[cons + 1],
+				vreinterpretq_u64_u32(rxcmp1[0]), 0));
 		rxcmp[0] = vld1q_u32((void *)&cpr->cp_desc_ring[cons + 0]);
 
 		t0 = vreinterpretq_u64_u32(vzip2q_u32(rxcmp1[0], rxcmp1[1]));
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.232399478 +0800
+++ 0042-net-bnxt-fix-reordering-in-NEON-Rx.patch	2022-06-21 15:37:49.037784585 +0800
@@ -1 +1 @@
-From e7f2effc9220dc5d71b0bb550bcc903badc7bac4 Mon Sep 17 00:00:00 2001
+From 1dc7ed3e26af939e3138183affef017962d613e4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e7f2effc9220dc5d71b0bb550bcc903badc7bac4 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index 779e23ac4f..32f8e59b3a 100644
+index 3cb94926fe..858e91bb9d 100644
@@ -33 +35 @@
-@@ -231,25 +231,38 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -225,25 +225,38 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)

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

* patch 'net/bnxt: remove unused macro' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (41 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bnxt: fix reordering in NEON Rx' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bnxt: fix device capability reporting' " Xueming Li
                   ` (72 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ae5516cd7a3ee2ec4b53772ade4ed06ebe85cabf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ae5516cd7a3ee2ec4b53772ade4ed06ebe85cabf Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:07 +0530
Subject: [PATCH] net/bnxt: remove unused macro
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c29aa80fb54addbda9a5c841472d7584d3ab9108 ]

BNXT_FLAG_UPDATE_HASH is redundant now, remove it.

Fixes: 1ebb765090a6 ("net/bnxt: fix config RSS update")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 1 -
 drivers/net/bnxt/bnxt_ethdev.c | 2 --
 drivers/net/bnxt/bnxt_rxq.c    | 3 ---
 3 files changed, 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 30265d245b..c24a9ca92a 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -659,7 +659,6 @@ struct bnxt {
 #define BNXT_FLAG_PORT_STATS		BIT(2)
 #define BNXT_FLAG_JUMBO			BIT(3)
 #define BNXT_FLAG_SHORT_CMD		BIT(4)
-#define BNXT_FLAG_UPDATE_HASH		BIT(5)
 #define BNXT_FLAG_PTP_SUPPORTED		BIT(6)
 #define BNXT_FLAG_MULTI_HOST    	BIT(7)
 #define BNXT_FLAG_EXT_RX_PORT_STATS	BIT(8)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 5fd159e2db..58198f96be 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2079,8 +2079,6 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
 			return -EINVAL;
 	}
 
-	bp->flags |= BNXT_FLAG_UPDATE_HASH;
-
 	/* Update the default RSS VNIC(s) */
 	vnic = BNXT_GET_DEFAULT_VNIC(bp);
 	vnic->hash_type = bnxt_rte_to_hwrm_hash_types(rss_conf->rss_hf);
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index e057393b2b..73e0ba36f6 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -139,9 +139,6 @@ skip_filter_allocation:
 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
 		struct rte_eth_rss_conf *rss = &bp->rss_conf;
 
-		if (bp->flags & BNXT_FLAG_UPDATE_HASH)
-			bp->flags &= ~BNXT_FLAG_UPDATE_HASH;
-
 		for (i = 0; i < bp->nr_vnics; i++) {
 			uint32_t lvl = ETH_RSS_LEVEL(rss->rss_hf);
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.276402320 +0800
+++ 0043-net-bnxt-remove-unused-macro.patch	2022-06-21 15:37:49.044451276 +0800
@@ -1 +1 @@
-From c29aa80fb54addbda9a5c841472d7584d3ab9108 Mon Sep 17 00:00:00 2001
+From ae5516cd7a3ee2ec4b53772ade4ed06ebe85cabf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c29aa80fb54addbda9a5c841472d7584d3ab9108 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 5eddb4f000..9e5ff7496e 100644
+index 30265d245b..c24a9ca92a 100644
@@ -24 +26 @@
-@@ -648,7 +648,6 @@ struct bnxt {
+@@ -659,7 +659,6 @@ struct bnxt {
@@ -33 +35 @@
-index fac3925469..181de42d15 100644
+index 5fd159e2db..58198f96be 100644
@@ -36 +38 @@
-@@ -2125,8 +2125,6 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
+@@ -2079,8 +2079,6 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
@@ -46 +48 @@
-index 0cfd0e588f..3c2283b8c6 100644
+index e057393b2b..73e0ba36f6 100644
@@ -49,2 +51,2 @@
-@@ -175,9 +175,6 @@ skip_filter_allocation:
- 	if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
+@@ -139,9 +139,6 @@ skip_filter_allocation:
+ 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
@@ -57 +59 @@
- 			uint32_t lvl = RTE_ETH_RSS_LEVEL(rss->rss_hf);
+ 			uint32_t lvl = ETH_RSS_LEVEL(rss->rss_hf);

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

* patch 'net/bnxt: fix device capability reporting' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (42 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bnxt: remove unused macro' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bnxt: fix Rx configuration' " Xueming Li
                   ` (71 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7ded422e25a5a16c91cce1cdb6e9bbf29165fbc5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7ded422e25a5a16c91cce1cdb6e9bbf29165fbc5 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:06 +0530
Subject: [PATCH] net/bnxt: fix device capability reporting
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 47a956a8fecdc60e935cc9d9b81356cafb2910f0 ]

1. Added two functions bnxt_get_tx_port_offloads() and
   bnxt_get_rx_port_offloads() to report the device
   tx/rx offload capabilities to the application.
2. This avoids few duplicate code in the driver and make
   VF-rep capability the same as VF.
3. This will help in selectively reporting offload capabilities
   based on FW support.

Fixes: 0a6d2a720078 ("net/bnxt: get device infos")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 25 -------------------------
 drivers/net/bnxt/bnxt_ethdev.c | 10 ++--------
 drivers/net/bnxt/bnxt_reps.c   |  6 ++----
 drivers/net/bnxt/bnxt_rxq.c    | 25 +++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxq.h    |  1 +
 drivers/net/bnxt/bnxt_txq.c    | 23 +++++++++++++++++++++++
 drivers/net/bnxt/bnxt_txq.h    |  1 +
 7 files changed, 54 insertions(+), 37 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index c24a9ca92a..61bb59feb6 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -567,31 +567,6 @@ struct bnxt_rep_info {
 	ETH_RSS_NONFRAG_IPV6_UDP |	\
 	ETH_RSS_LEVEL_MASK)
 
-#define BNXT_DEV_TX_OFFLOAD_SUPPORT (DEV_TX_OFFLOAD_IPV4_CKSUM | \
-				     DEV_TX_OFFLOAD_TCP_CKSUM | \
-				     DEV_TX_OFFLOAD_UDP_CKSUM | \
-				     DEV_TX_OFFLOAD_TCP_TSO | \
-				     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
-				     DEV_TX_OFFLOAD_VXLAN_TNL_TSO | \
-				     DEV_TX_OFFLOAD_GRE_TNL_TSO | \
-				     DEV_TX_OFFLOAD_IPIP_TNL_TSO | \
-				     DEV_TX_OFFLOAD_GENEVE_TNL_TSO | \
-				     DEV_TX_OFFLOAD_QINQ_INSERT | \
-				     DEV_TX_OFFLOAD_MULTI_SEGS)
-
-#define BNXT_DEV_RX_OFFLOAD_SUPPORT (DEV_RX_OFFLOAD_VLAN_FILTER | \
-				     DEV_RX_OFFLOAD_IPV4_CKSUM | \
-				     DEV_RX_OFFLOAD_UDP_CKSUM | \
-				     DEV_RX_OFFLOAD_TCP_CKSUM | \
-				     DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
-				     DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \
-				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
-				     DEV_RX_OFFLOAD_KEEP_CRC | \
-				     DEV_RX_OFFLOAD_VLAN_EXTEND | \
-				     DEV_RX_OFFLOAD_TCP_LRO | \
-				     DEV_RX_OFFLOAD_SCATTER | \
-				     DEV_RX_OFFLOAD_RSS_HASH)
-
 #define BNXT_HWRM_SHORT_REQ_LEN		sizeof(struct hwrm_short_input)
 
 struct bnxt_flow_stat_info {
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 58198f96be..fdcc73d432 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -987,16 +987,10 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
 	dev_info->min_rx_bufsize = 1;
 	dev_info->max_rx_pktlen = BNXT_MAX_PKT_LEN;
 
-	dev_info->rx_offload_capa = BNXT_DEV_RX_OFFLOAD_SUPPORT;
-	if (bp->flags & BNXT_FLAG_PTP_SUPPORTED)
-		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP;
-	if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP)
-		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_STRIP;
+	dev_info->rx_offload_capa = bnxt_get_rx_port_offloads(bp);
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-	dev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT |
+	dev_info->tx_offload_capa = bnxt_get_tx_port_offloads(bp) |
 				    dev_info->tx_queue_offload_capa;
-	if (bp->fw_cap & BNXT_FW_CAP_VLAN_TX_INSERT)
-		dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_VLAN_INSERT;
 	dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;
 
 	dev_info->speed_capa = bnxt_get_speed_capabilities(bp);
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index b35c54fe13..95d99072cd 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -541,10 +541,8 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
 	dev_info->min_rx_bufsize = 1;
 	dev_info->max_rx_pktlen = BNXT_MAX_PKT_LEN;
 
-	dev_info->rx_offload_capa = BNXT_DEV_RX_OFFLOAD_SUPPORT;
-	if (parent_bp->flags & BNXT_FLAG_PTP_SUPPORTED)
-		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP;
-	dev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT;
+	dev_info->rx_offload_capa = bnxt_get_rx_port_offloads(parent_bp);
+	dev_info->tx_offload_capa = bnxt_get_tx_port_offloads(parent_bp);
 	dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;
 
 	dev_info->switch_info.name = eth_dev->device->name;
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 73e0ba36f6..828b8e00aa 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -20,6 +20,31 @@
  * RX Queues
  */
 
+uint64_t bnxt_get_rx_port_offloads(struct bnxt *bp)
+{
+	uint64_t rx_offload_capa;
+
+	rx_offload_capa = DEV_RX_OFFLOAD_IPV4_CKSUM  |
+			  DEV_RX_OFFLOAD_UDP_CKSUM   |
+			  DEV_RX_OFFLOAD_TCP_CKSUM   |
+			  DEV_RX_OFFLOAD_KEEP_CRC    |
+			  DEV_RX_OFFLOAD_VLAN_FILTER |
+			  DEV_RX_OFFLOAD_VLAN_EXTEND |
+			  DEV_RX_OFFLOAD_TCP_LRO |
+			  DEV_RX_OFFLOAD_SCATTER |
+			  DEV_RX_OFFLOAD_RSS_HASH;
+
+	rx_offload_capa |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
+			   DEV_RX_OFFLOAD_OUTER_UDP_CKSUM;
+
+	if (bp->flags & BNXT_FLAG_PTP_SUPPORTED)
+		rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP;
+	if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP)
+		rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_STRIP;
+
+	return rx_offload_capa;
+}
+
 void bnxt_free_rxq_stats(struct bnxt_rx_queue *rxq)
 {
 	if (rxq && rxq->cp_ring && rxq->cp_ring->hw_stats)
diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index 980a16a566..e4d185676f 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -63,4 +63,5 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev,
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev,
 		       uint16_t rx_queue_id);
 void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq);
+uint64_t bnxt_get_rx_port_offloads(struct bnxt *bp);
 #endif
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 6c5e6948a7..bc1797095d 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -16,6 +16,29 @@
  * TX Queues
  */
 
+uint64_t bnxt_get_tx_port_offloads(struct bnxt *bp)
+{
+	uint64_t tx_offload_capa;
+
+	tx_offload_capa = DEV_TX_OFFLOAD_IPV4_CKSUM  |
+			  DEV_TX_OFFLOAD_UDP_CKSUM   |
+			  DEV_TX_OFFLOAD_TCP_CKSUM   |
+			  DEV_TX_OFFLOAD_TCP_TSO     |
+			  DEV_TX_OFFLOAD_QINQ_INSERT |
+			  DEV_TX_OFFLOAD_MULTI_SEGS;
+
+	tx_offload_capa |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
+			   DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
+			   DEV_TX_OFFLOAD_GRE_TNL_TSO |
+			   DEV_TX_OFFLOAD_IPIP_TNL_TSO |
+			   DEV_TX_OFFLOAD_GENEVE_TNL_TSO;
+
+	if (bp->fw_cap & BNXT_FW_CAP_VLAN_TX_INSERT)
+		tx_offload_capa |= DEV_TX_OFFLOAD_VLAN_INSERT;
+
+	return tx_offload_capa;
+}
+
 void bnxt_free_txq_stats(struct bnxt_tx_queue *txq)
 {
 	if (txq && txq->cp_ring && txq->cp_ring->hw_stats)
diff --git a/drivers/net/bnxt/bnxt_txq.h b/drivers/net/bnxt/bnxt_txq.h
index 42d37f7c7f..4416c54fca 100644
--- a/drivers/net/bnxt/bnxt_txq.h
+++ b/drivers/net/bnxt/bnxt_txq.h
@@ -43,4 +43,5 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 			       uint16_t nb_desc,
 			       unsigned int socket_id,
 			       const struct rte_eth_txconf *tx_conf);
+uint64_t bnxt_get_tx_port_offloads(struct bnxt *bp);
 #endif
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.323298704 +0800
+++ 0044-net-bnxt-fix-device-capability-reporting.patch	2022-06-21 15:37:49.051117966 +0800
@@ -1 +1 @@
-From 47a956a8fecdc60e935cc9d9b81356cafb2910f0 Mon Sep 17 00:00:00 2001
+From 7ded422e25a5a16c91cce1cdb6e9bbf29165fbc5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 47a956a8fecdc60e935cc9d9b81356cafb2910f0 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
- drivers/net/bnxt/bnxt.h        | 24 ------------------------
+ drivers/net/bnxt/bnxt.h        | 25 -------------------------
@@ -28 +30 @@
- 7 files changed, 54 insertions(+), 36 deletions(-)
+ 7 files changed, 54 insertions(+), 37 deletions(-)
@@ -31 +33 @@
-index 44724a9dfe..5eddb4f000 100644
+index c24a9ca92a..61bb59feb6 100644
@@ -34,15 +36,15 @@
-@@ -580,30 +580,6 @@ struct bnxt_rep_info {
- 	RTE_ETH_RSS_NONFRAG_IPV6_UDP |	\
- 	RTE_ETH_RSS_LEVEL_MASK)
- 
--#define BNXT_DEV_TX_OFFLOAD_SUPPORT (RTE_ETH_TX_OFFLOAD_IPV4_CKSUM | \
--				     RTE_ETH_TX_OFFLOAD_TCP_CKSUM | \
--				     RTE_ETH_TX_OFFLOAD_UDP_CKSUM | \
--				     RTE_ETH_TX_OFFLOAD_TCP_TSO | \
--				     RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
--				     RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO | \
--				     RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO | \
--				     RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO | \
--				     RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO | \
--				     RTE_ETH_TX_OFFLOAD_QINQ_INSERT | \
--				     RTE_ETH_TX_OFFLOAD_MULTI_SEGS)
+@@ -567,31 +567,6 @@ struct bnxt_rep_info {
+ 	ETH_RSS_NONFRAG_IPV6_UDP |	\
+ 	ETH_RSS_LEVEL_MASK)
+ 
+-#define BNXT_DEV_TX_OFFLOAD_SUPPORT (DEV_TX_OFFLOAD_IPV4_CKSUM | \
+-				     DEV_TX_OFFLOAD_TCP_CKSUM | \
+-				     DEV_TX_OFFLOAD_UDP_CKSUM | \
+-				     DEV_TX_OFFLOAD_TCP_TSO | \
+-				     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
+-				     DEV_TX_OFFLOAD_VXLAN_TNL_TSO | \
+-				     DEV_TX_OFFLOAD_GRE_TNL_TSO | \
+-				     DEV_TX_OFFLOAD_IPIP_TNL_TSO | \
+-				     DEV_TX_OFFLOAD_GENEVE_TNL_TSO | \
+-				     DEV_TX_OFFLOAD_QINQ_INSERT | \
+-				     DEV_TX_OFFLOAD_MULTI_SEGS)
@@ -50,11 +52,12 @@
--#define BNXT_DEV_RX_OFFLOAD_SUPPORT (RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
--				     RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \
--				     RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \
--				     RTE_ETH_RX_OFFLOAD_TCP_CKSUM | \
--				     RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
--				     RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM | \
--				     RTE_ETH_RX_OFFLOAD_KEEP_CRC | \
--				     RTE_ETH_RX_OFFLOAD_VLAN_EXTEND | \
--				     RTE_ETH_RX_OFFLOAD_TCP_LRO | \
--				     RTE_ETH_RX_OFFLOAD_SCATTER | \
--				     RTE_ETH_RX_OFFLOAD_RSS_HASH)
+-#define BNXT_DEV_RX_OFFLOAD_SUPPORT (DEV_RX_OFFLOAD_VLAN_FILTER | \
+-				     DEV_RX_OFFLOAD_IPV4_CKSUM | \
+-				     DEV_RX_OFFLOAD_UDP_CKSUM | \
+-				     DEV_RX_OFFLOAD_TCP_CKSUM | \
+-				     DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
+-				     DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \
+-				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
+-				     DEV_RX_OFFLOAD_KEEP_CRC | \
+-				     DEV_RX_OFFLOAD_VLAN_EXTEND | \
+-				     DEV_RX_OFFLOAD_TCP_LRO | \
+-				     DEV_RX_OFFLOAD_SCATTER | \
+-				     DEV_RX_OFFLOAD_RSS_HASH)
@@ -66 +69 @@
-index 261fe0be56..fac3925469 100644
+index 58198f96be..fdcc73d432 100644
@@ -69 +72 @@
-@@ -971,16 +971,10 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -987,16 +987,10 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
@@ -75 +78 @@
--		dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP;
+-		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP;
@@ -77 +80 @@
--		dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_VLAN_STRIP;
+-		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_STRIP;
@@ -79 +82 @@
- 	dev_info->tx_queue_offload_capa = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
+ 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
@@ -84 +87 @@
--		dev_info->tx_offload_capa |= RTE_ETH_TX_OFFLOAD_VLAN_INSERT;
+-		dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_VLAN_INSERT;
@@ -89 +92 @@
-index e773932681..8a5b777793 100644
+index b35c54fe13..95d99072cd 100644
@@ -92 +95 @@
-@@ -567,10 +567,8 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -541,10 +541,8 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
@@ -98 +101 @@
--		dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP;
+-		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP;
@@ -106 +109 @@
-index cd3bb1446f..0cfd0e588f 100644
+index 73e0ba36f6..828b8e00aa 100644
@@ -117,9 +120,9 @@
-+	rx_offload_capa = RTE_ETH_RX_OFFLOAD_IPV4_CKSUM  |
-+			  RTE_ETH_RX_OFFLOAD_UDP_CKSUM   |
-+			  RTE_ETH_RX_OFFLOAD_TCP_CKSUM   |
-+			  RTE_ETH_RX_OFFLOAD_KEEP_CRC    |
-+			  RTE_ETH_RX_OFFLOAD_VLAN_FILTER |
-+			  RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
-+			  RTE_ETH_RX_OFFLOAD_TCP_LRO |
-+			  RTE_ETH_RX_OFFLOAD_SCATTER |
-+			  RTE_ETH_RX_OFFLOAD_RSS_HASH;
++	rx_offload_capa = DEV_RX_OFFLOAD_IPV4_CKSUM  |
++			  DEV_RX_OFFLOAD_UDP_CKSUM   |
++			  DEV_RX_OFFLOAD_TCP_CKSUM   |
++			  DEV_RX_OFFLOAD_KEEP_CRC    |
++			  DEV_RX_OFFLOAD_VLAN_FILTER |
++			  DEV_RX_OFFLOAD_VLAN_EXTEND |
++			  DEV_RX_OFFLOAD_TCP_LRO |
++			  DEV_RX_OFFLOAD_SCATTER |
++			  DEV_RX_OFFLOAD_RSS_HASH;
@@ -127,2 +130,2 @@
-+	rx_offload_capa |= RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM |
-+			   RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM;
++	rx_offload_capa |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
++			   DEV_RX_OFFLOAD_OUTER_UDP_CKSUM;
@@ -131 +134 @@
-+		rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP;
++		rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP;
@@ -133 +136 @@
-+		rx_offload_capa |= RTE_ETH_RX_OFFLOAD_VLAN_STRIP;
++		rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_STRIP;
@@ -138,2 +141 @@
- /* Determine whether the current configuration needs aggregation ring in HW. */
- int bnxt_need_agg_ring(struct rte_eth_dev *eth_dev)
+ void bnxt_free_rxq_stats(struct bnxt_rx_queue *rxq)
@@ -140,0 +143 @@
+ 	if (rxq && rxq->cp_ring && rxq->cp_ring->hw_stats)
@@ -142 +145 @@
-index 0331c23810..287df8dff3 100644
+index 980a16a566..e4d185676f 100644
@@ -145 +148,3 @@
-@@ -65,4 +65,5 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev,
+@@ -63,4 +63,5 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev,
+ int bnxt_rx_queue_stop(struct rte_eth_dev *dev,
+ 		       uint16_t rx_queue_id);
@@ -147,2 +151,0 @@
- int bnxt_need_agg_ring(struct rte_eth_dev *eth_dev);
- void bnxt_free_rxq_mem(struct bnxt_rx_queue *rxq);
@@ -152 +155 @@
-index 72a55ea643..86073a505e 100644
+index 6c5e6948a7..bc1797095d 100644
@@ -155 +158 @@
-@@ -17,6 +17,29 @@
+@@ -16,6 +16,29 @@
@@ -163,12 +166,12 @@
-+	tx_offload_capa = RTE_ETH_TX_OFFLOAD_IPV4_CKSUM  |
-+			  RTE_ETH_TX_OFFLOAD_UDP_CKSUM   |
-+			  RTE_ETH_TX_OFFLOAD_TCP_CKSUM   |
-+			  RTE_ETH_TX_OFFLOAD_TCP_TSO     |
-+			  RTE_ETH_TX_OFFLOAD_QINQ_INSERT |
-+			  RTE_ETH_TX_OFFLOAD_MULTI_SEGS;
-+
-+	tx_offload_capa |= RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |
-+			   RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
-+			   RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |
-+			   RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
-+			   RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO;
++	tx_offload_capa = DEV_TX_OFFLOAD_IPV4_CKSUM  |
++			  DEV_TX_OFFLOAD_UDP_CKSUM   |
++			  DEV_TX_OFFLOAD_TCP_CKSUM   |
++			  DEV_TX_OFFLOAD_TCP_TSO     |
++			  DEV_TX_OFFLOAD_QINQ_INSERT |
++			  DEV_TX_OFFLOAD_MULTI_SEGS;
++
++	tx_offload_capa |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
++			   DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
++			   DEV_TX_OFFLOAD_GRE_TNL_TSO |
++			   DEV_TX_OFFLOAD_IPIP_TNL_TSO |
++			   DEV_TX_OFFLOAD_GENEVE_TNL_TSO;
@@ -177 +180 @@
-+		tx_offload_capa |= RTE_ETH_TX_OFFLOAD_VLAN_INSERT;
++		tx_offload_capa |= DEV_TX_OFFLOAD_VLAN_INSERT;
@@ -186 +189 @@
-index 67fd4cbebb..f3a03812ad 100644
+index 42d37f7c7f..4416c54fca 100644

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

* patch 'net/bnxt: fix Rx configuration' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (43 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bnxt: fix device capability reporting' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bnxt: fix ring group on Rx restart' " Xueming Li
                   ` (70 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c69db7f7f738f18d616bce1ddff29623f8e2db1c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c69db7f7f738f18d616bce1ddff29623f8e2db1c Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:08 +0530
Subject: [PATCH] net/bnxt: fix Rx configuration
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0a90c56eacd5e345b42c7f152d33ca4c39343a52 ]

We are currently not handling RX/RSS modes correctly.
After launching testpmd with multiple RXQs, if the user tries to set
the number of RXQs to 1, driver is not updating the "hash_type"
and "hash_mode" values of the VNICs. As a result, driver issues
bnxt_vnic_rss_configure() unnecessarily and the FW command fails.

Fixed bnxt_mq_rx_configure() to update VNIC RSS fields unconditionally.

Fixes: 4191bc8f79a8 ("net/bnxt: handle multi queue mode properly")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 37 ++++++++++++++-----------------------
 1 file changed, 14 insertions(+), 23 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 828b8e00aa..8145264950 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -54,6 +54,7 @@ void bnxt_free_rxq_stats(struct bnxt_rx_queue *rxq)
 int bnxt_mq_rx_configure(struct bnxt *bp)
 {
 	struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
+	struct rte_eth_rss_conf *rss = &bp->rss_conf;
 	const struct rte_eth_vmdq_rx_conf *conf =
 		    &dev_conf->rx_adv_conf.vmdq_rx_conf;
 	unsigned int i, j, nb_q_per_grp = 1, ring_idx = 0;
@@ -161,29 +162,19 @@ skip_filter_allocation:
 
 	bp->rx_num_qs_per_vnic = nb_q_per_grp;
 
-	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
-		struct rte_eth_rss_conf *rss = &bp->rss_conf;
-
-		for (i = 0; i < bp->nr_vnics; i++) {
-			uint32_t lvl = ETH_RSS_LEVEL(rss->rss_hf);
-
-			vnic = &bp->vnic_info[i];
-			vnic->hash_type =
-				bnxt_rte_to_hwrm_hash_types(rss->rss_hf);
-			vnic->hash_mode =
-				bnxt_rte_to_hwrm_hash_level(bp,
-							    rss->rss_hf,
-							    lvl);
-
-			/*
-			 * Use the supplied key if the key length is
-			 * acceptable and the rss_key is not NULL
-			 */
-			if (rss->rss_key &&
-			    rss->rss_key_len <= HW_HASH_KEY_SIZE)
-				memcpy(vnic->rss_hash_key,
-				       rss->rss_key, rss->rss_key_len);
-		}
+	for (i = 0; i < bp->nr_vnics; i++) {
+		uint32_t lvl = ETH_RSS_LEVEL(rss->rss_hf);
+
+		vnic = &bp->vnic_info[i];
+		vnic->hash_type = bnxt_rte_to_hwrm_hash_types(rss->rss_hf);
+		vnic->hash_mode = bnxt_rte_to_hwrm_hash_level(bp, rss->rss_hf, lvl);
+
+		/*
+		 * Use the supplied key if the key length is
+		 * acceptable and the rss_key is not NULL
+		 */
+		if (rss->rss_key && rss->rss_key_len <= HW_HASH_KEY_SIZE)
+			memcpy(vnic->rss_hash_key, rss->rss_key, rss->rss_key_len);
 	}
 
 	return rc;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.370956340 +0800
+++ 0045-net-bnxt-fix-Rx-configuration.patch	2022-06-21 15:37:49.051117966 +0800
@@ -1 +1 @@
-From 0a90c56eacd5e345b42c7f152d33ca4c39343a52 Mon Sep 17 00:00:00 2001
+From c69db7f7f738f18d616bce1ddff29623f8e2db1c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0a90c56eacd5e345b42c7f152d33ca4c39343a52 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 3c2283b8c6..8977138012 100644
+index 828b8e00aa..8145264950 100644
@@ -28 +30 @@
-@@ -65,6 +65,7 @@ void bnxt_free_rxq_stats(struct bnxt_rx_queue *rxq)
+@@ -54,6 +54,7 @@ void bnxt_free_rxq_stats(struct bnxt_rx_queue *rxq)
@@ -36 +38 @@
-@@ -172,29 +173,19 @@ skip_filter_allocation:
+@@ -161,29 +162,19 @@ skip_filter_allocation:
@@ -40 +42 @@
--	if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
+-	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
@@ -44 +46 @@
--			uint32_t lvl = RTE_ETH_RSS_LEVEL(rss->rss_hf);
+-			uint32_t lvl = ETH_RSS_LEVEL(rss->rss_hf);
@@ -64 +66 @@
-+		uint32_t lvl = RTE_ETH_RSS_LEVEL(rss->rss_hf);
++		uint32_t lvl = ETH_RSS_LEVEL(rss->rss_hf);

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

* patch 'net/bnxt: fix ring group on Rx restart' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (44 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bnxt: fix Rx configuration' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bnxt: avoid unnecessary endianness conversion' " Xueming Li
                   ` (69 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Ajit Khaparde, Kalesh AP, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/167d0cbbfd534297c41dc07d25d09608cadcf0d0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 167d0cbbfd534297c41dc07d25d09608cadcf0d0 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:12 +0530
Subject: [PATCH] net/bnxt: fix ring group on Rx restart
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1b27f8245eee1209d9ee27304fae3515e93ef5b0 ]

When an Rx queue is stopped and restarted, as part of that workflow,
for cards that have ring groups, we free and reallocate the ring group.
This new ring group is not communicated to the VNIC though via
HWRM_VNIC_CFG cmd.
Fix to issue HWRM_VNIC_CFG cmd on all adapters now in this scenario.

Fixes: ed0ae3502fc9 ("net/bnxt: update ring group after ring stop start")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 8145264950..7959d48f47 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -457,10 +457,11 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	if (rc)
 		return rc;
 
-	if (BNXT_CHIP_THOR(bp)) {
-		/* Reconfigure default receive ring and MRU. */
-		bnxt_hwrm_vnic_cfg(bp, rxq->vnic);
-	}
+	if (BNXT_HAS_RING_GRPS(bp))
+		rxq->vnic->dflt_ring_grp = bp->grp_info[rx_queue_id].fw_grp_id;
+	/* Reconfigure default receive ring and MRU. */
+	bnxt_hwrm_vnic_cfg(bp, rxq->vnic);
+
 	PMD_DRV_LOG(INFO, "Rx queue started %d\n", rx_queue_id);
 
 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.413173827 +0800
+++ 0046-net-bnxt-fix-ring-group-on-Rx-restart.patch	2022-06-21 15:37:49.054451311 +0800
@@ -1 +1 @@
-From 1b27f8245eee1209d9ee27304fae3515e93ef5b0 Mon Sep 17 00:00:00 2001
+From 167d0cbbfd534297c41dc07d25d09608cadcf0d0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1b27f8245eee1209d9ee27304fae3515e93ef5b0 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 8147404d9c..9b5ff4ce2d 100644
+index 8145264950..7959d48f47 100644
@@ -26 +28 @@
-@@ -488,10 +488,11 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -457,10 +457,11 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -30 +32 @@
--	if (BNXT_CHIP_P5(bp)) {
+-	if (BNXT_CHIP_THOR(bp)) {
@@ -41 +43 @@
- 	if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
+ 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {

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

* patch 'net/bnxt: avoid unnecessary endianness conversion' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (45 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bnxt: fix ring group on Rx restart' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bnxt: fix speed autonegotiation' " Xueming Li
                   ` (68 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/adb37db48f7cec1b4bd060437888a148d3102055

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From adb37db48f7cec1b4bd060437888a148d3102055 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:15 +0530
Subject: [PATCH] net/bnxt: avoid unnecessary endianness conversion
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8599820580c56477670b9f7260a2a1627a1d54dc ]

The "active_fec_signal_mode" in HWRM_PORT_PHY_QCFG response is uint8_t.
So no need of endianness conversion while parsing response.
Also, signal_mode is the first 4bits of "active_fec_signal_mode".

Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 9f61d8d037..4ddf3c0f6d 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1373,7 +1373,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
 	link_info->phy_ver[1] = resp->phy_min;
 	link_info->phy_ver[2] = resp->phy_bld;
 	link_info->link_signal_mode =
-		rte_le_to_cpu_16(resp->active_fec_signal_mode);
+		resp->active_fec_signal_mode & HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_MASK;
 	link_info->force_pam4_link_speed =
 			rte_le_to_cpu_16(resp->force_pam4_link_speed);
 	link_info->support_pam4_speeds =
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.455334971 +0800
+++ 0047-net-bnxt-avoid-unnecessary-endianness-conversion.patch	2022-06-21 15:37:49.057784656 +0800
@@ -1 +1 @@
-From 8599820580c56477670b9f7260a2a1627a1d54dc Mon Sep 17 00:00:00 2001
+From adb37db48f7cec1b4bd060437888a148d3102055 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8599820580c56477670b9f7260a2a1627a1d54dc ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 1b94e3c146..82d1a6205b 100644
+index 9f61d8d037..4ddf3c0f6d 100644
@@ -24 +26 @@
-@@ -1511,7 +1511,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
+@@ -1373,7 +1373,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,

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

* patch 'net/bnxt: fix speed autonegotiation' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (46 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bnxt: avoid unnecessary endianness conversion' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bnxt: force PHY update on certain configurations' " Xueming Li
                   ` (67 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/214e9d80bea943b94e0b16616f839b6be5dab4fa

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 214e9d80bea943b94e0b16616f839b6be5dab4fa Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:16 +0530
Subject: [PATCH] net/bnxt: fix speed autonegotiation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 34a075947879232fcbaf656665380ce25f0523aa ]

The "active_fec_signal_mode" in HWRM_PORT_PHY_QCFG response
does not return correct value till the link is up. Driver cannot
rely on active_fec_signal_mode while setting autoneg speed.

While setting autoneg speed, driver is currently checking only
"auto_link_speed_mask". Fixed to check "auto_pam4_link_speed_mask"
as well. Also, while setting auto mode and setting speed mask,
driver will have to set both NRZ and PAM4 mask.

Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 4ddf3c0f6d..6a3d81f223 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1291,17 +1291,17 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
 			}
 		}
 		/* AutoNeg - Advertise speeds specified. */
-		if (conf->auto_link_speed_mask &&
+		if ((conf->auto_link_speed_mask || conf->auto_pam4_link_speed_mask) &&
 		    !(conf->phy_flags & HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE)) {
 			req.auto_mode =
 				HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK;
-			if (conf->auto_pam4_link_speed_mask &&
-			    bp->link_info->link_signal_mode) {
+			if (conf->auto_pam4_link_speed_mask) {
 				enables |=
 				HWRM_PORT_PHY_CFG_IN_EN_AUTO_PAM4_LINK_SPD_MASK;
 				req.auto_link_pam4_speed_mask =
 				rte_cpu_to_le_16(conf->auto_pam4_link_speed_mask);
-			} else {
+			}
+			if (conf->auto_link_speed_mask) {
 				enables |=
 				HWRM_PORT_PHY_CFG_IN_EN_AUTO_LINK_SPEED_MASK;
 				req.auto_link_speed_mask =
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.501601302 +0800
+++ 0048-net-bnxt-fix-speed-autonegotiation.patch	2022-06-21 15:37:49.061118001 +0800
@@ -1 +1 @@
-From 34a075947879232fcbaf656665380ce25f0523aa Mon Sep 17 00:00:00 2001
+From 214e9d80bea943b94e0b16616f839b6be5dab4fa Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 34a075947879232fcbaf656665380ce25f0523aa ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 82d1a6205b..6e4753c508 100644
+index 4ddf3c0f6d..6a3d81f223 100644
@@ -29 +31 @@
-@@ -1429,17 +1429,17 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
+@@ -1291,17 +1291,17 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)

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

* patch 'net/bnxt: force PHY update on certain configurations' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (47 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bnxt: fix speed autonegotiation' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bnxt: fix link status when port is stopped' " Xueming Li
                   ` (66 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f5cee4b2cacf4f9b3435fd2591d70a341d3d43b6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f5cee4b2cacf4f9b3435fd2591d70a341d3d43b6 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:17 +0530
Subject: [PATCH] net/bnxt: force PHY update on certain configurations
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9c1410bed3d801a63c8c5b47d457a7f69e95e989 ]

Device is not obliged link down in certain scenarios, even
when forced. When FW does not allow any user other than the BMC
to shutdown the port, bnxt_get_hwrm_link_config() call always
returns link up. Force phy update always in that case,
else user configuration for speed/autoneg would not get applied
correctly.

Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  3 +--
 drivers/net/bnxt/bnxt_ethdev.c | 22 ++++++++++++++++++----
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 61bb59feb6..0696b8a99d 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -82,8 +82,7 @@
 #define BROADCOM_DEV_ID_58802_VF	0xd800
 
 #define BROADCOM_DEV_957508_N2100	0x5208
-#define IS_BNXT_DEV_957508_N2100(bp)	\
-	((bp)->pdev->id.subsystem_device_id == BROADCOM_DEV_957508_N2100)
+#define BROADCOM_DEV_957414_N225	0x4145
 
 #define BNXT_MAX_MTU		9574
 #define VLAN_TAG_SIZE		4
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index fdcc73d432..742a020cae 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -670,6 +670,19 @@ static int bnxt_init_ctx_mem(struct bnxt *bp)
 	return rc;
 }
 
+static inline bool bnxt_force_link_config(struct bnxt *bp)
+{
+	uint16_t subsystem_device_id = bp->pdev->id.subsystem_device_id;
+
+	switch (subsystem_device_id) {
+	case BROADCOM_DEV_957508_N2100:
+	case BROADCOM_DEV_957414_N225:
+		return true;
+	default:
+		return false;
+	}
+}
+
 static int bnxt_update_phy_setting(struct bnxt *bp)
 {
 	struct rte_eth_link new;
@@ -682,11 +695,12 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
 	}
 
 	/*
-	 * On BCM957508-N2100 adapters, FW will not allow any user other
-	 * than BMC to shutdown the port. bnxt_get_hwrm_link_config() call
-	 * always returns link up. Force phy update always in that case.
+	 * Device is not obliged link down in certain scenarios, even
+	 * when forced. When FW does not allow any user other than BMC
+	 * to shutdown the port, bnxt_get_hwrm_link_config() call always
+	 * returns link up. Force phy update always in that case.
 	 */
-	if (!new.link_status || IS_BNXT_DEV_957508_N2100(bp)) {
+	if (!new.link_status || bnxt_force_link_config(bp)) {
 		rc = bnxt_set_hwrm_link_config(bp, true);
 		if (rc) {
 			PMD_DRV_LOG(ERR, "Failed to update PHY settings\n");
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.547524942 +0800
+++ 0049-net-bnxt-force-PHY-update-on-certain-configurations.patch	2022-06-21 15:37:49.064451347 +0800
@@ -1 +1 @@
-From 9c1410bed3d801a63c8c5b47d457a7f69e95e989 Mon Sep 17 00:00:00 2001
+From f5cee4b2cacf4f9b3435fd2591d70a341d3d43b6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9c1410bed3d801a63c8c5b47d457a7f69e95e989 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index e4e8e8ecf8..e86e51e1fa 100644
+index 61bb59feb6..0696b8a99d 100644
@@ -28,2 +30,2 @@
-@@ -72,8 +72,7 @@
- #define BROADCOM_DEV_ID_58818_VF	0xd82e
+@@ -82,8 +82,7 @@
+ #define BROADCOM_DEV_ID_58802_VF	0xd800
@@ -37 +39 @@
- #define BNXT_NUM_VLANS		2
+ #define VLAN_TAG_SIZE		4
@@ -39 +41 @@
-index 181de42d15..1904db93c4 100644
+index fdcc73d432..742a020cae 100644
@@ -42 +44 @@
-@@ -659,6 +659,19 @@ static int bnxt_init_ctx_mem(struct bnxt *bp)
+@@ -670,6 +670,19 @@ static int bnxt_init_ctx_mem(struct bnxt *bp)
@@ -62 +64 @@
-@@ -671,11 +684,12 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
+@@ -682,11 +695,12 @@ static int bnxt_update_phy_setting(struct bnxt *bp)

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

* patch 'net/bnxt: fix link status when port is stopped' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (48 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bnxt: force PHY update on certain configurations' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bnxt: recheck FW readiness if in reset process' " Xueming Li
                   ` (65 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c105904aaa91b24a6c5708693eb6623426a828ba

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c105904aaa91b24a6c5708693eb6623426a828ba Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:18 +0530
Subject: [PATCH] net/bnxt: fix link status when port is stopped
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7b6eba8856ce3088a759d8e14bb0b73872f65526 ]

Driver forces link down during port stop. But device is not obliged
link down in certain scenarios, even when forced. In that case,
subsequent link queries returns link as up.
Fixed to return link status as down when port is stopped.
Driver is already doing that for VF/NPAR/MH functions.

Fixes: c09f57b49c13 ("net/bnxt: add start/stop/link update operations")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 742a020cae..e3fd3dcb7e 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1774,6 +1774,14 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
 	if (bp->link_info == NULL)
 		goto out;
 
+	/* Only single function PF can bring the phy down.
+	 * In certain scenarios, device is not obliged link down even when forced.
+	 * When port is stopped, report link down in those cases.
+	 */
+	if (!eth_dev->data->dev_started &&
+	    (!BNXT_SINGLE_PF(bp) || bnxt_force_link_config(bp)))
+		goto out;
+
 	do {
 		/* Retrieve link info from hardware */
 		rc = bnxt_get_hwrm_link_config(bp, &new);
@@ -1791,12 +1799,6 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
 		rte_delay_ms(BNXT_LINK_WAIT_INTERVAL);
 	} while (cnt--);
 
-	/* Only single function PF can bring phy down.
-	 * When port is stopped, report link down for VF/MH/NPAR functions.
-	 */
-	if (!BNXT_SINGLE_PF(bp) && !eth_dev->data->dev_started)
-		memset(&new, 0, sizeof(new));
-
 out:
 	/* Timed out or success */
 	if (new.link_status != eth_dev->data->dev_link.link_status ||
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.594442042 +0800
+++ 0050-net-bnxt-fix-link-status-when-port-is-stopped.patch	2022-06-21 15:37:49.067784691 +0800
@@ -1 +1 @@
-From 7b6eba8856ce3088a759d8e14bb0b73872f65526 Mon Sep 17 00:00:00 2001
+From c105904aaa91b24a6c5708693eb6623426a828ba Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7b6eba8856ce3088a759d8e14bb0b73872f65526 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 1904db93c4..69f1117ffa 100644
+index 742a020cae..e3fd3dcb7e 100644
@@ -26 +28 @@
-@@ -1826,6 +1826,14 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
+@@ -1774,6 +1774,14 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
@@ -41 +43 @@
-@@ -1843,12 +1851,6 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
+@@ -1791,12 +1799,6 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)

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

* patch 'net/bnxt: recheck FW readiness if in reset process' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (49 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bnxt: fix link status when port is stopped' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'net/bnxt: fix freeing VNIC filters' " Xueming Li
                   ` (64 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/03a539bf175280b8b9927846f6f0633ce3311cc2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 03a539bf175280b8b9927846f6f0633ce3311cc2 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:19 +0530
Subject: [PATCH] net/bnxt: recheck FW readiness if in reset process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5591bb92ced3a841398eec4444f593a22b1ca6ea ]

If Firmware is still in reset process and returns the error
HWRM_ERR_CODE_HOT_RESET_PROGRESS, retry VER_GET command.
We have to do it in bnxt_handle_if_change_status().

Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e3fd3dcb7e..281c209335 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -188,6 +188,7 @@ static int bnxt_restore_vlan_filters(struct bnxt *bp);
 static void bnxt_dev_recover(void *arg);
 static void bnxt_free_error_recovery_info(struct bnxt *bp);
 static void bnxt_free_rep_info(struct bnxt *bp);
+static int bnxt_check_fw_ready(struct bnxt *bp);
 
 int is_bnxt_in_error(struct bnxt *bp)
 {
@@ -1321,6 +1322,11 @@ static int bnxt_handle_if_change_status(struct bnxt *bp)
 
 	/* clear fatal flag so that re-init happens */
 	bp->flags &= ~BNXT_FLAG_FATAL_ERROR;
+
+	rc = bnxt_check_fw_ready(bp);
+	if (rc)
+		return rc;
+
 	rc = bnxt_init_resources(bp, true);
 
 	bp->flags &= ~BNXT_FLAG_IF_CHANGE_HOT_FW_RESET_DONE;
@@ -4136,7 +4142,7 @@ static int bnxt_restore_filters(struct bnxt *bp)
 
 static int bnxt_check_fw_ready(struct bnxt *bp)
 {
-	int timeout = bp->fw_reset_max_msecs;
+	int timeout = bp->fw_reset_max_msecs ? : BNXT_MAX_FW_RESET_TIMEOUT;
 	int rc = 0;
 
 	do {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.641248284 +0800
+++ 0051-net-bnxt-recheck-FW-readiness-if-in-reset-process.patch	2022-06-21 15:37:49.074451382 +0800
@@ -1 +1 @@
-From 5591bb92ced3a841398eec4444f593a22b1ca6ea Mon Sep 17 00:00:00 2001
+From 03a539bf175280b8b9927846f6f0633ce3311cc2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5591bb92ced3a841398eec4444f593a22b1ca6ea ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 69f1117ffa..abcb534af6 100644
+index e3fd3dcb7e..281c209335 100644
@@ -24 +26 @@
-@@ -177,6 +177,7 @@ static int bnxt_restore_vlan_filters(struct bnxt *bp);
+@@ -188,6 +188,7 @@ static int bnxt_restore_vlan_filters(struct bnxt *bp);
@@ -32 +34 @@
-@@ -1350,6 +1351,11 @@ static int bnxt_handle_if_change_status(struct bnxt *bp)
+@@ -1321,6 +1322,11 @@ static int bnxt_handle_if_change_status(struct bnxt *bp)
@@ -44 +46 @@
-@@ -4324,7 +4330,7 @@ static int bnxt_restore_filters(struct bnxt *bp)
+@@ -4136,7 +4142,7 @@ static int bnxt_restore_filters(struct bnxt *bp)

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

* patch 'net/bnxt: fix freeing VNIC filters' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (50 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bnxt: recheck FW readiness if in reset process' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:01 ` patch 'eal/x86: fix unaligned access for small memcpy' " Xueming Li
                   ` (63 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Kalesh AP, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ca4a019b457c6ef40b5edb28461f919934f03c30

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ca4a019b457c6ef40b5edb28461f919934f03c30 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:20 +0530
Subject: [PATCH] net/bnxt: fix freeing VNIC filters
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2df7dfffe3dc5d6b65c77a7fbe155e38a9e3dc24 ]

In bnxt_free_all_filters(), all the filters attached to a vnic are removed.
But each of these filters hold a backreference ptr to the vnic and they
need to be reset to NULL now. Otherwise, during a normal testpmd quit, as
part of dev_close_op(), first bnxt_free_all_filters() is invoked in
dev_stop, followed by bnxt_free_filter_mem() from bnxt_uninit_resources(),
which finds a filter with a vnic back reference ptr and now
bnxt_hwrm_clean_up_l2_filter() also tries to remove the filter from the
vnic's filter list which was already done as part of
bnxt_free_all_filters().

Fixes: f0f6b5e6cf94 ("net/bnxt: fix reusing L2 filter")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_filter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index 6d85983242..5e3e5b8034 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -99,6 +99,8 @@ void bnxt_free_all_filters(struct bnxt *bp)
 					bnxt_filter_info, next);
 			STAILQ_INSERT_TAIL(&bp->free_filter_list,
 					filter, next);
+			if (filter->vnic)
+				filter->vnic = NULL;
 			filter = temp_filter;
 		}
 		STAILQ_INIT(&vnic->filter);
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.687453159 +0800
+++ 0052-net-bnxt-fix-freeing-VNIC-filters.patch	2022-06-21 15:37:49.074451382 +0800
@@ -1 +1 @@
-From 2df7dfffe3dc5d6b65c77a7fbe155e38a9e3dc24 Mon Sep 17 00:00:00 2001
+From ca4a019b457c6ef40b5edb28461f919934f03c30 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2df7dfffe3dc5d6b65c77a7fbe155e38a9e3dc24 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 1d08e03b2f..b0c3bbd1b2 100644
+index 6d85983242..5e3e5b8034 100644

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

* patch 'eal/x86: fix unaligned access for small memcpy' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (51 preceding siblings ...)
  2022-06-21  8:01 ` patch 'net/bnxt: fix freeing VNIC filters' " Xueming Li
@ 2022-06-21  8:01 ` Xueming Li
  2022-06-21  8:02 ` patch 'examples/l3fwd: fix scalar LPM' " Xueming Li
                   ` (62 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:01 UTC (permalink / raw)
  To: Luc Pelletier; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/705be73150297d6254e327bc64c57e48409f02df

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 705be73150297d6254e327bc64c57e48409f02df Mon Sep 17 00:00:00 2001
From: Luc Pelletier <lucp.at.work@gmail.com>
Date: Fri, 25 Feb 2022 11:38:05 -0500
Subject: [PATCH] eal/x86: fix unaligned access for small memcpy
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 00901e4d1a9ee7c7b43d0a3592683f0a420a331d ]

Calls to rte_memcpy for 1 < n < 16 could result in unaligned
loads/stores, which is undefined behaviour according to the C
standard, and strict aliasing violations.

The code was changed to use a packed structure that allows aliasing
(using the __may_alias__ attribute) to perform the load/store
operations. This results in code that has the same performance as the
original code and that is also C standards-compliant.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Luc Pelletier <lucp.at.work@gmail.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_eal/include/rte_common.h     |   5 +
 lib/librte_eal/x86/include/rte_memcpy.h | 133 +++++++++---------------
 2 files changed, 56 insertions(+), 82 deletions(-)

diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h
index 1b630baf16..677b52a2f8 100644
--- a/lib/librte_eal/include/rte_common.h
+++ b/lib/librte_eal/include/rte_common.h
@@ -83,6 +83,11 @@ typedef uint16_t unaligned_uint16_t;
  */
 #define __rte_packed __attribute__((__packed__))
 
+/**
+ * Macro to mark a type that is not subject to type-based aliasing rules
+ */
+#define __rte_may_alias __attribute__((__may_alias__))
+
 /******* Macro to mark functions and fields scheduled for removal *****/
 #define __rte_deprecated	__attribute__((__deprecated__))
 #define __rte_deprecated_msg(msg)	__attribute__((__deprecated__(msg)))
diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h
index 1b6c6e585f..18aa4e43a7 100644
--- a/lib/librte_eal/x86/include/rte_memcpy.h
+++ b/lib/librte_eal/x86/include/rte_memcpy.h
@@ -45,6 +45,52 @@ extern "C" {
 static __rte_always_inline void *
 rte_memcpy(void *dst, const void *src, size_t n);
 
+/**
+ * Copy bytes from one location to another,
+ * locations should not overlap.
+ * Use with n <= 15.
+ */
+static __rte_always_inline void *
+rte_mov15_or_less(void *dst, const void *src, size_t n)
+{
+	/**
+	 * Use the following structs to avoid violating C standard
+	 * alignment requirements and to avoid strict aliasing bugs
+	 */
+	struct rte_uint64_alias {
+		uint64_t val;
+	} __rte_packed __rte_may_alias;
+	struct rte_uint32_alias {
+		uint32_t val;
+	} __rte_packed __rte_may_alias;
+	struct rte_uint16_alias {
+		uint16_t val;
+	} __rte_packed __rte_may_alias;
+
+	void *ret = dst;
+	if (n & 8) {
+		((struct rte_uint64_alias *)dst)->val =
+			((const struct rte_uint64_alias *)src)->val;
+		src = (const uint64_t *)src + 1;
+		dst = (uint64_t *)dst + 1;
+	}
+	if (n & 4) {
+		((struct rte_uint32_alias *)dst)->val =
+			((const struct rte_uint32_alias *)src)->val;
+		src = (const uint32_t *)src + 1;
+		dst = (uint32_t *)dst + 1;
+	}
+	if (n & 2) {
+		((struct rte_uint16_alias *)dst)->val =
+			((const struct rte_uint16_alias *)src)->val;
+		src = (const uint16_t *)src + 1;
+		dst = (uint16_t *)dst + 1;
+	}
+	if (n & 1)
+		*(uint8_t *)dst = *(const uint8_t *)src;
+	return ret;
+}
+
 #if defined __AVX512F__ && defined RTE_MEMCPY_AVX512
 
 #define ALIGNMENT_MASK 0x3F
@@ -171,8 +217,6 @@ rte_mov512blocks(uint8_t *dst, const uint8_t *src, size_t n)
 static __rte_always_inline void *
 rte_memcpy_generic(void *dst, const void *src, size_t n)
 {
-	uintptr_t dstu = (uintptr_t)dst;
-	uintptr_t srcu = (uintptr_t)src;
 	void *ret = dst;
 	size_t dstofss;
 	size_t bits;
@@ -181,24 +225,7 @@ rte_memcpy_generic(void *dst, const void *src, size_t n)
 	 * Copy less than 16 bytes
 	 */
 	if (n < 16) {
-		if (n & 0x01) {
-			*(uint8_t *)dstu = *(const uint8_t *)srcu;
-			srcu = (uintptr_t)((const uint8_t *)srcu + 1);
-			dstu = (uintptr_t)((uint8_t *)dstu + 1);
-		}
-		if (n & 0x02) {
-			*(uint16_t *)dstu = *(const uint16_t *)srcu;
-			srcu = (uintptr_t)((const uint16_t *)srcu + 1);
-			dstu = (uintptr_t)((uint16_t *)dstu + 1);
-		}
-		if (n & 0x04) {
-			*(uint32_t *)dstu = *(const uint32_t *)srcu;
-			srcu = (uintptr_t)((const uint32_t *)srcu + 1);
-			dstu = (uintptr_t)((uint32_t *)dstu + 1);
-		}
-		if (n & 0x08)
-			*(uint64_t *)dstu = *(const uint64_t *)srcu;
-		return ret;
+		return rte_mov15_or_less(dst, src, n);
 	}
 
 	/**
@@ -379,8 +406,6 @@ rte_mov128blocks(uint8_t *dst, const uint8_t *src, size_t n)
 static __rte_always_inline void *
 rte_memcpy_generic(void *dst, const void *src, size_t n)
 {
-	uintptr_t dstu = (uintptr_t)dst;
-	uintptr_t srcu = (uintptr_t)src;
 	void *ret = dst;
 	size_t dstofss;
 	size_t bits;
@@ -389,25 +414,7 @@ rte_memcpy_generic(void *dst, const void *src, size_t n)
 	 * Copy less than 16 bytes
 	 */
 	if (n < 16) {
-		if (n & 0x01) {
-			*(uint8_t *)dstu = *(const uint8_t *)srcu;
-			srcu = (uintptr_t)((const uint8_t *)srcu + 1);
-			dstu = (uintptr_t)((uint8_t *)dstu + 1);
-		}
-		if (n & 0x02) {
-			*(uint16_t *)dstu = *(const uint16_t *)srcu;
-			srcu = (uintptr_t)((const uint16_t *)srcu + 1);
-			dstu = (uintptr_t)((uint16_t *)dstu + 1);
-		}
-		if (n & 0x04) {
-			*(uint32_t *)dstu = *(const uint32_t *)srcu;
-			srcu = (uintptr_t)((const uint32_t *)srcu + 1);
-			dstu = (uintptr_t)((uint32_t *)dstu + 1);
-		}
-		if (n & 0x08) {
-			*(uint64_t *)dstu = *(const uint64_t *)srcu;
-		}
-		return ret;
+		return rte_mov15_or_less(dst, src, n);
 	}
 
 	/**
@@ -672,8 +679,6 @@ static __rte_always_inline void *
 rte_memcpy_generic(void *dst, const void *src, size_t n)
 {
 	__m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8;
-	uintptr_t dstu = (uintptr_t)dst;
-	uintptr_t srcu = (uintptr_t)src;
 	void *ret = dst;
 	size_t dstofss;
 	size_t srcofs;
@@ -682,25 +687,7 @@ rte_memcpy_generic(void *dst, const void *src, size_t n)
 	 * Copy less than 16 bytes
 	 */
 	if (n < 16) {
-		if (n & 0x01) {
-			*(uint8_t *)dstu = *(const uint8_t *)srcu;
-			srcu = (uintptr_t)((const uint8_t *)srcu + 1);
-			dstu = (uintptr_t)((uint8_t *)dstu + 1);
-		}
-		if (n & 0x02) {
-			*(uint16_t *)dstu = *(const uint16_t *)srcu;
-			srcu = (uintptr_t)((const uint16_t *)srcu + 1);
-			dstu = (uintptr_t)((uint16_t *)dstu + 1);
-		}
-		if (n & 0x04) {
-			*(uint32_t *)dstu = *(const uint32_t *)srcu;
-			srcu = (uintptr_t)((const uint32_t *)srcu + 1);
-			dstu = (uintptr_t)((uint32_t *)dstu + 1);
-		}
-		if (n & 0x08) {
-			*(uint64_t *)dstu = *(const uint64_t *)srcu;
-		}
-		return ret;
+		return rte_mov15_or_less(dst, src, n);
 	}
 
 	/**
@@ -818,27 +805,9 @@ rte_memcpy_aligned(void *dst, const void *src, size_t n)
 {
 	void *ret = dst;
 
-	/* Copy size <= 16 bytes */
+	/* Copy size < 16 bytes */
 	if (n < 16) {
-		if (n & 0x01) {
-			*(uint8_t *)dst = *(const uint8_t *)src;
-			src = (const uint8_t *)src + 1;
-			dst = (uint8_t *)dst + 1;
-		}
-		if (n & 0x02) {
-			*(uint16_t *)dst = *(const uint16_t *)src;
-			src = (const uint16_t *)src + 1;
-			dst = (uint16_t *)dst + 1;
-		}
-		if (n & 0x04) {
-			*(uint32_t *)dst = *(const uint32_t *)src;
-			src = (const uint32_t *)src + 1;
-			dst = (uint32_t *)dst + 1;
-		}
-		if (n & 0x08)
-			*(uint64_t *)dst = *(const uint64_t *)src;
-
-		return ret;
+		return rte_mov15_or_less(dst, src, n);
 	}
 
 	/* Copy 16 <= size <= 32 bytes */
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.730081067 +0800
+++ 0053-eal-x86-fix-unaligned-access-for-small-memcpy.patch	2022-06-21 15:37:49.074451382 +0800
@@ -1 +1 @@
-From 00901e4d1a9ee7c7b43d0a3592683f0a420a331d Mon Sep 17 00:00:00 2001
+From 705be73150297d6254e327bc64c57e48409f02df Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 00901e4d1a9ee7c7b43d0a3592683f0a420a331d ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +24,2 @@
- lib/eal/include/rte_common.h     |   5 ++
- lib/eal/x86/include/rte_memcpy.h | 133 ++++++++++++-------------------
+ lib/librte_eal/include/rte_common.h     |   5 +
+ lib/librte_eal/x86/include/rte_memcpy.h | 133 +++++++++---------------
@@ -26,5 +28,5 @@
-diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
-index d56a7570c0..a96cc2a138 100644
---- a/lib/eal/include/rte_common.h
-+++ b/lib/eal/include/rte_common.h
-@@ -85,6 +85,11 @@ typedef uint16_t unaligned_uint16_t;
+diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h
+index 1b630baf16..677b52a2f8 100644
+--- a/lib/librte_eal/include/rte_common.h
++++ b/lib/librte_eal/include/rte_common.h
+@@ -83,6 +83,11 @@ typedef uint16_t unaligned_uint16_t;
@@ -42 +44 @@
-diff --git a/lib/eal/x86/include/rte_memcpy.h b/lib/eal/x86/include/rte_memcpy.h
+diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h
@@ -44,2 +46,2 @@
---- a/lib/eal/x86/include/rte_memcpy.h
-+++ b/lib/eal/x86/include/rte_memcpy.h
+--- a/lib/librte_eal/x86/include/rte_memcpy.h
++++ b/lib/librte_eal/x86/include/rte_memcpy.h

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

* patch 'examples/l3fwd: fix scalar LPM' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (52 preceding siblings ...)
  2022-06-21  8:01 ` patch 'eal/x86: fix unaligned access for small memcpy' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'test/ring: remove excessive inlining' " Xueming Li
                   ` (61 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Stanislaw Kardach; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/597718802f0aff211828287a5b2f04fd79a33c7f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 597718802f0aff211828287a5b2f04fd79a33c7f Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Wed, 11 May 2022 16:56:50 +0200
Subject: [PATCH] examples/l3fwd: fix scalar LPM
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a137eb2b2512c202eb01ba96bb592a24cffc72c8 ]

The lpm_process_event_pkt() can either process a packet using an
architecture specific (defined for X86/SSE, ARM/Neon and PPC64/Altivec)
path or a scalar one. The choice is however done using an ifdef
pre-processor macro. Because of that the scalar version was apparently
not widely exercised/compiled.
Due to some copy/paste errors, the scalar logic in
lpm_process_event_pkt() retained a "continue" statement where it should
utilize rfc1812_process() and return the port/BAD_PORT.

Fixes: 99fc91d18082 ("examples/l3fwd: add event lpm main loop")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 examples/l3fwd/l3fwd_lpm.c | 24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index 1cfaf36572..40f3366adc 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -28,6 +28,7 @@
 #include <rte_lpm6.h>
 
 #include "l3fwd.h"
+#include "l3fwd_common.h"
 #include "l3fwd_event.h"
 
 struct ipv4_l3fwd_lpm_route {
@@ -272,30 +273,17 @@ lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf)
 
 	struct rte_ether_hdr *eth_hdr = rte_pktmbuf_mtod(mbuf,
 			struct rte_ether_hdr *);
-#ifdef DO_RFC_1812_CHECKS
-	struct rte_ipv4_hdr *ipv4_hdr;
-	if (RTE_ETH_IS_IPV4_HDR(mbuf->packet_type)) {
-		/* Handle IPv4 headers.*/
-		ipv4_hdr = rte_pktmbuf_mtod_offset(mbuf,
-				struct rte_ipv4_hdr *,
-				sizeof(struct rte_ether_hdr));
-
-		if (is_valid_ipv4_pkt(ipv4_hdr, mbuf->pkt_len)
-				< 0) {
-			mbuf->port = BAD_PORT;
-			continue;
-		}
-		/* Update time to live and header checksum */
-		--(ipv4_hdr->time_to_live);
-		++(ipv4_hdr->hdr_checksum);
-	}
-#endif
+
 	/* dst addr */
 	*(uint64_t *)&eth_hdr->d_addr = dest_eth_addr[mbuf->port];
 
 	/* src addr */
 	rte_ether_addr_copy(&ports_eth_addr[mbuf->port],
 			&eth_hdr->s_addr);
+
+	rfc1812_process(rte_pktmbuf_mtod_offset(mbuf, struct rte_ipv4_hdr *,
+						sizeof(struct rte_ether_hdr)),
+			&mbuf->port, mbuf->packet_type);
 #endif
 	return mbuf->port;
 }
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.773151153 +0800
+++ 0054-examples-l3fwd-fix-scalar-LPM.patch	2022-06-21 15:37:49.074451382 +0800
@@ -1 +1 @@
-From a137eb2b2512c202eb01ba96bb592a24cffc72c8 Mon Sep 17 00:00:00 2001
+From 597718802f0aff211828287a5b2f04fd79a33c7f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a137eb2b2512c202eb01ba96bb592a24cffc72c8 ]
@@ -24 +27 @@
-index 501fc5db5e..d1b850dd5b 100644
+index 1cfaf36572..40f3366adc 100644
@@ -34,2 +37,2 @@
- #include "lpm_route_parse.c"
-@@ -237,30 +238,17 @@ lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf)
+ struct ipv4_l3fwd_lpm_route {
+@@ -272,30 +273,17 @@ lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf)
@@ -59 +62 @@
- 	*(uint64_t *)&eth_hdr->dst_addr = dest_eth_addr[mbuf->port];
+ 	*(uint64_t *)&eth_hdr->d_addr = dest_eth_addr[mbuf->port];
@@ -63 +66 @@
- 			&eth_hdr->src_addr);
+ 			&eth_hdr->s_addr);

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

* patch 'test/ring: remove excessive inlining' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (53 preceding siblings ...)
  2022-06-21  8:02 ` patch 'examples/l3fwd: fix scalar LPM' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'eal/freebsd: fix use of newer cpuset macros' " Xueming Li
                   ` (60 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Stanislaw Kardach
  Cc: Bruce Richardson, Honnappa Nagarahalli, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8d8739b082947b014d4a6b3bc27a01a548d40d47

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8d8739b082947b014d4a6b3bc27a01a548d40d47 Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Wed, 11 May 2022 17:07:25 +0200
Subject: [PATCH] test/ring: remove excessive inlining
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 981a025741f80b4036f994ed30b04e757299ab19 ]

Forcing inlining in test_ring_enqueue and test_ring_dequeue can cause
the compiled code to grow extensively when compiled with no optimization
(-O0 or -Og). This is default in the meson's debug configuration. This
can collide with compiler bugs and cause issues during linking of unit
tests where the api_type or esize are non-const variables causing
inlining cascade. In perf tests this is not the case in perf-tests as
esize and api_type are const values.

One such case was discovered when porting DPDK to RISC-V. GCC 11.2 (and
no fix still in 12.1) is generating a short relative jump instruction
(J <offset>) for goto and for loops. When loop body grows extensively in
ring test, the target offset goes beyond supported offfset of +/- 1MB
from PC. This is an obvious bug in the GCC as RISC-V has a
two-instruction construct to jump to any absolute address (AUIPC+JALR).

However there is no reason to force inlining as the test code works
perfectly fine without it.

GCC has a bug report for a similar case (with conditionals):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93062

Fixes: a9fe152363e2 ("test/ring: add custom element size functional tests")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
---
 app/test/test_ring.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test/test_ring.h b/app/test/test_ring.h
index c8bfec8399..45c263f3ff 100644
--- a/app/test/test_ring.h
+++ b/app/test/test_ring.h
@@ -97,7 +97,7 @@ test_ring_copy_from(struct rte_ring_zc_data *zcd, void *dst, int esize,
 	}
 }
 
-static __rte_always_inline unsigned int
+static inline unsigned int
 test_ring_enqueue(struct rte_ring *r, void **obj, int esize, unsigned int n,
 			unsigned int api_type)
 {
@@ -158,7 +158,7 @@ test_ring_enqueue(struct rte_ring *r, void **obj, int esize, unsigned int n,
 		}
 }
 
-static __rte_always_inline unsigned int
+static inline unsigned int
 test_ring_dequeue(struct rte_ring *r, void **obj, int esize, unsigned int n,
 			unsigned int api_type)
 {
@@ -222,7 +222,7 @@ test_ring_dequeue(struct rte_ring *r, void **obj, int esize, unsigned int n,
 /* This function is placed here as it is required for both
  * performance and functional tests.
  */
-static __rte_always_inline void *
+static inline void *
 test_ring_calloc(unsigned int rsize, int esize)
 {
 	unsigned int sz;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.816897432 +0800
+++ 0055-test-ring-remove-excessive-inlining.patch	2022-06-21 15:37:49.074451382 +0800
@@ -1 +1 @@
-From 981a025741f80b4036f994ed30b04e757299ab19 Mon Sep 17 00:00:00 2001
+From 8d8739b082947b014d4a6b3bc27a01a548d40d47 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 981a025741f80b4036f994ed30b04e757299ab19 ]

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

* patch 'eal/freebsd: fix use of newer cpuset macros' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (54 preceding siblings ...)
  2022-06-21  8:02 ` patch 'test/ring: remove excessive inlining' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'test: avoid hang if queues are full and Tx fails' " Xueming Li
                   ` (59 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, Daxue Gao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/875e84259c1a9ac2f293e3d0345c0d7d1e04869a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 875e84259c1a9ac2f293e3d0345c0d7d1e04869a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 20 May 2022 19:10:50 +0100
Subject: [PATCH] eal/freebsd: fix use of newer cpuset macros
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2f51bc9c27a4f1da674d66499667155663dcc419 ]

FreeBSD has updated its CPU macros to align more with the definitions
used on Linux[1]. Unfortunately, while this makes compatibility better
in future, it means we need to have both legacy and newer definition
support. Use a meson check to determine which set of macros are used.

[1] https://cgit.freebsd.org/src/commit/?id=e2650af157bc

Bugzilla ID: 1014
Fixes: c3568ea37670 ("eal: restrict control threads to startup CPU affinity")
Fixes: b6be16acfeb1 ("eal: fix control thread affinity with --lcores")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
---
 lib/librte_eal/freebsd/include/rte_os.h | 17 ++++++++++++++++-
 lib/librte_eal/freebsd/meson.build      | 11 +++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/freebsd/include/rte_os.h b/lib/librte_eal/freebsd/include/rte_os.h
index 81a32387a0..e3c9f80720 100644
--- a/lib/librte_eal/freebsd/include/rte_os.h
+++ b/lib/librte_eal/freebsd/include/rte_os.h
@@ -18,6 +18,8 @@ extern "C" {
 
 typedef cpuset_t rte_cpuset_t;
 #define RTE_HAS_CPUSET
+
+#ifdef RTE_EAL_FREEBSD_CPUSET_LEGACY
 #define RTE_CPU_AND(dst, src1, src2) do \
 { \
 	cpuset_t tmp; \
@@ -51,7 +53,20 @@ typedef cpuset_t rte_cpuset_t;
 	CPU_ANDNOT(&tmp, src); \
 	CPU_COPY(&tmp, dst); \
 } while (0)
-#endif
+#endif /* CPU_NAND */
+
+#else /* RTE_EAL_FREEBSD_CPUSET_LEGACY */
+
+#define RTE_CPU_AND CPU_AND
+#define RTE_CPU_OR CPU_OR
+#define RTE_CPU_FILL CPU_FILL
+#define RTE_CPU_NOT(dst, src) do { \
+	cpu_set_t tmp; \
+	CPU_FILL(&tmp); \
+	CPU_XOR(dst, src, &tmp); \
+} while (0)
+
+#endif /* RTE_EAL_FREEBSD_CPUSET_LEGACY */
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_eal/freebsd/meson.build b/lib/librte_eal/freebsd/meson.build
index e10fd8a16d..0b7e2ca4a1 100644
--- a/lib/librte_eal/freebsd/meson.build
+++ b/lib/librte_eal/freebsd/meson.build
@@ -19,3 +19,14 @@ sources += files(
 )
 
 deps += ['kvargs', 'telemetry']
+                                                                                                                                                                                                        
+# test for version of cpuset macros                                                                                                                                                                      
+cpuset_test_code = '''                                                                                                                                                                                   
+        #include <sys/types.h>                                                                                                                                                                           
+        #include <sys/cpuset.h>                                                                                                                                                                          
+        void cpu_test_or(cpuset_t *s) { CPU_OR(s, s, s); }                                                                                                                                               
+'''                                                                                                                                                                                                      
+                                                                                                                                                                                                         
+if not cc.compiles(cpuset_test_code, name: 'Detect argument count for CPU_OR')                                                                                                                           
+    dpdk_conf.set('RTE_EAL_FREEBSD_CPUSET_LEGACY', 1)                                                                                                                                                    
+endif   
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.858968151 +0800
+++ 0056-eal-freebsd-fix-use-of-newer-cpuset-macros.patch	2022-06-21 15:37:49.077784727 +0800
@@ -1 +1 @@
-From 2f51bc9c27a4f1da674d66499667155663dcc419 Mon Sep 17 00:00:00 2001
+From 875e84259c1a9ac2f293e3d0345c0d7d1e04869a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2f51bc9c27a4f1da674d66499667155663dcc419 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +24,2 @@
- lib/eal/freebsd/include/rte_os.h | 17 ++++++++++++++++-
- lib/eal/freebsd/meson.build      | 11 +++++++++++
+ lib/librte_eal/freebsd/include/rte_os.h | 17 ++++++++++++++++-
+ lib/librte_eal/freebsd/meson.build      | 11 +++++++++++
@@ -26,5 +28,5 @@
-diff --git a/lib/eal/freebsd/include/rte_os.h b/lib/eal/freebsd/include/rte_os.h
-index b4afd45adc..003468caff 100644
---- a/lib/eal/freebsd/include/rte_os.h
-+++ b/lib/eal/freebsd/include/rte_os.h
-@@ -28,6 +28,8 @@ extern "C" {
+diff --git a/lib/librte_eal/freebsd/include/rte_os.h b/lib/librte_eal/freebsd/include/rte_os.h
+index 81a32387a0..e3c9f80720 100644
+--- a/lib/librte_eal/freebsd/include/rte_os.h
++++ b/lib/librte_eal/freebsd/include/rte_os.h
+@@ -18,6 +18,8 @@ extern "C" {
@@ -39 +41 @@
-@@ -61,7 +63,20 @@ typedef cpuset_t rte_cpuset_t;
+@@ -51,7 +53,20 @@ typedef cpuset_t rte_cpuset_t;
@@ -61,4 +63,4 @@
-diff --git a/lib/eal/freebsd/meson.build b/lib/eal/freebsd/meson.build
-index 398ceab71d..fe9097303a 100644
---- a/lib/eal/freebsd/meson.build
-+++ b/lib/eal/freebsd/meson.build
+diff --git a/lib/librte_eal/freebsd/meson.build b/lib/librte_eal/freebsd/meson.build
+index e10fd8a16d..0b7e2ca4a1 100644
+--- a/lib/librte_eal/freebsd/meson.build
++++ b/lib/librte_eal/freebsd/meson.build
@@ -69,11 +71,11 @@
-+
-+# test for version of cpuset macros
-+cpuset_test_code = '''
-+        #include <sys/types.h>
-+        #include <sys/cpuset.h>
-+        void cpu_test_or(cpuset_t *s) { CPU_OR(s, s, s); }
-+'''
-+
-+if not cc.compiles(cpuset_test_code, name: 'Detect argument count for CPU_OR')
-+    dpdk_conf.set('RTE_EAL_FREEBSD_CPUSET_LEGACY', 1)
-+endif
++                                                                                                                                                                                                        
++# test for version of cpuset macros                                                                                                                                                                      
++cpuset_test_code = '''                                                                                                                                                                                   
++        #include <sys/types.h>                                                                                                                                                                           
++        #include <sys/cpuset.h>                                                                                                                                                                          
++        void cpu_test_or(cpuset_t *s) { CPU_OR(s, s, s); }                                                                                                                                               
++'''                                                                                                                                                                                                      
++                                                                                                                                                                                                         
++if not cc.compiles(cpuset_test_code, name: 'Detect argument count for CPU_OR')                                                                                                                           
++    dpdk_conf.set('RTE_EAL_FREEBSD_CPUSET_LEGACY', 1)                                                                                                                                                    
++endif   

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

* patch 'test: avoid hang if queues are full and Tx fails' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (55 preceding siblings ...)
  2022-06-21  8:02 ` patch 'eal/freebsd: fix use of newer cpuset macros' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'acl: fix rules with 8-byte field size' " Xueming Li
                   ` (58 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Rakesh Kudurumalla; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/20ee31283dfda5ede87129fba4d5ec410ab3c1b7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 20ee31283dfda5ede87129fba4d5ec410ab3c1b7 Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Tue, 20 Jul 2021 22:20:52 +0530
Subject: [PATCH] test: avoid hang if queues are full and Tx fails
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 ]

Current pmd_perf_autotest() in continuous mode tries
to enqueue MAX_TRAFFIC_BURST completely before starting
the test. Some drivers cannot accept complete
MAX_TRAFFIC_BURST even though rx+tx desc count can fit it.
This patch changes behaviour to stop enqueuing after few
retries.

Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx")

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 app/test/test_pmd_perf.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 1ef844ba75..6ce02e3787 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -456,6 +456,7 @@ main_loop(__rte_unused void *args)
 #define PACKET_SIZE 64
 #define FRAME_GAP 12
 #define MAC_PREAMBLE 8
+#define MAX_RETRY_COUNT 5
 	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
 	unsigned lcore_id;
 	unsigned i, portid, nb_rx = 0, nb_tx = 0;
@@ -463,6 +464,8 @@ main_loop(__rte_unused void *args)
 	int pkt_per_port;
 	uint64_t diff_tsc;
 	uint64_t packets_per_second, total_packets;
+	int retry_cnt = 0;
+	int free_pkt = 0;
 
 	lcore_id = rte_lcore_id();
 	conf = &lcore_conf[lcore_id];
@@ -480,10 +483,19 @@ main_loop(__rte_unused void *args)
 			nb_tx = RTE_MIN(MAX_PKT_BURST, num);
 			nb_tx = rte_eth_tx_burst(portid, 0,
 						&tx_burst[idx], nb_tx);
+			if (nb_tx == 0)
+				retry_cnt++;
 			num -= nb_tx;
 			idx += nb_tx;
+			if (retry_cnt == MAX_RETRY_COUNT) {
+				retry_cnt = 0;
+				break;
+			}
 		}
 	}
+	for (free_pkt = idx; free_pkt < (MAX_TRAFFIC_BURST * conf->nb_ports);
+			free_pkt++)
+		rte_pktmbuf_free(tx_burst[free_pkt]);
 	printf("Total packets inject to prime ports = %u\n", idx);
 
 	packets_per_second = (link_mbps * 1000 * 1000) /
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.903408053 +0800
+++ 0057-test-avoid-hang-if-queues-are-full-and-Tx-fails.patch	2022-06-21 15:37:49.077784727 +0800
@@ -1 +1 @@
-From 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 Mon Sep 17 00:00:00 2001
+From 20ee31283dfda5ede87129fba4d5ec410ab3c1b7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 25611bfe9b..ec3dc251d1 100644
+index 1ef844ba75..6ce02e3787 100644

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

* patch 'acl: fix rules with 8-byte field size' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (56 preceding siblings ...)
  2022-06-21  8:02 ` patch 'test: avoid hang if queues are full and Tx fails' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'rib: fix traversal with /32 route' " Xueming Li
                   ` (57 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Ido Goshen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3267a37602b7566f266b5ce276d6cba1e78ce648

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3267a37602b7566f266b5ce276d6cba1e78ce648 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Date: Sun, 15 May 2022 21:03:18 +0100
Subject: [PATCH] acl: fix rules with 8-byte field size
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 451098159c2209bc5c395a30d2dae325af93e8c2 ]

In theory ACL library allows fields with 8B long.
Though in practice they usually not used, not tested,
and as was revealed by Ido, this functionality is not working properly.
There are few places inside ACL build code-path that need to be addressed.

Bugzilla ID: 673
Fixes: dc276b5780c2 ("acl: new library")

Reported-by: Ido Goshen <ido@cgstowernetworks.com>
Signed-off-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Tested-by: Ido Goshen <ido@cgstowernetworks.com>
---
 lib/librte_acl/acl_bld.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/lib/librte_acl/acl_bld.c b/lib/librte_acl/acl_bld.c
index 7ea30f4186..2816632803 100644
--- a/lib/librte_acl/acl_bld.c
+++ b/lib/librte_acl/acl_bld.c
@@ -12,6 +12,9 @@
 /* number of pointers per alloc */
 #define ACL_PTR_ALLOC	32
 
+/* account for situation when all fields are 8B long */
+#define ACL_MAX_INDEXES	(2 * RTE_ACL_MAX_FIELDS)
+
 /* macros for dividing rule sets heuristics */
 #define NODE_MAX	0x4000
 #define NODE_MIN	0x800
@@ -80,7 +83,7 @@ struct acl_build_context {
 	struct tb_mem_pool        pool;
 	struct rte_acl_trie       tries[RTE_ACL_MAX_TRIES];
 	struct rte_acl_bld_trie   bld_tries[RTE_ACL_MAX_TRIES];
-	uint32_t            data_indexes[RTE_ACL_MAX_TRIES][RTE_ACL_MAX_FIELDS];
+	uint32_t            data_indexes[RTE_ACL_MAX_TRIES][ACL_MAX_INDEXES];
 
 	/* memory free lists for nodes and blocks used for node ptrs */
 	struct acl_mem_block      blocks[MEM_BLOCK_NUM];
@@ -988,7 +991,7 @@ build_trie(struct acl_build_context *context, struct rte_acl_build_rule *head,
 				 */
 				uint64_t mask;
 				mask = RTE_ACL_MASKLEN_TO_BITMASK(
-					fld->mask_range.u32,
+					fld->mask_range.u64,
 					rule->config->defs[n].size);
 
 				/* gen a mini-trie for this field */
@@ -1301,6 +1304,9 @@ acl_build_index(const struct rte_acl_config *config, uint32_t *data_index)
 		if (last_header != config->defs[n].input_index) {
 			last_header = config->defs[n].input_index;
 			data_index[m++] = config->defs[n].offset;
+			if (config->defs[n].size > sizeof(uint32_t))
+				data_index[m++] = config->defs[n].offset +
+					sizeof(uint32_t);
 		}
 	}
 
@@ -1487,7 +1493,7 @@ acl_set_data_indexes(struct rte_acl_ctx *ctx)
 		memcpy(ctx->data_indexes + ofs, ctx->trie[i].data_index,
 			n * sizeof(ctx->data_indexes[0]));
 		ctx->trie[i].data_index = ctx->data_indexes + ofs;
-		ofs += RTE_ACL_MAX_FIELDS;
+		ofs += ACL_MAX_INDEXES;
 	}
 }
 
@@ -1643,7 +1649,7 @@ rte_acl_build(struct rte_acl_ctx *ctx, const struct rte_acl_config *cfg)
 			/* allocate and fill run-time  structures. */
 			rc = rte_acl_gen(ctx, bcx.tries, bcx.bld_tries,
 				bcx.num_tries, bcx.cfg.num_categories,
-				RTE_ACL_MAX_FIELDS * RTE_DIM(bcx.tries) *
+				ACL_MAX_INDEXES * RTE_DIM(bcx.tries) *
 				sizeof(ctx->data_indexes[0]), max_size);
 			if (rc == 0) {
 				/* set data indexes. */
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.950916667 +0800
+++ 0058-acl-fix-rules-with-8-byte-field-size.patch	2022-06-21 15:37:49.077784727 +0800
@@ -1 +1 @@
-From 451098159c2209bc5c395a30d2dae325af93e8c2 Mon Sep 17 00:00:00 2001
+From 3267a37602b7566f266b5ce276d6cba1e78ce648 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 451098159c2209bc5c395a30d2dae325af93e8c2 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/acl/acl_bld.c | 14 ++++++++++----
+ lib/librte_acl/acl_bld.c | 14 ++++++++++----
@@ -22 +24 @@
-diff --git a/lib/acl/acl_bld.c b/lib/acl/acl_bld.c
+diff --git a/lib/librte_acl/acl_bld.c b/lib/librte_acl/acl_bld.c
@@ -24,2 +26,2 @@
---- a/lib/acl/acl_bld.c
-+++ b/lib/acl/acl_bld.c
+--- a/lib/librte_acl/acl_bld.c
++++ b/lib/librte_acl/acl_bld.c

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

* patch 'rib: fix traversal with /32 route' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (57 preceding siblings ...)
  2022-06-21  8:02 ` patch 'acl: fix rules with 8-byte field size' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'mbuf: dump outer VLAN' " Xueming Li
                   ` (56 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/52822a9dd80a3d9bfb1fbc7103a0661d6b1dde6d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 52822a9dd80a3d9bfb1fbc7103a0661d6b1dde6d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 14 Apr 2022 13:01:04 -0700
Subject: [PATCH] rib: fix traversal with /32 route
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 ]

If a /32 route is entered in the RIB the code to traverse
will not see end of the tree. This is due to trying
to do a negative shift which is an undefined in C.

Fix by checking for max depth as is already done in rib6.

Fixes: 5a5793a5ffa2 ("rib: add RIB library")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/librte_rib/rte_rib.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_rib/rte_rib.c b/lib/librte_rib/rte_rib.c
index 6c29e1c49a..1a4b10d728 100644
--- a/lib/librte_rib/rte_rib.c
+++ b/lib/librte_rib/rte_rib.c
@@ -73,6 +73,8 @@ is_covered(uint32_t ip1, uint32_t ip2, uint8_t depth)
 static inline struct rte_rib_node *
 get_nxt_node(struct rte_rib_node *node, uint32_t ip)
 {
+	if (node->depth == RIB_MAXDEPTH)
+		return NULL;
 	return (ip & (1 << (31 - node->depth))) ? node->right : node->left;
 }
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:51.994924532 +0800
+++ 0059-rib-fix-traversal-with-32-route.patch	2022-06-21 15:37:49.077784727 +0800
@@ -1 +1 @@
-From 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 Mon Sep 17 00:00:00 2001
+From 52822a9dd80a3d9bfb1fbc7103a0661d6b1dde6d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
- lib/rib/rte_rib.c | 2 ++
+ lib/librte_rib/rte_rib.c | 2 ++
@@ -21,5 +23,5 @@
-diff --git a/lib/rib/rte_rib.c b/lib/rib/rte_rib.c
-index cd9e823068..0603980cab 100644
---- a/lib/rib/rte_rib.c
-+++ b/lib/rib/rte_rib.c
-@@ -71,6 +71,8 @@ is_covered(uint32_t ip1, uint32_t ip2, uint8_t depth)
+diff --git a/lib/librte_rib/rte_rib.c b/lib/librte_rib/rte_rib.c
+index 6c29e1c49a..1a4b10d728 100644
+--- a/lib/librte_rib/rte_rib.c
++++ b/lib/librte_rib/rte_rib.c
+@@ -73,6 +73,8 @@ is_covered(uint32_t ip1, uint32_t ip2, uint8_t depth)

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

* patch 'mbuf: dump outer VLAN' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (58 preceding siblings ...)
  2022-06-21  8:02 ` patch 'rib: fix traversal with /32 route' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'doc: fix API index Markdown syntax' " Xueming Li
                   ` (55 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Ben Magistro; +Cc: Morten Brørup, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/de28f76399f2f683a8802305c2250cf862979f70

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From de28f76399f2f683a8802305c2250cf862979f70 Mon Sep 17 00:00:00 2001
From: Ben Magistro <koncept1@gmail.com>
Date: Mon, 4 Apr 2022 00:56:35 +0000
Subject: [PATCH] mbuf: dump outer VLAN
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4d75f3fcdedd86327c5d515e8fe5ece1ef16394d ]

Enable printing of the outer VLAN if flags indicate it is present.

Signed-off-by: Ben Magistro <koncept1@gmail.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index 5f77840557..6d3eb73ced 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -680,6 +680,9 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 	fprintf(f, "  pkt_len=%u, ol_flags=%#"PRIx64", nb_segs=%u, port=%u",
 		m->pkt_len, m->ol_flags, m->nb_segs, m->port);
 
+	if (m->ol_flags & (PKT_RX_QINQ | PKT_TX_QINQ))
+		fprintf(f, ", vlan_tci_outer=%u", m->vlan_tci_outer);
+
 	if (m->ol_flags & (PKT_RX_VLAN | PKT_TX_VLAN))
 		fprintf(f, ", vlan_tci=%u", m->vlan_tci);
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.035162666 +0800
+++ 0060-mbuf-dump-outer-VLAN.patch	2022-06-21 15:37:49.081118072 +0800
@@ -1 +1 @@
-From 4d75f3fcdedd86327c5d515e8fe5ece1ef16394d Mon Sep 17 00:00:00 2001
+From de28f76399f2f683a8802305c2250cf862979f70 Mon Sep 17 00:00:00 2001
@@ -7,0 +8 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
@@ -9 +10 @@
-Enable printing of the outer VLAN if flags indicate it is present.
+[ upstream commit 4d75f3fcdedd86327c5d515e8fe5ece1ef16394d ]
@@ -11 +12 @@
-Cc: stable@dpdk.org
+Enable printing of the outer VLAN if flags indicate it is present.
@@ -17 +18 @@
- lib/mbuf/rte_mbuf.c | 3 +++
+ lib/librte_mbuf/rte_mbuf.c | 3 +++
@@ -20,5 +21,5 @@
-diff --git a/lib/mbuf/rte_mbuf.c b/lib/mbuf/rte_mbuf.c
-index 87592faccb..a2307cebe6 100644
---- a/lib/mbuf/rte_mbuf.c
-+++ b/lib/mbuf/rte_mbuf.c
-@@ -674,6 +674,9 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
+diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
+index 5f77840557..6d3eb73ced 100644
+--- a/lib/librte_mbuf/rte_mbuf.c
++++ b/lib/librte_mbuf/rte_mbuf.c
+@@ -680,6 +680,9 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
@@ -28 +29 @@
-+	if (m->ol_flags & (RTE_MBUF_F_RX_QINQ | RTE_MBUF_F_TX_QINQ))
++	if (m->ol_flags & (PKT_RX_QINQ | PKT_TX_QINQ))
@@ -31 +32 @@
- 	if (m->ol_flags & (RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_TX_VLAN))
+ 	if (m->ol_flags & (PKT_RX_VLAN | PKT_TX_VLAN))

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

* patch 'doc: fix API index Markdown syntax' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (59 preceding siblings ...)
  2022-06-21  8:02 ` patch 'mbuf: dump outer VLAN' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'devtools: fix null test for NUMA systems' " Xueming Li
                   ` (54 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1d5a0d3379dd277779990d4d90dc0ea1b778942f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1d5a0d3379dd277779990d4d90dc0ea1b778942f Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Wed, 6 Apr 2022 20:10:11 +0300
Subject: [PATCH] doc: fix API index Markdown syntax
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a9d84ead56b40cb9cb5b4efe8709528f12b81e2e ]

API documentation index had spaces between link caption and URL,
which may be unsupported by some Markdown implementations.
That is, "[caption](URL)" is valid but "[caption] (URL)" is not.
The problematic behavior is observed with Doxygen on Windows.
Remove the spaces.
Unfortunately, Markdown syntax is not formally specified.

Fixes: 9bf486e606b0 ("doc: generate HTML for API with doxygen")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 doc/api/doxy-api-index.md | 344 +++++++++++++++++++-------------------
 1 file changed, 172 insertions(+), 172 deletions(-)

diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index 748514e243..0661c5c1f6 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -9,212 +9,212 @@ API
 The public API headers are grouped by topics:
 
 - **device**:
-  [dev]                (@ref rte_dev.h),
-  [ethdev]             (@ref rte_ethdev.h),
-  [ethctrl]            (@ref rte_eth_ctrl.h),
-  [rte_flow]           (@ref rte_flow.h),
-  [rte_tm]             (@ref rte_tm.h),
-  [rte_mtr]            (@ref rte_mtr.h),
-  [bbdev]              (@ref rte_bbdev.h),
-  [cryptodev]          (@ref rte_cryptodev.h),
-  [security]           (@ref rte_security.h),
-  [compressdev]        (@ref rte_compressdev.h),
-  [compress]           (@ref rte_comp.h),
-  [regexdev]           (@ref rte_regexdev.h),
-  [eventdev]           (@ref rte_eventdev.h),
-  [event_eth_rx_adapter]   (@ref rte_event_eth_rx_adapter.h),
-  [event_eth_tx_adapter]   (@ref rte_event_eth_tx_adapter.h),
-  [event_timer_adapter]    (@ref rte_event_timer_adapter.h),
-  [event_crypto_adapter]   (@ref rte_event_crypto_adapter.h),
-  [rawdev]             (@ref rte_rawdev.h),
-  [metrics]            (@ref rte_metrics.h),
-  [bitrate]            (@ref rte_bitrate.h),
-  [latency]            (@ref rte_latencystats.h),
-  [devargs]            (@ref rte_devargs.h),
-  [PCI]                (@ref rte_pci.h),
-  [vdev]               (@ref rte_bus_vdev.h),
-  [vfio]               (@ref rte_vfio.h)
+  [dev](@ref rte_dev.h),
+  [ethdev](@ref rte_ethdev.h),
+  [ethctrl](@ref rte_eth_ctrl.h),
+  [rte_flow](@ref rte_flow.h),
+  [rte_tm](@ref rte_tm.h),
+  [rte_mtr](@ref rte_mtr.h),
+  [bbdev](@ref rte_bbdev.h),
+  [cryptodev](@ref rte_cryptodev.h),
+  [security](@ref rte_security.h),
+  [compressdev](@ref rte_compressdev.h),
+  [compress](@ref rte_comp.h),
+  [regexdev](@ref rte_regexdev.h),
+  [eventdev](@ref rte_eventdev.h),
+  [event_eth_rx_adapter](@ref rte_event_eth_rx_adapter.h),
+  [event_eth_tx_adapter](@ref rte_event_eth_tx_adapter.h),
+  [event_timer_adapter](@ref rte_event_timer_adapter.h),
+  [event_crypto_adapter](@ref rte_event_crypto_adapter.h),
+  [rawdev](@ref rte_rawdev.h),
+  [metrics](@ref rte_metrics.h),
+  [bitrate](@ref rte_bitrate.h),
+  [latency](@ref rte_latencystats.h),
+  [devargs](@ref rte_devargs.h),
+  [PCI](@ref rte_pci.h),
+  [vdev](@ref rte_bus_vdev.h),
+  [vfio](@ref rte_vfio.h)
 
 - **device specific**:
-  [softnic]            (@ref rte_eth_softnic.h),
-  [bond]               (@ref rte_eth_bond.h),
-  [vhost]              (@ref rte_vhost.h),
-  [vdpa]               (@ref rte_vdpa.h),
-  [KNI]                (@ref rte_kni.h),
+  [softnic](@ref rte_eth_softnic.h),
+  [bond](@ref rte_eth_bond.h),
+  [vhost](@ref rte_vhost.h),
+  [vdpa](@ref rte_vdpa.h),
+  [KNI](@ref rte_kni.h),
   [ark]                (@ref rte_pmd_ark.h),
-  [ixgbe]              (@ref rte_pmd_ixgbe.h),
-  [i40e]               (@ref rte_pmd_i40e.h),
-  [ice]                (@ref rte_pmd_ice.h),
-  [iavf]               (@ref rte_pmd_iavf.h),
-  [ioat]               (@ref rte_ioat_rawdev.h),
-  [bnxt]               (@ref rte_pmd_bnxt.h),
-  [dpaa]               (@ref rte_pmd_dpaa.h),
-  [dpaa2]              (@ref rte_pmd_dpaa2.h),
-  [mlx5]               (@ref rte_pmd_mlx5.h),
-  [dpaa2_mempool]      (@ref rte_dpaa2_mempool.h),
-  [dpaa2_cmdif]        (@ref rte_pmd_dpaa2_cmdif.h),
-  [dpaa2_qdma]         (@ref rte_pmd_dpaa2_qdma.h),
-  [crypto_scheduler]   (@ref rte_cryptodev_scheduler.h),
-  [dlb]                (@ref rte_pmd_dlb.h),
-  [dlb2]               (@ref rte_pmd_dlb2.h)
+  [ixgbe](@ref rte_pmd_ixgbe.h),
+  [i40e](@ref rte_pmd_i40e.h),
+  [ice](@ref rte_pmd_ice.h),
+  [iavf](@ref rte_pmd_iavf.h),
+  [ioat](@ref rte_ioat_rawdev.h),
+  [bnxt](@ref rte_pmd_bnxt.h),
+  [dpaa](@ref rte_pmd_dpaa.h),
+  [dpaa2](@ref rte_pmd_dpaa2.h),
+  [mlx5](@ref rte_pmd_mlx5.h),
+  [dpaa2_mempool](@ref rte_dpaa2_mempool.h),
+  [dpaa2_cmdif](@ref rte_pmd_dpaa2_cmdif.h),
+  [dpaa2_qdma](@ref rte_pmd_dpaa2_qdma.h),
+  [crypto_scheduler](@ref rte_cryptodev_scheduler.h),
+  [dlb](@ref rte_pmd_dlb.h),
+  [dlb2](@ref rte_pmd_dlb2.h)
 
 - **memory**:
-  [memseg]             (@ref rte_memory.h),
-  [memzone]            (@ref rte_memzone.h),
-  [mempool]            (@ref rte_mempool.h),
-  [malloc]             (@ref rte_malloc.h),
-  [memcpy]             (@ref rte_memcpy.h)
+  [memseg](@ref rte_memory.h),
+  [memzone](@ref rte_memzone.h),
+  [mempool](@ref rte_mempool.h),
+  [malloc](@ref rte_malloc.h),
+  [memcpy](@ref rte_memcpy.h)
 
 - **timers**:
-  [cycles]             (@ref rte_cycles.h),
-  [timer]              (@ref rte_timer.h),
-  [alarm]              (@ref rte_alarm.h)
+  [cycles](@ref rte_cycles.h),
+  [timer](@ref rte_timer.h),
+  [alarm](@ref rte_alarm.h)
 
 - **locks**:
-  [atomic]             (@ref rte_atomic.h),
-  [mcslock]            (@ref rte_mcslock.h),
-  [rwlock]             (@ref rte_rwlock.h),
-  [spinlock]           (@ref rte_spinlock.h),
-  [ticketlock]         (@ref rte_ticketlock.h),
-  [RCU]                (@ref rte_rcu_qsbr.h)
+  [atomic](@ref rte_atomic.h),
+  [mcslock](@ref rte_mcslock.h),
+  [rwlock](@ref rte_rwlock.h),
+  [spinlock](@ref rte_spinlock.h),
+  [ticketlock](@ref rte_ticketlock.h),
+  [RCU](@ref rte_rcu_qsbr.h)
 
 - **CPU arch**:
-  [branch prediction]  (@ref rte_branch_prediction.h),
-  [cache prefetch]     (@ref rte_prefetch.h),
-  [SIMD]               (@ref rte_vect.h),
-  [byte order]         (@ref rte_byteorder.h),
-  [CPU flags]          (@ref rte_cpuflags.h),
-  [CPU pause]          (@ref rte_pause.h),
-  [I/O access]         (@ref rte_io.h)
+  [branch prediction](@ref rte_branch_prediction.h),
+  [cache prefetch](@ref rte_prefetch.h),
+  [SIMD](@ref rte_vect.h),
+  [byte order](@ref rte_byteorder.h),
+  [CPU flags](@ref rte_cpuflags.h),
+  [CPU pause](@ref rte_pause.h),
+  [I/O access](@ref rte_io.h)
 
 - **CPU multicore**:
-  [interrupts]         (@ref rte_interrupts.h),
-  [launch]             (@ref rte_launch.h),
-  [lcore]              (@ref rte_lcore.h),
-  [per-lcore]          (@ref rte_per_lcore.h),
-  [service cores]      (@ref rte_service.h),
-  [keepalive]          (@ref rte_keepalive.h),
-  [power/freq]         (@ref rte_power.h)
+  [interrupts](@ref rte_interrupts.h),
+  [launch](@ref rte_launch.h),
+  [lcore](@ref rte_lcore.h),
+  [per-lcore](@ref rte_per_lcore.h),
+  [service cores](@ref rte_service.h),
+  [keepalive](@ref rte_keepalive.h),
+  [power/freq](@ref rte_power.h)
 
 - **layers**:
-  [ethernet]           (@ref rte_ether.h),
-  [ARP]                (@ref rte_arp.h),
-  [HIGIG]              (@ref rte_higig.h),
-  [ICMP]               (@ref rte_icmp.h),
-  [ESP]                (@ref rte_esp.h),
-  [IPsec]              (@ref rte_ipsec.h),
-  [IPsec group]        (@ref rte_ipsec_group.h),
-  [IPsec SA]           (@ref rte_ipsec_sa.h),
-  [IPsec SAD]          (@ref rte_ipsec_sad.h),
-  [IP]                 (@ref rte_ip.h),
-  [frag/reass]         (@ref rte_ip_frag.h),
-  [SCTP]               (@ref rte_sctp.h),
-  [TCP]                (@ref rte_tcp.h),
-  [UDP]                (@ref rte_udp.h),
-  [GTP]                (@ref rte_gtp.h),
-  [GRO]                (@ref rte_gro.h),
-  [GSO]                (@ref rte_gso.h),
-  [GRE]                (@ref rte_gre.h),
-  [MPLS]               (@ref rte_mpls.h),
-  [VXLAN]              (@ref rte_vxlan.h),
-  [Geneve]             (@ref rte_geneve.h),
-  [eCPRI]              (@ref rte_ecpri.h)
+  [ethernet](@ref rte_ether.h),
+  [ARP](@ref rte_arp.h),
+  [HIGIG](@ref rte_higig.h),
+  [ICMP](@ref rte_icmp.h),
+  [ESP](@ref rte_esp.h),
+  [IPsec](@ref rte_ipsec.h),
+  [IPsec group](@ref rte_ipsec_group.h),
+  [IPsec SA](@ref rte_ipsec_sa.h),
+  [IPsec SAD](@ref rte_ipsec_sad.h),
+  [IP](@ref rte_ip.h),
+  [frag/reass](@ref rte_ip_frag.h),
+  [SCTP](@ref rte_sctp.h),
+  [TCP](@ref rte_tcp.h),
+  [UDP](@ref rte_udp.h),
+  [GTP](@ref rte_gtp.h),
+  [GRO](@ref rte_gro.h),
+  [GSO](@ref rte_gso.h),
+  [GRE](@ref rte_gre.h),
+  [MPLS](@ref rte_mpls.h),
+  [VXLAN](@ref rte_vxlan.h),
+  [Geneve](@ref rte_geneve.h),
+  [eCPRI](@ref rte_ecpri.h)
 
 - **QoS**:
-  [metering]           (@ref rte_meter.h),
-  [scheduler]          (@ref rte_sched.h),
-  [RED congestion]     (@ref rte_red.h)
+  [metering](@ref rte_meter.h),
+  [scheduler](@ref rte_sched.h),
+  [RED congestion](@ref rte_red.h)
 
 - **routing**:
-  [LPM IPv4 route]     (@ref rte_lpm.h),
-  [LPM IPv6 route]     (@ref rte_lpm6.h),
-  [RIB IPv4]           (@ref rte_rib.h),
-  [RIB IPv6]           (@ref rte_rib6.h),
-  [FIB IPv4]           (@ref rte_fib.h),
-  [FIB IPv6]           (@ref rte_fib6.h)
+  [LPM IPv4 route](@ref rte_lpm.h),
+  [LPM IPv6 route](@ref rte_lpm6.h),
+  [RIB IPv4](@ref rte_rib.h),
+  [RIB IPv6](@ref rte_rib6.h),
+  [FIB IPv4](@ref rte_fib.h),
+  [FIB IPv6](@ref rte_fib6.h)
 
 - **hashes**:
-  [hash]               (@ref rte_hash.h),
-  [jhash]              (@ref rte_jhash.h),
-  [thash]              (@ref rte_thash.h),
-  [FBK hash]           (@ref rte_fbk_hash.h),
-  [CRC hash]           (@ref rte_hash_crc.h)
+  [hash](@ref rte_hash.h),
+  [jhash](@ref rte_jhash.h),
+  [thash](@ref rte_thash.h),
+  [FBK hash](@ref rte_fbk_hash.h),
+  [CRC hash](@ref rte_hash_crc.h)
 
 - **classification**
-  [reorder]            (@ref rte_reorder.h),
-  [distributor]        (@ref rte_distributor.h),
-  [EFD]                (@ref rte_efd.h),
-  [ACL]                (@ref rte_acl.h),
-  [member]             (@ref rte_member.h),
-  [flow classify]      (@ref rte_flow_classify.h),
-  [BPF]                (@ref rte_bpf.h)
+  [reorder](@ref rte_reorder.h),
+  [distributor](@ref rte_distributor.h),
+  [EFD](@ref rte_efd.h),
+  [ACL](@ref rte_acl.h),
+  [member](@ref rte_member.h),
+  [flow classify](@ref rte_flow_classify.h),
+  [BPF](@ref rte_bpf.h)
 
 - **containers**:
-  [mbuf]               (@ref rte_mbuf.h),
-  [mbuf pool ops]      (@ref rte_mbuf_pool_ops.h),
-  [ring]               (@ref rte_ring.h),
-  [stack]              (@ref rte_stack.h),
-  [tailq]              (@ref rte_tailq.h),
-  [bitmap]             (@ref rte_bitmap.h)
+  [mbuf](@ref rte_mbuf.h),
+  [mbuf pool ops](@ref rte_mbuf_pool_ops.h),
+  [ring](@ref rte_ring.h),
+  [stack](@ref rte_stack.h),
+  [tailq](@ref rte_tailq.h),
+  [bitmap](@ref rte_bitmap.h)
 
 - **packet framework**:
-  * [port]             (@ref rte_port.h):
-    [ethdev]           (@ref rte_port_ethdev.h),
-    [ring]             (@ref rte_port_ring.h),
-    [frag]             (@ref rte_port_frag.h),
-    [reass]            (@ref rte_port_ras.h),
-    [sched]            (@ref rte_port_sched.h),
-    [kni]              (@ref rte_port_kni.h),
-    [src/sink]         (@ref rte_port_source_sink.h)
-  * [table]            (@ref rte_table.h):
-    [lpm IPv4]         (@ref rte_table_lpm.h),
-    [lpm IPv6]         (@ref rte_table_lpm_ipv6.h),
-    [ACL]              (@ref rte_table_acl.h),
-    [hash]             (@ref rte_table_hash.h),
-    [array]            (@ref rte_table_array.h),
-    [stub]             (@ref rte_table_stub.h)
-  * [pipeline]         (@ref rte_pipeline.h)
-    [port_in_action]   (@ref rte_port_in_action.h)
-    [table_action]     (@ref rte_table_action.h)
+  * [port](@ref rte_port.h):
+    [ethdev](@ref rte_port_ethdev.h),
+    [ring](@ref rte_port_ring.h),
+    [frag](@ref rte_port_frag.h),
+    [reass](@ref rte_port_ras.h),
+    [sched](@ref rte_port_sched.h),
+    [kni](@ref rte_port_kni.h),
+    [src/sink](@ref rte_port_source_sink.h)
+  * [table](@ref rte_table.h):
+    [lpm IPv4](@ref rte_table_lpm.h),
+    [lpm IPv6](@ref rte_table_lpm_ipv6.h),
+    [ACL](@ref rte_table_acl.h),
+    [hash](@ref rte_table_hash.h),
+    [array](@ref rte_table_array.h),
+    [stub](@ref rte_table_stub.h)
+  * [pipeline](@ref rte_pipeline.h)
+    [port_in_action](@ref rte_port_in_action.h)
+    [table_action](@ref rte_table_action.h)
   * SWX pipeline:
-    [control]          (@ref rte_swx_ctl.h),
-    [extern]           (@ref rte_swx_extern.h),
-    [pipeline]         (@ref rte_swx_pipeline.h)
+    [control](@ref rte_swx_ctl.h),
+    [extern](@ref rte_swx_extern.h),
+    [pipeline](@ref rte_swx_pipeline.h)
   * SWX port:
-    [port]             (@ref rte_swx_port.h),
-    [ethdev]           (@ref rte_swx_port_ethdev.h),
-    [src/sink]         (@ref rte_swx_port_source_sink.h)
+    [port](@ref rte_swx_port.h),
+    [ethdev](@ref rte_swx_port_ethdev.h),
+    [src/sink](@ref rte_swx_port_source_sink.h)
   * SWX table:
-    [table]            (@ref rte_swx_table.h),
-    [table_em]         (@ref rte_swx_table_em.h)
-  * [graph]            (@ref rte_graph.h):
-    [graph_worker]     (@ref rte_graph_worker.h)
+    [table](@ref rte_swx_table.h),
+    [table_em](@ref rte_swx_table_em.h)
+  * [graph](@ref rte_graph.h):
+    [graph_worker](@ref rte_graph_worker.h)
   * graph_nodes:
-    [eth_node]         (@ref rte_node_eth_api.h),
-    [ip4_node]         (@ref rte_node_ip4_api.h)
+    [eth_node](@ref rte_node_eth_api.h),
+    [ip4_node](@ref rte_node_ip4_api.h)
 
 - **basic**:
-  [bitops]             (@ref rte_bitops.h),
-  [approx fraction]    (@ref rte_approx.h),
-  [random]             (@ref rte_random.h),
-  [config file]        (@ref rte_cfgfile.h),
-  [key/value args]     (@ref rte_kvargs.h),
-  [string]             (@ref rte_string_fns.h)
+  [bitops](@ref rte_bitops.h),
+  [approx fraction](@ref rte_approx.h),
+  [random](@ref rte_random.h),
+  [config file](@ref rte_cfgfile.h),
+  [key/value args](@ref rte_kvargs.h),
+  [string](@ref rte_string_fns.h)
 
 - **debug**:
-  [jobstats]           (@ref rte_jobstats.h),
-  [telemetry]          (@ref rte_telemetry.h),
-  [pdump]              (@ref rte_pdump.h),
-  [hexdump]            (@ref rte_hexdump.h),
-  [debug]              (@ref rte_debug.h),
-  [log]                (@ref rte_log.h),
-  [errno]              (@ref rte_errno.h),
-  [trace]              (@ref rte_trace.h),
-  [trace_point]        (@ref rte_trace_point.h)
+  [jobstats](@ref rte_jobstats.h),
+  [telemetry](@ref rte_telemetry.h),
+  [pdump](@ref rte_pdump.h),
+  [hexdump](@ref rte_hexdump.h),
+  [debug](@ref rte_debug.h),
+  [log](@ref rte_log.h),
+  [errno](@ref rte_errno.h),
+  [trace](@ref rte_trace.h),
+  [trace_point](@ref rte_trace_point.h)
 
 - **misc**:
-  [EAL config]         (@ref rte_eal.h),
-  [common]             (@ref rte_common.h),
-  [experimental APIs]  (@ref rte_compat.h),
-  [ABI versioning]     (@ref rte_function_versioning.h),
-  [version]            (@ref rte_version.h)
+  [EAL config](@ref rte_eal.h),
+  [common](@ref rte_common.h),
+  [experimental APIs](@ref rte_compat.h),
+  [ABI versioning](@ref rte_function_versioning.h),
+  [version](@ref rte_version.h)
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.077982201 +0800
+++ 0061-doc-fix-API-index-Markdown-syntax.patch	2022-06-21 15:37:49.081118072 +0800
@@ -1 +1 @@
-From a9d84ead56b40cb9cb5b4efe8709528f12b81e2e Mon Sep 17 00:00:00 2001
+From 1d5a0d3379dd277779990d4d90dc0ea1b778942f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a9d84ead56b40cb9cb5b4efe8709528f12b81e2e ]
@@ -17,2 +20,2 @@
- doc/api/doxy-api-index.md | 368 +++++++++++++++++++-------------------
- 1 file changed, 184 insertions(+), 184 deletions(-)
+ doc/api/doxy-api-index.md | 344 +++++++++++++++++++-------------------
+ 1 file changed, 172 insertions(+), 172 deletions(-)
@@ -21 +24 @@
-index 2b78d796ea..bb19cf9bc6 100644
+index 748514e243..0661c5c1f6 100644
@@ -24 +27 @@
-@@ -9,223 +9,223 @@ API
+@@ -9,212 +9,212 @@ API
@@ -40 +42,0 @@
--  [dmadev]             (@ref rte_dmadev.h),
@@ -66 +67,0 @@
-+  [dmadev](@ref rte_dmadev.h),
@@ -86,0 +88,6 @@
++  [softnic](@ref rte_eth_softnic.h),
++  [bond](@ref rte_eth_bond.h),
++  [vhost](@ref rte_vhost.h),
++  [vdpa](@ref rte_vdpa.h),
++  [KNI](@ref rte_kni.h),
+   [ark]                (@ref rte_pmd_ark.h),
@@ -93 +99,0 @@
--  [cnxk]               (@ref rte_pmd_cnxk.h),
@@ -101,7 +107,2 @@
--  [dlb2]               (@ref rte_pmd_dlb2.h),
--  [ifpga]              (@ref rte_pmd_ifpga.h)
-+  [softnic](@ref rte_eth_softnic.h),
-+  [bond](@ref rte_eth_bond.h),
-+  [vhost](@ref rte_vhost.h),
-+  [vdpa](@ref rte_vdpa.h),
-+  [KNI](@ref rte_kni.h),
+-  [dlb]                (@ref rte_pmd_dlb.h),
+-  [dlb2]               (@ref rte_pmd_dlb2.h)
@@ -114 +114,0 @@
-+  [cnxk](@ref rte_pmd_cnxk.h),
@@ -122,2 +122,2 @@
-+  [dlb2](@ref rte_pmd_dlb2.h),
-+  [ifpga](@ref rte_pmd_ifpga.h)
++  [dlb](@ref rte_pmd_dlb.h),
++  [dlb2](@ref rte_pmd_dlb2.h)
@@ -148 +147,0 @@
--  [pflock]             (@ref rte_pflock.h),
@@ -155 +153,0 @@
-+  [pflock](@ref rte_pflock.h),
@@ -168,2 +166 @@
--  [I/O access]         (@ref rte_io.h),
--  [power management]   (@ref rte_power_intrinsics.h)
+-  [I/O access]         (@ref rte_io.h)
@@ -176,2 +173 @@
-+  [I/O access](@ref rte_io.h),
-+  [power management](@ref rte_power_intrinsics.h)
++  [I/O access](@ref rte_io.h)
@@ -186,2 +182 @@
--  [power/freq]         (@ref rte_power.h),
--  [PMD power]          (@ref rte_power_pmd_mgmt.h)
+-  [power/freq]         (@ref rte_power.h)
@@ -194,2 +189 @@
-+  [power/freq](@ref rte_power.h),
-+  [PMD power](@ref rte_power_pmd_mgmt.h)
++  [power/freq](@ref rte_power.h)
@@ -219,3 +213 @@
--  [eCPRI]              (@ref rte_ecpri.h),
--  [L2TPv2]             (@ref rte_l2tpv2.h),
--  [PPP]                (@ref rte_ppp.h)
+-  [eCPRI]              (@ref rte_ecpri.h)
@@ -243,3 +235 @@
-+  [eCPRI](@ref rte_ecpri.h),
-+  [L2TPv2](@ref rte_l2tpv2.h),
-+  [PPP](@ref rte_ppp.h)
++  [eCPRI](@ref rte_ecpri.h)
@@ -273 +262,0 @@
--  [thash_gfni]         (@ref rte_thash_gfni.h),
@@ -279 +267,0 @@
-+  [thash_gfni](@ref rte_thash_gfni.h),
@@ -360,2 +347,0 @@
--    [fd]               (@ref rte_swx_port_fd.h),
--    [ring]             (@ref rte_swx_port_ring.h),
@@ -365,2 +350,0 @@
-+    [fd](@ref rte_swx_port_fd.h),
-+    [ring](@ref rte_swx_port_ring.h),
@@ -371 +354,0 @@
--    [table_wm]         (@ref rte_swx_table_wm.h)
@@ -376 +358,0 @@
-+    [table_wm](@ref rte_swx_table_wm.h)
@@ -402 +383,0 @@
--  [pcapng]             (@ref rte_pcapng.h),
@@ -412 +392,0 @@
-+  [pcapng](@ref rte_pcapng.h),

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

* patch 'devtools: fix null test for NUMA systems' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (60 preceding siblings ...)
  2022-06-21  8:02 ` patch 'doc: fix API index Markdown syntax' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'examples/ipsec-secgw: fix uninitialized memory access' " Xueming Li
                   ` (53 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b4797829e77b8ecc8f7225135826c66bd9254304

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b4797829e77b8ecc8f7225135826c66bd9254304 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 13 Apr 2022 13:19:44 +0200
Subject: [PATCH] devtools: fix null test for NUMA systems
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 924de7b8e64489231351c48767973a1042d8ffd3 ]

On NUMA systems, default cores (0 and 1) might be on different memory
nodes. Double the amount of memory.

Fixes: 9e6b36c34ce9 ("app/testpmd: reduce memory consumption")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/test-null.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/devtools/test-null.sh b/devtools/test-null.sh
index 4ba57a6829..6cd34f64f1 100755
--- a/devtools/test-null.sh
+++ b/devtools/test-null.sh
@@ -27,6 +27,7 @@ else
 fi
 
 (sleep 1 && echo stop) |
-$testpmd -c $coremask --no-huge -m 20 \
+# testpmd only needs 20M, make it x2 (default number of cores) for NUMA systems
+$testpmd -c $coremask --no-huge -m 40 \
 	$libs -a 0:0.0 --vdev net_null1 --vdev net_null2 $eal_options -- \
 	--no-mlockall --total-num-mbufs=2048 $testpmd_options -ia
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.118981378 +0800
+++ 0062-devtools-fix-null-test-for-NUMA-systems.patch	2022-06-21 15:37:49.081118072 +0800
@@ -1 +1 @@
-From 924de7b8e64489231351c48767973a1042d8ffd3 Mon Sep 17 00:00:00 2001
+From b4797829e77b8ecc8f7225135826c66bd9254304 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 924de7b8e64489231351c48767973a1042d8ffd3 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'examples/ipsec-secgw: fix uninitialized memory access' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (61 preceding siblings ...)
  2022-06-21  8:02 ` patch 'devtools: fix null test for NUMA systems' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'examples/ipsec-secgw: fix promiscuous mode option' " Xueming Li
                   ` (52 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Volodymyr Fialko; +Cc: Anoob Joseph, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/78059ea5a5fd9eed93237e9a6d04dd3b96ae1d38

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 78059ea5a5fd9eed93237e9a6d04dd3b96ae1d38 Mon Sep 17 00:00:00 2001
From: Volodymyr Fialko <vfialko@marvell.com>
Date: Fri, 25 Mar 2022 12:29:42 +0100
Subject: [PATCH] examples/ipsec-secgw: fix uninitialized memory access
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0b512a92b77009ab6e4291382b18f0e0ac74645f ]

rte_flow_validate and rte_flow_create not always initialize flow error.
Using error.message in some error cases will cause read from
uninitialized memory.

Fixes: 6738c0a9569 ("examples/ipsec-secgw: support flow director")

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/flow.c  | 2 +-
 examples/ipsec-secgw/ipsec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/ipsec-secgw/flow.c b/examples/ipsec-secgw/flow.c
index 1a1ec7861c..c217b9e475 100644
--- a/examples/ipsec-secgw/flow.c
+++ b/examples/ipsec-secgw/flow.c
@@ -214,7 +214,7 @@ flow_init_single(struct flow_rule_entry *rule)
 	struct rte_flow_item pattern[MAX_RTE_FLOW_PATTERN] = {};
 	struct rte_flow_action action[MAX_RTE_FLOW_ACTIONS] = {};
 	struct rte_flow_attr attr = {};
-	struct rte_flow_error err;
+	struct rte_flow_error err = {};
 	int ret;
 
 	attr.egress = 0;
diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 6baeeb342f..a8a8cdbe2e 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -425,7 +425,7 @@ int
 create_ipsec_esp_flow(struct ipsec_sa *sa)
 {
 	int ret = 0;
-	struct rte_flow_error err;
+	struct rte_flow_error err = {};
 	if (sa->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {
 		RTE_LOG(ERR, IPSEC,
 			"No Flow director rule for Egress traffic\n");
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.160100934 +0800
+++ 0063-examples-ipsec-secgw-fix-uninitialized-memory-access.patch	2022-06-21 15:37:49.081118072 +0800
@@ -1 +1 @@
-From 0b512a92b77009ab6e4291382b18f0e0ac74645f Mon Sep 17 00:00:00 2001
+From 78059ea5a5fd9eed93237e9a6d04dd3b96ae1d38 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0b512a92b77009ab6e4291382b18f0e0ac74645f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -35 +37 @@
-index 2d4a26c962..b66ff2b650 100644
+index 6baeeb342f..a8a8cdbe2e 100644
@@ -38 +40 @@
-@@ -496,7 +496,7 @@ int
+@@ -425,7 +425,7 @@ int

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

* patch 'examples/ipsec-secgw: fix promiscuous mode option' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (62 preceding siblings ...)
  2022-06-21  8:02 ` patch 'examples/ipsec-secgw: fix uninitialized memory access' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'test/crypto: fix null check for ZUC authentication' " Xueming Li
                   ` (51 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b9b994dcf2d97b40154ed90f4dd5c682f2d77773

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b9b994dcf2d97b40154ed90f4dd5c682f2d77773 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Thu, 28 Apr 2022 20:48:30 +0530
Subject: [PATCH] examples/ipsec-secgw: fix promiscuous mode option
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 23d3a468c42ac8b63a36c9c4a6f01e459350f777 ]

Currently default value of promiscuous mode flag is true and
even there is command line argument to set it to true.
So it never is in non-promiscuous mode. Fix it by
changing default value to false.

Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 8d244318e0..091f54f065 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -160,7 +160,7 @@ uint32_t single_sa_idx;
 /* mask of enabled ports */
 static uint32_t enabled_port_mask;
 static uint64_t enabled_cryptodev_mask = UINT64_MAX;
-static int32_t promiscuous_on = 1;
+static int32_t promiscuous_on;
 static int32_t numa_on = 1; /**< NUMA is enabled by default. */
 static uint32_t nb_lcores;
 static uint32_t single_sa;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.207847776 +0800
+++ 0064-examples-ipsec-secgw-fix-promiscuous-mode-option.patch	2022-06-21 15:37:49.084451417 +0800
@@ -1 +1 @@
-From 23d3a468c42ac8b63a36c9c4a6f01e459350f777 Mon Sep 17 00:00:00 2001
+From b9b994dcf2d97b40154ed90f4dd5c682f2d77773 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 23d3a468c42ac8b63a36c9c4a6f01e459350f777 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index ad1b55f85c..25255e053c 100644
+index 8d244318e0..091f54f065 100644
@@ -24 +26 @@
-@@ -168,7 +168,7 @@ uint32_t single_sa_idx;
+@@ -160,7 +160,7 @@ uint32_t single_sa_idx;
@@ -32 +34 @@
- uint32_t single_sa;
+ static uint32_t single_sa;

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

* patch 'test/crypto: fix null check for ZUC authentication' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (63 preceding siblings ...)
  2022-06-21  8:02 ` patch 'examples/ipsec-secgw: fix promiscuous mode option' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'drivers/crypto: fix warnings for OpenSSL version' " Xueming Li
                   ` (50 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Ciara Power; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/387d4b3ca78d650e91c284fb7b213b16fb2577c0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 387d4b3ca78d650e91c284fb7b213b16fb2577c0 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 11 May 2022 13:29:24 +0000
Subject: [PATCH] test/crypto: fix null check for ZUC authentication
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e6d37ffa69ac7fb4eec9580af5b005e6c130b79d ]

Check if the returned op is NULL because of failure,
before using it and causing a segmentation fault.

Fixes: 4c99481f49c4 ("app/test: add ZUC")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index ed005da6b0..441193c0f6 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -5749,8 +5749,8 @@ test_zuc_authentication(const struct wireless_test_data *tdata)
 	else
 		ut_params->op = process_crypto_request(ts_params->valid_devs[0],
 				ut_params->op);
-	ut_params->obuf = ut_params->op->sym->m_src;
 	TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
+	ut_params->obuf = ut_params->op->sym->m_src;
 	ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
 			+ plaintext_pad_len;
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.252574701 +0800
+++ 0065-test-crypto-fix-null-check-for-ZUC-authentication.patch	2022-06-21 15:37:49.091118108 +0800
@@ -1 +1 @@
-From e6d37ffa69ac7fb4eec9580af5b005e6c130b79d Mon Sep 17 00:00:00 2001
+From 387d4b3ca78d650e91c284fb7b213b16fb2577c0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e6d37ffa69ac7fb4eec9580af5b005e6c130b79d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index f444144cc6..4ffaadc008 100644
+index ed005da6b0..441193c0f6 100644
@@ -22 +24 @@
-@@ -6238,8 +6238,8 @@ test_zuc_authentication(const struct wireless_test_data *tdata)
+@@ -5749,8 +5749,8 @@ test_zuc_authentication(const struct wireless_test_data *tdata)

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

* patch 'drivers/crypto: fix warnings for OpenSSL version' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (64 preceding siblings ...)
  2022-06-21  8:02 ` patch 'test/crypto: fix null check for ZUC authentication' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'doc: add missing auth algo for IPsec example' " Xueming Li
                   ` (49 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Daxue Gao, David Marchand, Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5e4a008e4e1442c7f3d7d1e6808dad8b87fd9029

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5e4a008e4e1442c7f3d7d1e6808dad8b87fd9029 Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Tue, 10 May 2022 17:06:35 +0200
Subject: [PATCH] drivers/crypto: fix warnings for OpenSSL version
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7360749f167b9039f549818700db3f57d6f8a9fd ]

The API of the OpenSSL library has changed with version 3.0. This results
in a lot of compiler warnings like

    ../dpdk/drivers/crypto/ccp/ccp_crypto.c:182:9:
    warning: ‘SHA256_Transform’ is deprecated:
    Since OpenSSL 3.0 [-Wdeprecated-declarations]

As many Linux distributions still use elder OpenSSL libraries we cannot
change the used API now. Instead define OPENSSL_API_COMPAT to indicate
that we are using the OpenSSL 1.1.0 API.

OPENSSL_API_COMPAT is introduced in *.c files and not in *.h files as some
*.c files directly include OpenSSL headers.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 drivers/crypto/ccp/ccp_crypto.c              | 2 ++
 drivers/crypto/openssl/rte_openssl_pmd.c     | 2 ++
 drivers/crypto/openssl/rte_openssl_pmd_ops.c | 2 ++
 drivers/crypto/qat/qat_sym.c                 | 2 ++
 drivers/crypto/qat/qat_sym_session.c         | 2 ++
 5 files changed, 10 insertions(+)

diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 9fb03cc244..e66aa98e2a 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -2,6 +2,8 @@
  *   Copyright(c) 2018 Advanced Micro Devices, Inc. All rights reserved.
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <dirent.h>
 #include <fcntl.h>
 #include <stdio.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index ca4265d2be..786c87baed 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2016-2017 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index ed75877581..1b075fd847 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2016-2017 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <string.h>
 
 #include <rte_common.h>
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index f7992a0a33..86fc7aff38 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2015-2019 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <openssl/evp.h>
 
 #include <rte_mempool.h>
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 6e2193fb69..aa9ce1236b 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2015-2019 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <openssl/sha.h>	/* Needed to calculate pre-compute values */
 #include <openssl/aes.h>	/* Needed to calculate pre-compute values */
 #include <openssl/md5.h>	/* Needed to calculate pre-compute values */
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.299524004 +0800
+++ 0066-drivers-crypto-fix-warnings-for-OpenSSL-version.patch	2022-06-21 15:37:49.094451453 +0800
@@ -1 +1 @@
-From 7360749f167b9039f549818700db3f57d6f8a9fd Mon Sep 17 00:00:00 2001
+From 5e4a008e4e1442c7f3d7d1e6808dad8b87fd9029 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7360749f167b9039f549818700db3f57d6f8a9fd ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -39 +41 @@
-index 4ed91a7436..4bab18323b 100644
+index 9fb03cc244..e66aa98e2a 100644
@@ -52 +54 @@
-index d80e1052e2..4f331af157 100644
+index ca4265d2be..786c87baed 100644
@@ -65 +67 @@
-index 1cb07794bd..87c395a836 100644
+index ed75877581..1b075fd847 100644
@@ -78 +80 @@
-index ca8c9a8124..3a6c9dcc0a 100644
+index f7992a0a33..86fc7aff38 100644
@@ -82 +84 @@
-  * Copyright(c) 2015-2022 Intel Corporation
+  * Copyright(c) 2015-2019 Intel Corporation
@@ -91 +93 @@
-index 9d6a19c0be..737a180810 100644
+index 6e2193fb69..aa9ce1236b 100644
@@ -95 +97 @@
-  * Copyright(c) 2015-2022 Intel Corporation
+  * Copyright(c) 2015-2019 Intel Corporation

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

* patch 'doc: add missing auth algo for IPsec example' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (65 preceding siblings ...)
  2022-06-21  8:02 ` patch 'drivers/crypto: fix warnings for OpenSSL version' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'app/testpmd: perform SW IP checksum for GRO/GSO packets' " Xueming Li
                   ` (48 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3b918bc7112e84c2ba9c845563afd7d7332d1291

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3b918bc7112e84c2ba9c845563afd7d7332d1291 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Fri, 20 May 2022 09:51:04 +0530
Subject: [PATCH] doc: add missing auth algo for IPsec example
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d05828ac583876f05590ac14136c398a54014bc6 ]

Adding the missing SHA256-HMAC authentication algorithm
in ipsec-secgw guide.

Fixes: b5350285ce6e ("examples/ipsec-secgw: support SHA256 HMAC")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 doc/guides/sample_app_ug/ipsec_secgw.rst | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/guides/sample_app_ug/ipsec_secgw.rst b/doc/guides/sample_app_ug/ipsec_secgw.rst
index b2f94963d5..c276976a39 100644
--- a/doc/guides/sample_app_ug/ipsec_secgw.rst
+++ b/doc/guides/sample_app_ug/ipsec_secgw.rst
@@ -106,7 +106,8 @@ Constraints
 
 *  No IPv6 options headers.
 *  No AH mode.
-*  Supported algorithms: AES-CBC, AES-CTR, AES-GCM, 3DES-CBC, HMAC-SHA1 and NULL.
+*  Supported algorithms: AES-CBC, AES-CTR, AES-GCM, 3DES-CBC, HMAC-SHA1,
+   HMAC-SHA256 and NULL.
 *  Each SA must be handle by a unique lcore (*1 RX queue per port*).
 
 Compiling the Application
@@ -564,6 +565,7 @@ where each options means:
 
     * *null*: NULL algorithm
     * *sha1-hmac*: HMAC SHA1 algorithm
+    * *sha256-hmac*: HMAC SHA256 algorithm
 
 ``<auth_key>``
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.341163771 +0800
+++ 0067-doc-add-missing-auth-algo-for-IPsec-example.patch	2022-06-21 15:37:49.094451453 +0800
@@ -1 +1 @@
-From d05828ac583876f05590ac14136c398a54014bc6 Mon Sep 17 00:00:00 2001
+From 3b918bc7112e84c2ba9c845563afd7d7332d1291 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d05828ac583876f05590ac14136c398a54014bc6 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +17,2 @@
- doc/guides/sample_app_ug/ipsec_secgw.rst | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
+ doc/guides/sample_app_ug/ipsec_secgw.rst | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
@@ -19 +21 @@
-index 5cb6a69a27..94197a34f0 100644
+index b2f94963d5..c276976a39 100644
@@ -22 +24,2 @@
-@@ -116,8 +116,8 @@ Constraints
+@@ -106,7 +106,8 @@ Constraints
+ 
@@ -25,5 +28,3 @@
- *  Supported algorithms: AES-CBC, AES-CTR, AES-GCM, 3DES-CBC, DES-CBC,
--   HMAC-SHA1, AES-GMAC, AES_CTR, AES_XCBC_MAC, AES_CCM, CHACHA20_POLY1305
--   and NULL.
-+   HMAC-SHA1, HMAC-SHA256, AES-GMAC, AES_CTR, AES_XCBC_MAC, AES_CCM,
-+   CHACHA20_POLY1305 and NULL.
+-*  Supported algorithms: AES-CBC, AES-CTR, AES-GCM, 3DES-CBC, HMAC-SHA1 and NULL.
++*  Supported algorithms: AES-CBC, AES-CTR, AES-GCM, 3DES-CBC, HMAC-SHA1,
++   HMAC-SHA256 and NULL.
@@ -33 +34 @@
-@@ -595,6 +595,7 @@ where each options means:
+@@ -564,6 +565,7 @@ where each options means:
@@ -38 +38,0 @@
-     * *aes-xcbc-mac*: AES XCBC MAC algorithm
@@ -40,0 +41 @@
+ 

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

* patch 'app/testpmd: perform SW IP checksum for GRO/GSO packets' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (66 preceding siblings ...)
  2022-06-21  8:02 ` patch 'doc: add missing auth algo for IPsec example' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'app/testpmd: remove useless pointer checks' " Xueming Li
                   ` (47 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Wenwu Ma; +Cc: Jiayu Hu, Wei Ling, Yuying Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9463f695d7c8f3f7d54fb575ecf143bcab3e6a7d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9463f695d7c8f3f7d54fb575ecf143bcab3e6a7d Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Thu, 12 May 2022 01:07:56 +0000
Subject: [PATCH] app/testpmd: perform SW IP checksum for GRO/GSO packets
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1945c64674b2b9ad55af0ef31f8a02ae0b747400 ]

The GRO/GSO library doesn't re-calculate checksums for
merged/fragmented packets. If users want the packets to
have correct IP checksums, they should select HW IP
checksum calculation for the port which the packets are
transmitted to. But if the port doesn't support HW IP
checksum, users may perform a SW IP checksum.

Fixes: b7091f1dcfbc ("app/testpmd: enable the heavyweight mode TCP/IPv4 GRO")
Fixes: 52f38a2055ed ("app/testpmd: enable TCP/IPv4 VxLAN and GRE GSO")

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Reviewed-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Acked-by: Yuying Zhang <yuying.zhang@intel.com>
---
 app/test-pmd/csumonly.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 243ef3e47a..282e87092f 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -760,6 +760,28 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	return md[0];
 }
 
+#if defined(RTE_LIB_GRO) || defined(RTE_LIB_GSO)
+/*
+ * Re-calculate IP checksum for merged/fragmented packets.
+ */
+static void
+pkts_ip_csum_recalc(struct rte_mbuf **pkts_burst, const uint16_t nb_pkts, uint64_t tx_offloads)
+{
+	int i;
+	struct rte_ipv4_hdr *ipv4_hdr;
+	for (i = 0; i < nb_pkts; i++) {
+		if ((pkts_burst[i]->ol_flags & PKT_TX_IPV4) &&
+			(tx_offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) == 0) {
+			ipv4_hdr = rte_pktmbuf_mtod_offset(pkts_burst[i],
+						struct rte_ipv4_hdr *,
+						pkts_burst[i]->l2_len);
+			ipv4_hdr->hdr_checksum = 0;
+			ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
+		}
+	}
+}
+#endif
+
 /*
  * Receive a burst of packets, and for each packet:
  *  - parse packet, and try to recognize a supported packet type (1)
@@ -1072,6 +1094,8 @@ tunnel_update:
 				fs->gro_times = 0;
 			}
 		}
+
+		pkts_ip_csum_recalc(pkts_burst, nb_rx, tx_offloads);
 	}
 
 	if (gso_ports[fs->tx_port].enable == 0)
@@ -1101,6 +1125,8 @@ tunnel_update:
 
 		tx_pkts_burst = gso_segments;
 		nb_rx = nb_segments;
+
+		pkts_ip_csum_recalc(tx_pkts_burst, nb_rx, tx_offloads);
 	}
 
 	nb_prep = rte_eth_tx_prepare(fs->tx_port, fs->tx_queue,
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.379602352 +0800
+++ 0068-app-testpmd-perform-SW-IP-checksum-for-GRO-GSO-packe.patch	2022-06-21 15:37:49.097784798 +0800
@@ -1 +1 @@
-From 1945c64674b2b9ad55af0ef31f8a02ae0b747400 Mon Sep 17 00:00:00 2001
+From 9463f695d7c8f3f7d54fb575ecf143bcab3e6a7d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1945c64674b2b9ad55af0ef31f8a02ae0b747400 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index cdb1920763..05763a71e8 100644
+index 243ef3e47a..282e87092f 100644
@@ -29 +31 @@
-@@ -778,6 +778,28 @@ pkt_copy_split(const struct rte_mbuf *pkt)
+@@ -760,6 +760,28 @@ pkt_copy_split(const struct rte_mbuf *pkt)
@@ -43,2 +45,2 @@
-+		if ((pkts_burst[i]->ol_flags & RTE_MBUF_F_TX_IPV4) &&
-+			(tx_offloads & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM) == 0) {
++		if ((pkts_burst[i]->ol_flags & PKT_TX_IPV4) &&
++			(tx_offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) == 0) {
@@ -58 +60 @@
-@@ -1102,6 +1124,8 @@ tunnel_update:
+@@ -1072,6 +1094,8 @@ tunnel_update:
@@ -65 +66,0 @@
- #endif
@@ -67 +68,2 @@
-@@ -1135,6 +1159,8 @@ tunnel_update:
+ 	if (gso_ports[fs->tx_port].enable == 0)
+@@ -1101,6 +1125,8 @@ tunnel_update:
@@ -73,3 +75,3 @@
- 	} else
- #endif
- 		tx_pkts_burst = pkts_burst;
+ 	}
+ 
+ 	nb_prep = rte_eth_tx_prepare(fs->tx_port, fs->tx_queue,

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

* patch 'app/testpmd: remove useless pointer checks' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (67 preceding siblings ...)
  2022-06-21  8:02 ` patch 'app/testpmd: perform SW IP checksum for GRO/GSO packets' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'ethdev: clarify null location case in xstats get' " Xueming Li
                   ` (46 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cf28773c938acfdf13f181649facbad24efea7d1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cf28773c938acfdf13f181649facbad24efea7d1 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 24 Mar 2022 17:15:03 +0100
Subject: [PATCH] app/testpmd: remove useless pointer checks
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2d8699ebb2a0638e8ae18fc0a83c56f984d0b270 ]

Parameters to this static helper can't be NULL.
str has already been dereferenced in caller.
dst and size point to variable in stack.

Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test-pmd/cmdline_flow.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index c80be57bfe..de0db3994b 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -6414,11 +6414,7 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
 	const uint8_t *head = dst;
 	uint32_t left;
 
-	/* Check input parameters */
-	if ((src == NULL) ||
-		(dst == NULL) ||
-		(size == NULL) ||
-		(*size == 0))
+	if (*size == 0)
 		return -1;
 
 	left = *size;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.420196937 +0800
+++ 0069-app-testpmd-remove-useless-pointer-checks.patch	2022-06-21 15:37:49.101118143 +0800
@@ -1 +1 @@
-From 2d8699ebb2a0638e8ae18fc0a83c56f984d0b270 Mon Sep 17 00:00:00 2001
+From cf28773c938acfdf13f181649facbad24efea7d1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2d8699ebb2a0638e8ae18fc0a83c56f984d0b270 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index fc4a6d9cca..e3269e278d 100644
+index c80be57bfe..de0db3994b 100644
@@ -22 +24 @@
-@@ -9338,11 +9338,7 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
+@@ -6414,11 +6414,7 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)

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

* patch 'ethdev: clarify null location case in xstats get' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (68 preceding siblings ...)
  2022-06-21  8:02 ` patch 'app/testpmd: remove useless pointer checks' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/hns3: fix xstats get return if xstats is null' " Xueming Li
                   ` (45 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/eb7b05b5de570be7a4bb62ec3e878df6f4a7811e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eb7b05b5de570be7a4bb62ec3e878df6f4a7811e Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:49 +0800
Subject: [PATCH] ethdev: clarify null location case in xstats get
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 485df8847a2c0ecf947a514f634b8180b725b827 ]

When xstats location is null in rte_eth_xstats_get() the return value
is not clearly specified.  Some PMDs (eg. hns3/ipn3ke/mvpp2/axgbe) return
zero while others return the required number of elements.

In this patch, special parameter combinations are restricted:
 1. highlight that xstats location may be null if and only if n is 0.
 2. amend n parameter description to specify that if n is lower than
    the required number of elements, the function returns the required
    number of elements.
 3. specify that if n is zero, the xstats must be NULL, the function
    returns the required number of elements (a duplicate which should
    help to not very attentive readers).

Add sanity check for null xstats and non-zero n case on API level to
make it unnecessary to care about it in drivers.

Fixes: ce757f5c9a4d ("ethdev: new method to retrieve extended statistics")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/librte_ethdev/rte_ethdev.c | 5 +++--
 lib/librte_ethdev/rte_ethdev.h | 6 +++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 24eb0d1197..028d16f99e 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -3170,7 +3170,8 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
 	int ret;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-
+	if (xstats == NULL && n > 0)
+		return -EINVAL;
 	dev = &rte_eth_devices[port_id];
 
 	nb_rxqs = RTE_MIN(dev->data->nb_rx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS);
@@ -3187,7 +3188,7 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
 		 * xstats struct.
 		 */
 		xcount = (*dev->dev_ops->xstats_get)(dev,
-				     xstats ? xstats + count : NULL,
+				     (n > count) ? xstats + count : NULL,
 				     (n > count) ? n - count : 0);
 
 		if (xcount < 0)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 899f152a83..7da58d3fd1 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2814,9 +2814,13 @@ int rte_eth_xstats_get_names(uint16_t port_id,
  * @param xstats
  *   A pointer to a table of structure of type *rte_eth_xstat*
  *   to be filled with device statistics ids and values.
- *   This parameter can be set to NULL if n is 0.
+ *   This parameter can be set to NULL if and only if n is 0.
  * @param n
  *   The size of the xstats array (number of elements).
+ *   If lower than the required number of elements, the function returns
+ *   the required number of elements.
+ *   If equal to zero, the xstats must be NULL, the function returns the
+ *   required number of elements.
  * @return
  *   - A positive value lower or equal to n: success. The return value
  *     is the number of entries filled in the stats table.
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.466881894 +0800
+++ 0070-ethdev-clarify-null-location-case-in-xstats-get.patch	2022-06-21 15:37:49.107784833 +0800
@@ -1 +1 @@
-From 485df8847a2c0ecf947a514f634b8180b725b827 Mon Sep 17 00:00:00 2001
+From eb7b05b5de570be7a4bb62ec3e878df6f4a7811e Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 485df8847a2c0ecf947a514f634b8180b725b827 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -32,9 +34,9 @@
- lib/ethdev/rte_ethdev.c | 4 +++-
- lib/ethdev/rte_ethdev.h | 6 +++++-
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
-index 8520aec561..af55edb6b9 100644
---- a/lib/ethdev/rte_ethdev.c
-+++ b/lib/ethdev/rte_ethdev.c
-@@ -2973,6 +2973,8 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
+ lib/librte_ethdev/rte_ethdev.c | 5 +++--
+ lib/librte_ethdev/rte_ethdev.h | 6 +++++-
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
+index 24eb0d1197..028d16f99e 100644
+--- a/lib/librte_ethdev/rte_ethdev.c
++++ b/lib/librte_ethdev/rte_ethdev.c
+@@ -3170,7 +3170,8 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
@@ -43,0 +46 @@
+-
@@ -49 +52 @@
-@@ -2989,7 +2991,7 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
+@@ -3187,7 +3188,7 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
@@ -58,5 +61,5 @@
-diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
-index 04cff8ee10..04225bba4d 100644
---- a/lib/ethdev/rte_ethdev.h
-+++ b/lib/ethdev/rte_ethdev.h
-@@ -3174,9 +3174,13 @@ int rte_eth_xstats_get_names(uint16_t port_id,
+diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
+index 899f152a83..7da58d3fd1 100644
+--- a/lib/librte_ethdev/rte_ethdev.h
++++ b/lib/librte_ethdev/rte_ethdev.h
+@@ -2814,9 +2814,13 @@ int rte_eth_xstats_get_names(uint16_t port_id,

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

* patch 'net/hns3: fix xstats get return if xstats is null' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (69 preceding siblings ...)
  2022-06-21  8:02 ` patch 'ethdev: clarify null location case in xstats get' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/ipn3ke: " Xueming Li
                   ` (44 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/17467579f79a4f9825a307a189d86c123b29d259

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 17467579f79a4f9825a307a189d86c123b29d259 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:51 +0800
Subject: [PATCH] net/hns3: fix xstats get return if xstats is null
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e15401f362779dba8623b4ee3db388fdf79dca7f ]

Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently hns3 PMD
returns zero when xstats is null.

Dedicated check for xstats vs null is not required, since ethdev layer
guarantees that it may be null only if number of entries n is 0 (which
is definitely smaller than total xstats count).

Fixes: 8839c5e202f3 ("net/hns3: support device stats")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/hns3/hns3_stats.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 04702f17d1..3cb1e4cac1 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -694,9 +694,13 @@ hns3_error_int_stats_add(struct hns3_adapter *hns, const char *err)
  * @praram xstats
  *   A pointer to a table of structure of type *rte_eth_xstat*
  *   to be filled with device statistics ids and values.
- *   This parameter can be set to NULL if n is 0.
+ *   This parameter can be set to NULL if and only if n is 0.
  * @param n
  *   The size of the xstats array (number of elements).
+ *   If lower than the required number of elements, the function returns the
+ *   required number of elements.
+ *   If equal to zero, the xstats parameter must be NULL, the function returns
+ *   the required number of elements.
  * @return
  *   0 on fail, count(The size of the statistics elements) on success.
  */
@@ -716,9 +720,6 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	int count;
 	int ret;
 
-	if (xstats == NULL)
-		return 0;
-
 	count = hns3_xstats_calc_num(dev);
 	if ((int)n < count)
 		return count;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.511593306 +0800
+++ 0071-net-hns3-fix-xstats-get-return-if-xstats-is-null.patch	2022-06-21 15:37:49.107784833 +0800
@@ -1 +1 @@
-From e15401f362779dba8623b4ee3db388fdf79dca7f Mon Sep 17 00:00:00 2001
+From 17467579f79a4f9825a307a189d86c123b29d259 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e15401f362779dba8623b4ee3db388fdf79dca7f ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 2799ff4432..07fad03485 100644
+index 04702f17d1..3cb1e4cac1 100644
@@ -31 +33 @@
-@@ -1031,9 +1031,13 @@ hns3_imissed_stats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -694,9 +694,13 @@ hns3_error_int_stats_add(struct hns3_adapter *hns, const char *err)
@@ -46 +48 @@
-@@ -1052,9 +1056,6 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -716,9 +720,6 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,

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

* patch 'net/ipn3ke: fix xstats get return if xstats is null' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (70 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/hns3: fix xstats get return if xstats is null' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/mvpp2: " Xueming Li
                   ` (43 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/007dfe41028fba0388a3c5fcd9a7f91100b63c3e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 007dfe41028fba0388a3c5fcd9a7f91100b63c3e Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:52 +0800
Subject: [PATCH] net/ipn3ke: fix xstats get return if xstats is null
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e17cb41db7656121f5809e353f8db126b026fbb4 ]

Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently ipn3ke PMD
returns zero when xstats is null.

Dedicated check for xstats vs null is not required, since ethdev layer
guarantees that it may be null only if number of entries n is 0 (which
is definitely smaller than total xstats count).

Fixes: 5a6d883878db ("net/ipn3ke: implement statistics")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/ipn3ke/ipn3ke_representor.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index 9fc3918303..603017f896 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -2228,9 +2228,6 @@ ipn3ke_rpst_xstats_get
 	struct ipn3ke_rpst_hw_port_stats hw_stats;
 	struct rte_eth_stats stats;
 
-	if (!xstats)
-		return 0;
-
 	if (!ethdev) {
 		IPN3KE_AFU_PMD_ERR("ethernet device to get statistics is NULL");
 		return -EINVAL;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.550537456 +0800
+++ 0072-net-ipn3ke-fix-xstats-get-return-if-xstats-is-null.patch	2022-06-21 15:37:49.107784833 +0800
@@ -1 +1 @@
-From e17cb41db7656121f5809e353f8db126b026fbb4 Mon Sep 17 00:00:00 2001
+From 007dfe41028fba0388a3c5fcd9a7f91100b63c3e Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e17cb41db7656121f5809e353f8db126b026fbb4 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index c9dde1d82e..abbecfdf2e 100644
+index 9fc3918303..603017f896 100644
@@ -31 +33 @@
-@@ -2218,9 +2218,6 @@ ipn3ke_rpst_xstats_get
+@@ -2228,9 +2228,6 @@ ipn3ke_rpst_xstats_get

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

* patch 'net/mvpp2: fix xstats get return if xstats is null' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (71 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/ipn3ke: " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/axgbe: " Xueming Li
                   ` (42 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2b88b790c13c872f1de308ccf9ea120b27dc5666

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2b88b790c13c872f1de308ccf9ea120b27dc5666 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:53 +0800
Subject: [PATCH] net/mvpp2: fix xstats get return if xstats is null
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d853d24b27d6524f26a2a830c7ef678ba739cfce ]

Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently mvpp2 PMD
returns zero when xstats is null.

Remove the logic of "return zero when xstats is NULL", and add the logic
of "return the required number of entries when n is lower than the
required number of entries".

Fixes: a77b5378cd41 ("net/mrvl: add extended statistics")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index ce077c4ecd..09af452abe 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1376,13 +1376,14 @@ mrvl_xstats_get(struct rte_eth_dev *dev,
 {
 	struct mrvl_priv *priv = dev->data->dev_private;
 	struct pp2_ppio_statistics ppio_stats;
-	unsigned int i;
+	unsigned int i, count;
 
-	if (!stats)
-		return 0;
+	count = RTE_DIM(mrvl_xstats_tbl);
+	if (n < count)
+		return count;
 
 	pp2_ppio_get_statistics(priv->ppio, &ppio_stats, 0);
-	for (i = 0; i < n && i < RTE_DIM(mrvl_xstats_tbl); i++) {
+	for (i = 0; i < count; i++) {
 		uint64_t val;
 
 		if (mrvl_xstats_tbl[i].size == sizeof(uint32_t))
@@ -1398,7 +1399,7 @@ mrvl_xstats_get(struct rte_eth_dev *dev,
 		stats[i].value = val;
 	}
 
-	return n;
+	return count;
 }
 
 /**
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.589867491 +0800
+++ 0073-net-mvpp2-fix-xstats-get-return-if-xstats-is-null.patch	2022-06-21 15:37:49.111118179 +0800
@@ -1 +1 @@
-From d853d24b27d6524f26a2a830c7ef678ba739cfce Mon Sep 17 00:00:00 2001
+From 2b88b790c13c872f1de308ccf9ea120b27dc5666 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d853d24b27d6524f26a2a830c7ef678ba739cfce ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index f86701d248..735efb6cfc 100644
+index ce077c4ecd..09af452abe 100644
@@ -31 +33 @@
-@@ -1626,13 +1626,14 @@ mrvl_xstats_get(struct rte_eth_dev *dev,
+@@ -1376,13 +1376,14 @@ mrvl_xstats_get(struct rte_eth_dev *dev,
@@ -50 +52 @@
-@@ -1648,7 +1649,7 @@ mrvl_xstats_get(struct rte_eth_dev *dev,
+@@ -1398,7 +1399,7 @@ mrvl_xstats_get(struct rte_eth_dev *dev,

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

* patch 'net/axgbe: fix xstats get return if xstats is null' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (72 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/mvpp2: " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'ethdev: fix memory leak in xstats telemetry' " Xueming Li
                   ` (41 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7d17ff9a817b0cc250ee5c18f7579a09454f8e04

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7d17ff9a817b0cc250ee5c18f7579a09454f8e04 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:54 +0800
Subject: [PATCH] net/axgbe: fix xstats get return if xstats is null
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 93041fd5149a4f8cc795ea8ebb229415e2994e51 ]

Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently axgbe PMD
returns zero when xstats is null.

Remove the logic of "return zero when xstats is NULL", and add the logic
of "return the required number of entries when n is lower than the
required number of entries".

Fixes: 9d1ef6b2e731 ("net/axgbe: add xstats")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/axgbe/axgbe_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 6e63d7673b..586cf6974c 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -984,18 +984,18 @@ axgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
 	struct axgbe_port *pdata = dev->data->dev_private;
 	unsigned int i;
 
-	if (!stats)
-		return 0;
+	if (n < AXGBE_XSTATS_COUNT)
+		return AXGBE_XSTATS_COUNT;
 
 	axgbe_read_mmc_stats(pdata);
 
-	for (i = 0; i < n && i < AXGBE_XSTATS_COUNT; i++) {
+	for (i = 0; i < AXGBE_XSTATS_COUNT; i++) {
 		stats[i].id = i;
 		stats[i].value = *(u64 *)((uint8_t *)&pdata->mmc_stats +
 				axgbe_xstats_strings[i].offset);
 	}
 
-	return i;
+	return AXGBE_XSTATS_COUNT;
 }
 
 static int
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.627923176 +0800
+++ 0074-net-axgbe-fix-xstats-get-return-if-xstats-is-null.patch	2022-06-21 15:37:49.111118179 +0800
@@ -1 +1 @@
-From 93041fd5149a4f8cc795ea8ebb229415e2994e51 Mon Sep 17 00:00:00 2001
+From 7d17ff9a817b0cc250ee5c18f7579a09454f8e04 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 93041fd5149a4f8cc795ea8ebb229415e2994e51 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 951da5cc26..e6822fa711 100644
+index 6e63d7673b..586cf6974c 100644
@@ -31 +33 @@
-@@ -1013,18 +1013,18 @@ axgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
+@@ -984,18 +984,18 @@ axgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,

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

* patch 'ethdev: fix memory leak in xstats telemetry' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (73 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/axgbe: " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'ethdev: fix possible null pointer access' " Xueming Li
                   ` (40 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7386b53220564c4f10aefdadd9ccb09bc37f2216

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7386b53220564c4f10aefdadd9ccb09bc37f2216 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:55 +0800
Subject: [PATCH] ethdev: fix memory leak in xstats telemetry
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2d00e2b4382d6538d305fc6f3606ecea72011f5b ]

The 'eth_xstats' should be freed after telemetry dictionary setup.

Fixes: c190daedb9b1 ("ethdev: add telemetry callbacks")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/librte_ethdev/rte_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 028d16f99e..8df4b0f6ac 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -5721,6 +5721,7 @@ eth_dev_handle_port_xstats(const char *cmd __rte_unused,
 	for (i = 0; i < num_xstats; i++)
 		rte_tel_data_add_dict_u64(d, xstat_names[i].name,
 				eth_xstats[i].value);
+	free(eth_xstats);
 	return 0;
 }
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.666404356 +0800
+++ 0075-ethdev-fix-memory-leak-in-xstats-telemetry.patch	2022-06-21 15:37:49.114451524 +0800
@@ -1 +1 @@
-From 2d00e2b4382d6538d305fc6f3606ecea72011f5b Mon Sep 17 00:00:00 2001
+From 7386b53220564c4f10aefdadd9ccb09bc37f2216 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2d00e2b4382d6538d305fc6f3606ecea72011f5b ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
- lib/ethdev/rte_ethdev.c | 1 +
+ lib/librte_ethdev/rte_ethdev.c | 1 +
@@ -21,5 +23,5 @@
-diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
-index 10db76c1a6..dc47543e6b 100644
---- a/lib/ethdev/rte_ethdev.c
-+++ b/lib/ethdev/rte_ethdev.c
-@@ -5595,6 +5595,7 @@ eth_dev_handle_port_xstats(const char *cmd __rte_unused,
+diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
+index 028d16f99e..8df4b0f6ac 100644
+--- a/lib/librte_ethdev/rte_ethdev.c
++++ b/lib/librte_ethdev/rte_ethdev.c
+@@ -5721,6 +5721,7 @@ eth_dev_handle_port_xstats(const char *cmd __rte_unused,

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

* patch 'ethdev: fix possible null pointer access' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (74 preceding siblings ...)
  2022-06-21  8:02 ` patch 'ethdev: fix memory leak in xstats telemetry' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'app/testpmd: replace hardcoded min mbuf number with macro' " Xueming Li
                   ` (39 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fe09e56cb54c6e32242a349e32d50e4b733687fd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fe09e56cb54c6e32242a349e32d50e4b733687fd Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:56 +0800
Subject: [PATCH] ethdev: fix possible null pointer access
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 590e988fdfca241d810d6cc94098c223ccb7c737 ]

The rte_tel_data_alloc() may return NULL, so the caller should add
judgement for it.

Fixes: 083b0b310b19 ("ethdev: add common stats for telemetry")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/librte_ethdev/rte_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 8df4b0f6ac..259498342d 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -5628,6 +5628,8 @@ eth_dev_add_port_queue_stats(struct rte_tel_data *d, uint64_t *q_stats,
 {
 	int q;
 	struct rte_tel_data *q_data = rte_tel_data_alloc();
+	if (q_data == NULL)
+		return;
 	rte_tel_data_start_array(q_data, RTE_TEL_U64_VAL);
 	for (q = 0; q < RTE_ETHDEV_QUEUE_STAT_CNTRS; q++)
 		rte_tel_data_add_array_u64(q_data, q_stats[q]);
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.705539559 +0800
+++ 0076-ethdev-fix-possible-null-pointer-access.patch	2022-06-21 15:37:49.117784869 +0800
@@ -1 +1 @@
-From 590e988fdfca241d810d6cc94098c223ccb7c737 Mon Sep 17 00:00:00 2001
+From fe09e56cb54c6e32242a349e32d50e4b733687fd Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 590e988fdfca241d810d6cc94098c223ccb7c737 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/ethdev/rte_ethdev.c | 2 ++
+ lib/librte_ethdev/rte_ethdev.c | 2 ++
@@ -22,5 +24,5 @@
-diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
-index dc47543e6b..a175867651 100644
---- a/lib/ethdev/rte_ethdev.c
-+++ b/lib/ethdev/rte_ethdev.c
-@@ -5502,6 +5502,8 @@ eth_dev_add_port_queue_stats(struct rte_tel_data *d, uint64_t *q_stats,
+diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
+index 8df4b0f6ac..259498342d 100644
+--- a/lib/librte_ethdev/rte_ethdev.c
++++ b/lib/librte_ethdev/rte_ethdev.c
+@@ -5628,6 +5628,8 @@ eth_dev_add_port_queue_stats(struct rte_tel_data *d, uint64_t *q_stats,

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

* patch 'app/testpmd: replace hardcoded min mbuf number with macro' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (75 preceding siblings ...)
  2022-06-21  8:02 ` patch 'ethdev: fix possible null pointer access' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'app/testpmd: fix metering and policing command for RFC4115' " Xueming Li
                   ` (38 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Mingxia Liu; +Cc: Yuying Zhang, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/070f2b2b8a0da9f20601f1aea430f5fdddcf35a3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 070f2b2b8a0da9f20601f1aea430f5fdddcf35a3 Mon Sep 17 00:00:00 2001
From: Mingxia Liu <mingxia.liu@intel.com>
Date: Thu, 31 Mar 2022 02:33:33 +0000
Subject: [PATCH] app/testpmd: replace hardcoded min mbuf number with macro
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 57d91f5b8dc589226a307560bd36181ac7a6b7df ]

Add macro MIN_TOTAL_NUM_MBUFS (1024) to indicate
what the value of total-num-mbufs should bigger than.

Fixes: c87988187fdb ("app/testpmd: add --total-num-mbufs option")

Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>
Acked-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 app/test-pmd/parameters.c | 5 +++--
 app/test-pmd/testpmd.h    | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index c842943796..f9b5c189cb 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -804,11 +804,12 @@ launch_args_parse(int argc, char** argv)
 			}
 			if (!strcmp(lgopts[opt_idx].name, "total-num-mbufs")) {
 				n = atoi(optarg);
-				if (n > 1024)
+				if (n > MIN_TOTAL_NUM_MBUFS)
 					param_total_num_mbufs = (unsigned)n;
 				else
 					rte_exit(EXIT_FAILURE,
-						 "total-num-mbufs should be > 1024\n");
+						 "total-num-mbufs should be > %d\n",
+						 MIN_TOTAL_NUM_MBUFS);
 			}
 			if (!strcmp(lgopts[opt_idx].name, "max-pkt-len")) {
 				n = atoi(optarg);
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 2d4dc05332..2a6312217d 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -64,6 +64,8 @@
 #define NUMA_NO_CONFIG 0xFF
 #define UMA_NO_CONFIG  0xFF
 
+#define MIN_TOTAL_NUM_MBUFS 1024
+
 typedef uint8_t  lcoreid_t;
 typedef uint16_t portid_t;
 typedef uint16_t queueid_t;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.744280180 +0800
+++ 0077-app-testpmd-replace-hardcoded-min-mbuf-number-with-m.patch	2022-06-21 15:37:49.121118214 +0800
@@ -1 +1 @@
-From 57d91f5b8dc589226a307560bd36181ac7a6b7df Mon Sep 17 00:00:00 2001
+From 070f2b2b8a0da9f20601f1aea430f5fdddcf35a3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 57d91f5b8dc589226a307560bd36181ac7a6b7df ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index daf6a31b2b..641c9c767e 100644
+index c842943796..f9b5c189cb 100644
@@ -24 +26 @@
-@@ -940,11 +940,12 @@ launch_args_parse(int argc, char** argv)
+@@ -804,11 +804,12 @@ launch_args_parse(int argc, char** argv)
@@ -40 +42 @@
-index 67f253b30e..f04a9a11b4 100644
+index 2d4dc05332..2a6312217d 100644
@@ -43 +45 @@
-@@ -72,6 +72,8 @@
+@@ -64,6 +64,8 @@

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

* patch 'app/testpmd: fix metering and policing command for RFC4115' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (76 preceding siblings ...)
  2022-06-21  8:02 ` patch 'app/testpmd: replace hardcoded min mbuf number with macro' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'ethdev: prohibit polling stopped queue' " Xueming Li
                   ` (37 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Shun Hao; +Cc: Matan Azrad, Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b4f13e0fdb08bec45a41f321cf2df2fc664f58f4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b4f13e0fdb08bec45a41f321cf2df2fc664f58f4 Mon Sep 17 00:00:00 2001
From: Shun Hao <shunh@nvidia.com>
Date: Fri, 13 May 2022 06:57:38 +0300
Subject: [PATCH] app/testpmd: fix metering and policing command for RFC4115
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b4f94d758f9eadf45e3fbefcc8dc5701ab73bfca ]

Add CLI command support for metering and policing of trtcm_rfc4115.

Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")

Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 app/test-pmd/cmdline.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 1741d00ba8..481821b40a 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16987,6 +16987,7 @@ cmdline_parse_ctx_t main_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_show_port_meter_cap,
 	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcm,
 	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm,
+	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm_rfc4115,
 	(cmdline_parse_inst_t *)&cmd_del_port_meter_profile,
 	(cmdline_parse_inst_t *)&cmd_create_port_meter,
 	(cmdline_parse_inst_t *)&cmd_enable_port_meter,
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.782188029 +0800
+++ 0078-app-testpmd-fix-metering-and-policing-command-for-RF.patch	2022-06-21 15:37:49.131118249 +0800
@@ -1 +1 @@
-From b4f94d758f9eadf45e3fbefcc8dc5701ab73bfca Mon Sep 17 00:00:00 2001
+From b4f13e0fdb08bec45a41f321cf2df2fc664f58f4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b4f94d758f9eadf45e3fbefcc8dc5701ab73bfca ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 44ddf9bbc8..1e5b294ab3 100644
+index 1741d00ba8..481821b40a 100644
@@ -22 +24 @@
-@@ -17963,6 +17963,7 @@ cmdline_parse_ctx_t main_ctx[] = {
+@@ -16987,6 +16987,7 @@ cmdline_parse_ctx_t main_ctx[] = {

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

* patch 'ethdev: prohibit polling stopped queue' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (77 preceding siblings ...)
  2022-06-21  8:02 ` patch 'app/testpmd: fix metering and policing command for RFC4115' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'app/testpmd: do not poll stopped queues' " Xueming Li
                   ` (36 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f6060b16895290b11386d024c2bd72bee18aab56

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f6060b16895290b11386d024c2bd72bee18aab56 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Mon, 11 Apr 2022 00:35:50 +0300
Subject: [PATCH] ethdev: prohibit polling stopped queue
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b77d3318d6a3ca266751031ff04520b7ad485529 ]

Whether it is allowed to call Rx/Tx functions for a stopped queue
was undocumented. Some PMDs make this behavior a no-op
either by explicitly checking the queue state
or by the way how their routines are implemented or HW works.

No-op behavior may be convenient for application developers.
But it also means that pollers of stopped queues
would go all the way down to PMD Rx/Tx routines, wasting cycles.
Some PMDs would do a check for the queue state on data path,
even though it may never be needed for a particular application.
Also, use cases for stopping queues or starting them deferred
do not logically require polling stopped queues.

Use case 1: a secondary that was polling the queue has crashed,
the primary is doing a recovery to free all mbufs.
By definition the queue to be restarted is not polled.

Use case 2: deferred queue start or queue reconfiguration.
The polling thread must be synchronized anyway,
because queue start and stop are non-atomic.

Prohibit calling Rx/Tx functions on stopped queues.

Fixes: 0748be2cf9a2 ("ethdev: queue start and stop")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/librte_ethdev/rte_ethdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 7da58d3fd1..dd7eef908d 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -74,7 +74,7 @@
  * rte_eth_rx_queue_setup()), it must call rte_eth_dev_stop() first to stop the
  * device and then do the reconfiguration before calling rte_eth_dev_start()
  * again. The transmit and receive functions should not be invoked when the
- * device is stopped.
+ * device or the queue is stopped.
  *
  * Please note that some configuration is not stored between calls to
  * rte_eth_dev_stop()/rte_eth_dev_start(). The following configuration will
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.829284863 +0800
+++ 0079-ethdev-prohibit-polling-stopped-queue.patch	2022-06-21 15:37:49.134451595 +0800
@@ -1 +1 @@
-From b77d3318d6a3ca266751031ff04520b7ad485529 Mon Sep 17 00:00:00 2001
+From f6060b16895290b11386d024c2bd72bee18aab56 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b77d3318d6a3ca266751031ff04520b7ad485529 ]
@@ -30 +32,0 @@
-Cc: stable@dpdk.org
@@ -35 +37 @@
- lib/ethdev/rte_ethdev.h | 2 +-
+ lib/librte_ethdev/rte_ethdev.h | 2 +-
@@ -38,4 +40,4 @@
-diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
-index 04225bba4d..02df65d923 100644
---- a/lib/ethdev/rte_ethdev.h
-+++ b/lib/ethdev/rte_ethdev.h
+diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
+index 7da58d3fd1..dd7eef908d 100644
+--- a/lib/librte_ethdev/rte_ethdev.h
++++ b/lib/librte_ethdev/rte_ethdev.h

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

* patch 'app/testpmd: do not poll stopped queues' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (78 preceding siblings ...)
  2022-06-21  8:02 ` patch 'ethdev: prohibit polling stopped queue' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/bonding: fix mbuf fast free usage' " Xueming Li
                   ` (35 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bdf2967cd5c84e5df7691a3c87a66cf5529f6134

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bdf2967cd5c84e5df7691a3c87a66cf5529f6134 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Mon, 7 Mar 2022 14:53:50 +0200
Subject: [PATCH] app/testpmd: do not poll stopped queues
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3c4426db54fc24e7a97f2b4000a0a4f30897a104 ]

Calling Rx/Tx functions on a stopped queue is not supported.
Do not run packet forwarding for streams that use stopped queues.

Each stream has a read-only "disabled" field,
so that lcore function can skip such streams.
Forwarding engines can set this field
using a new "stream_init" callback function
by checking relevant queue states,
which are stored along with queue configurations
(not all PMDs implement rte_eth_rx/tx_queue_info_get()
to query the state from there).

Fixes: 5f4ec54f1d16 ("testpmd: queue start and stop")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 app/test-pmd/5tswap.c                 | 13 +++++
 app/test-pmd/cmdline.c                | 45 +++++++++------
 app/test-pmd/config.c                 |  4 +-
 app/test-pmd/csumonly.c               | 13 +++++
 app/test-pmd/flowgen.c                | 13 +++++
 app/test-pmd/icmpecho.c               | 13 +++++
 app/test-pmd/ieee1588fwd.c            | 13 +++++
 app/test-pmd/iofwd.c                  | 13 +++++
 app/test-pmd/macfwd.c                 | 13 +++++
 app/test-pmd/macswap.c                | 13 +++++
 app/test-pmd/noisy_vnf.c              | 13 +++++
 app/test-pmd/rxonly.c                 |  8 +++
 app/test-pmd/testpmd.c                | 81 +++++++++++++++++----------
 app/test-pmd/testpmd.h                | 19 ++++++-
 app/test-pmd/txonly.c                 |  8 +++
 lib/librte_ethdev/rte_ethdev.h        |  7 +++
 lib/librte_ethdev/rte_ethdev_driver.h |  7 ---
 17 files changed, 238 insertions(+), 58 deletions(-)

diff --git a/app/test-pmd/5tswap.c b/app/test-pmd/5tswap.c
index e8cef9623b..090798d68b 100644
--- a/app/test-pmd/5tswap.c
+++ b/app/test-pmd/5tswap.c
@@ -185,9 +185,22 @@ pkt_burst_5tuple_swap(struct fwd_stream *fs)
 	get_end_cycles(fs, start_tsc);
 }
 
+static void
+stream_init_5tuple_swap(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine five_tuple_swap_fwd_engine = {
 	.fwd_mode_name  = "5tswap",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = stream_init_5tuple_swap,
 	.packet_fwd     = pkt_burst_5tuple_swap,
 };
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 481821b40a..b868081770 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2557,8 +2557,10 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
 			__rte_unused void *data)
 {
 	struct cmd_config_rxtx_queue *res = parsed_result;
+	struct rte_port *port;
 	uint8_t isrx;
 	uint8_t isstart;
+	uint8_t *state;
 	int ret = 0;
 
 	if (test_done == 0) {
@@ -2606,8 +2608,15 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
 	else
 		ret = rte_eth_dev_tx_queue_stop(res->portid, res->qid);
 
-	if (ret == -ENOTSUP)
+	if (ret == -ENOTSUP) {
 		fprintf(stderr, "Function not supported in PMD\n");
+		return;
+	}
+
+	port = &ports[res->portid];
+	state = isrx ? &port->rxq[res->qid].state : &port->txq[res->qid].state;
+	*state = isstart ? RTE_ETH_QUEUE_STATE_STARTED :
+			   RTE_ETH_QUEUE_STATE_STOPPED;
 }
 
 cmdline_parse_token_string_t cmd_config_rxtx_queue_port =
@@ -2676,11 +2685,11 @@ cmd_config_deferred_start_rxtx_queue_parsed(void *parsed_result,
 
 	ison = !strcmp(res->state, "on");
 
-	if (isrx && port->rx_conf[res->qid].rx_deferred_start != ison) {
-		port->rx_conf[res->qid].rx_deferred_start = ison;
+	if (isrx && port->rxq[res->qid].conf.rx_deferred_start != ison) {
+		port->rxq[res->qid].conf.rx_deferred_start = ison;
 		needreconfig = 1;
-	} else if (!isrx && port->tx_conf[res->qid].tx_deferred_start != ison) {
-		port->tx_conf[res->qid].tx_deferred_start = ison;
+	} else if (!isrx && port->txq[res->qid].conf.tx_deferred_start != ison) {
+		port->txq[res->qid].conf.tx_deferred_start = ison;
 		needreconfig = 1;
 	}
 
@@ -2799,7 +2808,7 @@ cmd_setup_rxtx_queue_parsed(
 				     res->qid,
 				     port->nb_rx_desc[res->qid],
 				     socket_id,
-				     &port->rx_conf[res->qid],
+				     &port->rxq[res->qid].conf,
 				     mp);
 		if (ret)
 			printf("Failed to setup RX queue\n");
@@ -2816,7 +2825,7 @@ cmd_setup_rxtx_queue_parsed(
 					     res->qid,
 					     port->nb_tx_desc[res->qid],
 					     socket_id,
-					     &port->tx_conf[res->qid]);
+					     &port->txq[res->qid].conf);
 		if (ret)
 			printf("Failed to setup TX queue\n");
 	}
@@ -4569,7 +4578,7 @@ cmd_config_queue_tx_offloads(struct rte_port *port)
 
 	/* Apply queue tx offloads configuration */
 	for (k = 0; k < port->dev_info.max_tx_queues; k++)
-		port->tx_conf[k].offloads =
+		port->txq[k].conf.offloads =
 			port->dev_conf.txmode.offloads;
 }
 
@@ -15412,7 +15421,7 @@ cmd_rx_offload_get_configuration_parsed(
 
 	nb_rx_queues = dev_info.nb_rx_queues;
 	for (q = 0; q < nb_rx_queues; q++) {
-		queue_offloads = port->rx_conf[q].offloads;
+		queue_offloads = port->rxq[q].conf.offloads;
 		printf("  Queue[%2d] :", q);
 		print_rx_offloads(queue_offloads);
 		printf("\n");
@@ -15531,11 +15540,11 @@ cmd_config_per_port_rx_offload_parsed(void *parsed_result,
 	if (!strcmp(res->on_off, "on")) {
 		port->dev_conf.rxmode.offloads |= single_offload;
 		for (q = 0; q < nb_rx_queues; q++)
-			port->rx_conf[q].offloads |= single_offload;
+			port->rxq[q].conf.offloads |= single_offload;
 	} else {
 		port->dev_conf.rxmode.offloads &= ~single_offload;
 		for (q = 0; q < nb_rx_queues; q++)
-			port->rx_conf[q].offloads &= ~single_offload;
+			port->rxq[q].conf.offloads &= ~single_offload;
 	}
 
 	cmd_reconfig_device_queue(port_id, 1, 1);
@@ -15639,9 +15648,9 @@ cmd_config_per_queue_rx_offload_parsed(void *parsed_result,
 	}
 
 	if (!strcmp(res->on_off, "on"))
-		port->rx_conf[queue_id].offloads |= single_offload;
+		port->rxq[queue_id].conf.offloads |= single_offload;
 	else
-		port->rx_conf[queue_id].offloads &= ~single_offload;
+		port->rxq[queue_id].conf.offloads &= ~single_offload;
 
 	cmd_reconfig_device_queue(port_id, 1, 1);
 }
@@ -15823,7 +15832,7 @@ cmd_tx_offload_get_configuration_parsed(
 
 	nb_tx_queues = dev_info.nb_tx_queues;
 	for (q = 0; q < nb_tx_queues; q++) {
-		queue_offloads = port->tx_conf[q].offloads;
+		queue_offloads = port->txq[q].conf.offloads;
 		printf("  Queue[%2d] :", q);
 		print_tx_offloads(queue_offloads);
 		printf("\n");
@@ -15946,11 +15955,11 @@ cmd_config_per_port_tx_offload_parsed(void *parsed_result,
 	if (!strcmp(res->on_off, "on")) {
 		port->dev_conf.txmode.offloads |= single_offload;
 		for (q = 0; q < nb_tx_queues; q++)
-			port->tx_conf[q].offloads |= single_offload;
+			port->txq[q].conf.offloads |= single_offload;
 	} else {
 		port->dev_conf.txmode.offloads &= ~single_offload;
 		for (q = 0; q < nb_tx_queues; q++)
-			port->tx_conf[q].offloads &= ~single_offload;
+			port->txq[q].conf.offloads &= ~single_offload;
 	}
 
 	cmd_reconfig_device_queue(port_id, 1, 1);
@@ -16057,9 +16066,9 @@ cmd_config_per_queue_tx_offload_parsed(void *parsed_result,
 	}
 
 	if (!strcmp(res->on_off, "on"))
-		port->tx_conf[queue_id].offloads |= single_offload;
+		port->txq[queue_id].conf.offloads |= single_offload;
 	else
-		port->tx_conf[queue_id].offloads &= ~single_offload;
+		port->txq[queue_id].conf.offloads &= ~single_offload;
 
 	cmd_reconfig_device_queue(port_id, 1, 1);
 }
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index d6b43baaf4..ee2f560b61 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2816,8 +2816,8 @@ rxtx_config_display(void)
 	       nb_fwd_lcores, nb_fwd_ports);
 
 	RTE_ETH_FOREACH_DEV(pid) {
-		struct rte_eth_rxconf *rx_conf = &ports[pid].rx_conf[0];
-		struct rte_eth_txconf *tx_conf = &ports[pid].tx_conf[0];
+		struct rte_eth_rxconf *rx_conf = &ports[pid].rxq[0].conf;
+		struct rte_eth_txconf *tx_conf = &ports[pid].txq[0].conf;
 		uint16_t *nb_rx_desc = &ports[pid].nb_rx_desc[0];
 		uint16_t *nb_tx_desc = &ports[pid].nb_tx_desc[0];
 		struct rte_eth_rxq_info rx_qinfo;
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 282e87092f..8adac07cb6 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -1165,9 +1165,22 @@ tunnel_update:
 	get_end_cycles(fs, start_tsc);
 }
 
+static void
+stream_init_checksum_forward(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine csum_fwd_engine = {
 	.fwd_mode_name  = "csum",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = stream_init_checksum_forward,
 	.packet_fwd     = pkt_burst_checksum_forward,
 };
diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index bb4bf85519..506ff07086 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -206,9 +206,22 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 	get_end_cycles(fs, start_tsc);
 }
 
+static void
+flowgen_stream_init(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine flow_gen_engine = {
 	.fwd_mode_name  = "flowgen",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = flowgen_stream_init,
 	.packet_fwd     = pkt_burst_flow_gen,
 };
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index a7b568e46e..989609fa5b 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -513,9 +513,22 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 	get_end_cycles(fs, start_tsc);
 }
 
+static void
+icmpecho_stream_init(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine icmp_echo_engine = {
 	.fwd_mode_name  = "icmpecho",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = icmpecho_stream_init,
 	.packet_fwd     = reply_to_icmp_echo_rqsts,
 };
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index a949d24d5c..5876aafa5b 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -211,9 +211,22 @@ port_ieee1588_fwd_end(portid_t pi)
 	rte_eth_timesync_disable(pi);
 }
 
+static void
+port_ieee1588_stream_init(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine ieee1588_fwd_engine = {
 	.fwd_mode_name  = "ieee1588",
 	.port_fwd_begin = port_ieee1588_fwd_begin,
 	.port_fwd_end   = port_ieee1588_fwd_end,
+	.stream_init    = port_ieee1588_stream_init,
 	.packet_fwd     = ieee1588_packet_fwd,
 };
diff --git a/app/test-pmd/iofwd.c b/app/test-pmd/iofwd.c
index 83d098adcb..de20d645b5 100644
--- a/app/test-pmd/iofwd.c
+++ b/app/test-pmd/iofwd.c
@@ -89,9 +89,22 @@ pkt_burst_io_forward(struct fwd_stream *fs)
 	get_end_cycles(fs, start_tsc);
 }
 
+static void
+stream_init_forward(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine io_fwd_engine = {
 	.fwd_mode_name  = "io",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = stream_init_forward,
 	.packet_fwd     = pkt_burst_io_forward,
 };
diff --git a/app/test-pmd/macfwd.c b/app/test-pmd/macfwd.c
index 0568ea794d..f8f55023b8 100644
--- a/app/test-pmd/macfwd.c
+++ b/app/test-pmd/macfwd.c
@@ -120,9 +120,22 @@ pkt_burst_mac_forward(struct fwd_stream *fs)
 	get_end_cycles(fs, start_tsc);
 }
 
+static void
+stream_init_mac_forward(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine mac_fwd_engine = {
 	.fwd_mode_name  = "mac",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = stream_init_mac_forward,
 	.packet_fwd     = pkt_burst_mac_forward,
 };
diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c
index 310bca06af..ba9a148e1c 100644
--- a/app/test-pmd/macswap.c
+++ b/app/test-pmd/macswap.c
@@ -98,9 +98,22 @@ pkt_burst_mac_swap(struct fwd_stream *fs)
 	get_end_cycles(fs, start_tsc);
 }
 
+static void
+stream_init_mac_swap(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine mac_swap_engine = {
 	.fwd_mode_name  = "macswap",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = stream_init_mac_swap,
 	.packet_fwd     = pkt_burst_mac_swap,
 };
diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c
index e4434bea95..a92e810190 100644
--- a/app/test-pmd/noisy_vnf.c
+++ b/app/test-pmd/noisy_vnf.c
@@ -277,9 +277,22 @@ noisy_fwd_begin(portid_t pi)
 	return 0;
 }
 
+static void
+stream_init_noisy_vnf(struct fwd_stream *fs)
+{
+	bool rx_stopped, tx_stopped;
+
+	rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+	fs->disabled = rx_stopped || tx_stopped;
+}
+
 struct fwd_engine noisy_vnf_engine = {
 	.fwd_mode_name  = "noisy",
 	.port_fwd_begin = noisy_fwd_begin,
 	.port_fwd_end   = noisy_fwd_end,
+	.stream_init    = stream_init_noisy_vnf,
 	.packet_fwd     = pkt_burst_noisy_vnf,
 };
diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c
index c78fc4609a..83d0dcf670 100644
--- a/app/test-pmd/rxonly.c
+++ b/app/test-pmd/rxonly.c
@@ -69,9 +69,17 @@ pkt_burst_receive(struct fwd_stream *fs)
 	get_end_cycles(fs, start_tsc);
 }
 
+static void
+stream_init_receive(struct fwd_stream *fs)
+{
+	fs->disabled = ports[fs->rx_port].rxq[fs->rx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+}
+
 struct fwd_engine rx_only_engine = {
 	.fwd_mode_name  = "rxonly",
 	.port_fwd_begin = NULL,
 	.port_fwd_end   = NULL,
+	.stream_init    = stream_init_receive,
 	.packet_fwd     = pkt_burst_receive,
 };
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 5da22fab57..0e553d19b9 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1429,10 +1429,10 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
 
 	/* Apply Rx offloads configuration */
 	for (i = 0; i < port->dev_info.max_rx_queues; i++)
-		port->rx_conf[i].offloads = port->dev_conf.rxmode.offloads;
+		port->rxq[i].conf.offloads = port->dev_conf.rxmode.offloads;
 	/* Apply Tx offloads configuration */
 	for (i = 0; i < port->dev_info.max_tx_queues; i++)
-		port->tx_conf[i].offloads = port->dev_conf.txmode.offloads;
+		port->txq[i].conf.offloads = port->dev_conf.txmode.offloads;
 
 	/* set flag to initialize port/queue */
 	port->need_reconfig = 1;
@@ -1600,7 +1600,6 @@ reconfig(portid_t new_port_id, unsigned socket_id)
 	init_port_config();
 }
 
-
 int
 init_fwd_streams(void)
 {
@@ -1990,6 +1989,12 @@ flush_fwd_rx_queues(void)
 		for (rxp = 0; rxp < cur_fwd_config.nb_fwd_ports; rxp++) {
 			for (rxq = 0; rxq < nb_rxq; rxq++) {
 				port_id = fwd_ports_ids[rxp];
+
+				/* Polling stopped queues is prohibited. */
+				if (ports[port_id].rxq[rxq].state ==
+				    RTE_ETH_QUEUE_STATE_STOPPED)
+					continue;
+
 				/**
 				* testpmd can stuck in the below do while loop
 				* if rte_eth_rx_burst() always returns nonzero
@@ -2035,7 +2040,8 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
 	nb_fs = fc->stream_nb;
 	do {
 		for (sm_id = 0; sm_id < nb_fs; sm_id++)
-			(*pkt_fwd)(fsm[sm_id]);
+			if (!fsm[sm_id]->disabled)
+				(*pkt_fwd)(fsm[sm_id]);
 #ifdef RTE_LIB_BITRATESTATS
 		if (bitrate_enabled != 0 &&
 				bitrate_lcore_id == rte_lcore_id()) {
@@ -2116,6 +2122,7 @@ start_packet_forwarding(int with_tx_first)
 {
 	port_fwd_begin_t port_fwd_begin;
 	port_fwd_end_t  port_fwd_end;
+	stream_init_t stream_init = cur_fwd_eng->stream_init;
 	unsigned int i;
 
 	if (strcmp(cur_fwd_eng->fwd_mode_name, "rxonly") == 0 && !nb_rxq)
@@ -2142,6 +2149,10 @@ start_packet_forwarding(int with_tx_first)
 
 	fwd_config_setup();
 
+	if (stream_init != NULL)
+		for (i = 0; i < cur_fwd_config.nb_fwd_streams; i++)
+			stream_init(fwd_streams[i]);
+
 	port_fwd_begin = cur_fwd_config.fwd_eng->port_fwd_begin;
 	if (port_fwd_begin != NULL) {
 		for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
@@ -2404,7 +2415,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 		ret = rte_eth_rx_queue_setup(port_id, rx_queue_id,
 					     nb_rx_desc, socket_id,
 					     rx_conf, mp);
-		return ret;
+		goto exit;
 	}
 	for (i = 0; i < rx_pkt_nb_segs; i++) {
 		struct rte_eth_rxseg_split *rx_seg = &rx_useg[i].split;
@@ -2429,6 +2440,10 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 				    socket_id, rx_conf, NULL);
 	rx_conf->rx_seg = NULL;
 	rx_conf->rx_nseg = 0;
+exit:
+	ports[port_id].rxq[rx_queue_id].state = rx_conf->rx_deferred_start ?
+						RTE_ETH_QUEUE_STATE_STOPPED :
+						RTE_ETH_QUEUE_STATE_STARTED;
 	return ret;
 }
 
@@ -2508,20 +2523,28 @@ start_port(portid_t pid)
 			port->need_reconfig_queues = 0;
 			/* setup tx queues */
 			for (qi = 0; qi < nb_txq; qi++) {
+				struct rte_eth_txconf *conf =
+							&port->txq[qi].conf;
+
 				if ((numa_support) &&
 					(txring_numa[pi] != NUMA_NO_CONFIG))
 					diag = rte_eth_tx_queue_setup(pi, qi,
 						port->nb_tx_desc[qi],
 						txring_numa[pi],
-						&(port->tx_conf[qi]));
+						&(port->txq[qi].conf));
 				else
 					diag = rte_eth_tx_queue_setup(pi, qi,
 						port->nb_tx_desc[qi],
 						port->socket_id,
-						&(port->tx_conf[qi]));
+						&(port->txq[qi].conf));
 
-				if (diag == 0)
+				if (diag == 0) {
+					port->txq[qi].state =
+						conf->tx_deferred_start ?
+						RTE_ETH_QUEUE_STATE_STOPPED :
+						RTE_ETH_QUEUE_STATE_STARTED;
 					continue;
+				}
 
 				/* Fail to setup tx queue, return */
 				if (rte_atomic16_cmpset(&(port->port_status),
@@ -2553,7 +2576,7 @@ start_port(portid_t pid)
 					diag = rx_queue_setup(pi, qi,
 					     port->nb_rx_desc[qi],
 					     rxring_numa[pi],
-					     &(port->rx_conf[qi]),
+					     &(port->rxq[qi].conf),
 					     mp);
 				} else {
 					struct rte_mempool *mp =
@@ -2569,7 +2592,7 @@ start_port(portid_t pid)
 					diag = rx_queue_setup(pi, qi,
 					     port->nb_rx_desc[qi],
 					     port->socket_id,
-					     &(port->rx_conf[qi]),
+					     &(port->rxq[qi].conf),
 					     mp);
 				}
 				if (diag == 0)
@@ -3293,51 +3316,51 @@ rxtx_port_config(struct rte_port *port)
 	uint64_t offloads;
 
 	for (qid = 0; qid < nb_rxq; qid++) {
-		offloads = port->rx_conf[qid].offloads;
-		port->rx_conf[qid] = port->dev_info.default_rxconf;
+		offloads = port->rxq[qid].conf.offloads;
+		port->rxq[qid].conf = port->dev_info.default_rxconf;
 		if (offloads != 0)
-			port->rx_conf[qid].offloads = offloads;
+			port->rxq[qid].conf.offloads = offloads;
 
 		/* Check if any Rx parameters have been passed */
 		if (rx_pthresh != RTE_PMD_PARAM_UNSET)
-			port->rx_conf[qid].rx_thresh.pthresh = rx_pthresh;
+			port->rxq[qid].conf.rx_thresh.pthresh = rx_pthresh;
 
 		if (rx_hthresh != RTE_PMD_PARAM_UNSET)
-			port->rx_conf[qid].rx_thresh.hthresh = rx_hthresh;
+			port->rxq[qid].conf.rx_thresh.hthresh = rx_hthresh;
 
 		if (rx_wthresh != RTE_PMD_PARAM_UNSET)
-			port->rx_conf[qid].rx_thresh.wthresh = rx_wthresh;
+			port->rxq[qid].conf.rx_thresh.wthresh = rx_wthresh;
 
 		if (rx_free_thresh != RTE_PMD_PARAM_UNSET)
-			port->rx_conf[qid].rx_free_thresh = rx_free_thresh;
+			port->rxq[qid].conf.rx_free_thresh = rx_free_thresh;
 
 		if (rx_drop_en != RTE_PMD_PARAM_UNSET)
-			port->rx_conf[qid].rx_drop_en = rx_drop_en;
+			port->rxq[qid].conf.rx_drop_en = rx_drop_en;
 
 		port->nb_rx_desc[qid] = nb_rxd;
 	}
 
 	for (qid = 0; qid < nb_txq; qid++) {
-		offloads = port->tx_conf[qid].offloads;
-		port->tx_conf[qid] = port->dev_info.default_txconf;
+		offloads = port->txq[qid].conf.offloads;
+		port->txq[qid].conf = port->dev_info.default_txconf;
 		if (offloads != 0)
-			port->tx_conf[qid].offloads = offloads;
+			port->txq[qid].conf.offloads = offloads;
 
 		/* Check if any Tx parameters have been passed */
 		if (tx_pthresh != RTE_PMD_PARAM_UNSET)
-			port->tx_conf[qid].tx_thresh.pthresh = tx_pthresh;
+			port->txq[qid].conf.tx_thresh.pthresh = tx_pthresh;
 
 		if (tx_hthresh != RTE_PMD_PARAM_UNSET)
-			port->tx_conf[qid].tx_thresh.hthresh = tx_hthresh;
+			port->txq[qid].conf.tx_thresh.hthresh = tx_hthresh;
 
 		if (tx_wthresh != RTE_PMD_PARAM_UNSET)
-			port->tx_conf[qid].tx_thresh.wthresh = tx_wthresh;
+			port->txq[qid].conf.tx_thresh.wthresh = tx_wthresh;
 
 		if (tx_rs_thresh != RTE_PMD_PARAM_UNSET)
-			port->tx_conf[qid].tx_rs_thresh = tx_rs_thresh;
+			port->txq[qid].conf.tx_rs_thresh = tx_rs_thresh;
 
 		if (tx_free_thresh != RTE_PMD_PARAM_UNSET)
-			port->tx_conf[qid].tx_free_thresh = tx_free_thresh;
+			port->txq[qid].conf.tx_free_thresh = tx_free_thresh;
 
 		port->nb_tx_desc[qid] = nb_txd;
 	}
@@ -3396,9 +3419,9 @@ update_jumbo_frame_offload(portid_t portid)
 		/* Apply JUMBO_FRAME offload configuration to Rx queue(s) */
 		for (qid = 0; qid < port->dev_info.nb_rx_queues; qid++) {
 			if (on)
-				port->rx_conf[qid].offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+				port->rxq[qid].conf.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 			else
-				port->rx_conf[qid].offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
+				port->rxq[qid].conf.offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
 		}
 	}
 
@@ -3610,7 +3633,7 @@ init_port_dcb_config(portid_t pid,
 	if (port_conf.rxmode.mq_mode == ETH_MQ_RX_VMDQ_DCB) {
 		port_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_RSS_HASH;
 		for (i = 0; i < nb_rxq; i++)
-			rte_port->rx_conf[i].offloads &=
+			rte_port->rxq[i].conf.offloads &=
 				~DEV_RX_OFFLOAD_RSS_HASH;
 	}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 2a6312217d..5fa898eb96 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -128,6 +128,7 @@ struct fwd_stream {
 	portid_t   tx_port;   /**< forwarding port of received packets */
 	queueid_t  tx_queue;  /**< TX queue to send forwarded packets */
 	streamid_t peer_addr; /**< index of peer ethernet address of packets */
+	bool       disabled;  /**< the stream is disabled and should not run */
 
 	unsigned int retry_enabled;
 
@@ -195,6 +196,18 @@ struct tunnel_ops {
 	uint32_t items:1;
 };
 
+/** RX queue configuration and state. */
+struct port_rxqueue {
+	struct rte_eth_rxconf conf;
+	uint8_t state; /**< RTE_ETH_QUEUE_STATE_* value. */
+};
+
+/** TX queue configuration and state. */
+struct port_txqueue {
+	struct rte_eth_txconf conf;
+	uint8_t state; /**< RTE_ETH_QUEUE_STATE_* value. */
+};
+
 /**
  * The data structure associated with each port.
  */
@@ -217,8 +230,8 @@ struct rte_port {
 	uint8_t                 dcb_flag;   /**< enable dcb */
 	uint16_t                nb_rx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue rx desc number */
 	uint16_t                nb_tx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue tx desc number */
-	struct rte_eth_rxconf   rx_conf[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue rx configuration */
-	struct rte_eth_txconf   tx_conf[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue tx configuration */
+	struct port_rxqueue     rxq[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue Rx config and state */
+	struct port_txqueue     txq[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue Tx config and state */
 	struct rte_ether_addr   *mc_addr_pool; /**< pool of multicast addrs */
 	uint32_t                mc_addr_nb; /**< nb. of addr. in mc_addr_pool */
 	uint8_t                 slave_flag; /**< bonding slave port */
@@ -271,12 +284,14 @@ struct fwd_lcore {
  */
 typedef int (*port_fwd_begin_t)(portid_t pi);
 typedef void (*port_fwd_end_t)(portid_t pi);
+typedef void (*stream_init_t)(struct fwd_stream *fs);
 typedef void (*packet_fwd_t)(struct fwd_stream *fs);
 
 struct fwd_engine {
 	const char       *fwd_mode_name; /**< Forwarding mode name. */
 	port_fwd_begin_t port_fwd_begin; /**< NULL if nothing special to do. */
 	port_fwd_end_t   port_fwd_end;   /**< NULL if nothing special to do. */
+	stream_init_t    stream_init;    /**< NULL if nothing special to do. */
 	packet_fwd_t     packet_fwd;     /**< Mandatory. */
 };
 
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 9f5087d215..a7cd3bff0d 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -493,9 +493,17 @@ tx_only_begin(portid_t pi)
 	return 0;
 }
 
+static void
+tx_only_stream_init(struct fwd_stream *fs)
+{
+	fs->disabled = ports[fs->tx_port].txq[fs->tx_queue].state ==
+						RTE_ETH_QUEUE_STATE_STOPPED;
+}
+
 struct fwd_engine tx_only_engine = {
 	.fwd_mode_name  = "txonly",
 	.port_fwd_begin = tx_only_begin,
 	.port_fwd_end   = NULL,
+	.stream_init    = tx_only_stream_init,
 	.packet_fwd     = pkt_burst_transmit,
 };
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index dd7eef908d..5e8331da1c 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1561,6 +1561,13 @@ struct rte_eth_dev_info {
 	void *reserved_ptrs[2];   /**< Reserved for future fields */
 };
 
+/**
+ * RX/TX queue states
+ */
+#define RTE_ETH_QUEUE_STATE_STOPPED 0
+#define RTE_ETH_QUEUE_STATE_STARTED 1
+#define RTE_ETH_QUEUE_STATE_HAIRPIN 2
+
 /**
  * Ethernet device RX queue information structure.
  * Used to retrieve information about configured queue.
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index afee4b8b80..6764ffb854 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -923,13 +923,6 @@ struct eth_dev_ops {
 	/**< Disconnect the hairpin queues of a pair from each other. */
 };
 
-/**
- * RX/TX queue states
- */
-#define RTE_ETH_QUEUE_STATE_STOPPED 0
-#define RTE_ETH_QUEUE_STATE_STARTED 1
-#define RTE_ETH_QUEUE_STATE_HAIRPIN 2
-
 /**
  * @internal
  * Check if the selected Rx queue is hairpin queue.
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.871831919 +0800
+++ 0080-app-testpmd-do-not-poll-stopped-queues.patch	2022-06-21 15:37:49.164451701 +0800
@@ -1 +1 @@
-From 3c4426db54fc24e7a97f2b4000a0a4f30897a104 Mon Sep 17 00:00:00 2001
+From bdf2967cd5c84e5df7691a3c87a66cf5529f6134 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3c4426db54fc24e7a97f2b4000a0a4f30897a104 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -24,17 +26,18 @@
- app/test-pmd/5tswap.c         | 13 ++++++
- app/test-pmd/cmdline.c        | 45 ++++++++++--------
- app/test-pmd/config.c         |  8 ++--
- app/test-pmd/csumonly.c       | 13 ++++++
- app/test-pmd/flowgen.c        | 13 ++++++
- app/test-pmd/icmpecho.c       | 13 ++++++
- app/test-pmd/ieee1588fwd.c    | 13 ++++++
- app/test-pmd/iofwd.c          | 13 ++++++
- app/test-pmd/macfwd.c         | 13 ++++++
- app/test-pmd/macswap.c        | 13 ++++++
- app/test-pmd/noisy_vnf.c      | 13 ++++++
- app/test-pmd/rxonly.c         |  8 ++++
- app/test-pmd/shared_rxq_fwd.c |  8 ++++
- app/test-pmd/testpmd.c        | 87 ++++++++++++++++++++++-------------
- app/test-pmd/testpmd.h        | 19 +++++++-
- app/test-pmd/txonly.c         |  8 ++++
- 16 files changed, 244 insertions(+), 56 deletions(-)
+ app/test-pmd/5tswap.c                 | 13 +++++
+ app/test-pmd/cmdline.c                | 45 +++++++++------
+ app/test-pmd/config.c                 |  4 +-
+ app/test-pmd/csumonly.c               | 13 +++++
+ app/test-pmd/flowgen.c                | 13 +++++
+ app/test-pmd/icmpecho.c               | 13 +++++
+ app/test-pmd/ieee1588fwd.c            | 13 +++++
+ app/test-pmd/iofwd.c                  | 13 +++++
+ app/test-pmd/macfwd.c                 | 13 +++++
+ app/test-pmd/macswap.c                | 13 +++++
+ app/test-pmd/noisy_vnf.c              | 13 +++++
+ app/test-pmd/rxonly.c                 |  8 +++
+ app/test-pmd/testpmd.c                | 81 +++++++++++++++++----------
+ app/test-pmd/testpmd.h                | 19 ++++++-
+ app/test-pmd/txonly.c                 |  8 +++
+ lib/librte_ethdev/rte_ethdev.h        |  7 +++
+ lib/librte_ethdev/rte_ethdev_driver.h |  7 ---
+ 17 files changed, 238 insertions(+), 58 deletions(-)
@@ -43 +46 @@
-index 629d3e0d31..f041a5e1d5 100644
+index e8cef9623b..090798d68b 100644
@@ -70 +73 @@
-index 1e5b294ab3..d8900a0d07 100644
+index 481821b40a..b868081770 100644
@@ -73 +76 @@
-@@ -2654,8 +2654,10 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
+@@ -2557,8 +2557,10 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
@@ -84 +87 @@
-@@ -2703,8 +2705,15 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
+@@ -2606,8 +2608,15 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
@@ -101 +104 @@
-@@ -2773,11 +2782,11 @@ cmd_config_deferred_start_rxtx_queue_parsed(void *parsed_result,
+@@ -2676,11 +2685,11 @@ cmd_config_deferred_start_rxtx_queue_parsed(void *parsed_result,
@@ -117 +120 @@
-@@ -2895,7 +2904,7 @@ cmd_setup_rxtx_queue_parsed(
+@@ -2799,7 +2808,7 @@ cmd_setup_rxtx_queue_parsed(
@@ -125,2 +128,2 @@
- 			fprintf(stderr, "Failed to setup RX queue\n");
-@@ -2913,7 +2922,7 @@ cmd_setup_rxtx_queue_parsed(
+ 			printf("Failed to setup RX queue\n");
+@@ -2816,7 +2825,7 @@ cmd_setup_rxtx_queue_parsed(
@@ -133 +136 @@
- 			fprintf(stderr, "Failed to setup TX queue\n");
+ 			printf("Failed to setup TX queue\n");
@@ -135 +138 @@
-@@ -4689,7 +4698,7 @@ cmd_config_queue_tx_offloads(struct rte_port *port)
+@@ -4569,7 +4578,7 @@ cmd_config_queue_tx_offloads(struct rte_port *port)
@@ -144 +147 @@
-@@ -16201,7 +16210,7 @@ cmd_rx_offload_get_configuration_parsed(
+@@ -15412,7 +15421,7 @@ cmd_rx_offload_get_configuration_parsed(
@@ -153 +156 @@
-@@ -16321,11 +16330,11 @@ cmd_config_per_port_rx_offload_parsed(void *parsed_result,
+@@ -15531,11 +15540,11 @@ cmd_config_per_port_rx_offload_parsed(void *parsed_result,
@@ -167 +170 @@
-@@ -16431,9 +16440,9 @@ cmd_config_per_queue_rx_offload_parsed(void *parsed_result,
+@@ -15639,9 +15648,9 @@ cmd_config_per_queue_rx_offload_parsed(void *parsed_result,
@@ -179 +182 @@
-@@ -16620,7 +16629,7 @@ cmd_tx_offload_get_configuration_parsed(
+@@ -15823,7 +15832,7 @@ cmd_tx_offload_get_configuration_parsed(
@@ -188 +191 @@
-@@ -16744,11 +16753,11 @@ cmd_config_per_port_tx_offload_parsed(void *parsed_result,
+@@ -15946,11 +15955,11 @@ cmd_config_per_port_tx_offload_parsed(void *parsed_result,
@@ -202 +205 @@
-@@ -16857,9 +16866,9 @@ cmd_config_per_queue_tx_offload_parsed(void *parsed_result,
+@@ -16057,9 +16066,9 @@ cmd_config_per_queue_tx_offload_parsed(void *parsed_result,
@@ -215 +218 @@
-index dc9ef1e868..72d2606d19 100644
+index d6b43baaf4..ee2f560b61 100644
@@ -218 +221 @@
-@@ -3643,8 +3643,8 @@ rxtx_config_display(void)
+@@ -2816,8 +2816,8 @@ rxtx_config_display(void)
@@ -229,18 +231,0 @@
-@@ -3902,7 +3902,7 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
- 			fs = fwd_streams[sm_id];
- 			port = &ports[fs->rx_port];
- 			dev_info = &port->dev_info;
--			rxq_conf = &port->rx_conf[fs->rx_queue];
-+			rxq_conf = &port->rxq[fs->rx_queue].conf;
- 			if ((dev_info->dev_capa & RTE_ETH_DEV_CAPA_RXQ_SHARE)
- 			    == 0 || rxq_conf->share_group == 0)
- 				/* Not shared rxq. */
-@@ -3962,7 +3962,7 @@ pkt_fwd_shared_rxq_check(void)
- 			fs->lcore = fwd_lcores[lc_id];
- 			port = &ports[fs->rx_port];
- 			dev_info = &port->dev_info;
--			rxq_conf = &port->rx_conf[fs->rx_queue];
-+			rxq_conf = &port->rxq[fs->rx_queue].conf;
- 			if ((dev_info->dev_capa & RTE_ETH_DEV_CAPA_RXQ_SHARE)
- 			    == 0 || rxq_conf->share_group == 0)
- 				/* Not shared rxq. */
@@ -248 +233 @@
-index 05763a71e8..7df201e047 100644
+index 282e87092f..8adac07cb6 100644
@@ -251 +236 @@
-@@ -1203,9 +1203,22 @@ tunnel_update:
+@@ -1165,9 +1165,22 @@ tunnel_update:
@@ -275 +260 @@
-index 9ceef3b54a..1e01120ae9 100644
+index bb4bf85519..506ff07086 100644
@@ -278,2 +263,2 @@
-@@ -207,9 +207,22 @@ flowgen_begin(portid_t pi)
- 	return 0;
+@@ -206,9 +206,22 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
+ 	get_end_cycles(fs, start_tsc);
@@ -296 +281 @@
- 	.port_fwd_begin = flowgen_begin,
+ 	.port_fwd_begin = NULL,
@@ -302 +287 @@
-index 99c94cb282..066f2a3ab7 100644
+index a7b568e46e..989609fa5b 100644
@@ -305 +290 @@
-@@ -512,9 +512,22 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
+@@ -513,9 +513,22 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
@@ -329 +314 @@
-index 9ff817aa68..fc4e2d014c 100644
+index a949d24d5c..5876aafa5b 100644
@@ -356 +341 @@
-index 19cd920f70..71849aaf96 100644
+index 83d098adcb..de20d645b5 100644
@@ -359 +344 @@
-@@ -88,9 +88,22 @@ pkt_burst_io_forward(struct fwd_stream *fs)
+@@ -89,9 +89,22 @@ pkt_burst_io_forward(struct fwd_stream *fs)
@@ -383 +368 @@
-index 812a0c721f..79c9241d00 100644
+index 0568ea794d..f8f55023b8 100644
@@ -386 +371 @@
-@@ -119,9 +119,22 @@ pkt_burst_mac_forward(struct fwd_stream *fs)
+@@ -120,9 +120,22 @@ pkt_burst_mac_forward(struct fwd_stream *fs)
@@ -410 +395 @@
-index 4627ff83e9..acb0fd7fb4 100644
+index 310bca06af..ba9a148e1c 100644
@@ -413 +398 @@
-@@ -97,9 +97,22 @@ pkt_burst_mac_swap(struct fwd_stream *fs)
+@@ -98,9 +98,22 @@ pkt_burst_mac_swap(struct fwd_stream *fs)
@@ -464 +449 @@
-index d1a579d8d8..04457010f4 100644
+index c78fc4609a..83d0dcf670 100644
@@ -467 +452 @@
-@@ -68,9 +68,17 @@ pkt_burst_receive(struct fwd_stream *fs)
+@@ -69,9 +69,17 @@ pkt_burst_receive(struct fwd_stream *fs)
@@ -485,22 +469,0 @@
-diff --git a/app/test-pmd/shared_rxq_fwd.c b/app/test-pmd/shared_rxq_fwd.c
-index da54a383fd..2e9047804b 100644
---- a/app/test-pmd/shared_rxq_fwd.c
-+++ b/app/test-pmd/shared_rxq_fwd.c
-@@ -107,9 +107,17 @@ shared_rxq_fwd(struct fwd_stream *fs)
- 	get_end_cycles(fs, start_tsc);
- }
- 
-+static void
-+shared_rxq_stream_init(struct fwd_stream *fs)
-+{
-+	fs->disabled = ports[fs->rx_port].rxq[fs->rx_queue].state ==
-+						RTE_ETH_QUEUE_STATE_STOPPED;
-+}
-+
- struct fwd_engine shared_rxq_engine = {
- 	.fwd_mode_name  = "shared_rxq",
- 	.port_fwd_begin = NULL,
- 	.port_fwd_end   = NULL,
-+	.stream_init    = shared_rxq_stream_init,
- 	.packet_fwd     = shared_rxq_fwd,
- };
@@ -508 +471 @@
-index 5b742911a8..99f2a31bb8 100644
+index 5da22fab57..0e553d19b9 100644
@@ -511 +474 @@
-@@ -1638,10 +1638,10 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
+@@ -1429,10 +1429,10 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
@@ -522,3 +485,3 @@
- 	if (eth_link_speed)
- 		port->dev_conf.link_speeds = eth_link_speed;
-@@ -1828,7 +1828,6 @@ reconfig(portid_t new_port_id, unsigned socket_id)
+ 	/* set flag to initialize port/queue */
+ 	port->need_reconfig = 1;
+@@ -1600,7 +1600,6 @@ reconfig(portid_t new_port_id, unsigned socket_id)
@@ -532 +495 @@
-@@ -2233,6 +2232,12 @@ flush_fwd_rx_queues(void)
+@@ -1990,6 +1989,12 @@ flush_fwd_rx_queues(void)
@@ -545 +508 @@
-@@ -2278,7 +2283,8 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
+@@ -2035,7 +2040,8 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
@@ -555 +518 @@
-@@ -2360,6 +2366,7 @@ start_packet_forwarding(int with_tx_first)
+@@ -2116,6 +2122,7 @@ start_packet_forwarding(int with_tx_first)
@@ -563,3 +526,3 @@
-@@ -2390,6 +2397,10 @@ start_packet_forwarding(int with_tx_first)
- 	if (!pkt_fwd_shared_rxq_check())
- 		return;
+@@ -2142,6 +2149,10 @@ start_packet_forwarding(int with_tx_first)
+ 
+ 	fwd_config_setup();
@@ -574 +537 @@
-@@ -2651,7 +2662,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+@@ -2404,7 +2415,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
@@ -583 +546 @@
-@@ -2676,6 +2687,10 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+@@ -2429,6 +2440,10 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
@@ -594,19 +557 @@
-@@ -2878,7 +2893,7 @@ start_port(portid_t pid)
- 				for (k = 0;
- 				     k < port->dev_info.max_rx_queues;
- 				     k++)
--					port->rx_conf[k].offloads |=
-+					port->rxq[k].conf.offloads |=
- 						dev_conf.rxmode.offloads;
- 			}
- 			/* Apply Tx offloads configuration */
-@@ -2889,7 +2904,7 @@ start_port(portid_t pid)
- 				for (k = 0;
- 				     k < port->dev_info.max_tx_queues;
- 				     k++)
--					port->tx_conf[k].offloads |=
-+					port->txq[k].conf.offloads |=
- 						dev_conf.txmode.offloads;
- 			}
- 		}
-@@ -2897,20 +2912,28 @@ start_port(portid_t pid)
+@@ -2508,20 +2523,28 @@ start_port(portid_t pid)
@@ -643,2 +588,2 @@
- 				if (port->port_status == RTE_PORT_HANDLING)
-@@ -2943,7 +2966,7 @@ start_port(portid_t pid)
+ 				if (rte_atomic16_cmpset(&(port->port_status),
+@@ -2553,7 +2576,7 @@ start_port(portid_t pid)
@@ -653 +598 @@
-@@ -2958,7 +2981,7 @@ start_port(portid_t pid)
+@@ -2569,7 +2592,7 @@ start_port(portid_t pid)
@@ -662,2 +607,2 @@
-@@ -3734,59 +3757,59 @@ rxtx_port_config(portid_t pid)
- 	struct rte_port *port = &ports[pid];
+@@ -3293,51 +3316,51 @@ rxtx_port_config(struct rte_port *port)
+ 	uint64_t offloads;
@@ -670,10 +614,0 @@
- 
- 		if (rxq_share > 0 &&
- 		    (port->dev_info.dev_capa & RTE_ETH_DEV_CAPA_RXQ_SHARE)) {
- 			/* Non-zero share group to enable RxQ share. */
--			port->rx_conf[qid].share_group = pid / rxq_share + 1;
--			port->rx_conf[qid].share_qid = qid; /* Equal mapping. */
-+			port->rxq[qid].conf.share_group = pid / rxq_share + 1;
-+			port->rxq[qid].conf.share_qid = qid; /* Equal mapping. */
- 		}
- 
@@ -740,8 +675,9 @@
-@@ -3867,7 +3890,7 @@ init_port_config(void)
- 				for (i = 0;
- 				     i < port->dev_info.nb_rx_queues;
- 				     i++)
--					port->rx_conf[i].offloads &=
-+					port->rxq[i].conf.offloads &=
- 						~RTE_ETH_RX_OFFLOAD_RSS_HASH;
- 			}
+@@ -3396,9 +3419,9 @@ update_jumbo_frame_offload(portid_t portid)
+ 		/* Apply JUMBO_FRAME offload configuration to Rx queue(s) */
+ 		for (qid = 0; qid < port->dev_info.nb_rx_queues; qid++) {
+ 			if (on)
+-				port->rx_conf[qid].offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
++				port->rxq[qid].conf.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+ 			else
+-				port->rx_conf[qid].offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
++				port->rxq[qid].conf.offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
@@ -749,3 +685,5 @@
-@@ -4041,7 +4064,7 @@ init_port_dcb_config(portid_t pid,
- 	if (port_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_VMDQ_DCB) {
- 		port_conf.rxmode.offloads &= ~RTE_ETH_RX_OFFLOAD_RSS_HASH;
+ 	}
+ 
+@@ -3610,7 +3633,7 @@ init_port_dcb_config(portid_t pid,
+ 	if (port_conf.rxmode.mq_mode == ETH_MQ_RX_VMDQ_DCB) {
+ 		port_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_RSS_HASH;
@@ -755 +693 @@
- 				~RTE_ETH_RX_OFFLOAD_RSS_HASH;
+ 				~DEV_RX_OFFLOAD_RSS_HASH;
@@ -759 +697 @@
-index 8ee682b362..63e19c9aef 100644
+index 2a6312217d..5fa898eb96 100644
@@ -762 +700 @@
-@@ -136,6 +136,7 @@ struct fwd_stream {
+@@ -128,6 +128,7 @@ struct fwd_stream {
@@ -770,2 +708,2 @@
-@@ -240,6 +241,18 @@ struct xstat_display_info {
- 	bool	 allocated;
+@@ -195,6 +196,18 @@ struct tunnel_ops {
+ 	uint32_t items:1;
@@ -789 +727 @@
-@@ -262,8 +275,8 @@ struct rte_port {
+@@ -217,8 +230,8 @@ struct rte_port {
@@ -799,2 +737,2 @@
- 	queueid_t               queue_nb; /**< nb. of queues for flow rules */
-@@ -326,12 +339,14 @@ struct fwd_lcore {
+ 	uint8_t                 slave_flag; /**< bonding slave port */
+@@ -271,12 +284,14 @@ struct fwd_lcore {
@@ -816 +754 @@
-index fc039a622c..e1bc78b73d 100644
+index 9f5087d215..a7cd3bff0d 100644
@@ -819 +757 @@
-@@ -504,9 +504,17 @@ tx_only_begin(portid_t pi)
+@@ -493,9 +493,17 @@ tx_only_begin(portid_t pi)
@@ -836,0 +775,36 @@
+diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
+index dd7eef908d..5e8331da1c 100644
+--- a/lib/librte_ethdev/rte_ethdev.h
++++ b/lib/librte_ethdev/rte_ethdev.h
+@@ -1561,6 +1561,13 @@ struct rte_eth_dev_info {
+ 	void *reserved_ptrs[2];   /**< Reserved for future fields */
+ };
+ 
++/**
++ * RX/TX queue states
++ */
++#define RTE_ETH_QUEUE_STATE_STOPPED 0
++#define RTE_ETH_QUEUE_STATE_STARTED 1
++#define RTE_ETH_QUEUE_STATE_HAIRPIN 2
++
+ /**
+  * Ethernet device RX queue information structure.
+  * Used to retrieve information about configured queue.
+diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
+index afee4b8b80..6764ffb854 100644
+--- a/lib/librte_ethdev/rte_ethdev_driver.h
++++ b/lib/librte_ethdev/rte_ethdev_driver.h
+@@ -923,13 +923,6 @@ struct eth_dev_ops {
+ 	/**< Disconnect the hairpin queues of a pair from each other. */
+ };
+ 
+-/**
+- * RX/TX queue states
+- */
+-#define RTE_ETH_QUEUE_STATE_STOPPED 0
+-#define RTE_ETH_QUEUE_STATE_STARTED 1
+-#define RTE_ETH_QUEUE_STATE_HAIRPIN 2
+-
+ /**
+  * @internal
+  * Check if the selected Rx queue is hairpin queue.

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

* patch 'net/bonding: fix mbuf fast free usage' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (79 preceding siblings ...)
  2022-06-21  8:02 ` patch 'app/testpmd: do not poll stopped queues' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/memif: fix overwriting of head segment' " Xueming Li
                   ` (34 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/711575cd7f765ef2ff441aacd0b558717a85278d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 711575cd7f765ef2ff441aacd0b558717a85278d Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 25 May 2022 09:08:28 +0800
Subject: [PATCH] net/bonding: fix mbuf fast free usage
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 18c41457cbaeaf44a87f88fe861de35c923ab702 ]

Usage of 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' offload has two
constraints: per-queue all mbufs comes from the same mempool and
has refcnt = 1.

Bonding mode Broadcast, Tx mbuf has more than one refcnt.
Bonding mode 8023AD, It contains two mempools separately for LACP
packets and other packets. In Tx or Rx, Fast mbuf free will operate
mbuf from different mempool.

This patch will prevent 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' offload
when in bonding mode Broadcast and mode 8023AD.

Fixes: 78aecefed955 ("bond: move param parsing in configure step")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 259651a0c5..43383db319 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3563,6 +3563,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	const char *name = dev->device->name;
 	struct bond_dev_private *internals = dev->data->dev_private;
 	struct rte_kvargs *kvlist = internals->kvlist;
+	uint64_t offloads;
 	int arg_count;
 	uint16_t port_id = dev - rte_eth_devices;
 	uint8_t agg_mode;
@@ -3623,6 +3624,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 		}
 	}
 
+	offloads = dev->data->dev_conf.txmode.offloads;
+	if ((offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) &&
+			(internals->mode == BONDING_MODE_8023AD ||
+			internals->mode == BONDING_MODE_BROADCAST)) {
+		RTE_BOND_LOG(WARNING,
+			"bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload, force disable it.");
+		offloads &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+		dev->data->dev_conf.txmode.offloads = offloads;
+	}
+
 	/* set the max_rx_pktlen */
 	internals->max_rx_pktlen = internals->candidate_max_rx_pktlen;
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.929518969 +0800
+++ 0081-net-bonding-fix-mbuf-fast-free-usage.patch	2022-06-21 15:37:49.167785046 +0800
@@ -1 +1 @@
-From 18c41457cbaeaf44a87f88fe861de35c923ab702 Mon Sep 17 00:00:00 2001
+From 711575cd7f765ef2ff441aacd0b558717a85278d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 18c41457cbaeaf44a87f88fe861de35c923ab702 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index f0668a636f..ace8f8b45e 100644
+index 259651a0c5..43383db319 100644
@@ -30 +32 @@
-@@ -3583,6 +3583,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3563,6 +3563,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
@@ -38 +40 @@
-@@ -3643,6 +3644,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3623,6 +3624,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
@@ -43 +45 @@
-+	if ((offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) &&
++	if ((offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) &&
@@ -48 +50 @@
-+		offloads &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
++		offloads &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;

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

* patch 'net/memif: fix overwriting of head segment' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (80 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/bonding: fix mbuf fast free usage' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'ethdev: fix port state when stop' " Xueming Li
                   ` (33 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Joyce Kong; +Cc: Ferruh Yigit, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/89f54969e74601b49c90389df682b329c5a3776b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 89f54969e74601b49c90389df682b329c5a3776b Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Wed, 25 May 2022 05:56:35 +0000
Subject: [PATCH] net/memif: fix overwriting of head segment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c ]

The 'dst_off' was reset in multi segment case.
This caused memif buffer segment to write to
beginning of mbuf, overwriting previous data.
Fix it with this patch.

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Reported-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/net/memif/rte_eth_memif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 3dc357aef3..642c44d4ac 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -349,13 +349,13 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 			goto no_free_bufs;
 		mbuf = mbuf_head;
 		mbuf->port = mq->in_port;
+		dst_off = 0;
 
 next_slot:
 		s0 = cur_slot & mask;
 		d0 = &ring->desc[s0];
 
 		src_len = d0->length;
-		dst_off = 0;
 		src_off = 0;
 
 		do {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.968686050 +0800
+++ 0082-net-memif-fix-overwriting-of-head-segment.patch	2022-06-21 15:37:49.167785046 +0800
@@ -1 +1 @@
-From 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c Mon Sep 17 00:00:00 2001
+From 89f54969e74601b49c90389df682b329c5a3776b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 587ad45576..dd951b8296 100644
+index 3dc357aef3..642c44d4ac 100644
@@ -25 +27 @@
-@@ -348,13 +348,13 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -349,13 +349,13 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)

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

* patch 'ethdev: fix port state when stop' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (81 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/memif: fix overwriting of head segment' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/txgbe: fix max number of queues for SR-IOV' " Xueming Li
                   ` (32 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Thomas Monjalon, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d096c590deef6b8352eec0ca5c67fb9cb81b39a7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d096c590deef6b8352eec0ca5c67fb9cb81b39a7 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Tue, 3 May 2022 18:02:17 +0800
Subject: [PATCH] ethdev: fix port state when stop
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 74b74269978c2790bc49238029e00b7c6e81c450 ]

Currently, 'dev_started' is always set to be 0 when dev stop, whether
it succeeded or failed. This is unreasonable and this patch fixed it.

Fixes: 62024eb82756 ("ethdev: change stop operation callback to return int")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 lib/librte_ethdev/rte_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 259498342d..ac88c4484e 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1785,8 +1785,9 @@ rte_eth_dev_stop(uint16_t port_id)
 		return 0;
 	}
 
-	dev->data->dev_started = 0;
 	ret = (*dev->dev_ops->dev_stop)(dev);
+	if (ret == 0)
+		dev->data->dev_started = 0;
 	rte_ethdev_trace_stop(port_id, ret);
 
 	return ret;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.006656095 +0800
+++ 0083-ethdev-fix-port-state-when-stop.patch	2022-06-21 15:37:49.174451737 +0800
@@ -1 +1 @@
-From 74b74269978c2790bc49238029e00b7c6e81c450 Mon Sep 17 00:00:00 2001
+From d096c590deef6b8352eec0ca5c67fb9cb81b39a7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 74b74269978c2790bc49238029e00b7c6e81c450 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/ethdev/rte_ethdev.c | 3 ++-
+ lib/librte_ethdev/rte_ethdev.c | 3 ++-
@@ -19,7 +21,7 @@
-diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
-index a175867651..fe64f8d39d 100644
---- a/lib/ethdev/rte_ethdev.c
-+++ b/lib/ethdev/rte_ethdev.c
-@@ -1533,8 +1533,9 @@ rte_eth_dev_stop(uint16_t port_id)
- 	/* point fast-path functions to dummy ones */
- 	eth_dev_fp_ops_reset(rte_eth_fp_ops + port_id);
+diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
+index 259498342d..ac88c4484e 100644
+--- a/lib/librte_ethdev/rte_ethdev.c
++++ b/lib/librte_ethdev/rte_ethdev.c
+@@ -1785,8 +1785,9 @@ rte_eth_dev_stop(uint16_t port_id)
+ 		return 0;
+ 	}

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

* patch 'net/txgbe: fix max number of queues for SR-IOV' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (82 preceding siblings ...)
  2022-06-21  8:02 ` patch 'ethdev: fix port state when stop' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/nfp: fix disabling VLAN stripping' " Xueming Li
                   ` (31 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ef9b30142146ea6ae21b050ffe1ba8fcd0e85812

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ef9b30142146ea6ae21b050ffe1ba8fcd0e85812 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 30 May 2022 17:30:16 +0800
Subject: [PATCH] net/txgbe: fix max number of queues for SR-IOV
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 09b010da8ec6388edae44ff55e1feab5c08191ab ]

Hardware restrictions require a maximum of 4 queues for every pool.

Fixes: a6712cd029a4 ("net/txgbe: add PF module init and uninit for SRIOV")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_pf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_pf.c b/drivers/net/txgbe/txgbe_pf.c
index a910f51048..20e19b47d8 100644
--- a/drivers/net/txgbe/txgbe_pf.c
+++ b/drivers/net/txgbe/txgbe_pf.c
@@ -109,7 +109,7 @@ int txgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 		nb_queue = 4;
 		RTE_ETH_DEV_SRIOV(eth_dev).active = ETH_32_POOLS;
 	} else {
-		nb_queue = 8;
+		nb_queue = 4;
 		RTE_ETH_DEV_SRIOV(eth_dev).active = ETH_16_POOLS;
 	}
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.046253912 +0800
+++ 0084-net-txgbe-fix-max-number-of-queues-for-SR-IOV.patch	2022-06-21 15:37:49.174451737 +0800
@@ -1 +1 @@
-From 09b010da8ec6388edae44ff55e1feab5c08191ab Mon Sep 17 00:00:00 2001
+From ef9b30142146ea6ae21b050ffe1ba8fcd0e85812 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 09b010da8ec6388edae44ff55e1feab5c08191ab ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 67d92bfa56..0b82fb1a88 100644
+index a910f51048..20e19b47d8 100644
@@ -20 +22 @@
-@@ -108,7 +108,7 @@ int txgbe_pf_host_init(struct rte_eth_dev *eth_dev)
+@@ -109,7 +109,7 @@ int txgbe_pf_host_init(struct rte_eth_dev *eth_dev)
@@ -22 +24 @@
- 		RTE_ETH_DEV_SRIOV(eth_dev).active = RTE_ETH_32_POOLS;
+ 		RTE_ETH_DEV_SRIOV(eth_dev).active = ETH_32_POOLS;
@@ -26 +28 @@
- 		RTE_ETH_DEV_SRIOV(eth_dev).active = RTE_ETH_16_POOLS;
+ 		RTE_ETH_DEV_SRIOV(eth_dev).active = ETH_16_POOLS;

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

* patch 'net/nfp: fix disabling VLAN stripping' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (83 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/txgbe: fix max number of queues for SR-IOV' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'ethdev: fix port close in secondary process' " Xueming Li
                   ` (30 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Peng Zhang; +Cc: Yong Xu, Chaoyong He, Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ac86ba961eb3e117a50b91308e423509de580995

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ac86ba961eb3e117a50b91308e423509de580995 Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Thu, 26 May 2022 16:34:44 +0200
Subject: [PATCH] net/nfp: fix disabling VLAN stripping
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7988cdca98940faa80d3e030c1b9811bcdd4c67d ]

"vlan set strip off 0" can't work, due to the incorrect usage
of the mask, it just represent that the status is changed or not,
not represent offloaded or not, so that the driver send the
error control message to the nic.

Now, by first inspect the mask of things that changed, and then
change the requested state if VLAN stripping according the
requested offload status. So this change can fix this bug.

Fixes: d4a27a3b092a ("nfp: add basic features")

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Signed-off-by: Yong Xu <yong.xu@corigine.com>
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_net.c | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index fa42548e7a..4fa0bcc9e7 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2393,22 +2393,25 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	uint32_t new_ctrl, update;
 	struct nfp_net_hw *hw;
+	struct rte_eth_conf *dev_conf;
 	int ret;
 
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	new_ctrl = 0;
-
-	/* Enable vlan strip if it is not configured yet */
-	if ((mask & ETH_VLAN_STRIP_OFFLOAD) &&
-	    !(hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN))
-		new_ctrl = hw->ctrl | NFP_NET_CFG_CTRL_RXVLAN;
+	dev_conf = &dev->data->dev_conf;
+	new_ctrl = hw->ctrl;
 
-	/* Disable vlan strip just if it is configured */
-	if (!(mask & ETH_VLAN_STRIP_OFFLOAD) &&
-	    (hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN))
-		new_ctrl = hw->ctrl & ~NFP_NET_CFG_CTRL_RXVLAN;
+	/*
+	 * Vlan stripping setting
+	 * Enable or disable VLAN stripping
+	 */
+	if (mask & ETH_VLAN_STRIP_MASK) {
+		if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
+			new_ctrl |= NFP_NET_CFG_CTRL_RXVLAN;
+		else
+			new_ctrl &= ~NFP_NET_CFG_CTRL_RXVLAN;
+	}
 
-	if (new_ctrl == 0)
+	if (new_ctrl == hw->ctrl)
 		return 0;
 
 	update = NFP_NET_CFG_UPDATE_GEN;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.087178366 +0800
+++ 0085-net-nfp-fix-disabling-VLAN-stripping.patch	2022-06-21 15:37:49.174451737 +0800
@@ -1 +1 @@
-From 7988cdca98940faa80d3e030c1b9811bcdd4c67d Mon Sep 17 00:00:00 2001
+From ac86ba961eb3e117a50b91308e423509de580995 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7988cdca98940faa80d3e030c1b9811bcdd4c67d ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
- drivers/net/nfp/nfp_common.c | 25 ++++++++++++++-----------
+ drivers/net/nfp/nfp_net.c | 25 ++++++++++++++-----------
@@ -29,5 +31,5 @@
-diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
-index be68c25fb8..34e3a03edd 100644
---- a/drivers/net/nfp/nfp_common.c
-+++ b/drivers/net/nfp/nfp_common.c
-@@ -989,22 +989,25 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
+index fa42548e7a..4fa0bcc9e7 100644
+--- a/drivers/net/nfp/nfp_net.c
++++ b/drivers/net/nfp/nfp_net.c
+@@ -2393,22 +2393,25 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)
@@ -44 +46 @@
--	if ((mask & RTE_ETH_VLAN_STRIP_OFFLOAD) &&
+-	if ((mask & ETH_VLAN_STRIP_OFFLOAD) &&
@@ -51 +53 @@
--	if (!(mask & RTE_ETH_VLAN_STRIP_OFFLOAD) &&
+-	if (!(mask & ETH_VLAN_STRIP_OFFLOAD) &&
@@ -58,2 +60,2 @@
-+	if (mask & RTE_ETH_VLAN_STRIP_MASK) {
-+		if (dev_conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)
++	if (mask & ETH_VLAN_STRIP_MASK) {
++		if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)

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

* patch 'ethdev: fix port close in secondary process' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (84 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/nfp: fix disabling VLAN stripping' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/bnxt: fix compatibility with some old firmwares' " Xueming Li
                   ` (29 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fa4da49c81448a520107c072dee1614dd048234e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fa4da49c81448a520107c072dee1614dd048234e Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 1 Jun 2022 11:15:13 +0800
Subject: [PATCH] ethdev: fix port close in secondary process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ea6101a8e483f3b6ec505c91b7e72ab1628dab1f ]

Secondary process needs to close device to release process private
resources.  But secondary process should not be obliged to wait for
device stop before closing ethdev.

Fixes: febc855b358e ("ethdev: forbid closing started device")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/librte_ethdev/rte_ethdev.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index ac88c4484e..50e32d7f0d 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1829,7 +1829,13 @@ rte_eth_dev_close(uint16_t port_id)
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
 	dev = &rte_eth_devices[port_id];
 
-	if (dev->data->dev_started) {
+	/*
+	 * Secondary process needs to close device to release process private
+	 * resources. But secondary process should not be obliged to wait
+	 * for device stop before closing ethdev.
+	 */
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY &&
+			dev->data->dev_started) {
 		RTE_ETHDEV_LOG(ERR, "Cannot close started device (port %u)\n",
 			       port_id);
 		return -EINVAL;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.127479826 +0800
+++ 0086-ethdev-fix-port-close-in-secondary-process.patch	2022-06-21 15:37:49.177785082 +0800
@@ -1 +1 @@
-From ea6101a8e483f3b6ec505c91b7e72ab1628dab1f Mon Sep 17 00:00:00 2001
+From fa4da49c81448a520107c072dee1614dd048234e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ea6101a8e483f3b6ec505c91b7e72ab1628dab1f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/ethdev/rte_ethdev.c | 8 +++++++-
+ lib/librte_ethdev/rte_ethdev.c | 8 +++++++-
@@ -19,5 +21,5 @@
-diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
-index 46c088dc88..b9c5dea09f 100644
---- a/lib/ethdev/rte_ethdev.c
-+++ b/lib/ethdev/rte_ethdev.c
-@@ -1576,7 +1576,13 @@ rte_eth_dev_close(uint16_t port_id)
+diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
+index ac88c4484e..50e32d7f0d 100644
+--- a/lib/librte_ethdev/rte_ethdev.c
++++ b/lib/librte_ethdev/rte_ethdev.c
+@@ -1829,7 +1829,13 @@ rte_eth_dev_close(uint16_t port_id)

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

* patch 'net/bnxt: fix compatibility with some old firmwares' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (85 preceding siblings ...)
  2022-06-21  8:02 ` patch 'ethdev: fix port close in secondary process' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'doc: fix vhost multi-queue reconnection' " Xueming Li
                   ` (28 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: David Marchand; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ff874e673ad8161edf3c3eedc6a7c61a86f05076

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ff874e673ad8161edf3c3eedc6a7c61a86f05076 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 18 Mar 2022 16:03:31 +0100
Subject: [PATCH] net/bnxt: fix compatibility with some old firmwares
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a43d0129579034af06314b6603d92a866d809eeb ]

This reverts commit 3972281f47b2cc0cf844698885f0e6b4228c0975.

Reported by Red Hat QE: with older firmware versions (at least versions
20.6.112.0 and 20.6.143.0), initialisation never succeeds following this
change.
Revert it for now, waiting for a more complete fix.

Fixes: 3972281f47b2 ("net/bnxt: fix device readiness check")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 6a3d81f223..deebea428a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1122,11 +1122,6 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
 	else
 		HWRM_CHECK_RESULT();
 
-	if (resp->flags & HWRM_VER_GET_OUTPUT_FLAGS_DEV_NOT_RDY) {
-		rc = -EAGAIN;
-		goto error;
-	}
-
 	PMD_DRV_LOG(INFO, "%d.%d.%d:%d.%d.%d.%d\n",
 		resp->hwrm_intf_maj_8b, resp->hwrm_intf_min_8b,
 		resp->hwrm_intf_upd_8b, resp->hwrm_fw_maj_8b,
@@ -5959,10 +5954,6 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
 
 	HWRM_CHECK_RESULT_SILENT();
-
-	if (resp->flags & HWRM_VER_GET_OUTPUT_FLAGS_DEV_NOT_RDY)
-		rc = -EAGAIN;
-
 	HWRM_UNLOCK();
 
 	return rc;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.169463168 +0800
+++ 0087-net-bnxt-fix-compatibility-with-some-old-firmwares.patch	2022-06-21 15:37:49.184451772 +0800
@@ -1 +1 @@
-From a43d0129579034af06314b6603d92a866d809eeb Mon Sep 17 00:00:00 2001
+From ff874e673ad8161edf3c3eedc6a7c61a86f05076 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a43d0129579034af06314b6603d92a866d809eeb ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 6e4753c508..9eb8b8d56d 100644
+index 6a3d81f223..deebea428a 100644
@@ -26 +28 @@
-@@ -1249,11 +1249,6 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
+@@ -1122,11 +1122,6 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
@@ -38 +40 @@
-@@ -6154,10 +6149,6 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
+@@ -5959,10 +5954,6 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)

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

* patch 'doc: fix vhost multi-queue reconnection' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (86 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/bnxt: fix compatibility with some old firmwares' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'vhost: fix deadlock when message handling failed' " Xueming Li
                   ` (27 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Xuan Ding; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4daae0ccb80c1b410be3a640d1637ed60bf6c5c4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4daae0ccb80c1b410be3a640d1637ed60bf6c5c4 Mon Sep 17 00:00:00 2001
From: Xuan Ding <xuan.ding@intel.com>
Date: Mon, 9 May 2022 04:11:58 +0000
Subject: [PATCH] doc: fix vhost multi-queue reconnection
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5d4a6a437076c3ba6230a36b1d811ab69272fab6 ]

Since QEMU 5.2.0 fixes the vhost split ring multi-queue reconnection
issue in commit f66337bdbfda ("vhost-user: save features of multiqueues
if chardev is closed"), this patch updates known issue to indicate
the range of affeacted QEMU versions.

Fixes: b37e95507e1b ("doc: add vhost multi-queue reconnection issue")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 doc/guides/rel_notes/known_issues.rst | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
index 65c196de6c..a248aa86ab 100644
--- a/doc/guides/rel_notes/known_issues.rst
+++ b/doc/guides/rel_notes/known_issues.rst
@@ -885,14 +885,15 @@ Unsuitable IOVA mode may be picked as the default
 **Driver/Module**:
    ALL.
 
-Vhost multi-queue reconnection failed with QEMU version >= 4.2.0
-----------------------------------------------------------------
+Vhost multi-queue reconnection failed with QEMU version 4.2.0 to 5.1.0
+----------------------------------------------------------------------
 
 **Description**
    It's a QEMU regression bug (bad commit: c6beefd674ff). QEMU only saves
    acked features for one vhost-net when vhost quits. When vhost reconnects
    to virtio-net/virtio-pmd in multi-queue situations, the features been
-   set multiple times are not consistent.
+   set multiple times are not consistent. QEMU-5.2.0 fixes this issue in commit
+   f66337bdbfda ("vhost-user: save features of multiqueues if chardev is closed").
 
 **Implication**
    Vhost cannot reconnect back to virtio-net/virtio-pmd normally.
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.212008396 +0800
+++ 0088-doc-fix-vhost-multi-queue-reconnection.patch	2022-06-21 15:37:49.184451772 +0800
@@ -1 +1 @@
-From 5d4a6a437076c3ba6230a36b1d811ab69272fab6 Mon Sep 17 00:00:00 2001
+From 4daae0ccb80c1b410be3a640d1637ed60bf6c5c4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5d4a6a437076c3ba6230a36b1d811ab69272fab6 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 187d9c942e..570550843a 100644
+index 65c196de6c..a248aa86ab 100644

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

* patch 'vhost: fix deadlock when message handling failed' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (87 preceding siblings ...)
  2022-06-21  8:02 ` patch 'doc: fix vhost multi-queue reconnection' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'examples/vhost: fix crash when no VMDq' " Xueming Li
                   ` (26 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Wenwu Ma; +Cc: Chenbo Xia, Wei Ling, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/63005df100f41bc54d8146bdd1d2e8ab4c67ec38

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 63005df100f41bc54d8146bdd1d2e8ab4c67ec38 Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Sat, 7 May 2022 13:27:53 +0000
Subject: [PATCH] vhost: fix deadlock when message handling failed
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9e89b06d027c6087624f36f288bd82c643c5a269 ]

In vhost_user_msg_handler(), if vhost message handling
failed, we should check whether the queue is locked and
release the lock before returning. Or, it will cause a
deadlock later.

Fixes: 7f31d4ea05ca ("vhost: fix lock on device readiness notification")

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index fbb854dad0..25ebc0c37c 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2789,7 +2789,6 @@ vhost_user_msg_handler(int vid, int fd)
 		return -1;
 	}
 
-	ret = 0;
 	request = msg.request.master;
 	if (request > VHOST_USER_NONE && request < VHOST_USER_MAX &&
 			vhost_message_str[request]) {
@@ -2931,9 +2930,11 @@ skip_to_post_handle:
 	} else if (ret == RTE_VHOST_MSG_RESULT_ERR) {
 		VHOST_LOG_CONFIG(ERR,
 			"vhost message handling failed.\n");
-		return -1;
+		ret = -1;
+		goto unlock;
 	}
 
+	ret = 0;
 	for (i = 0; i < dev->nr_vring; i++) {
 		struct vhost_virtqueue *vq = dev->virtqueue[i];
 		bool cur_ready = vq_is_ready(dev, vq);
@@ -2944,10 +2945,11 @@ skip_to_post_handle:
 		}
 	}
 
+unlock:
 	if (unlock_required)
 		vhost_user_unlock_all_queue_pairs(dev);
 
-	if (!virtio_is_ready(dev))
+	if (ret != 0 || !virtio_is_ready(dev))
 		goto out;
 
 	/*
@@ -2974,7 +2976,7 @@ skip_to_post_handle:
 	}
 
 out:
-	return 0;
+	return ret;
 }
 
 static int process_slave_message_reply(struct virtio_net *dev,
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.251533320 +0800
+++ 0089-vhost-fix-deadlock-when-message-handling-failed.patch	2022-06-21 15:37:49.184451772 +0800
@@ -1 +1 @@
-From 9e89b06d027c6087624f36f288bd82c643c5a269 Mon Sep 17 00:00:00 2001
+From 63005df100f41bc54d8146bdd1d2e8ab4c67ec38 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9e89b06d027c6087624f36f288bd82c643c5a269 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/vhost/vhost_user.c | 10 ++++++----
+ lib/librte_vhost/vhost_user.c | 10 ++++++----
@@ -22,5 +24,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 850848c269..91e69d1d97 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -2887,7 +2887,6 @@ vhost_user_msg_handler(int vid, int fd)
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index fbb854dad0..25ebc0c37c 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -2789,7 +2789,6 @@ vhost_user_msg_handler(int vid, int fd)
@@ -31,5 +33,4 @@
- 	request = ctx.msg.request.master;
- 	if (request > VHOST_USER_NONE && request < RTE_DIM(vhost_message_handlers))
- 		msg_handler = &vhost_message_handlers[request];
-@@ -3031,9 +3030,11 @@ skip_to_post_handle:
- 		send_vhost_reply(dev, fd, &ctx);
+ 	request = msg.request.master;
+ 	if (request > VHOST_USER_NONE && request < VHOST_USER_MAX &&
+ 			vhost_message_str[request]) {
+@@ -2931,9 +2930,11 @@ skip_to_post_handle:
@@ -37 +38,2 @@
- 		VHOST_LOG_CONFIG(ERR, "(%s) vhost message handling failed.\n", dev->ifname);
+ 		VHOST_LOG_CONFIG(ERR,
+ 			"vhost message handling failed.\n");
@@ -47 +49 @@
-@@ -3044,10 +3045,11 @@ skip_to_post_handle:
+@@ -2944,10 +2945,11 @@ skip_to_post_handle:
@@ -60 +62 @@
-@@ -3074,7 +3076,7 @@ skip_to_post_handle:
+@@ -2974,7 +2976,7 @@ skip_to_post_handle:

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

* patch 'examples/vhost: fix crash when no VMDq' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (88 preceding siblings ...)
  2022-06-21  8:02 ` patch 'vhost: fix deadlock when message handling failed' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/mlx5: fix Tx recovery' " Xueming Li
                   ` (25 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Yuan Wang; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/27dda79b5d23c2badbf870e2a4edcc3bf430c118

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 27dda79b5d23c2badbf870e2a4edcc3bf430c118 Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Wed, 18 May 2022 21:36:33 +0800
Subject: [PATCH] examples/vhost: fix crash when no VMDq
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6f3d83c7f207d435d960ad881f127e9971a81069 ]

If the VMDq limits is 0, a divide-by-zero error occurs.
This patch replaces throwing a floating point exception with
a normal error message.

Fixes: d19533e86f ("examples/vhost: copy old vhost example")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 examples/vhost/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index fc07b31b2e..24e37f7ce5 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -255,6 +255,10 @@ port_init(uint16_t port)
 
 		return retval;
 	}
+	if (dev_info.max_vmdq_pools == 0) {
+		RTE_LOG(ERR, VHOST_PORT, "Failed to get VMDq info.\n");
+		return -1;
+	}
 
 	rxconf = &dev_info.default_rxconf;
 	txconf = &dev_info.default_txconf;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.293101523 +0800
+++ 0090-examples-vhost-fix-crash-when-no-VMDq.patch	2022-06-21 15:37:49.187785117 +0800
@@ -1 +1 @@
-From 6f3d83c7f207d435d960ad881f127e9971a81069 Mon Sep 17 00:00:00 2001
+From 27dda79b5d23c2badbf870e2a4edcc3bf430c118 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6f3d83c7f207d435d960ad881f127e9971a81069 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 5bc34b0c52..e7fee5aa1b 100644
+index fc07b31b2e..24e37f7ce5 100644
@@ -23 +25 @@
-@@ -431,6 +431,10 @@ port_init(uint16_t port)
+@@ -255,6 +255,10 @@ port_init(uint16_t port)

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

* patch 'net/mlx5: fix Tx recovery' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (89 preceding siblings ...)
  2022-06-21  8:02 ` patch 'examples/vhost: fix crash when no VMDq' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'kni: fix build with Linux 5.18' " Xueming Li
                   ` (24 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Matan Azrad, Dmitry Kozlyuk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8048354bb7f450314c3c63a86b3fdf980e11fb43

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8048354bb7f450314c3c63a86b3fdf980e11fb43 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Wed, 18 May 2022 12:42:32 +0300
Subject: [PATCH] net/mlx5: fix Tx recovery
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1485d961e2c9d77dfa4900a16b5ba70cbaa4c7ce ]

When an error occurs in Tx, and it is moved to ERROR state, it
is not recoverable, during recovery it's state cannot be modified
to INIT. to modify state from RESET to INIT, the port must be
passed in modify attributes, and in case of ERROR to READY
modification path, it was not provided.

Provide port number when changing state from RESET to INIT.

Fixes: 3a87b964edd3 ("net/mlx5: create Tx queues with DevX")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_verbs.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c
index 29e569c321..ccb6918394 100644
--- a/drivers/net/mlx5/linux/mlx5_verbs.c
+++ b/drivers/net/mlx5/linux/mlx5_verbs.c
@@ -134,7 +134,6 @@ mlx5_ibv_modify_qp(struct mlx5_txq_obj *obj, enum mlx5_txq_modify_type type,
 		.qp_state = IBV_QPS_RESET,
 		.port_num = dev_port,
 	};
-	int attr_mask = (IBV_QP_STATE | IBV_QP_PORT);
 	int ret;
 
 	if (type != MLX5_TXQ_MOD_RST2RDY) {
@@ -148,10 +147,8 @@ mlx5_ibv_modify_qp(struct mlx5_txq_obj *obj, enum mlx5_txq_modify_type type,
 		if (type == MLX5_TXQ_MOD_RDY2RST)
 			return 0;
 	}
-	if (type == MLX5_TXQ_MOD_ERR2RDY)
-		attr_mask = IBV_QP_STATE;
 	mod.qp_state = IBV_QPS_INIT;
-	ret = mlx5_glue->modify_qp(obj->qp, &mod, attr_mask);
+	ret = mlx5_glue->modify_qp(obj->qp, &mod, IBV_QP_STATE | IBV_QP_PORT);
 	if (ret) {
 		DRV_LOG(ERR, "Cannot change Tx QP state to INIT %s",
 			strerror(errno));
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.334103089 +0800
+++ 0091-net-mlx5-fix-Tx-recovery.patch	2022-06-21 15:37:49.187785117 +0800
@@ -1 +1 @@
-From 1485d961e2c9d77dfa4900a16b5ba70cbaa4c7ce Mon Sep 17 00:00:00 2001
+From 8048354bb7f450314c3c63a86b3fdf980e11fb43 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1485d961e2c9d77dfa4900a16b5ba70cbaa4c7ce ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index b6ba21c216..67a7bec22b 100644
+index 29e569c321..ccb6918394 100644
@@ -28 +30 @@
-@@ -94,7 +94,6 @@ mlx5_ibv_modify_qp(struct mlx5_txq_obj *obj, enum mlx5_txq_modify_type type,
+@@ -134,7 +134,6 @@ mlx5_ibv_modify_qp(struct mlx5_txq_obj *obj, enum mlx5_txq_modify_type type,
@@ -36 +38 @@
-@@ -108,10 +107,8 @@ mlx5_ibv_modify_qp(struct mlx5_txq_obj *obj, enum mlx5_txq_modify_type type,
+@@ -148,10 +147,8 @@ mlx5_ibv_modify_qp(struct mlx5_txq_obj *obj, enum mlx5_txq_modify_type type,

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

* patch 'kni: fix build with Linux 5.18' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (90 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/mlx5: fix Tx recovery' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/iavf: fix data path selection' " Xueming Li
                   ` (23 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/133ec0ce1cf48478423440b532eabb7bcb019c0c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 133ec0ce1cf48478423440b532eabb7bcb019c0c Mon Sep 17 00:00:00 2001
From: Jiri Slaby <jslaby@suse.cz>
Date: Wed, 1 Jun 2022 08:53:58 +0200
Subject: [PATCH] kni: fix build with Linux 5.18
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c98600d4bed6d15599e448990f2ba117ca938a2d ]

Since commit 2655926aea9b (net: Remove netif_rx_any_context() and
netif_rx_ni().) in 5.18, netif_rx_ni() no longer exists as netif_rx()
can be called from any context. So define HAVE_NETIF_RX_NI for older
releases and call the appropriate function in kni_net.

netif_rx_ni() must be used on older kernel since netif_rx() might
might lead to deadlocks or other problems there.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 kernel/linux/kni/compat.h  | 4 ++++
 kernel/linux/kni/kni_net.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 664785674f..0db29a4a6f 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -141,3 +141,7 @@
 #if KERNEL_VERSION(5, 9, 0) > LINUX_VERSION_CODE
 #define HAVE_TSK_IN_GUP
 #endif
+
+#if KERNEL_VERSION(5, 18, 0) > LINUX_VERSION_CODE
+#define HAVE_NETIF_RX_NI
+#endif
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index 29e5b9e21f..a8b092b756 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -441,7 +441,11 @@ kni_net_rx_normal(struct kni_dev *kni)
 		skb->ip_summed = CHECKSUM_UNNECESSARY;
 
 		/* Call netif interface */
+#ifdef HAVE_NETIF_RX_NI
 		netif_rx_ni(skb);
+#else
+		netif_rx(skb);
+#else
 
 		/* Update statistics */
 		dev->stats.rx_bytes += len;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.373585006 +0800
+++ 0092-kni-fix-build-with-Linux-5.18.patch	2022-06-21 15:37:49.187785117 +0800
@@ -1 +1 @@
-From c98600d4bed6d15599e448990f2ba117ca938a2d Mon Sep 17 00:00:00 2001
+From 133ec0ce1cf48478423440b532eabb7bcb019c0c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c98600d4bed6d15599e448990f2ba117ca938a2d ]
@@ -13,2 +15,0 @@
-
-Cc: stable@dpdk.org

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

* patch 'net/iavf: fix data path selection' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (91 preceding siblings ...)
  2022-06-21  8:02 ` patch 'kni: fix build with Linux 5.18' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/ixgbe: add option for link up check on pin SDP3' " Xueming Li
                   ` (22 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Yiding Zhou; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e0658c31961ef7e6760aa577d50e19bc5b0d4617

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e0658c31961ef7e6760aa577d50e19bc5b0d4617 Mon Sep 17 00:00:00 2001
From: Yiding Zhou <yidingx.zhou@intel.com>
Date: Sun, 8 May 2022 03:52:39 +0800
Subject: [PATCH] net/iavf: fix data path selection
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 865df516f931827580f00e65f246f49838c722bb ]

If PF driver don't support a flex Rx descriptor that required by VF,
legacy descriptor format will be negotiated to configure the hardware
queue.

The patch fixes the issue that an Rx data path that handle flexible
descriptor  (e.g.:
iavf_recv_scattered_pkts_vec_avx512_flex_rxd) is selected while the
actual hardware queues are configured as legacy due to above scenario,
which will cause following coredump.

Fixes: 12b435bf8f2f ("net/iavf: support flex desc metadata extraction")

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 7554ce3593..516a1684c2 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2370,10 +2370,24 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
 	struct iavf_adapter *adapter =
 		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+	int i;
+	struct iavf_rx_queue *rxq;
+	bool use_flex = true;
+
+	for (i = 0; i < dev->data->nb_rx_queues; i++) {
+		rxq = dev->data->rx_queues[i];
+		if (rxq->rxdid <= IAVF_RXDID_LEGACY_1) {
+			PMD_DRV_LOG(NOTICE, "request RXDID[%d] in Queue[%d] is legacy, "
+				"set rx_pkt_burst as legacy for all queues", rxq->rxdid, i);
+			use_flex = false;
+		} else if (!(vf->supported_rxdid & BIT(rxq->rxdid))) {
+			PMD_DRV_LOG(NOTICE, "request RXDID[%d] in Queue[%d] is not supported, "
+				"set rx_pkt_burst as legacy for all queues", rxq->rxdid, i);
+			use_flex = false;
+		}
+	}
 
 #ifdef RTE_ARCH_X86
-	struct iavf_rx_queue *rxq;
-	int i;
 	bool use_avx2 = false;
 #ifdef CC_AVX512_SUPPORT
 	bool use_avx512 = false;
@@ -2455,7 +2469,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
 	if (dev->data->scattered_rx) {
 		PMD_DRV_LOG(DEBUG, "Using a Scattered Rx callback (port=%d).",
 			    dev->data->port_id);
-		if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC)
+		if (use_flex)
 			dev->rx_pkt_burst = iavf_recv_scattered_pkts_flex_rxd;
 		else
 			dev->rx_pkt_burst = iavf_recv_scattered_pkts;
@@ -2466,7 +2480,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
 	} else {
 		PMD_DRV_LOG(DEBUG, "Using Basic Rx callback (port=%d).",
 			    dev->data->port_id);
-		if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC)
+		if (use_flex)
 			dev->rx_pkt_burst = iavf_recv_pkts_flex_rxd;
 		else
 			dev->rx_pkt_burst = iavf_recv_pkts;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.412738993 +0800
+++ 0093-net-iavf-fix-data-path-selection.patch	2022-06-21 15:37:49.191118462 +0800
@@ -1 +1 @@
-From 865df516f931827580f00e65f246f49838c722bb Mon Sep 17 00:00:00 2001
+From e0658c31961ef7e6760aa577d50e19bc5b0d4617 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 865df516f931827580f00e65f246f49838c722bb ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +24,2 @@
- drivers/net/iavf/iavf_rxtx.c | 27 ++++++++++++++++++---------
- 1 file changed, 18 insertions(+), 9 deletions(-)
+ drivers/net/iavf/iavf_rxtx.c | 22 ++++++++++++++++++----
+ 1 file changed, 18 insertions(+), 4 deletions(-)
@@ -26 +28 @@
-index 345f6aeebc..d3b1a58b27 100644
+index 7554ce3593..516a1684c2 100644
@@ -29 +31 @@
-@@ -2899,14 +2899,27 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
+@@ -2370,10 +2370,24 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
@@ -53 +54,0 @@
- 	int check_ret;
@@ -54,0 +56 @@
+ #ifdef CC_AVX512_SUPPORT
@@ -56,16 +58 @@
--	bool use_flex = false;
- 
- 	check_ret = iavf_rx_vec_dev_check(dev);
- 	if (check_ret >= 0 &&
-@@ -2923,10 +2936,6 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
- 			use_avx512 = true;
- #endif
- 
--		if (vf->vf_res->vf_cap_flags &
--			VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC)
--			use_flex = true;
--
- 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
- 			rxq = dev->data->rx_queues[i];
- 			(void)iavf_rxq_vec_setup(rxq);
-@@ -3030,7 +3039,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
+@@ -2455,7 +2469,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
@@ -80 +67 @@
-@@ -3041,7 +3050,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
+@@ -2466,7 +2480,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev)

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

* patch 'net/ixgbe: add option for link up check on pin SDP3' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (92 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/iavf: fix data path selection' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/ice/base: fix getting sched node from ID type' " Xueming Li
                   ` (21 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Jeff Daly; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/43eac062d1116e8e50276cb46f8867eb4f78717e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 43eac062d1116e8e50276cb46f8867eb4f78717e Mon Sep 17 00:00:00 2001
From: Jeff Daly <jeffd@silicom-usa.com>
Date: Tue, 10 May 2022 14:57:25 -0400
Subject: [PATCH] net/ixgbe: add option for link up check on pin SDP3
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0f9fb100f6c6ed1dcadaf76352f4b4f2bd5501f6 ]

1ca05831b9b added a check that SDP3 (used as a TX_DISABLE output to the
SFP cage on these cards) is not asserted to avoid incorrectly reporting
link up when the SFP's laser is turned off.

ff8162cb957 limited this workaround to fiber ports

This patch:
* Adds devarg 'fiber_sdp3_no_tx_disable' not all fiber ixgbe devs use
  SDP3 as TX_DISABLE

Fixes: 1ca05831b9b ("net/ixgbe: fix link status")
Fixes: ff8162cb957 ("net/ixgbe: fix link status")

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 doc/guides/nics/ixgbe.rst        | 17 ++++++++++++++
 drivers/net/ixgbe/ixgbe_ethdev.c | 39 +++++++++++++++++++++++++++++++-
 drivers/net/ixgbe/ixgbe_ethdev.h |  3 +++
 3 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index 4f4d3b1c2c..388778a01d 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -81,6 +81,23 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
 
 fdir_conf->mode will also be checked.
 
+Disable SDP3 TX_DISABLE for Fiber Links
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The following ``devargs`` option can be enabled at runtime.  It must
+be passed as part of EAL arguments. For example,
+
+.. code-block:: console
+
+   dpdk-testpmd -a fiber_sdp3_no_tx_disable=1 -- -i
+
+- ``fiber_sdp3_no_tx_disable`` (default **0**)
+
+  Not all IXGBE implementations with SFP cages use the SDP3 signal as
+  TX_DISABLE as a means to disable the laser on fiber SFP modules.
+  This option informs the driver that in this case, SDP3 is not to be
+  used as a check for link up by testing for laser on/off.
+
 VF Runtime Options
 ^^^^^^^^^^^^^^^^^^
 
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 08d6bb66a5..3bd4a838e5 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -128,6 +128,13 @@
 #define IXGBE_EXVET_VET_EXT_SHIFT              16
 #define IXGBE_DMATXCTL_VT_MASK                 0xFFFF0000
 
+#define IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE	"fiber_sdp3_no_tx_disable"
+
+static const char * const ixgbe_valid_arguments[] = {
+	IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE,
+	NULL
+};
+
 #define IXGBEVF_DEVARG_PFLINK_FULLCHK		"pflink_fullchk"
 
 static const char * const ixgbevf_valid_arguments[] = {
@@ -355,6 +362,8 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
 static int ixgbe_filter_restore(struct rte_eth_dev *dev);
 static void ixgbe_l2_tunnel_conf(struct rte_eth_dev *dev);
 static int ixgbe_wait_for_link_up(struct ixgbe_hw *hw);
+static int devarg_handle_int(__rte_unused const char *key, const char *value,
+			     void *extra_args);
 
 /*
  * Define VF Stats MACRO for Non "cleared on read" register
@@ -1039,6 +1048,29 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
 	ixgbe_release_swfw_semaphore(hw, mask);
 }
 
+static void
+ixgbe_parse_devargs(struct ixgbe_adapter *adapter,
+		      struct rte_devargs *devargs)
+{
+	struct rte_kvargs *kvlist;
+	uint16_t sdp3_no_tx_disable;
+
+	if (devargs == NULL)
+		return;
+
+	kvlist = rte_kvargs_parse(devargs->args, ixgbe_valid_arguments);
+	if (kvlist == NULL)
+		return;
+
+	if (rte_kvargs_count(kvlist, IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE) == 1 &&
+	    rte_kvargs_process(kvlist, IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE,
+			       devarg_handle_int, &sdp3_no_tx_disable) == 0 &&
+	    sdp3_no_tx_disable == 1)
+		adapter->sdp3_no_tx_disable = 1;
+
+	rte_kvargs_free(kvlist);
+}
+
 /*
  * This function is based on code in ixgbe_attach() in base/ixgbe.c.
  * It returns 0 on success.
@@ -1103,6 +1135,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	}
 
 	rte_atomic32_clear(&ad->link_thread_running);
+	ixgbe_parse_devargs(eth_dev->data->dev_private,
+			    pci_dev->device.devargs);
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
@@ -4278,7 +4312,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 		return rte_eth_linkstatus_set(dev, &link);
 	}
 
-	if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
+	if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber &&
+	    !ad->sdp3_no_tx_disable) {
 		esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
 		if ((esdp_reg & IXGBE_ESDP_SDP3))
 			link_up = 0;
@@ -8498,6 +8533,8 @@ ixgbe_dev_macsec_register_disable(struct rte_eth_dev *dev)
 RTE_PMD_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe, pci_id_ixgbe_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe, "* igb_uio | uio_pci_generic | vfio-pci");
+RTE_PMD_REGISTER_PARAM_STRING(net_ixgbe,
+			      IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE "=<0|1>");
 RTE_PMD_REGISTER_PCI(net_ixgbe_vf, rte_ixgbevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe_vf, pci_id_ixgbevf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci");
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 8d32088493..319a98cebf 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -510,6 +510,9 @@ struct ixgbe_adapter {
 	/* For RSS reta table update */
 	uint8_t rss_reta_updated;
 
+	/* Used for limiting SDP3 TX_DISABLE checks */
+	uint8_t sdp3_no_tx_disable;
+
 	/* Used for VF link sync with PF's physical and logical (by checking
 	 * mailbox status) link status.
 	 */
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.451576636 +0800
+++ 0094-net-ixgbe-add-option-for-link-up-check-on-pin-SDP3.patch	2022-06-21 15:37:49.197785153 +0800
@@ -1 +1 @@
-From 0f9fb100f6c6ed1dcadaf76352f4b4f2bd5501f6 Mon Sep 17 00:00:00 2001
+From 43eac062d1116e8e50276cb46f8867eb4f78717e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0f9fb100f6c6ed1dcadaf76352f4b4f2bd5501f6 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index 82fa453fa2..ad1a3da610 100644
+index 4f4d3b1c2c..388778a01d 100644
@@ -32 +34 @@
-@@ -101,6 +101,23 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
+@@ -81,6 +81,23 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
@@ -57 +59 @@
-index 2da3f67bbc..f31bbb7895 100644
+index 08d6bb66a5..3bd4a838e5 100644
@@ -74 +76 @@
-@@ -348,6 +355,8 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
+@@ -355,6 +362,8 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
@@ -83 +85 @@
-@@ -1032,6 +1041,29 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
+@@ -1039,6 +1048,29 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
@@ -113 +115 @@
-@@ -1095,6 +1127,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1103,6 +1135,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -122 +124 @@
-@@ -4261,7 +4295,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4278,7 +4312,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -132 +134 @@
-@@ -8250,6 +8285,8 @@ ixgbe_dev_macsec_register_disable(struct rte_eth_dev *dev)
+@@ -8498,6 +8533,8 @@ ixgbe_dev_macsec_register_disable(struct rte_eth_dev *dev)
@@ -142 +144 @@
-index 69e0e82a5b..cc6049a66a 100644
+index 8d32088493..319a98cebf 100644
@@ -145 +147 @@
-@@ -501,6 +501,9 @@ struct ixgbe_adapter {
+@@ -510,6 +510,9 @@ struct ixgbe_adapter {

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

* patch 'net/ice/base: fix getting sched node from ID type' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (93 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/ixgbe: add option for link up check on pin SDP3' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/ice: fix MTU info for DCF' " Xueming Li
                   ` (20 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e2660944da20ecb45c1f7d12cc87234f8d30ab69

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e2660944da20ecb45c1f7d12cc87234f8d30ab69 Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Tue, 17 May 2022 13:09:26 +0800
Subject: [PATCH] net/ice/base: fix getting sched node from ID type
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8f7a83e19325be26207e4cb2f11856f0fe3dbeca ]

The function ice_sched_get_node_by_id_type needs to be called
with the scheduler lock held. However, the function
ice_sched_get_node also requests the scheduler lock.
It will cause the dead lock issue.

This patch replaces function ice_sched_get_node with
function ice_sched_find_node_by_teid to solve this problem.

Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 882448671e..9196628cf1 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -4728,12 +4728,12 @@ ice_sched_get_node_by_id_type(struct ice_port_info *pi, u32 id,
 
 	case ICE_AGG_TYPE_Q:
 		/* The current implementation allows single queue to modify */
-		node = ice_sched_get_node(pi, id);
+		node = ice_sched_find_node_by_teid(pi->root, id);
 		break;
 
 	case ICE_AGG_TYPE_QG:
 		/* The current implementation allows single qg to modify */
-		child_node = ice_sched_get_node(pi, id);
+		child_node = ice_sched_find_node_by_teid(pi->root, id);
 		if (!child_node)
 			break;
 		node = child_node->parent;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.493758649 +0800
+++ 0095-net-ice-base-fix-getting-sched-node-from-ID-type.patch	2022-06-21 15:37:49.197785153 +0800
@@ -1 +1 @@
-From 8f7a83e19325be26207e4cb2f11856f0fe3dbeca Mon Sep 17 00:00:00 2001
+From e2660944da20ecb45c1f7d12cc87234f8d30ab69 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8f7a83e19325be26207e4cb2f11856f0fe3dbeca ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 2620892c9e..e697c579be 100644
+index 882448671e..9196628cf1 100644
@@ -27 +29 @@
-@@ -4774,12 +4774,12 @@ ice_sched_get_node_by_id_type(struct ice_port_info *pi, u32 id,
+@@ -4728,12 +4728,12 @@ ice_sched_get_node_by_id_type(struct ice_port_info *pi, u32 id,

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

* patch 'net/ice: fix MTU info for DCF' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (94 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/ice/base: fix getting sched node from ID type' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/i40e: fix max frame size config at port level' " Xueming Li
                   ` (19 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Kevin Liu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d731c37a84ee13a4d0f40fda6506c86e756988d4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d731c37a84ee13a4d0f40fda6506c86e756988d4 Mon Sep 17 00:00:00 2001
From: Kevin Liu <kevinx.liu@intel.com>
Date: Fri, 8 Apr 2022 01:43:08 +0000
Subject: [PATCH] net/ice: fix MTU info for DCF
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 24e6e0363e1704d7471eacafea80c182d4016739 ]

In the DCF module, Missing maximum and minimum
MTU value settings.

This patch adds the settings of the maximum and
minimum MTU to correctly calculate the MTU value.

Fixes: bf89db4409bb ("net/ice: complete device info get in DCF")

Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_dcf_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 1793d8cbd3..429057a862 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -652,6 +652,8 @@ ice_dcf_dev_info_get(struct rte_eth_dev *dev,
 	dev_info->hash_key_size = hw->vf_res->rss_key_size;
 	dev_info->reta_size = hw->vf_res->rss_lut_size;
 	dev_info->flow_type_rss_offloads = ICE_RSS_OFFLOAD_ALL;
+	dev_info->max_mtu = dev_info->max_rx_pktlen - ICE_ETH_OVERHEAD;
+	dev_info->min_mtu = RTE_ETHER_MIN_MTU;
 
 	dev_info->rx_offload_capa =
 		DEV_RX_OFFLOAD_VLAN_STRIP |
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.533733985 +0800
+++ 0096-net-ice-fix-MTU-info-for-DCF.patch	2022-06-21 15:37:49.201118498 +0800
@@ -1 +1 @@
-From 24e6e0363e1704d7471eacafea80c182d4016739 Mon Sep 17 00:00:00 2001
+From d731c37a84ee13a4d0f40fda6506c86e756988d4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 24e6e0363e1704d7471eacafea80c182d4016739 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 8005eb2ab8..0da267db1f 100644
+index 1793d8cbd3..429057a862 100644
@@ -25 +27,2 @@
-@@ -713,6 +713,8 @@ ice_dcf_dev_info_get(struct rte_eth_dev *dev,
+@@ -652,6 +652,8 @@ ice_dcf_dev_info_get(struct rte_eth_dev *dev,
+ 	dev_info->hash_key_size = hw->vf_res->rss_key_size;
@@ -28 +30,0 @@
- 	dev_info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP;
@@ -33 +35 @@
- 		RTE_ETH_RX_OFFLOAD_VLAN_STRIP |
+ 		DEV_RX_OFFLOAD_VLAN_STRIP |

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

* patch 'net/i40e: fix max frame size config at port level' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (95 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/ice: fix MTU info for DCF' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/iavf: fix queue start exception handling' " Xueming Li
                   ` (18 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Wenxuan Wu; +Cc: Yuying Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5b55b9b1ea723a2cebc8f51a44b3ae17055a0dd9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5b55b9b1ea723a2cebc8f51a44b3ae17055a0dd9 Mon Sep 17 00:00:00 2001
From: Wenxuan Wu <wenxuanx.wu@intel.com>
Date: Wed, 18 May 2022 04:59:14 +0000
Subject: [PATCH] net/i40e: fix max frame size config at port level
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2184f7cdeeaa7eb814e102fd01773db204ccd3bf ]

Previously, max frame size can only be set when link is up, and the wait
time is 1 sec. Startup time of 10G_BASET longer than 1s would result in
failure.

Actually, max frame size of media type I40E_MEDIA_TYPE_BASET can be set
regardless of link status.

This patch omitted the link status check of 10G_MEDIA_TYPE_BASET.

Fixes: a4ba77367923 ("net/i40e: enable maximum frame size at port level")

Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
Acked-by: Yuying Zhang <yuying.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index e396e82f06..c2d52e4acc 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -13139,16 +13139,20 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size)
 	uint32_t rep_cnt = MAX_REPEAT_TIME;
 	struct rte_eth_link link;
 	enum i40e_status_code status;
+	bool can_be_set = true;
 
-	do {
-		update_link_reg(hw, &link);
-		if (link.link_status)
-			break;
-
-		rte_delay_ms(CHECK_INTERVAL);
-	} while (--rep_cnt);
+	/* I40E_MEDIA_TYPE_BASET link up can be ignored */
+	if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET) {
+		do {
+			update_link_reg(hw, &link);
+			if (link.link_status)
+				break;
+			rte_delay_ms(CHECK_INTERVAL);
+		} while (--rep_cnt);
+		can_be_set = !!link.link_status;
+	}
 
-	if (link.link_status) {
+	if (can_be_set) {
 		status = i40e_aq_set_mac_config(hw, size, TRUE, 0, false, NULL);
 		if (status != I40E_SUCCESS)
 			PMD_DRV_LOG(ERR, "Failed to set max frame size at port level");
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.573089897 +0800
+++ 0097-net-i40e-fix-max-frame-size-config-at-port-level.patch	2022-06-21 15:37:49.207785188 +0800
@@ -1 +1 @@
-From 2184f7cdeeaa7eb814e102fd01773db204ccd3bf Mon Sep 17 00:00:00 2001
+From 5b55b9b1ea723a2cebc8f51a44b3ae17055a0dd9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2184f7cdeeaa7eb814e102fd01773db204ccd3bf ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 755786dc10..7ffd7e7384 100644
+index e396e82f06..c2d52e4acc 100644
@@ -28 +30 @@
-@@ -12103,16 +12103,20 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size)
+@@ -13139,16 +13139,20 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size)

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

* patch 'net/iavf: fix queue start exception handling' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (96 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/i40e: fix max frame size config at port level' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/iavf: fix mbuf release in multi-process' " Xueming Li
                   ` (17 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/755ea301dbaa6a3b50d3c64407483f716538358e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 755ea301dbaa6a3b50d3c64407483f716538358e Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Thu, 19 May 2022 05:01:56 +0000
Subject: [PATCH] net/iavf: fix queue start exception handling
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1fa739c3f2b3876d21e506c024a3c6bee6562943 ]

If any queue start fail during dev_start, all started queues
should be stopped.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 3397d87e8a..bbbd7e84a4 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -634,28 +634,38 @@ iavf_start_queues(struct rte_eth_dev *dev)
 	struct iavf_rx_queue *rxq;
 	struct iavf_tx_queue *txq;
 	int i;
+	uint16_t nb_txq, nb_rxq;
 
-	for (i = 0; i < dev->data->nb_tx_queues; i++) {
-		txq = dev->data->tx_queues[i];
+	for (nb_txq = 0; nb_txq < dev->data->nb_tx_queues; nb_txq++) {
+		txq = dev->data->tx_queues[nb_txq];
 		if (txq->tx_deferred_start)
 			continue;
-		if (iavf_dev_tx_queue_start(dev, i) != 0) {
-			PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
-			return -1;
+		if (iavf_dev_tx_queue_start(dev, nb_txq) != 0) {
+			PMD_DRV_LOG(ERR, "Fail to start tx queue %u", nb_txq);
+			goto tx_err;
 		}
 	}
 
-	for (i = 0; i < dev->data->nb_rx_queues; i++) {
-		rxq = dev->data->rx_queues[i];
+	for (nb_rxq = 0; nb_rxq < dev->data->nb_rx_queues; nb_rxq++) {
+		rxq = dev->data->rx_queues[nb_rxq];
 		if (rxq->rx_deferred_start)
 			continue;
-		if (iavf_dev_rx_queue_start(dev, i) != 0) {
-			PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
-			return -1;
+		if (iavf_dev_rx_queue_start(dev, nb_rxq) != 0) {
+			PMD_DRV_LOG(ERR, "Fail to start rx queue %u", nb_rxq);
+			goto rx_err;
 		}
 	}
 
 	return 0;
+
+rx_err:
+	for (i = 0; i < nb_rxq; i++)
+		iavf_dev_rx_queue_stop(dev, i);
+tx_err:
+	for (i = 0; i < nb_txq; i++)
+		iavf_dev_tx_queue_stop(dev, i);
+
+	return -1;
 }
 
 static int
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.616390842 +0800
+++ 0098-net-iavf-fix-queue-start-exception-handling.patch	2022-06-21 15:37:49.207785188 +0800
@@ -1 +1 @@
-From 1fa739c3f2b3876d21e506c024a3c6bee6562943 Mon Sep 17 00:00:00 2001
+From 755ea301dbaa6a3b50d3c64407483f716538358e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1fa739c3f2b3876d21e506c024a3c6bee6562943 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 198d8299af..315ab15aad 100644
+index 3397d87e8a..bbbd7e84a4 100644
@@ -22 +24 @@
-@@ -926,28 +926,38 @@ iavf_start_queues(struct rte_eth_dev *dev)
+@@ -634,28 +634,38 @@ iavf_start_queues(struct rte_eth_dev *dev)

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

* patch 'net/iavf: fix mbuf release in multi-process' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (97 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/iavf: fix queue start exception handling' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/iavf: fix Rx queue interrupt setting' " Xueming Li
                   ` (16 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7ec8629367d742344b5a725ade2f3d987ff52f9f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7ec8629367d742344b5a725ade2f3d987ff52f9f Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Thu, 19 May 2022 07:36:04 +0000
Subject: [PATCH] net/iavf: fix mbuf release in multi-process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fced83c1229e0ad89f26d07fa7bd46b8767d9f5c ]

In the multiple process environment, the subprocess operates on the
shared memory and changes the function pointer of the main process,
resulting in the failure to find the address of the function when main
process releasing, resulting in crash.

Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c            | 36 ++++++++++++++++---------
 drivers/net/iavf/iavf_rxtx.h            | 11 ++++++++
 drivers/net/iavf/iavf_rxtx_vec_avx512.c |  8 ++----
 drivers/net/iavf/iavf_rxtx_vec_sse.c    | 16 +++--------
 4 files changed, 41 insertions(+), 30 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 516a1684c2..7689d7fa46 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -326,12 +326,24 @@ release_txq_mbufs(struct iavf_tx_queue *txq)
 	}
 }
 
-static const struct iavf_rxq_ops def_rxq_ops = {
-	.release_mbufs = release_rxq_mbufs,
+static const
+struct iavf_rxq_ops iavf_rxq_release_mbufs_ops[] = {
+	[IAVF_REL_MBUFS_DEFAULT].release_mbufs = release_rxq_mbufs,
+#ifdef RTE_ARCH_X86
+	[IAVF_REL_MBUFS_SSE_VEC].release_mbufs = iavf_rx_queue_release_mbufs_sse,
+#endif
 };
 
-static const struct iavf_txq_ops def_txq_ops = {
-	.release_mbufs = release_txq_mbufs,
+static const
+struct iavf_txq_ops iavf_txq_release_mbufs_ops[] = {
+	[IAVF_REL_MBUFS_DEFAULT].release_mbufs = release_txq_mbufs,
+#ifdef RTE_ARCH_X86
+	[IAVF_REL_MBUFS_SSE_VEC].release_mbufs = iavf_tx_queue_release_mbufs_sse,
+#ifdef CC_AVX512_SUPPORT
+	[IAVF_REL_MBUFS_AVX512_VEC].release_mbufs = iavf_tx_queue_release_mbufs_avx512,
+#endif
+#endif
+
 };
 
 static inline void
@@ -610,7 +622,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	rxq->q_set = true;
 	dev->data->rx_queues[queue_idx] = rxq;
 	rxq->qrx_tail = hw->hw_addr + IAVF_QRX_TAIL1(rxq->queue_id);
-	rxq->ops = &def_rxq_ops;
+	rxq->rel_mbufs_type = IAVF_REL_MBUFS_DEFAULT;
 
 	if (check_rx_bulk_allow(rxq) == true) {
 		PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions are "
@@ -721,7 +733,7 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
 	txq->q_set = true;
 	dev->data->tx_queues[queue_idx] = txq;
 	txq->qtx_tail = hw->hw_addr + IAVF_QTX_TAIL1(queue_idx);
-	txq->ops = &def_txq_ops;
+	txq->rel_mbufs_type = IAVF_REL_MBUFS_DEFAULT;
 
 	if (check_tx_vec_allow(txq) == false) {
 		struct iavf_adapter *ad =
@@ -837,7 +849,7 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	}
 
 	rxq = dev->data->rx_queues[rx_queue_id];
-	rxq->ops->release_mbufs(rxq);
+	iavf_rxq_release_mbufs_ops[rxq->rel_mbufs_type].release_mbufs(rxq);
 	reset_rx_queue(rxq);
 	dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;
 
@@ -865,7 +877,7 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 	}
 
 	txq = dev->data->tx_queues[tx_queue_id];
-	txq->ops->release_mbufs(txq);
+	iavf_txq_release_mbufs_ops[txq->rel_mbufs_type].release_mbufs(txq);
 	reset_tx_queue(txq);
 	dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;
 
@@ -880,7 +892,7 @@ iavf_dev_rx_queue_release(void *rxq)
 	if (!q)
 		return;
 
-	q->ops->release_mbufs(q);
+	iavf_rxq_release_mbufs_ops[q->rel_mbufs_type].release_mbufs(q);
 	rte_free(q->sw_ring);
 	rte_memzone_free(q->mz);
 	rte_free(q);
@@ -894,7 +906,7 @@ iavf_dev_tx_queue_release(void *txq)
 	if (!q)
 		return;
 
-	q->ops->release_mbufs(q);
+	iavf_txq_release_mbufs_ops[q->rel_mbufs_type].release_mbufs(q);
 	rte_free(q->sw_ring);
 	rte_memzone_free(q->mz);
 	rte_free(q);
@@ -928,7 +940,7 @@ iavf_stop_queues(struct rte_eth_dev *dev)
 		txq = dev->data->tx_queues[i];
 		if (!txq)
 			continue;
-		txq->ops->release_mbufs(txq);
+		iavf_txq_release_mbufs_ops[txq->rel_mbufs_type].release_mbufs(txq);
 		reset_tx_queue(txq);
 		dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
 	}
@@ -936,7 +948,7 @@ iavf_stop_queues(struct rte_eth_dev *dev)
 		rxq = dev->data->rx_queues[i];
 		if (!rxq)
 			continue;
-		rxq->ops->release_mbufs(rxq);
+		iavf_rxq_release_mbufs_ops[rxq->rel_mbufs_type].release_mbufs(rxq);
 		reset_rx_queue(rxq);
 		dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
 	}
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index 5b24d2ca29..557a7e46a7 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -166,6 +166,7 @@ struct iavf_rx_queue {
 	struct rte_mbuf *pkt_last_seg;  /* last segment of current packet */
 	struct rte_mbuf fake_mbuf;      /* dummy mbuf */
 	uint8_t rxdid;
+	uint8_t rel_mbufs_type;
 
 	/* used for VPMD */
 	uint16_t rxrearm_nb;       /* number of remaining to be re-armed */
@@ -220,6 +221,7 @@ struct iavf_tx_queue {
 	uint16_t last_desc_cleaned;    /* last desc have been cleaned*/
 	uint16_t free_thresh;
 	uint16_t rs_thresh;
+	uint8_t rel_mbufs_type;
 
 	uint16_t port_id;
 	uint16_t queue_id;
@@ -324,6 +326,12 @@ struct iavf_32b_rx_flex_desc_comms_ovs {
 	} flex_ts;
 };
 
+enum iavf_rxtx_rel_mbufs_type {
+	IAVF_REL_MBUFS_DEFAULT		= 0,
+	IAVF_REL_MBUFS_SSE_VEC		= 1,
+	IAVF_REL_MBUFS_AVX512_VEC	= 2,
+};
+
 /* Receive Flex Descriptor profile IDs: There are a total
  * of 64 profiles where profile IDs 0/1 are for legacy; and
  * profiles 2-63 are flex profiles that can be programmed
@@ -483,6 +491,9 @@ int iavf_txq_vec_setup_avx512(struct iavf_tx_queue *txq);
 uint8_t iavf_proto_xtr_type_to_rxdid(uint8_t xtr_type);
 
 void iavf_set_default_ptype_table(struct rte_eth_dev *dev);
+void iavf_tx_queue_release_mbufs_avx512(struct iavf_tx_queue *txq);
+void iavf_rx_queue_release_mbufs_sse(struct iavf_rx_queue *rxq);
+void iavf_tx_queue_release_mbufs_sse(struct iavf_tx_queue *txq);
 
 static inline
 void iavf_dump_rx_descriptor(struct iavf_rx_queue *rxq,
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index f61681474c..d56a523940 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -1681,7 +1681,7 @@ iavf_xmit_pkts_vec_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
 	return nb_tx;
 }
 
-static inline void
+void __rte_cold
 iavf_tx_queue_release_mbufs_avx512(struct iavf_tx_queue *txq)
 {
 	unsigned int i;
@@ -1701,13 +1701,9 @@ iavf_tx_queue_release_mbufs_avx512(struct iavf_tx_queue *txq)
 	}
 }
 
-static const struct iavf_txq_ops avx512_vec_txq_ops = {
-	.release_mbufs = iavf_tx_queue_release_mbufs_avx512,
-};
-
 int __rte_cold
 iavf_txq_vec_setup_avx512(struct iavf_tx_queue *txq)
 {
-	txq->ops = &avx512_vec_txq_ops;
+	txq->rel_mbufs_type = IAVF_REL_MBUFS_AVX512_VEC;
 	return 0;
 }
diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index e9ea17842f..b3ea8bc86d 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -1198,37 +1198,29 @@ iavf_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 	return nb_tx;
 }
 
-static void __rte_cold
+void __rte_cold
 iavf_rx_queue_release_mbufs_sse(struct iavf_rx_queue *rxq)
 {
 	_iavf_rx_queue_release_mbufs_vec(rxq);
 }
 
-static void __rte_cold
+void __rte_cold
 iavf_tx_queue_release_mbufs_sse(struct iavf_tx_queue *txq)
 {
 	_iavf_tx_queue_release_mbufs_vec(txq);
 }
 
-static const struct iavf_rxq_ops sse_vec_rxq_ops = {
-	.release_mbufs = iavf_rx_queue_release_mbufs_sse,
-};
-
-static const struct iavf_txq_ops sse_vec_txq_ops = {
-	.release_mbufs = iavf_tx_queue_release_mbufs_sse,
-};
-
 int __rte_cold
 iavf_txq_vec_setup(struct iavf_tx_queue *txq)
 {
-	txq->ops = &sse_vec_txq_ops;
+	txq->rel_mbufs_type = IAVF_REL_MBUFS_SSE_VEC;
 	return 0;
 }
 
 int __rte_cold
 iavf_rxq_vec_setup(struct iavf_rx_queue *rxq)
 {
-	rxq->ops = &sse_vec_rxq_ops;
+	rxq->rel_mbufs_type = IAVF_REL_MBUFS_SSE_VEC;
 	return iavf_rxq_vec_setup_default(rxq);
 }
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.654301751 +0800
+++ 0099-net-iavf-fix-mbuf-release-in-multi-process.patch	2022-06-21 15:37:49.214451878 +0800
@@ -1 +1 @@
-From fced83c1229e0ad89f26d07fa7bd46b8767d9f5c Mon Sep 17 00:00:00 2001
+From 7ec8629367d742344b5a725ade2f3d987ff52f9f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fced83c1229e0ad89f26d07fa7bd46b8767d9f5c ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 73e4960257..ff0c98ffc3 100644
+index 516a1684c2..7689d7fa46 100644
@@ -27 +29 @@
-@@ -362,12 +362,24 @@ release_txq_mbufs(struct iavf_tx_queue *txq)
+@@ -326,12 +326,24 @@ release_txq_mbufs(struct iavf_tx_queue *txq)
@@ -56 +58 @@
-@@ -681,7 +693,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+@@ -610,7 +622,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
@@ -65 +67 @@
-@@ -821,7 +833,7 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -721,7 +733,7 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -74 +76 @@
-@@ -953,7 +965,7 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -837,7 +849,7 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -83 +85 @@
-@@ -981,7 +993,7 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -865,7 +877,7 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
@@ -92 +94 @@
-@@ -996,7 +1008,7 @@ iavf_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
+@@ -880,7 +892,7 @@ iavf_dev_rx_queue_release(void *rxq)
@@ -101 +103 @@
-@@ -1010,7 +1022,7 @@ iavf_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
+@@ -894,7 +906,7 @@ iavf_dev_tx_queue_release(void *txq)
@@ -110 +112 @@
-@@ -1044,7 +1056,7 @@ iavf_stop_queues(struct rte_eth_dev *dev)
+@@ -928,7 +940,7 @@ iavf_stop_queues(struct rte_eth_dev *dev)
@@ -119 +121 @@
-@@ -1052,7 +1064,7 @@ iavf_stop_queues(struct rte_eth_dev *dev)
+@@ -936,7 +948,7 @@ iavf_stop_queues(struct rte_eth_dev *dev)
@@ -129 +131 @@
-index 642b9a700a..e8362bbd1d 100644
+index 5b24d2ca29..557a7e46a7 100644
@@ -132 +134 @@
-@@ -190,6 +190,7 @@ struct iavf_rx_queue {
+@@ -166,6 +166,7 @@ struct iavf_rx_queue {
@@ -140 +142 @@
-@@ -249,6 +250,7 @@ struct iavf_tx_queue {
+@@ -220,6 +221,7 @@ struct iavf_tx_queue {
@@ -148,2 +150,2 @@
-@@ -392,6 +394,12 @@ struct iavf_32b_rx_flex_desc_comms_ipsec {
- 	__le32 ipsec_said;
+@@ -324,6 +326,12 @@ struct iavf_32b_rx_flex_desc_comms_ovs {
+ 	} flex_ts;
@@ -161 +163 @@
-@@ -695,6 +703,9 @@ int iavf_txq_vec_setup_avx512(struct iavf_tx_queue *txq);
+@@ -483,6 +491,9 @@ int iavf_txq_vec_setup_avx512(struct iavf_tx_queue *txq);
@@ -172 +174 @@
-index 7319d4cb65..3bfec63851 100644
+index f61681474c..d56a523940 100644
@@ -175,2 +177,2 @@
-@@ -1992,7 +1992,7 @@ iavf_xmit_pkts_vec_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
- 	return iavf_xmit_pkts_vec_avx512_cmn(tx_queue, tx_pkts, nb_pkts, false);
+@@ -1681,7 +1681,7 @@ iavf_xmit_pkts_vec_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
+ 	return nb_tx;
@@ -184 +186 @@
-@@ -2012,14 +2012,10 @@ iavf_tx_queue_release_mbufs_avx512(struct iavf_tx_queue *txq)
+@@ -1701,13 +1701,9 @@ iavf_tx_queue_release_mbufs_avx512(struct iavf_tx_queue *txq)
@@ -199 +200,0 @@
- 
@@ -201 +202 @@
-index 717a227b2c..4a5232c1d2 100644
+index e9ea17842f..b3ea8bc86d 100644

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

* patch 'net/iavf: fix Rx queue interrupt setting' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (98 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/iavf: fix mbuf release in multi-process' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'doc: update matching versions in i40e guide' " Xueming Li
                   ` (15 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/789223ef41ebf4a8b9efecf516cb415f2bf48cf0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 789223ef41ebf4a8b9efecf516cb415f2bf48cf0 Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Fri, 20 May 2022 03:00:23 +0000
Subject: [PATCH] net/iavf: fix Rx queue interrupt setting
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a08f9cb698c3d4687765860e328dca727f7a516b ]

For Rx-Queue Interrupt Setting, when VF Rx interrupt
disable (INTENA=0), there are two ways to write back
descriptor to host memory:

1) Set WB_ON_ITR bit 0 to Interrupt Dynamic Control Register:
Completed descriptors are posted to host memory according to
the internal descriptor cache policy (in other words when a
full cache line is available for write-back).

A internal descriptor size is 16 bytes or 32 bytes, a cache
line size is 64 bytes or 128 bytes from datasheet :
PCIe Global Config 2 - GLPCI_CNF2 (0x000BE004; RO)
so the full cache line could contains 4 packets, it means
Network card will send 4 packets to host when a full cache line
is available.

2) Set WB_ON_ITR bit 1 to Interrupt Dynamic Control Register:
Completed descriptors also trigger the ITR. Following ITR
expiration, all leftover completed descriptors are posted to
host memory.

Network card will send packet to host even if only one
descriptor is completed.

Changing 1) to 2) to make sure VF send the packet to host even
if there is only one Rx packet is ready in hardware.

Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index bbbd7e84a4..060b3e3707 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1431,7 +1431,7 @@ iavf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
 
 	IAVF_WRITE_REG(hw,
 		      IAVF_VFINT_DYN_CTLN1(msix_intr - IAVF_RX_VEC_START),
-		      0);
+		      IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK);
 
 	IAVF_WRITE_FLUSH(hw);
 	return 0;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.696163186 +0800
+++ 0100-net-iavf-fix-Rx-queue-interrupt-setting.patch	2022-06-21 15:37:49.214451878 +0800
@@ -1 +1 @@
-From a08f9cb698c3d4687765860e328dca727f7a516b Mon Sep 17 00:00:00 2001
+From 789223ef41ebf4a8b9efecf516cb415f2bf48cf0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a08f9cb698c3d4687765860e328dca727f7a516b ]
@@ -34 +36,0 @@
-Cc: stable@dpdk.org
@@ -43 +45 @@
-index 315ab15aad..a74056f0f1 100644
+index bbbd7e84a4..060b3e3707 100644
@@ -46 +48 @@
-@@ -1925,7 +1925,7 @@ iavf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -1431,7 +1431,7 @@ iavf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)

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

* patch 'doc: update matching versions in i40e guide' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (99 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/iavf: fix Rx queue interrupt setting' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/ice: fix outer L4 checksum in scalar Rx' " Xueming Li
                   ` (14 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2d9b2c2190098186ad9b1ff5b188713c7ae79e96

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2d9b2c2190098186ad9b1ff5b188713c7ae79e96 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Fri, 20 May 2022 15:04:41 +0800
Subject: [PATCH] doc: update matching versions in i40e guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c43bfb7d598585271573e3231d831b9cd5ad4708 ]

Add recommended matching list for i40e PMD in DPDK 21.05,
21.08, 21.11 and 22.03. And add a known issue when FW upgrade
to a version 8.4 and higher

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 doc/guides/nics/i40e.rst | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index 15febba941..53818fcf4a 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -88,6 +88,14 @@ For X710/XL710/XXV710,
    +--------------+-----------------------+------------------+
    | DPDK version | Kernel driver version | Firmware version |
    +==============+=======================+==================+
+   |    22.03     |         2.17.15       |       8.30       |
+   +--------------+-----------------------+------------------+
+   |    21.11     |         2.17.4        |       8.30       |
+   +--------------+-----------------------+------------------+
+   |    21.08     |         2.15.9        |       8.30       |
+   +--------------+-----------------------+------------------+
+   |    21.05     |         2.15.9        |       8.30       |
+   +--------------+-----------------------+------------------+
    |    20.11     |         2.14.13       |       8.00       |
    +--------------+-----------------------+------------------+
    |    20.08     |         2.12.6        |       7.30       |
@@ -133,6 +141,14 @@ For X722,
    +--------------+-----------------------+------------------+
    | DPDK version | Kernel driver version | Firmware version |
    +==============+=======================+==================+
+   |    22.03     |         2.17.15       |       5.50       |
+   +--------------+-----------------------+------------------+
+   |    21.11     |         2.17.4        |       5.30       |
+   +--------------+-----------------------+------------------+
+   |    21.08     |         2.15.9        |       5.30       |
+   +--------------+-----------------------+------------------+
+   |    21.05     |         2.15.9        |       5.30       |
+   +--------------+-----------------------+------------------+
    |    20.11     |         2.13.10       |       5.00       |
    +--------------+-----------------------+------------------+
    |    20.08     |         2.12.6        |       4.11       |
@@ -758,6 +774,13 @@ it will fail and return the info "Conflict with the first rule's input set",
 which means the current rule's input set conflicts with the first rule's.
 Remove the first rule if want to change the input set of the PCTYPE.
 
+PF reset fail after QinQ set with FW >= 8.4
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If upgrade FW to version 8.4 and higher, after set MAC VLAN filter and configure outer VLAN on PF, kill
+DPDK process will cause the card crash.
+
+
 Example of getting best performance with l3fwd example
 ------------------------------------------------------
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.736744020 +0800
+++ 0101-doc-update-matching-versions-in-i40e-guide.patch	2022-06-21 15:37:49.217785224 +0800
@@ -1 +1 @@
-From c43bfb7d598585271573e3231d831b9cd5ad4708 Mon Sep 17 00:00:00 2001
+From 2d9b2c2190098186ad9b1ff5b188713c7ae79e96 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c43bfb7d598585271573e3231d831b9cd5ad4708 ]
@@ -10,2 +12,0 @@
-Cc: stable@dpdk.org
-
@@ -19 +20 @@
-index ef91b3a1ac..aedb1afc4b 100644
+index 15febba941..53818fcf4a 100644
@@ -22 +23 @@
-@@ -101,6 +101,14 @@ For X710/XL710/XXV710,
+@@ -88,6 +88,14 @@ For X710/XL710/XXV710,
@@ -34,2 +34,0 @@
-    |    21.02     |         2.14.13       |       8.00       |
-    +--------------+-----------------------+------------------+
@@ -37 +36,3 @@
-@@ -148,6 +156,14 @@ For X722,
+    +--------------+-----------------------+------------------+
+    |    20.08     |         2.12.6        |       7.30       |
+@@ -133,6 +141,14 @@ For X722,
@@ -49,2 +49,0 @@
-    |    21.02     |         2.14.13       |       5.00       |
-    +--------------+-----------------------+------------------+
@@ -52 +51,3 @@
-@@ -771,6 +787,13 @@ it will fail and return the info "Conflict with the first rule's input set",
+    +--------------+-----------------------+------------------+
+    |    20.08     |         2.12.6        |       4.11       |
+@@ -758,6 +774,13 @@ it will fail and return the info "Conflict with the first rule's input set",

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

* patch 'net/ice: fix outer L4 checksum in scalar Rx' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (100 preceding siblings ...)
  2022-06-21  8:02 ` patch 'doc: update matching versions in i40e guide' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'net/iavf: increase reset complete wait count' " Xueming Li
                   ` (13 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Wenjing Qiao; +Cc: Xiao Wang, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4d11ba721d11f38c3efbd57370b9e6c330b1ccb5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4d11ba721d11f38c3efbd57370b9e6c330b1ccb5 Mon Sep 17 00:00:00 2001
From: Wenjing Qiao <wenjing.qiao@intel.com>
Date: Fri, 27 May 2022 04:09:55 -0400
Subject: [PATCH] net/ice: fix outer L4 checksum in scalar Rx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 23e35ac5f9431139590d4a4994b6992ef749f4a1 ]

In scalar datapath, ol_flag shows RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
which is error, therefore fixing this bug.

Fixes: 94005e4640a7 ("net/ice: fix build with 16-byte Rx descriptor")

Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Reported-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index edd21f0401..5f94b4174d 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -1446,7 +1446,9 @@ ice_rxd_error_to_pkt_flags(uint16_t stat_err0)
 		return 0;
 
 	if (likely(!(stat_err0 & ICE_RX_FLEX_ERR0_BITS))) {
-		flags |= (PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD);
+		flags |= (PKT_RX_IP_CKSUM_GOOD |
+			  PKT_RX_L4_CKSUM_GOOD |
+			  PKT_RX_OUTER_L4_CKSUM_GOOD);
 		return flags;
 	}
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.776917359 +0800
+++ 0102-net-ice-fix-outer-L4-checksum-in-scalar-Rx.patch	2022-06-21 15:37:49.217785224 +0800
@@ -1 +1 @@
-From 23e35ac5f9431139590d4a4994b6992ef749f4a1 Mon Sep 17 00:00:00 2001
+From 4d11ba721d11f38c3efbd57370b9e6c330b1ccb5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 23e35ac5f9431139590d4a4994b6992ef749f4a1 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 91cdc560f2..975ab55749 100644
+index edd21f0401..5f94b4174d 100644
@@ -23 +25 @@
-@@ -1497,7 +1497,9 @@ ice_rxd_error_to_pkt_flags(uint16_t stat_err0)
+@@ -1446,7 +1446,9 @@ ice_rxd_error_to_pkt_flags(uint16_t stat_err0)
@@ -27,4 +29,4 @@
--		flags |= (RTE_MBUF_F_RX_IP_CKSUM_GOOD | RTE_MBUF_F_RX_L4_CKSUM_GOOD);
-+		flags |= (RTE_MBUF_F_RX_IP_CKSUM_GOOD |
-+			  RTE_MBUF_F_RX_L4_CKSUM_GOOD |
-+			  RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD);
+-		flags |= (PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD);
++		flags |= (PKT_RX_IP_CKSUM_GOOD |
++			  PKT_RX_L4_CKSUM_GOOD |
++			  PKT_RX_OUTER_L4_CKSUM_GOOD);

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

* patch 'net/iavf: increase reset complete wait count' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (101 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/ice: fix outer L4 checksum in scalar Rx' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'examples/dma: fix Tx drop statistics' " Xueming Li
                   ` (12 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6c17d9269777f1cbc15ba546010bd935377963ff

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6c17d9269777f1cbc15ba546010bd935377963ff Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Mon, 30 May 2022 13:34:58 +0800
Subject: [PATCH] net/iavf: increase reset complete wait count
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit be7226980c9ad4963b92b489c8afb17f08899953 ]

Kernel iavf driver has sent patch to increase the completion
wait time to reduce the "Reset never finished" case.
Follow this action in DPDK iavf driver.
Kernel reference commit:
8e3e4b9da7e6 ("iavf: increase reset complete wait time")

Fixes: 22b123a36d07 ("net/avf: initialize PMD")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index e06b35a283..bc49f1fa17 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -14,7 +14,7 @@
 
 #define IAVF_AQ_LEN               32
 #define IAVF_AQ_BUF_SZ            4096
-#define IAVF_RESET_WAIT_CNT       50
+#define IAVF_RESET_WAIT_CNT       500
 #define IAVF_BUF_SIZE_MIN         1024
 #define IAVF_FRAME_SIZE_MAX       9728
 #define IAVF_QUEUE_BASE_ADDR_UNIT 128
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.822514875 +0800
+++ 0103-net-iavf-increase-reset-complete-wait-count.patch	2022-06-21 15:37:49.217785224 +0800
@@ -1 +1 @@
-From be7226980c9ad4963b92b489c8afb17f08899953 Mon Sep 17 00:00:00 2001
+From 6c17d9269777f1cbc15ba546010bd935377963ff Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit be7226980c9ad4963b92b489c8afb17f08899953 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index f1c2daa06e..025ab3ff60 100644
+index e06b35a283..bc49f1fa17 100644
@@ -25 +27 @@
-@@ -18,7 +18,7 @@
+@@ -14,7 +14,7 @@

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

* patch 'examples/dma: fix Tx drop statistics' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (102 preceding siblings ...)
  2022-06-21  8:02 ` patch 'net/iavf: increase reset complete wait count' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'raw/ifpga: unregister interrupt on close' " Xueming Li
                   ` (11 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Bruce Richardson, Kevin Laatz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/14a272633109c98fe5c1fdf47385c45b974561e9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 14a272633109c98fe5c1fdf47385c45b974561e9 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sun, 24 Apr 2022 14:07:40 +0800
Subject: [PATCH] examples/dma: fix Tx drop statistics
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7d3cb76fba200e1649842319facb932d9a05467d ]

The Tx drop statistic was designed to be collected by
rte_eth_dev_tx_buffer mechanism, but the application uses
rte_eth_tx_burst to send packets and this lead the Tx drop statistic
was not collected.

This patch removes rte_eth_dev_tx_buffer mechanism to fix the problem.

Fixes: 632bcd9b5d4f ("examples/ioat: print statistics")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
---
 examples/ioat/ioatfwd.c | 27 +++++----------------------
 1 file changed, 5 insertions(+), 22 deletions(-)

diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
index 4bf37642dc..e30df8118a 100644
--- a/examples/ioat/ioatfwd.c
+++ b/examples/ioat/ioatfwd.c
@@ -103,7 +103,6 @@ static volatile bool force_quit;
 /* ethernet addresses of ports */
 static struct rte_ether_addr ioat_ports_eth_addr[RTE_MAX_ETHPORTS];
 
-static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
 struct rte_mempool *ioat_pktmbuf_pool;
 
 /* Print out statistics for one port. */
@@ -478,11 +477,14 @@ ioat_tx_port(struct rxtx_port_config *tx_config)
 
 		port_statistics.tx[tx_config->rxtx_port] += nb_tx;
 
-		/* Free any unsent packets. */
-		if (unlikely(nb_tx < nb_dq))
+		if (unlikely(nb_tx < nb_dq)) {
+			port_statistics.tx_dropped[tx_config->rxtx_port] +=
+				(nb_dq - nb_tx);
+			/* Free any unsent packets. */
 			rte_mempool_put_bulk(ioat_pktmbuf_pool,
 			(void *)&mbufs_dst[nb_tx],
 				nb_dq - nb_tx);
+		}
 	}
 }
 
@@ -873,25 +875,6 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues)
 			"rte_eth_tx_queue_setup:err=%d,port=%u\n",
 			ret, portid);
 
-	/* Initialize TX buffers */
-	tx_buffer[portid] = rte_zmalloc_socket("tx_buffer",
-			RTE_ETH_TX_BUFFER_SIZE(MAX_PKT_BURST), 0,
-			rte_eth_dev_socket_id(portid));
-	if (tx_buffer[portid] == NULL)
-		rte_exit(EXIT_FAILURE,
-			"Cannot allocate buffer for tx on port %u\n",
-			portid);
-
-	rte_eth_tx_buffer_init(tx_buffer[portid], MAX_PKT_BURST);
-
-	ret = rte_eth_tx_buffer_set_err_callback(tx_buffer[portid],
-		rte_eth_tx_buffer_count_callback,
-		&port_statistics.tx_dropped[portid]);
-	if (ret < 0)
-		rte_exit(EXIT_FAILURE,
-			"Cannot set error callback for tx buffer on port %u\n",
-			portid);
-
 	/* Start device */
 	ret = rte_eth_dev_start(portid);
 	if (ret < 0)
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.863814577 +0800
+++ 0104-examples-dma-fix-Tx-drop-statistics.patch	2022-06-21 15:37:49.221118569 +0800
@@ -1 +1 @@
-From 7d3cb76fba200e1649842319facb932d9a05467d Mon Sep 17 00:00:00 2001
+From 14a272633109c98fe5c1fdf47385c45b974561e9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7d3cb76fba200e1649842319facb932d9a05467d ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
- examples/dma/dmafwd.c | 27 +++++----------------------
+ examples/ioat/ioatfwd.c | 27 +++++----------------------
@@ -23,5 +25,5 @@
-diff --git a/examples/dma/dmafwd.c b/examples/dma/dmafwd.c
-index a03ca05129..dd576bcf77 100644
---- a/examples/dma/dmafwd.c
-+++ b/examples/dma/dmafwd.c
-@@ -122,7 +122,6 @@ static uint32_t max_frame_size;
+diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
+index 4bf37642dc..e30df8118a 100644
+--- a/examples/ioat/ioatfwd.c
++++ b/examples/ioat/ioatfwd.c
+@@ -103,7 +103,6 @@ static volatile bool force_quit;
@@ -29 +31 @@
- static struct rte_ether_addr dma_ports_eth_addr[RTE_MAX_ETHPORTS];
+ static struct rte_ether_addr ioat_ports_eth_addr[RTE_MAX_ETHPORTS];
@@ -32 +34 @@
- struct rte_mempool *dma_pktmbuf_pool;
+ struct rte_mempool *ioat_pktmbuf_pool;
@@ -35 +37 @@
-@@ -484,10 +483,13 @@ dma_tx_port(struct rxtx_port_config *tx_config)
+@@ -478,11 +477,14 @@ ioat_tx_port(struct rxtx_port_config *tx_config)
@@ -45,2 +47,3 @@
- 			rte_mempool_put_bulk(dma_pktmbuf_pool,
- 			(void *)&mbufs[nb_tx], nb_dq - nb_tx);
+ 			rte_mempool_put_bulk(ioat_pktmbuf_pool,
+ 			(void *)&mbufs_dst[nb_tx],
+ 				nb_dq - nb_tx);
@@ -50,2 +53,2 @@
- /* >8 End of transmitting packets from dmadev. */
-@@ -970,25 +972,6 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues)
+ 
+@@ -873,25 +875,6 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues)
@@ -74 +77 @@
- 	/* Start device. 8< */
+ 	/* Start device */

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

* patch 'raw/ifpga: unregister interrupt on close' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (103 preceding siblings ...)
  2022-06-21  8:02 ` patch 'examples/dma: fix Tx drop statistics' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'bus/fslmc: fix VFIO setup' " Xueming Li
                   ` (10 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Wei Huang; +Cc: Tianfei Zhang, Rosen Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/30c0b36a019c910f9f7d2c5b13b044aa40d8de8d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 30c0b36a019c910f9f7d2c5b13b044aa40d8de8d Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Tue, 7 Jun 2022 05:07:22 -0400
Subject: [PATCH] raw/ifpga: unregister interrupt on close
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2545683564aa15f36392be2b4ceead454064135b ]

There is an API rte_pmd_ifpga_cleanup provided by ifpga driver to
free the software resource used by ifpga card. The function call
of rte_pmd_ifpga_cleanup is list below.
rte_pmd_ifpga_cleanup()
  ifpga_rawdev_cleanup()
     rte_rawdev_pmd_release()
       rte_rawdev_close()
         ifpga_rawdev_close()

The interrupts are unregistered in ifpga_rawdev_destroy instead of
ifpga_rawdev_close function, so rte_pmd_ifpga_cleanup cannot free
interrupt resource as expected.

To fix such issue, interrupt unregistration is moved from
ifpga_rawdev_destroy to ifpga_rawdev_close function. The change of
function call of ifpga_rawdev_destroy is as below.
ifpga_rawdev_destroy()
  ifpga_unregister_msix_irq()  // removed
  rte_rawdev_pmd_release()
    rte_rawdev_close()
      ifpga_rawdev_close()

Fixes: e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 33 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index cc6223cb28..2d7f1af51d 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -78,6 +78,7 @@ static int set_surprise_link_check_aer(
 static int ifpga_pci_find_next_ext_capability(unsigned int fd,
 					      int start, uint32_t cap);
 static int ifpga_pci_find_ext_capability(unsigned int fd, uint32_t cap);
+static void fme_interrupt_handler(void *param);
 
 struct ifpga_rawdev *
 ifpga_rawdev_get(const struct rte_rawdev *rawdev)
@@ -736,18 +737,30 @@ ifpga_rawdev_stop(struct rte_rawdev *dev)
 static int
 ifpga_rawdev_close(struct rte_rawdev *dev)
 {
+	struct ifpga_rawdev *ifpga_rdev = NULL;
 	struct opae_adapter *adapter;
+	struct opae_manager *mgr;
+	int ret = 0;
 
 	if (dev) {
-		ifpga_monitor_stop_func(ifpga_rawdev_get(dev));
+		ifpga_rdev = ifpga_rawdev_get(dev); 
+		if (ifpga_rdev)
+			ifpga_monitor_stop_func(ifpga_rdev);
 		adapter = ifpga_rawdev_get_priv(dev);
 		if (adapter) {
+			mgr = opae_adapter_get_mgr(adapter);
+			if (ifpga_rdev && mgr) {
+				if (ifpga_unregister_msix_irq(ifpga_rdev,
+					IFPGA_FME_IRQ, 0,
+					fme_interrupt_handler, mgr) < 0)
+					ret = -EINVAL;
+			}
 			opae_adapter_destroy(adapter);
 			opae_adapter_data_free(adapter->data);
 		}
 	}
 
-	return dev ? 0:1;
+	return ret;
 }
 
 static int
@@ -1599,9 +1612,6 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
 	int ret;
 	struct rte_rawdev *rawdev;
 	char name[RTE_RAWDEV_NAME_MAX_LEN];
-	struct opae_adapter *adapter;
-	struct opae_manager *mgr;
-	struct ifpga_rawdev *dev;
 
 	if (!pci_dev) {
 		IFPGA_RAWDEV_PMD_ERR("Invalid pci_dev of the device!");
@@ -1621,19 +1631,6 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
 		IFPGA_RAWDEV_PMD_ERR("Invalid device name (%s)", name);
 		return -EINVAL;
 	}
-	dev = ifpga_rawdev_get(rawdev);
-
-	adapter = ifpga_rawdev_get_priv(rawdev);
-	if (!adapter)
-		return -ENODEV;
-
-	mgr = opae_adapter_get_mgr(adapter);
-	if (!mgr)
-		return -ENODEV;
-
-	if (ifpga_unregister_msix_irq(dev, IFPGA_FME_IRQ, 0,
-				fme_interrupt_handler, mgr) < 0)
-		return -EINVAL;
 
 	/* rte_rawdev_close is called by pmd_release */
 	ret = rte_rawdev_pmd_release(rawdev);
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.904207763 +0800
+++ 0105-raw-ifpga-unregister-interrupt-on-close.patch	2022-06-21 15:37:49.221118569 +0800
@@ -1 +1 @@
-From 2545683564aa15f36392be2b4ceead454064135b Mon Sep 17 00:00:00 2001
+From 30c0b36a019c910f9f7d2c5b13b044aa40d8de8d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2545683564aa15f36392be2b4ceead454064135b ]
@@ -29 +31,0 @@
-Cc: stable@dpdk.org
@@ -35,2 +37,2 @@
- drivers/raw/ifpga/ifpga_rawdev.c | 29 +++++++++++------------------
- 1 file changed, 11 insertions(+), 18 deletions(-)
+ drivers/raw/ifpga/ifpga_rawdev.c | 33 +++++++++++++++-----------------
+ 1 file changed, 15 insertions(+), 18 deletions(-)
@@ -39 +41 @@
-index fe3fc43abe..94df56c90c 100644
+index cc6223cb28..2d7f1af51d 100644
@@ -50 +52,3 @@
-@@ -740,8 +741,9 @@ ifpga_rawdev_close(struct rte_rawdev *dev)
+@@ -736,18 +737,30 @@ ifpga_rawdev_stop(struct rte_rawdev *dev)
+ static int
+ ifpga_rawdev_close(struct rte_rawdev *dev)
@@ -52 +56 @@
- 	struct ifpga_rawdev *ifpga_rdev = NULL;
++	struct ifpga_rawdev *ifpga_rdev = NULL;
@@ -55,3 +59 @@
- 	char *vdev_name = NULL;
--	int i = 0;
-+	int i, ret = 0;
++	int ret = 0;
@@ -60,3 +62,4 @@
- 		ifpga_rdev = ifpga_rawdev_get(dev);
-@@ -756,12 +758,19 @@ ifpga_rawdev_close(struct rte_rawdev *dev)
- 		}
+-		ifpga_monitor_stop_func(ifpga_rawdev_get(dev));
++		ifpga_rdev = ifpga_rawdev_get(dev); 
++		if (ifpga_rdev)
++			ifpga_monitor_stop_func(ifpga_rdev);
@@ -82 +85 @@
-@@ -1629,9 +1638,6 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
+@@ -1599,9 +1612,6 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
@@ -92 +95 @@
-@@ -1651,19 +1657,6 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
+@@ -1621,19 +1631,6 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)

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

* patch 'bus/fslmc: fix VFIO setup' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (104 preceding siblings ...)
  2022-06-21  8:02 ` patch 'raw/ifpga: unregister interrupt on close' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'doc: fix formatting and link in BPF library guide' " Xueming Li
                   ` (9 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Romain Delhomel; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8f68d6fdc6262db2fcf83030e248b83ebba4c991

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8f68d6fdc6262db2fcf83030e248b83ebba4c991 Mon Sep 17 00:00:00 2001
From: Romain Delhomel <romain.delhomel@6wind.com>
Date: Fri, 3 Jun 2022 17:18:30 +0200
Subject: [PATCH] bus/fslmc: fix VFIO setup
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 36c3c4df136f6d79c0ffaddec00696f5eddaef16 ]

At device probe, the fslmc bus driver calls rte_vfio_get_group_fd() to
get a fd associated to a vfio group. This function first checks if the
group is already opened, else it opens /dev/vfio/%u, and increases the
number of active groups in default_vfio_cfg (which references the
default vfio container).

When adding the first group to a vfio_cfg, the caller is supposed to
pick an IOMMU type and set up DMA mappings for container, as it's done
by pci bus, but it is not done here. Instead, a new container is created
and used.

This prevents the pci bus driver, which uses the default_vfio_cfg
container, to configure the container because
default_vfio_cfg->active_group > 1.

This patch fixes the issue by always creating a new container (and its
associated vfio_cfg) and binding the group to it.

Fixes: a69f79300262 ("bus/fslmc: support multi VFIO group")

Signed-off-by: Romain Delhomel <romain.delhomel@6wind.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/fslmc_vfio.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index b52f36c33e..2ab1368202 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -968,6 +968,7 @@ fslmc_vfio_setup_group(void)
 {
 	int groupid;
 	int ret;
+	int vfio_container_fd;
 	struct vfio_group_status status = { .argsz = sizeof(status) };
 
 	/* if already done once */
@@ -986,8 +987,15 @@ fslmc_vfio_setup_group(void)
 		return 0;
 	}
 
+	ret = rte_vfio_container_create();
+	if (ret < 0) {
+		DPAA2_BUS_ERR("Failed to open VFIO container");
+		return ret;
+	}
+	vfio_container_fd = ret;
+
 	/* Get the actual group fd */
-	ret = rte_vfio_get_group_fd(groupid);
+	ret = rte_vfio_container_group_bind(vfio_container_fd, groupid);
 	if (ret < 0)
 		return ret;
 	vfio_group.fd = ret;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.946601540 +0800
+++ 0106-bus-fslmc-fix-VFIO-setup.patch	2022-06-21 15:37:49.221118569 +0800
@@ -1 +1 @@
-From 36c3c4df136f6d79c0ffaddec00696f5eddaef16 Mon Sep 17 00:00:00 2001
+From 8f68d6fdc6262db2fcf83030e248b83ebba4c991 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 36c3c4df136f6d79c0ffaddec00696f5eddaef16 ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org
@@ -34 +36 @@
-index 1b89a56bbc..3d4e71a80a 100644
+index b52f36c33e..2ab1368202 100644
@@ -37 +39 @@
-@@ -995,6 +995,7 @@ fslmc_vfio_setup_group(void)
+@@ -968,6 +968,7 @@ fslmc_vfio_setup_group(void)
@@ -45 +47 @@
-@@ -1013,8 +1014,15 @@ fslmc_vfio_setup_group(void)
+@@ -986,8 +987,15 @@ fslmc_vfio_setup_group(void)

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

* patch 'doc: fix formatting and link in BPF library guide' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (105 preceding siblings ...)
  2022-06-21  8:02 ` patch 'bus/fslmc: fix VFIO setup' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'app/testpmd: fix packet segment allocation' " Xueming Li
                   ` (8 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/641e8b889ef088ad87177641dfb5f034a991f2d1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 641e8b889ef088ad87177641dfb5f034a991f2d1 Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Fri, 27 May 2022 13:45:00 +0000
Subject: [PATCH] doc: fix formatting and link in BPF library guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 85bd316d084f6a2715f8574f322f09b56075789b ]

Small improvements to the documentation based on Sphinx HTML doc output.

Fixes: 14b8f0bbe519 ("doc: add BPF library guide")
Fixes: b901d928361c ("bpf: support packet data load instructions")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
---
 doc/guides/prog_guide/bpf_lib.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/guides/prog_guide/bpf_lib.rst b/doc/guides/prog_guide/bpf_lib.rst
index 1feb7734a3..1cf2d59429 100644
--- a/doc/guides/prog_guide/bpf_lib.rst
+++ b/doc/guides/prog_guide/bpf_lib.rst
@@ -10,7 +10,7 @@ user-space dpdk application.
 
 It supports basic set of features from eBPF spec.
 Please refer to the
-`eBPF spec <https://www.kernel.org/doc/Documentation/networking/filter.txt>`
+`eBPF spec <https://www.kernel.org/doc/Documentation/networking/filter.txt>`_
 for more information.
 Also it introduces basic framework to load/unload BPF-based filters
 on eth devices (right now only via SW RX/TX callbacks).
@@ -48,9 +48,9 @@ For example, ``(BPF_IND | BPF_W | BPF_LD)`` means:
 .. code-block:: c
 
     uint32_t tmp;
-    R0 = rte_pktmbuf_read((const struct rte_mbuf *)R6,  src_reg + imm32,
-	sizeof(tmp), &tmp);
-    if (R0 == NULL) return FAILED;
+    R0 = rte_pktmbuf_read((const struct rte_mbuf *)R6,  src_reg + imm32, sizeof(tmp), &tmp);
+    if (R0 == NULL)
+        return FAILED;
     R0 = ntohl(*(uint32_t *)R0);
 
 and ``R1-R5`` were scratched.
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:53.986399279 +0800
+++ 0107-doc-fix-formatting-and-link-in-BPF-library-guide.patch	2022-06-21 15:37:49.221118569 +0800
@@ -1 +1 @@
-From 85bd316d084f6a2715f8574f322f09b56075789b Mon Sep 17 00:00:00 2001
+From 641e8b889ef088ad87177641dfb5f034a991f2d1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 85bd316d084f6a2715f8574f322f09b56075789b ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/testpmd: fix packet segment allocation' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (106 preceding siblings ...)
  2022-06-21  8:02 ` patch 'doc: fix formatting and link in BPF library guide' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'app/testpmd: fix multicast address pool leak' " Xueming Li
                   ` (7 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9c1410c9b0a7741543cc6c22f3b94196d777318b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9c1410c9b0a7741543cc6c22f3b94196d777318b Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Thu, 2 Jun 2022 15:59:47 +0300
Subject: [PATCH] app/testpmd: fix packet segment allocation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1108c33e743f8be81e765165c8b3cf27d57a7220 ]

When --mbuf-size cmdline parameter is specified, the segments to scatter
packets on are allocated sequentially from these extra memory pools
(the mbuf for the first segment is allocated from the first pool, the
second one from the second pool, and so on, if segment number is greater
then pool’s the mbuf for remaining segments will be allocated from the
last valid pool).
A bug in comparing segment index with mbuf index caused wrong mapping
of one of the segments.

Fix the comparison.

Fixes: 2befc67ff679 ("app/testpmd: add extended Rx queue setup")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 app/test-pmd/testpmd.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 0e553d19b9..6ecb032c81 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2406,8 +2406,10 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 {
 	union rte_eth_rxseg rx_useg[MAX_SEGS_BUFFER_SPLIT] = {};
 	unsigned int i, mp_n;
-	int ret;
+	int ret = -1;
 
+	if (mbuf_data_size_n < 1)
+		goto exit;
 	if (rx_pkt_nb_segs <= 1 ||
 	    (rx_conf->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) == 0) {
 		rx_conf->rx_seg = NULL;
@@ -2424,7 +2426,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 		 * Use last valid pool for the segments with number
 		 * exceeding the pool index.
 		 */
-		mp_n = (i > mbuf_data_size_n) ? mbuf_data_size_n - 1 : i;
+		mp_n = (i >= mbuf_data_size_n) ? mbuf_data_size_n - 1 : i;
 		mpx = mbuf_pool_find(socket_id, mp_n);
 		/* Handle zero as mbuf data buffer size. */
 		rx_seg->length = rx_pkt_seg_lengths[i] ?
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:54.023092616 +0800
+++ 0108-app-testpmd-fix-packet-segment-allocation.patch	2022-06-21 15:37:49.224451914 +0800
@@ -1 +1 @@
-From 1108c33e743f8be81e765165c8b3cf27d57a7220 Mon Sep 17 00:00:00 2001
+From 9c1410c9b0a7741543cc6c22f3b94196d777318b Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1108c33e743f8be81e765165c8b3cf27d57a7220 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -26,2 +28,2 @@
- app/test-pmd/testpmd.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ app/test-pmd/testpmd.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
@@ -30 +32 @@
-index fc1b64b60d..4d51eb9576 100644
+index 0e553d19b9..6ecb032c81 100644
@@ -33 +35,13 @@
-@@ -2671,7 +2671,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+@@ -2406,8 +2406,10 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+ {
+ 	union rte_eth_rxseg rx_useg[MAX_SEGS_BUFFER_SPLIT] = {};
+ 	unsigned int i, mp_n;
+-	int ret;
++	int ret = -1;
+ 
++	if (mbuf_data_size_n < 1)
++		goto exit;
+ 	if (rx_pkt_nb_segs <= 1 ||
+ 	    (rx_conf->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) == 0) {
+ 		rx_conf->rx_seg = NULL;
+@@ -2424,7 +2426,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,

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

* patch 'app/testpmd: fix multicast address pool leak' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (107 preceding siblings ...)
  2022-06-21  8:02 ` patch 'app/testpmd: fix packet segment allocation' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'kni: use dedicated function to set random MAC address' " Xueming Li
                   ` (6 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Yuying Zhang, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/59d08006aa2a9596efd300fb54e033f07167b65a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 59d08006aa2a9596efd300fb54e033f07167b65a Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Fri, 25 Mar 2022 08:35:55 +0000
Subject: [PATCH] app/testpmd: fix multicast address pool leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 68629be3a622ee53cd5b40c8447ae9b083ff3f6c ]

A multicast address pool is allocated for a port when
using mcast_addr testpmd commands.

When closing a port or stopping testpmd, this pool was
not freed, resulting in a leak.
This issue has been caught using ASan.

Free this pool when closing the port.

Error info as following:
ERROR: LeakSanitizer: detected memory leaksDirect leak of
       192 byte(s)
0 0x7f6a2e0aeffe in __interceptor_realloc
	(/lib/x86_64-linux-gnu/libasan.so.5+0x10dffe)
1 0x565361eb340f in mcast_addr_pool_extend
	../app/test-pmd/config.c:5162
2 0x565361eb3556 in mcast_addr_pool_append
	../app/test-pmd/config.c:5180
3 0x565361eb3aae in mcast_addr_add
	../app/test-pmd/config.c:5243

Fixes: 8fff667578a7 ("app/testpmd: new command to add/remove multicast MAC addresses")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Acked-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 app/test-pmd/config.c  | 19 +++++++++++++++++++
 app/test-pmd/testpmd.c |  1 +
 app/test-pmd/testpmd.h |  1 +
 3 files changed, 21 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index ee2f560b61..d24fb7763e 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -5088,6 +5088,25 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
 		sizeof(struct rte_ether_addr) * (port->mc_addr_nb - addr_idx));
 }
 
+int
+mcast_addr_pool_destroy(portid_t port_id)
+{
+	struct rte_port *port;
+
+	if (port_id_is_invalid(port_id, ENABLED_WARN) ||
+	    port_id == (portid_t)RTE_PORT_ALL)
+		return -EINVAL;
+	port = &ports[port_id];
+
+	if (port->mc_addr_nb != 0) {
+		/* free the pool of multicast addresses. */
+		free(port->mc_addr_pool);
+		port->mc_addr_pool = NULL;
+		port->mc_addr_nb = 0;
+	}
+	return 0;
+}
+
 static int
 eth_port_multicast_addr_list_set(portid_t port_id)
 {
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 6ecb032c81..ae7a7ddd3e 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2834,6 +2834,7 @@ close_port(portid_t pid)
 			continue;
 		}
 
+		mcast_addr_pool_destroy(pi);
 		port_flow_flush(pi);
 		rte_eth_dev_close(pi);
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 5fa898eb96..6ccdff43f1 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -838,6 +838,7 @@ int port_flow_create(portid_t port_id,
 int port_shared_action_query(portid_t port_id, uint32_t id);
 void update_age_action_context(const struct rte_flow_action *actions,
 		     struct port_flow *pf);
+int mcast_addr_pool_destroy(portid_t port_id);
 int port_flow_destroy(portid_t port_id, uint32_t n, const uint32_t *rule);
 int port_flow_flush(portid_t port_id);
 int port_flow_dump(portid_t port_id, const char *file_name);
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:54.061779618 +0800
+++ 0109-app-testpmd-fix-multicast-address-pool-leak.patch	2022-06-21 15:37:49.234451950 +0800
@@ -1 +1 @@
-From 68629be3a622ee53cd5b40c8447ae9b083ff3f6c Mon Sep 17 00:00:00 2001
+From 59d08006aa2a9596efd300fb54e033f07167b65a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 68629be3a622ee53cd5b40c8447ae9b083ff3f6c ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -40 +42 @@
-index 72d2606d19..d6caa1f0b2 100644
+index ee2f560b61..d24fb7763e 100644
@@ -43 +45 @@
-@@ -6070,6 +6070,25 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
+@@ -5088,6 +5088,25 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
@@ -70 +72 @@
-index 4d51eb9576..9d6175e9a7 100644
+index 6ecb032c81..ae7a7ddd3e 100644
@@ -73 +75,2 @@
-@@ -3237,6 +3237,7 @@ close_port(portid_t pid)
+@@ -2834,6 +2834,7 @@ close_port(portid_t pid)
+ 			continue;
@@ -76,5 +79,4 @@
- 		if (is_proc_primary()) {
-+			mcast_addr_pool_destroy(pi);
- 			port_flow_flush(pi);
- 			port_flex_item_flush(pi);
- 			port_action_handle_flush(pi);
++		mcast_addr_pool_destroy(pi);
+ 		port_flow_flush(pi);
+ 		rte_eth_dev_close(pi);
+ 	}
@@ -82 +84 @@
-index 6693813dda..dd34b025e6 100644
+index 5fa898eb96..6ccdff43f1 100644
@@ -85,2 +87,2 @@
-@@ -991,6 +991,7 @@ int port_flow_create(portid_t port_id,
- int port_action_handle_query(portid_t port_id, uint32_t id);
+@@ -838,6 +838,7 @@ int port_flow_create(portid_t port_id,
+ int port_shared_action_query(portid_t port_id, uint32_t id);
@@ -92 +94 @@
- int port_flow_dump(portid_t port_id, bool dump_all,
+ int port_flow_dump(portid_t port_id, const char *file_name);

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

* patch 'kni: use dedicated function to set random MAC address' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (108 preceding siblings ...)
  2022-06-21  8:02 ` patch 'app/testpmd: fix multicast address pool leak' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'kni: use dedicated function to set " Xueming Li
                   ` (5 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Andrew Rybchenko, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/628b8d88c48c3679daf1ae2e7a42933c5ad5401a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 628b8d88c48c3679daf1ae2e7a42933c5ad5401a Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Wed, 8 Jun 2022 15:11:16 +0300
Subject: [PATCH] kni: use dedicated function to set random MAC address
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2ee8c67ef9399759cb0d3f34b2c9fb6ea0ecc832 ]

eth_hw_addr_random() sets address type correctly.

eth_hw_addr_random() is available since Linux v3.4, so
no compat is required.

Also fix the warning:
warning: passing argument 1 of ‘memcpy’ discards ‘const’
qualifier from pointer target type

Variable dev_addr is done const intentionally in Linux v5.17 to
prevent using it directly.

Fixes: ea6b39b5b847 ("kni: remove ethtool support")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 kernel/linux/kni/kni_misc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index d1f6f54aac..a6b51fc32f 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -407,8 +407,8 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
 	if (is_valid_ether_addr(dev_info.mac_addr))
 		memcpy(net_dev->dev_addr, dev_info.mac_addr, ETH_ALEN);
 	else
-		/* Generate random MAC address. */
-		eth_random_addr(net_dev->dev_addr);
+		/* Assign random MAC address. */
+		eth_hw_addr_random(net_dev);
 
 	if (dev_info.mtu)
 		net_dev->mtu = dev_info.mtu;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:54.105319444 +0800
+++ 0110-kni-use-dedicated-function-to-set-random-MAC-address.patch	2022-06-21 15:37:49.234451950 +0800
@@ -1 +1 @@
-From 2ee8c67ef9399759cb0d3f34b2c9fb6ea0ecc832 Mon Sep 17 00:00:00 2001
+From 628b8d88c48c3679daf1ae2e7a42933c5ad5401a Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2ee8c67ef9399759cb0d3f34b2c9fb6ea0ecc832 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 780187d8bf..4f6dd373a3 100644
+index d1f6f54aac..a6b51fc32f 100644
@@ -35 +37 @@
-@@ -405,8 +405,8 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
+@@ -407,8 +407,8 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,

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

* patch 'kni: use dedicated function to set MAC address' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (109 preceding siblings ...)
  2022-06-21  8:02 ` patch 'kni: use dedicated function to set random MAC address' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'raw/ifpga: remove virtual devices on close' " Xueming Li
                   ` (4 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Andrew Rybchenko, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3590f93137200914516a66452535016088b0cb5f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3590f93137200914516a66452535016088b0cb5f Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Wed, 8 Jun 2022 15:11:17 +0300
Subject: [PATCH] kni: use dedicated function to set MAC address
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b99bd4a0aacab47165d045a6aeee88ee74744600 ]

The warning info:
warning: passing argument 1 of ‘memcpy’ discards ‘const’
qualifier from pointer target type

Variable dev_addr is done const intentionally in v5.17 to prevent using
it directly.  See the following Linux kernel changeset for details:

commit adeef3e32146 ("net: constify netdev->dev_addr")

Used helper function was introduced earlier in v5.15.

Fixes: ea6b39b5b847 ("kni: remove ethtool support")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 kernel/linux/kni/compat.h   | 4 ++++
 kernel/linux/kni/kni_misc.c | 9 +++++++--
 kernel/linux/kni/kni_net.c  | 4 ++++
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 0db29a4a6f..3a86d12bbc 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -142,6 +142,10 @@
 #define HAVE_TSK_IN_GUP
 #endif
 
+#if KERNEL_VERSION(5, 15, 0) <= LINUX_VERSION_CODE
+#define HAVE_ETH_HW_ADDR_SET
+#endif
+
 #if KERNEL_VERSION(5, 18, 0) > LINUX_VERSION_CODE
 #define HAVE_NETIF_RX_NI
 #endif
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index a6b51fc32f..0df129240b 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -404,11 +404,16 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
 	pr_debug("mbuf_size:    %u\n", kni->mbuf_size);
 
 	/* if user has provided a valid mac address */
-	if (is_valid_ether_addr(dev_info.mac_addr))
+	if (is_valid_ether_addr(dev_info.mac_addr)) {
+#ifdef HAVE_ETH_HW_ADDR_SET
+		eth_hw_addr_set(net_dev, dev_info.mac_addr);
+#else
 		memcpy(net_dev->dev_addr, dev_info.mac_addr, ETH_ALEN);
-	else
+#endif
+	} else {
 		/* Assign random MAC address. */
 		eth_hw_addr_random(net_dev);
+	}
 
 	if (dev_info.mtu)
 		net_dev->mtu = dev_info.mtu;
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index a8b092b756..09f690bf81 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -783,7 +783,11 @@ kni_net_set_mac(struct net_device *netdev, void *p)
 		return -EADDRNOTAVAIL;
 
 	memcpy(req.mac_addr, addr->sa_data, netdev->addr_len);
+#ifdef HAVE_ETH_HW_ADDR_SET
+	eth_hw_addr_set(netdev, addr->sa_data);
+#else
 	memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
+#endif
 
 	ret = kni_net_process_request(netdev, &req);
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:54.148981770 +0800
+++ 0111-kni-use-dedicated-function-to-set-MAC-address.patch	2022-06-21 15:37:49.234451950 +0800
@@ -1 +1 @@
-From b99bd4a0aacab47165d045a6aeee88ee74744600 Mon Sep 17 00:00:00 2001
+From 3590f93137200914516a66452535016088b0cb5f Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b99bd4a0aacab47165d045a6aeee88ee74744600 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -48 +50 @@
-index 4f6dd373a3..0c3a86ee35 100644
+index a6b51fc32f..0df129240b 100644
@@ -51 +53 @@
-@@ -402,11 +402,16 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
+@@ -404,11 +404,16 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
@@ -71 +73 @@
-index 41805fcabf..779ee3451a 100644
+index a8b092b756..09f690bf81 100644

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

* patch 'raw/ifpga: remove virtual devices on close' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (110 preceding siblings ...)
  2022-06-21  8:02 ` patch 'kni: use dedicated function to set " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:02 ` patch 'vhost: fix async access' " Xueming Li
                   ` (3 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: Wei Huang; +Cc: Tianfei Zhang, Rosen Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c9a4ddc1e848c4e1fcd6d928d7e8f715c0189f4f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c9a4ddc1e848c4e1fcd6d928d7e8f715c0189f4f Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Thu, 16 Jun 2022 23:38:21 -0400
Subject: [PATCH] raw/ifpga: remove virtual devices on close
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ae835aba40349ee9631ef6b52e68a2893febe7e0 ]

Virtual devices created on ifpga raw device will not be removed
when ifpga device has closed. To avoid resource leak problem,
this patch introduces an ifpga virtual device remove function,
virtual devices will be destroyed after the ifpga raw device closed.

Fixes: ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 169 +++++++++++++++++++++++--------
 drivers/raw/ifpga/ifpga_rawdev.h |   8 ++
 2 files changed, 136 insertions(+), 41 deletions(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 2d7f1af51d..ee6589ad01 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -135,6 +135,8 @@ ifpga_rawdev_allocate(struct rte_rawdev *rawdev)
 	for (i = 0; i < IFPGA_MAX_IRQ; i++)
 		dev->intr_handle[i] = NULL;
 	dev->poll_enabled = 0;
+	for (i = 0; i < IFPGA_MAX_VDEV; i++)
+		dev->vdev_name[i] = NULL;
 
 	return dev;
 }
@@ -740,12 +742,20 @@ ifpga_rawdev_close(struct rte_rawdev *dev)
 	struct ifpga_rawdev *ifpga_rdev = NULL;
 	struct opae_adapter *adapter;
 	struct opae_manager *mgr;
-	int ret = 0;
+	char *vdev_name = NULL;
+	int i, ret = 0;
 
 	if (dev) {
-		ifpga_rdev = ifpga_rawdev_get(dev); 
-		if (ifpga_rdev)
+		ifpga_rdev = ifpga_rawdev_get(dev);
+		if (ifpga_rdev) {
+			for (i = 0; i < IFPGA_MAX_VDEV; i++) {
+				vdev_name = ifpga_rdev->vdev_name[i];
+				if (vdev_name)
+					rte_vdev_uninit(vdev_name);
+			}
 			ifpga_monitor_stop_func(ifpga_rdev);
+			ifpga_rdev->rawdev = NULL;
+		}
 		adapter = ifpga_rawdev_get_priv(dev);
 		if (adapter) {
 			mgr = opae_adapter_get_mgr(adapter);
@@ -1637,9 +1647,6 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
 	if (ret)
 		IFPGA_RAWDEV_PMD_DEBUG("Device cleanup failed");
 
-	if (dev)
-		dev->rawdev = NULL;
-
 	return ret;
 }
 
@@ -1696,75 +1703,118 @@ static int ifpga_rawdev_get_string_arg(const char *key __rte_unused,
 
 	return 0;
 }
+
 static int
-ifpga_cfg_probe(struct rte_vdev_device *dev)
+ifpga_vdev_parse_devargs(struct rte_devargs *devargs,
+	struct ifpga_vdev_args *args)
 {
-	struct rte_devargs *devargs;
-	struct rte_kvargs *kvlist = NULL;
-	struct rte_rawdev *rawdev = NULL;
-	struct ifpga_rawdev *ifpga_dev;
-	int port;
+	struct rte_kvargs *kvlist;
 	char *name = NULL;
-	char dev_name[RTE_RAWDEV_NAME_MAX_LEN];
-	int ret = -1;
+	int port = 0;
+	int ret = -EINVAL;
 
-	devargs = dev->device.devargs;
+	if (!devargs || !args)
+		return ret;
 
 	kvlist = rte_kvargs_parse(devargs->args, valid_args);
 	if (!kvlist) {
-		IFPGA_RAWDEV_PMD_LOG(ERR, "error when parsing param");
-		goto end;
+		IFPGA_RAWDEV_PMD_ERR("error when parsing devargs");
+		return ret;
 	}
 
 	if (rte_kvargs_count(kvlist, IFPGA_ARG_NAME) == 1) {
 		if (rte_kvargs_process(kvlist, IFPGA_ARG_NAME,
-				       &ifpga_rawdev_get_string_arg,
-				       &name) < 0) {
+			&ifpga_rawdev_get_string_arg, &name) < 0) {
 			IFPGA_RAWDEV_PMD_ERR("error to parse %s",
-				     IFPGA_ARG_NAME);
+				IFPGA_ARG_NAME);
 			goto end;
+		} else {
+			strlcpy(args->bdf, name, sizeof(args->bdf));
+			rte_free(name);
 		}
 	} else {
 		IFPGA_RAWDEV_PMD_ERR("arg %s is mandatory for ifpga bus",
-			  IFPGA_ARG_NAME);
+			IFPGA_ARG_NAME);
 		goto end;
 	}
 
 	if (rte_kvargs_count(kvlist, IFPGA_ARG_PORT) == 1) {
-		if (rte_kvargs_process(kvlist,
-			IFPGA_ARG_PORT,
-			&rte_ifpga_get_integer32_arg,
-			&port) < 0) {
+		if (rte_kvargs_process(kvlist, IFPGA_ARG_PORT,
+			&rte_ifpga_get_integer32_arg, &port) < 0) {
 			IFPGA_RAWDEV_PMD_ERR("error to parse %s",
 				IFPGA_ARG_PORT);
 			goto end;
+		} else {
+			args->port = port;
 		}
 	} else {
 		IFPGA_RAWDEV_PMD_ERR("arg %s is mandatory for ifpga bus",
-			  IFPGA_ARG_PORT);
+			IFPGA_ARG_PORT);
 		goto end;
 	}
 
+	ret = 0;
+
+end:
+	if (kvlist)
+		rte_kvargs_free(kvlist);
+
+	return ret;
+}
+
+static int
+ifpga_cfg_probe(struct rte_vdev_device *vdev)
+{
+	struct rte_rawdev *rawdev = NULL;
+	struct ifpga_rawdev *ifpga_dev;
+	struct ifpga_vdev_args args;
+	char dev_name[RTE_RAWDEV_NAME_MAX_LEN];
+	const char *vdev_name = NULL;
+	int i, n, ret = 0;
+
+	vdev_name = rte_vdev_device_name(vdev);
+	if (!vdev_name)
+		return -EINVAL;
+
+	IFPGA_RAWDEV_PMD_INFO("probe ifpga virtual device %s", vdev_name);
+
+	ret = ifpga_vdev_parse_devargs(vdev->device.devargs, &args);
+	if (ret)
+		return ret;
+
 	memset(dev_name, 0, sizeof(dev_name));
-	snprintf(dev_name, RTE_RAWDEV_NAME_MAX_LEN, "IFPGA:%s", name);
+	snprintf(dev_name, RTE_RAWDEV_NAME_MAX_LEN, "IFPGA:%s", args.bdf);
 	rawdev = rte_rawdev_pmd_get_named_dev(dev_name);
 	if (!rawdev)
-		goto end;
+		return -ENODEV;
 	ifpga_dev = ifpga_rawdev_get(rawdev);
 	if (!ifpga_dev)
-		goto end;
+		return -ENODEV;
 
-	memset(dev_name, 0, sizeof(dev_name));
-	snprintf(dev_name, RTE_RAWDEV_NAME_MAX_LEN, "%d|%s",
-	port, name);
+	for (i = 0; i < IFPGA_MAX_VDEV; i++) {
+		if (ifpga_dev->vdev_name[i] == NULL) {
+			n = strlen(vdev_name) + 1;
+			ifpga_dev->vdev_name[i] = rte_malloc(NULL, n, 0);
+			if (ifpga_dev->vdev_name[i] == NULL)
+				return -ENOMEM;
+			strlcpy(ifpga_dev->vdev_name[i], vdev_name, n);
+			break;
+		}
+	}
 
+	if (i >= IFPGA_MAX_VDEV) {
+		IFPGA_RAWDEV_PMD_ERR("Can't create more virtual device!");
+		return -ENOENT;
+	}
+
+	snprintf(dev_name, RTE_RAWDEV_NAME_MAX_LEN, "%d|%s",
+		args.port, args.bdf);
 	ret = rte_eal_hotplug_add(RTE_STR(IFPGA_BUS_NAME),
-			dev_name, devargs->args);
-end:
-	if (kvlist)
-		rte_kvargs_free(kvlist);
-	if (name)
-		free(name);
+			dev_name, vdev->device.devargs->args);
+	if (ret) {
+		rte_free(ifpga_dev->vdev_name[i]);
+		ifpga_dev->vdev_name[i] = NULL;
+	}
 
 	return ret;
 }
@@ -1772,10 +1822,47 @@ end:
 static int
 ifpga_cfg_remove(struct rte_vdev_device *vdev)
 {
-	IFPGA_RAWDEV_PMD_INFO("Remove ifpga_cfg %p",
-		vdev);
+	struct rte_rawdev *rawdev = NULL;
+	struct ifpga_rawdev *ifpga_dev;
+	struct ifpga_vdev_args args;
+	char dev_name[RTE_RAWDEV_NAME_MAX_LEN];
+	const char *vdev_name = NULL;
+	char *tmp_vdev = NULL;
+	int i, ret = 0;
 
-	return 0;
+	vdev_name = rte_vdev_device_name(vdev);
+	if (!vdev_name)
+		return -EINVAL;
+
+	IFPGA_RAWDEV_PMD_INFO("remove ifpga virtual device %s", vdev_name);
+
+	ret = ifpga_vdev_parse_devargs(vdev->device.devargs, &args);
+	if (ret)
+		return ret;
+
+	memset(dev_name, 0, sizeof(dev_name));
+	snprintf(dev_name, RTE_RAWDEV_NAME_MAX_LEN, "IFPGA:%s", args.bdf);
+	rawdev = rte_rawdev_pmd_get_named_dev(dev_name);
+	if (!rawdev)
+		return -ENODEV;
+	ifpga_dev = ifpga_rawdev_get(rawdev);
+	if (!ifpga_dev)
+		return -ENODEV;
+
+	snprintf(dev_name, RTE_RAWDEV_NAME_MAX_LEN, "%d|%s",
+		args.port, args.bdf);
+	ret = rte_eal_hotplug_remove(RTE_STR(IFPGA_BUS_NAME), dev_name);
+
+	for (i = 0; i < IFPGA_MAX_VDEV; i++) {
+		tmp_vdev = ifpga_dev->vdev_name[i];
+		if (tmp_vdev && !strcmp(tmp_vdev, vdev_name)) {
+			free(tmp_vdev);
+			ifpga_dev->vdev_name[i] = NULL;
+			break;
+		}
+	}
+
+	return ret;
 }
 
 static struct rte_vdev_driver ifpga_cfg_driver = {
diff --git a/drivers/raw/ifpga/ifpga_rawdev.h b/drivers/raw/ifpga/ifpga_rawdev.h
index b3c7295070..b4aaa15fda 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.h
+++ b/drivers/raw/ifpga/ifpga_rawdev.h
@@ -50,6 +50,7 @@ ifpga_rawdev_get_priv(const struct rte_rawdev *rawdev)
 
 #define IFPGA_RAWDEV_MSIX_IRQ_NUM 7
 #define IFPGA_RAWDEV_NUM 32
+#define IFPGA_MAX_VDEV 4
 #define IFPGA_MAX_IRQ 12
 
 struct ifpga_rawdev {
@@ -64,6 +65,13 @@ struct ifpga_rawdev {
 	void *intr_handle[IFPGA_MAX_IRQ];
 	/* enable monitor thread poll device's sensors or not */
 	int poll_enabled;
+	/* name of virtual devices created on raw device */
+	char *vdev_name[IFPGA_MAX_VDEV];
+};
+
+struct ifpga_vdev_args {
+	char bdf[PCI_PRI_STR_SIZE];
+	int port;
 };
 
 struct ifpga_rawdev *
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:54.201821835 +0800
+++ 0112-raw-ifpga-remove-virtual-devices-on-close.patch	2022-06-21 15:37:49.237785294 +0800
@@ -1 +1 @@
-From ae835aba40349ee9631ef6b52e68a2893febe7e0 Mon Sep 17 00:00:00 2001
+From c9a4ddc1e848c4e1fcd6d928d7e8f715c0189f4f Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Tue, 7 Jun 2022 05:07:21 -0400
+Date: Thu, 16 Jun 2022 23:38:21 -0400
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ae835aba40349ee9631ef6b52e68a2893febe7e0 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
- drivers/raw/ifpga/ifpga_rawdev.c | 166 ++++++++++++++++++++++++-------
+ drivers/raw/ifpga/ifpga_rawdev.c | 169 +++++++++++++++++++++++--------
@@ -20 +22 @@
- 2 files changed, 138 insertions(+), 36 deletions(-)
+ 2 files changed, 136 insertions(+), 41 deletions(-)
@@ -23 +25 @@
-index 6d4117c5e8..fe3fc43abe 100644
+index 2d7f1af51d..ee6589ad01 100644
@@ -26 +28 @@
-@@ -134,6 +134,8 @@ ifpga_rawdev_allocate(struct rte_rawdev *rawdev)
+@@ -135,6 +135,8 @@ ifpga_rawdev_allocate(struct rte_rawdev *rawdev)
@@ -35,5 +37,2 @@
-@@ -736,10 +738,22 @@ ifpga_rawdev_stop(struct rte_rawdev *dev)
- static int
- ifpga_rawdev_close(struct rte_rawdev *dev)
- {
-+	struct ifpga_rawdev *ifpga_rdev = NULL;
+@@ -740,12 +742,20 @@ ifpga_rawdev_close(struct rte_rawdev *dev)
+ 	struct ifpga_rawdev *ifpga_rdev = NULL;
@@ -40,0 +40,2 @@
+ 	struct opae_manager *mgr;
+-	int ret = 0;
@@ -42 +43 @@
-+	int i = 0;
++	int i, ret = 0;
@@ -45 +46,2 @@
--		ifpga_monitor_stop_func(ifpga_rawdev_get(dev));
+-		ifpga_rdev = ifpga_rawdev_get(dev); 
+-		if (ifpga_rdev)
@@ -53 +55 @@
-+			ifpga_monitor_stop_func(ifpga_rdev);
+ 			ifpga_monitor_stop_func(ifpga_rdev);
@@ -58,5 +60,5 @@
- 			opae_adapter_destroy(adapter);
-@@ -1638,8 +1652,6 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
- 		return -EINVAL;
- 	}
- 	dev = ifpga_rawdev_get(rawdev);
+ 			mgr = opae_adapter_get_mgr(adapter);
+@@ -1637,9 +1647,6 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
+ 	if (ret)
+ 		IFPGA_RAWDEV_PMD_DEBUG("Device cleanup failed");
+ 
@@ -64,0 +67,3 @@
+-
+ 	return ret;
+ }
@@ -66,3 +71 @@
- 	adapter = ifpga_rawdev_get_priv(rawdev);
- 	if (!adapter)
-@@ -1714,73 +1726,118 @@ static int ifpga_rawdev_get_string_arg(const char *key __rte_unused,
+@@ -1696,75 +1703,118 @@ static int ifpga_rawdev_get_string_arg(const char *key __rte_unused,
@@ -207,2 +210,4 @@
--	rte_kvargs_free(kvlist);
--	free(name);
+-	if (kvlist)
+-		rte_kvargs_free(kvlist);
+-	if (name)
+-		free(name);
@@ -217 +222 @@
-@@ -1788,10 +1845,47 @@ end:
+@@ -1772,10 +1822,47 @@ end:
@@ -269 +274 @@
-index 857b73463d..4c191190ca 100644
+index b3c7295070..b4aaa15fda 100644

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

* patch 'vhost: fix async access' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (111 preceding siblings ...)
  2022-06-21  8:02 ` patch 'raw/ifpga: remove virtual devices on close' " Xueming Li
@ 2022-06-21  8:02 ` Xueming Li
  2022-06-21  8:03 ` patch 'net/bnxt: fix tunnel stateless offloads' " Xueming Li
                   ` (2 subsequent siblings)
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:02 UTC (permalink / raw)
  To: David Marchand; +Cc: Sunil Pai G, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ee29f5fa6b16c19ab2d8cb1fdeffabe0b95f0aa2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ee29f5fa6b16c19ab2d8cb1fdeffabe0b95f0aa2 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 17 Jun 2022 07:52:27 +0200
Subject: [PATCH] vhost: fix async access
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2d47fd3dfb596d266b89d82c2c4b2351c3d6fe20 ]

vq->async accesses must be protected with vq->access_lock.

Fixes: eb666d24085f ("vhost: fix async unregister deadlock")
Fixes: 0c0935c5f794 ("vhost: allow to check in-flight packets for async vhost")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost.c | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index e76929d81b..93f0aa240b 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -1697,31 +1697,26 @@ int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id)
 	if (vq == NULL)
 		return ret;
 
-	ret = 0;
-
-	if (!vq->async_registered)
-		return ret;
-
 	if (!rte_spinlock_trylock(&vq->access_lock)) {
 		VHOST_LOG_CONFIG(ERR, "Failed to unregister async channel. "
 			"virt queue busy.\n");
-		return -1;
+		return ret;
 	}
 
-	if (vq->async_pkts_inflight_n) {
+	if (!vq->async_registered) {
+		ret = 0;
+	} else if (vq->async_pkts_inflight_n) {
 		VHOST_LOG_CONFIG(ERR, "Failed to unregister async channel. "
 			"async inflight packets must be completed before unregistration.\n");
-		ret = -1;
-		goto out;
-	}
-
-	vhost_free_async_mem(vq);
+	} else {
+		ret = 0;
+		vhost_free_async_mem(vq);
 
-	vq->async_ops.transfer_data = NULL;
-	vq->async_ops.check_completed_copies = NULL;
-	vq->async_registered = false;
+		vq->async_ops.transfer_data = NULL;
+		vq->async_ops.check_completed_copies = NULL;
+		vq->async_registered = false;
+	}
 
-out:
 	rte_spinlock_unlock(&vq->access_lock);
 
 	return ret;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:54.254313139 +0800
+++ 0113-vhost-fix-async-access.patch	2022-06-21 15:37:49.237785294 +0800
@@ -1 +1 @@
-From 2d47fd3dfb596d266b89d82c2c4b2351c3d6fe20 Mon Sep 17 00:00:00 2001
+From ee29f5fa6b16c19ab2d8cb1fdeffabe0b95f0aa2 Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Mon, 11 Apr 2022 13:00:08 +0200
+Date: Fri, 17 Jun 2022 07:52:27 +0200
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2d47fd3dfb596d266b89d82c2c4b2351c3d6fe20 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +18,2 @@
- lib/vhost/vhost.c | 25 ++++++++++---------------
- 1 file changed, 10 insertions(+), 15 deletions(-)
+ lib/librte_vhost/vhost.c | 27 +++++++++++----------------
+ 1 file changed, 11 insertions(+), 16 deletions(-)
@@ -19,5 +21,5 @@
-diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
-index df0bb9d043..14863144f3 100644
---- a/lib/vhost/vhost.c
-+++ b/lib/vhost/vhost.c
-@@ -1753,27 +1753,23 @@ rte_vhost_async_channel_unregister(int vid, uint16_t queue_id)
+diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
+index e76929d81b..93f0aa240b 100644
+--- a/lib/librte_vhost/vhost.c
++++ b/lib/librte_vhost/vhost.c
+@@ -1697,31 +1697,26 @@ int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id)
@@ -29 +31 @@
--	if (!vq->async)
+-	if (!vq->async_registered)
@@ -33,2 +35,2 @@
- 		VHOST_LOG_CONFIG(ERR, "(%s) failed to unregister async channel, virtqueue busy.\n",
- 				dev->ifname);
+ 		VHOST_LOG_CONFIG(ERR, "Failed to unregister async channel. "
+ 			"virt queue busy.\n");
@@ -39,2 +41,2 @@
--	if (vq->async->pkts_inflight_n) {
-+	if (!vq->async) {
+-	if (vq->async_pkts_inflight_n) {
++	if (!vq->async_registered) {
@@ -42,4 +44,3 @@
-+	} else if (vq->async->pkts_inflight_n) {
- 		VHOST_LOG_CONFIG(ERR, "(%s) failed to unregister async channel.\n", dev->ifname);
- 		VHOST_LOG_CONFIG(ERR, "(%s) inflight packets must be completed before unregistration.\n",
- 			dev->ifname);
++	} else if (vq->async_pkts_inflight_n) {
+ 		VHOST_LOG_CONFIG(ERR, "Failed to unregister async channel. "
+ 			"async inflight packets must be completed before unregistration.\n");
@@ -47,0 +49,3 @@
+-	}
+-
+-	vhost_free_async_mem(vq);
@@ -49 +52,0 @@
-+		vhost_free_async_mem(vq);
@@ -51,10 +54 @@
- 	}
- 
--	vhost_free_async_mem(vq);
--out:
- 	rte_spinlock_unlock(&vq->access_lock);
- 
- 	return ret;
-@@ -1891,9 +1887,6 @@ rte_vhost_async_get_inflight(int vid, uint16_t queue_id)
- 	if (vq == NULL)
- 		return ret;
++		vhost_free_async_mem(vq);
@@ -62,9 +56,7 @@
--	if (!vq->async)
--		return ret;
--
- 	if (!rte_spinlock_trylock(&vq->access_lock)) {
- 		VHOST_LOG_CONFIG(DEBUG,
- 			"(%s) failed to check in-flight packets. virtqueue busy.\n",
-@@ -1901,7 +1894,9 @@ rte_vhost_async_get_inflight(int vid, uint16_t queue_id)
- 		return ret;
- 	}
+-	vq->async_ops.transfer_data = NULL;
+-	vq->async_ops.check_completed_copies = NULL;
+-	vq->async_registered = false;
++		vq->async_ops.transfer_data = NULL;
++		vq->async_ops.check_completed_copies = NULL;
++		vq->async_registered = false;
++	}
@@ -72,4 +64 @@
--	ret = vq->async->pkts_inflight_n;
-+	if (vq->async)
-+		ret = vq->async->pkts_inflight_n;
-+
+-out:

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

* patch 'net/bnxt: fix tunnel stateless offloads' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (112 preceding siblings ...)
  2022-06-21  8:02 ` patch 'vhost: fix async access' " Xueming Li
@ 2022-06-21  8:03 ` Xueming Li
  2022-06-21  8:03 ` patch 'net/mlx5: fix RSS hash types adjustment' " Xueming Li
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:03 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/145c5b453d83f9c898b67ce2fb637209851e910b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 145c5b453d83f9c898b67ce2fb637209851e910b Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 20 Jun 2022 13:58:43 +0530
Subject: [PATCH] net/bnxt: fix tunnel stateless offloads
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c0278f6e52399f7612f9f1a9d52434071ac49921 ]
[ upstream commit 41dfa14c9c6587dc934042c04ce7f86015acd608 ]

The HW only supports tunnel header parsing globally for supported tunnel
types. When a function uses one default VNIC to receive both the tunnel
and non-tunnel packets, applying the same stateless offload operation to
both tunnel and non-tunnel packets can cause problems in certain scenarios.
To workaround these problems, the firmware advertises no tunnel header
parsing capabilities to the driver using the HWRM_FUNC_QCAPS.
The driver must check this flag setting and accordingly not advertise
tunnel packet stateless offload capabilities to the stack.

If the device supports VXLAN, GRE, IPIP and GENEVE tunnel parsing,
then reports RX_OFFLOAD_OUTER_IPV4_CKSUM, RX_OFFLOAD_OUTER_UDP_CKSUM
and TX_OFFLOAD_OUTER_IPV4_CKSUM in the Rx/Tx offload capabilities of
the device.
Also, advertise tunnel TSO capabilities based on FW support.

Fixes: 0a6d2a720078 ("net/bnxt: get device infos")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt.h                |  1 +
 drivers/net/bnxt/bnxt_hwrm.c           |  4 ++
 drivers/net/bnxt/bnxt_hwrm.h           | 20 +++++++
 drivers/net/bnxt/bnxt_rxq.c            |  7 +--
 drivers/net/bnxt/bnxt_txq.c            | 19 ++++---
 drivers/net/bnxt/hsi_struct_def_dpdk.h | 74 +++++++++++++++++++++++++-
 6 files changed, 114 insertions(+), 11 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 0696b8a99d..4354c0f55e 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -835,6 +835,7 @@ struct bnxt {
 	uint32_t		max_mcast_addr; /* maximum number of mcast filters supported */
 
 	struct rte_eth_rss_conf	rss_conf; /* RSS configuration. */
+	uint16_t tunnel_disable_flag; /* tunnel stateless offloads status */
 };
 
 static
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index deebea428a..44070ca482 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -824,6 +824,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 		bp->fw_cap |= BNXT_FW_CAP_VLAN_TX_INSERT;
 		PMD_DRV_LOG(DEBUG, "VLAN acceleration for TX is enabled\n");
 	}
+	bp->tunnel_disable_flag = rte_le_to_cpu_16(resp->tunnel_disable_flag);
+	if (bp->tunnel_disable_flag)
+		PMD_DRV_LOG(DEBUG, "Tunnel parsing capability is disabled, flags : %#x\n",
+			    bp->tunnel_disable_flag);
 unlock:
 	HWRM_UNLOCK();
 
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index d36defbc70..813ac333f7 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -120,6 +120,26 @@ struct bnxt_pf_resource_info {
 
 #define BNXT_CTX_VAL_INVAL	0xFFFF
 
+#define BNXT_TUNNELED_OFFLOADS_CAP_VXLAN_EN(bp)		\
+	(!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_VXLAN))
+#define BNXT_TUNNELED_OFFLOADS_CAP_NGE_EN(bp)		\
+	(!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_NGE))
+#define BNXT_TUNNELED_OFFLOADS_CAP_GRE_EN(bp)		\
+	(!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_GRE))
+#define BNXT_TUNNELED_OFFLOADS_CAP_IPINIP_EN(bp)	\
+	(!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_IPINIP))
+
+/*
+ * If the device supports VXLAN, GRE, IPIP and GENEVE tunnel parsing, then report
+ * RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM, RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM and
+ * RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM in the Rx/Tx offload capabilities of the device.
+ */
+#define BNXT_TUNNELED_OFFLOADS_CAP_ALL_EN(bp)			\
+	(BNXT_TUNNELED_OFFLOADS_CAP_VXLAN_EN(bp) &&		\
+	 BNXT_TUNNELED_OFFLOADS_CAP_NGE_EN(bp)   &&		\
+	 BNXT_TUNNELED_OFFLOADS_CAP_GRE_EN(bp)   &&		\
+	 BNXT_TUNNELED_OFFLOADS_CAP_IPINIP_EN(bp))
+
 int bnxt_hwrm_cfa_l2_clear_rx_mask(struct bnxt *bp,
 				   struct bnxt_vnic_info *vnic);
 int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, struct bnxt_vnic_info *vnic,
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 7959d48f47..f597f376e6 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -34,14 +34,15 @@ uint64_t bnxt_get_rx_port_offloads(struct bnxt *bp)
 			  DEV_RX_OFFLOAD_SCATTER |
 			  DEV_RX_OFFLOAD_RSS_HASH;
 
-	rx_offload_capa |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
-			   DEV_RX_OFFLOAD_OUTER_UDP_CKSUM;
-
 	if (bp->flags & BNXT_FLAG_PTP_SUPPORTED)
 		rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP;
 	if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP)
 		rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_STRIP;
 
+	if (BNXT_TUNNELED_OFFLOADS_CAP_ALL_EN(bp))
+		rx_offload_capa |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
+				   DEV_RX_OFFLOAD_OUTER_UDP_CKSUM;
+
 	return rx_offload_capa;
 }
 
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index bc1797095d..d282d077ea 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -8,6 +8,7 @@
 #include <rte_malloc.h>
 
 #include "bnxt.h"
+#include "bnxt_hwrm.h"
 #include "bnxt_ring.h"
 #include "bnxt_txq.h"
 #include "bnxt_txr.h"
@@ -27,15 +28,21 @@ uint64_t bnxt_get_tx_port_offloads(struct bnxt *bp)
 			  DEV_TX_OFFLOAD_QINQ_INSERT |
 			  DEV_TX_OFFLOAD_MULTI_SEGS;
 
-	tx_offload_capa |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
-			   DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
-			   DEV_TX_OFFLOAD_GRE_TNL_TSO |
-			   DEV_TX_OFFLOAD_IPIP_TNL_TSO |
-			   DEV_TX_OFFLOAD_GENEVE_TNL_TSO;
-
 	if (bp->fw_cap & BNXT_FW_CAP_VLAN_TX_INSERT)
 		tx_offload_capa |= DEV_TX_OFFLOAD_VLAN_INSERT;
 
+	if (BNXT_TUNNELED_OFFLOADS_CAP_ALL_EN(bp))
+		tx_offload_capa |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
+
+	if (BNXT_TUNNELED_OFFLOADS_CAP_VXLAN_EN(bp))
+		tx_offload_capa |= DEV_TX_OFFLOAD_VXLAN_TNL_TSO;
+	if (BNXT_TUNNELED_OFFLOADS_CAP_GRE_EN(bp))
+		tx_offload_capa |= DEV_TX_OFFLOAD_GRE_TNL_TSO;
+	if (BNXT_TUNNELED_OFFLOADS_CAP_NGE_EN(bp))
+		tx_offload_capa |= DEV_TX_OFFLOAD_GENEVE_TNL_TSO;
+	if (BNXT_TUNNELED_OFFLOADS_CAP_IPINIP_EN(bp))
+		tx_offload_capa |= DEV_TX_OFFLOAD_IPIP_TNL_TSO;
+
 	return tx_offload_capa;
 }
 
diff --git a/drivers/net/bnxt/hsi_struct_def_dpdk.h b/drivers/net/bnxt/hsi_struct_def_dpdk.h
index 81fc68d0c9..f905181d3b 100644
--- a/drivers/net/bnxt/hsi_struct_def_dpdk.h
+++ b/drivers/net/bnxt/hsi_struct_def_dpdk.h
@@ -10718,7 +10718,7 @@ struct hwrm_func_qcaps_input {
 	uint8_t	unused_0[6];
 } __rte_packed;
 
-/* hwrm_func_qcaps_output (size:704b/88B) */
+/* hwrm_func_qcaps_output (size:768b/96B) */
 struct hwrm_func_qcaps_output {
 	/* The specific error status for the command. */
 	uint16_t	error_code;
@@ -11082,7 +11082,13 @@ struct hwrm_func_qcaps_output {
 	 * (max_tx_rings) to the function.
 	 */
 	uint16_t	max_sp_tx_rings;
-	uint8_t	unused_0[2];
+	/*
+	 * The maximum number of MSI-X vectors that may be allocated across
+	 * all VFs for the function. This is valid only on the PF with SR-IOV
+	 * enabled. Returns zero if this command is called on a PF with
+	 * SR-IOV disabled or on a VF.
+	 */
+	uint16_t	max_msix_vfs;
 	uint32_t	flags_ext;
 	/*
 	 * If 1, the device can be configured to set the ECN bits in the
@@ -11164,6 +11170,70 @@ struct hwrm_func_qcaps_output {
 	 * to the primate processor block.
 	 */
 	#define HWRM_FUNC_QCAPS_OUTPUT_MPC_CHNLS_CAP_PRIMATE     UINT32_C(0x10)
+	/*
+	 * Maximum number of Key Contexts supported per HWRM
+	 * function call for allocating Key Contexts.
+	 */
+	uint16_t	max_key_ctxs_alloc;
+	uint32_t	flags_ext2;
+	/*
+	 * When this bit is '1', it indicates that FW will support
+	 * timestamping on all RX packets, not just PTP type packets.
+	 */
+	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_RX_ALL_PKTS_TIMESTAMPS_SUPPORTED \
+		UINT32_C(0x1)
+	/* When this bit is '1', it indicates that HW and FW support QUIC. */
+	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_QUIC_SUPPORTED \
+		UINT32_C(0x2)
+	uint16_t	tunnel_disable_flag;
+	/*
+	 * When this bit is '1', it indicates that the VXLAN parsing
+	 * is disabled in hardware
+	 */
+	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_VXLAN \
+		UINT32_C(0x1)
+	/*
+	 * When this bit is '1', it indicates that the NGE parsing
+	 * is disabled in hardware
+	 */
+	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_NGE \
+		UINT32_C(0x2)
+	/*
+	 * When this bit is '1', it indicates that the NVGRE parsing
+	 * is disabled in hardware
+	 */
+	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_NVGRE \
+		UINT32_C(0x4)
+	/*
+	 * When this bit is '1', it indicates that the L2GRE parsing
+	 * is disabled in hardware
+	 */
+	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_L2GRE \
+		UINT32_C(0x8)
+	/*
+	 * When this bit is '1', it indicates that the GRE parsing
+	 * is disabled in hardware
+	 */
+	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_GRE \
+		UINT32_C(0x10)
+	/*
+	 * When this bit is '1', it indicates that the IPINIP parsing
+	 * is disabled in hardware
+	 */
+	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_IPINIP \
+		UINT32_C(0x20)
+	/*
+	 * When this bit is '1', it indicates that the MPLS parsing
+	 * is disabled in hardware
+	 */
+	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_MPLS \
+		UINT32_C(0x40)
+	/*
+	 * When this bit is '1', it indicates that the PPPOE parsing
+	 * is disabled in hardware
+	 */
+	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_PPPOE \
+		UINT32_C(0x80)
 	uint8_t	unused_1;
 	/*
 	 * This field is used in Output records to indicate that the output
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:54.304644100 +0800
+++ 0114-net-bnxt-fix-tunnel-stateless-offloads.patch	2022-06-21 15:37:49.277785436 +0800
@@ -0,0 +1,261 @@
+From 145c5b453d83f9c898b67ce2fb637209851e910b Mon Sep 17 00:00:00 2001
+From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
+Date: Mon, 20 Jun 2022 13:58:43 +0530
+Subject: [PATCH] net/bnxt: fix tunnel stateless offloads
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c0278f6e52399f7612f9f1a9d52434071ac49921 ]
+[ upstream commit 41dfa14c9c6587dc934042c04ce7f86015acd608 ]
+
+The HW only supports tunnel header parsing globally for supported tunnel
+types. When a function uses one default VNIC to receive both the tunnel
+and non-tunnel packets, applying the same stateless offload operation to
+both tunnel and non-tunnel packets can cause problems in certain scenarios.
+To workaround these problems, the firmware advertises no tunnel header
+parsing capabilities to the driver using the HWRM_FUNC_QCAPS.
+The driver must check this flag setting and accordingly not advertise
+tunnel packet stateless offload capabilities to the stack.
+
+If the device supports VXLAN, GRE, IPIP and GENEVE tunnel parsing,
+then reports RX_OFFLOAD_OUTER_IPV4_CKSUM, RX_OFFLOAD_OUTER_UDP_CKSUM
+and TX_OFFLOAD_OUTER_IPV4_CKSUM in the Rx/Tx offload capabilities of
+the device.
+Also, advertise tunnel TSO capabilities based on FW support.
+
+Fixes: 0a6d2a720078 ("net/bnxt: get device infos")
+
+Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
+Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
+Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
+---
+ drivers/net/bnxt/bnxt.h                |  1 +
+ drivers/net/bnxt/bnxt_hwrm.c           |  4 ++
+ drivers/net/bnxt/bnxt_hwrm.h           | 20 +++++++
+ drivers/net/bnxt/bnxt_rxq.c            |  7 +--
+ drivers/net/bnxt/bnxt_txq.c            | 19 ++++---
+ drivers/net/bnxt/hsi_struct_def_dpdk.h | 74 +++++++++++++++++++++++++-
+ 6 files changed, 114 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
+index 0696b8a99d..4354c0f55e 100644
+--- a/drivers/net/bnxt/bnxt.h
++++ b/drivers/net/bnxt/bnxt.h
+@@ -835,6 +835,7 @@ struct bnxt {
+ 	uint32_t		max_mcast_addr; /* maximum number of mcast filters supported */
+ 
+ 	struct rte_eth_rss_conf	rss_conf; /* RSS configuration. */
++	uint16_t tunnel_disable_flag; /* tunnel stateless offloads status */
+ };
+ 
+ static
+diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
+index deebea428a..44070ca482 100644
+--- a/drivers/net/bnxt/bnxt_hwrm.c
++++ b/drivers/net/bnxt/bnxt_hwrm.c
+@@ -824,6 +824,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+ 		bp->fw_cap |= BNXT_FW_CAP_VLAN_TX_INSERT;
+ 		PMD_DRV_LOG(DEBUG, "VLAN acceleration for TX is enabled\n");
+ 	}
++	bp->tunnel_disable_flag = rte_le_to_cpu_16(resp->tunnel_disable_flag);
++	if (bp->tunnel_disable_flag)
++		PMD_DRV_LOG(DEBUG, "Tunnel parsing capability is disabled, flags : %#x\n",
++			    bp->tunnel_disable_flag);
+ unlock:
+ 	HWRM_UNLOCK();
+ 
+diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
+index d36defbc70..813ac333f7 100644
+--- a/drivers/net/bnxt/bnxt_hwrm.h
++++ b/drivers/net/bnxt/bnxt_hwrm.h
+@@ -120,6 +120,26 @@ struct bnxt_pf_resource_info {
+ 
+ #define BNXT_CTX_VAL_INVAL	0xFFFF
+ 
++#define BNXT_TUNNELED_OFFLOADS_CAP_VXLAN_EN(bp)		\
++	(!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_VXLAN))
++#define BNXT_TUNNELED_OFFLOADS_CAP_NGE_EN(bp)		\
++	(!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_NGE))
++#define BNXT_TUNNELED_OFFLOADS_CAP_GRE_EN(bp)		\
++	(!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_GRE))
++#define BNXT_TUNNELED_OFFLOADS_CAP_IPINIP_EN(bp)	\
++	(!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_IPINIP))
++
++/*
++ * If the device supports VXLAN, GRE, IPIP and GENEVE tunnel parsing, then report
++ * RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM, RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM and
++ * RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM in the Rx/Tx offload capabilities of the device.
++ */
++#define BNXT_TUNNELED_OFFLOADS_CAP_ALL_EN(bp)			\
++	(BNXT_TUNNELED_OFFLOADS_CAP_VXLAN_EN(bp) &&		\
++	 BNXT_TUNNELED_OFFLOADS_CAP_NGE_EN(bp)   &&		\
++	 BNXT_TUNNELED_OFFLOADS_CAP_GRE_EN(bp)   &&		\
++	 BNXT_TUNNELED_OFFLOADS_CAP_IPINIP_EN(bp))
++
+ int bnxt_hwrm_cfa_l2_clear_rx_mask(struct bnxt *bp,
+ 				   struct bnxt_vnic_info *vnic);
+ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, struct bnxt_vnic_info *vnic,
+diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
+index 7959d48f47..f597f376e6 100644
+--- a/drivers/net/bnxt/bnxt_rxq.c
++++ b/drivers/net/bnxt/bnxt_rxq.c
+@@ -34,14 +34,15 @@ uint64_t bnxt_get_rx_port_offloads(struct bnxt *bp)
+ 			  DEV_RX_OFFLOAD_SCATTER |
+ 			  DEV_RX_OFFLOAD_RSS_HASH;
+ 
+-	rx_offload_capa |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
+-			   DEV_RX_OFFLOAD_OUTER_UDP_CKSUM;
+-
+ 	if (bp->flags & BNXT_FLAG_PTP_SUPPORTED)
+ 		rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP;
+ 	if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP)
+ 		rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_STRIP;
+ 
++	if (BNXT_TUNNELED_OFFLOADS_CAP_ALL_EN(bp))
++		rx_offload_capa |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
++				   DEV_RX_OFFLOAD_OUTER_UDP_CKSUM;
++
+ 	return rx_offload_capa;
+ }
+ 
+diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
+index bc1797095d..d282d077ea 100644
+--- a/drivers/net/bnxt/bnxt_txq.c
++++ b/drivers/net/bnxt/bnxt_txq.c
+@@ -8,6 +8,7 @@
+ #include <rte_malloc.h>
+ 
+ #include "bnxt.h"
++#include "bnxt_hwrm.h"
+ #include "bnxt_ring.h"
+ #include "bnxt_txq.h"
+ #include "bnxt_txr.h"
+@@ -27,15 +28,21 @@ uint64_t bnxt_get_tx_port_offloads(struct bnxt *bp)
+ 			  DEV_TX_OFFLOAD_QINQ_INSERT |
+ 			  DEV_TX_OFFLOAD_MULTI_SEGS;
+ 
+-	tx_offload_capa |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
+-			   DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
+-			   DEV_TX_OFFLOAD_GRE_TNL_TSO |
+-			   DEV_TX_OFFLOAD_IPIP_TNL_TSO |
+-			   DEV_TX_OFFLOAD_GENEVE_TNL_TSO;
+-
+ 	if (bp->fw_cap & BNXT_FW_CAP_VLAN_TX_INSERT)
+ 		tx_offload_capa |= DEV_TX_OFFLOAD_VLAN_INSERT;
+ 
++	if (BNXT_TUNNELED_OFFLOADS_CAP_ALL_EN(bp))
++		tx_offload_capa |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
++
++	if (BNXT_TUNNELED_OFFLOADS_CAP_VXLAN_EN(bp))
++		tx_offload_capa |= DEV_TX_OFFLOAD_VXLAN_TNL_TSO;
++	if (BNXT_TUNNELED_OFFLOADS_CAP_GRE_EN(bp))
++		tx_offload_capa |= DEV_TX_OFFLOAD_GRE_TNL_TSO;
++	if (BNXT_TUNNELED_OFFLOADS_CAP_NGE_EN(bp))
++		tx_offload_capa |= DEV_TX_OFFLOAD_GENEVE_TNL_TSO;
++	if (BNXT_TUNNELED_OFFLOADS_CAP_IPINIP_EN(bp))
++		tx_offload_capa |= DEV_TX_OFFLOAD_IPIP_TNL_TSO;
++
+ 	return tx_offload_capa;
+ }
+ 
+diff --git a/drivers/net/bnxt/hsi_struct_def_dpdk.h b/drivers/net/bnxt/hsi_struct_def_dpdk.h
+index 81fc68d0c9..f905181d3b 100644
+--- a/drivers/net/bnxt/hsi_struct_def_dpdk.h
++++ b/drivers/net/bnxt/hsi_struct_def_dpdk.h
+@@ -10718,7 +10718,7 @@ struct hwrm_func_qcaps_input {
+ 	uint8_t	unused_0[6];
+ } __rte_packed;
+ 
+-/* hwrm_func_qcaps_output (size:704b/88B) */
++/* hwrm_func_qcaps_output (size:768b/96B) */
+ struct hwrm_func_qcaps_output {
+ 	/* The specific error status for the command. */
+ 	uint16_t	error_code;
+@@ -11082,7 +11082,13 @@ struct hwrm_func_qcaps_output {
+ 	 * (max_tx_rings) to the function.
+ 	 */
+ 	uint16_t	max_sp_tx_rings;
+-	uint8_t	unused_0[2];
++	/*
++	 * The maximum number of MSI-X vectors that may be allocated across
++	 * all VFs for the function. This is valid only on the PF with SR-IOV
++	 * enabled. Returns zero if this command is called on a PF with
++	 * SR-IOV disabled or on a VF.
++	 */
++	uint16_t	max_msix_vfs;
+ 	uint32_t	flags_ext;
+ 	/*
+ 	 * If 1, the device can be configured to set the ECN bits in the
+@@ -11164,6 +11170,70 @@ struct hwrm_func_qcaps_output {
+ 	 * to the primate processor block.
+ 	 */
+ 	#define HWRM_FUNC_QCAPS_OUTPUT_MPC_CHNLS_CAP_PRIMATE     UINT32_C(0x10)
++	/*
++	 * Maximum number of Key Contexts supported per HWRM
++	 * function call for allocating Key Contexts.
++	 */
++	uint16_t	max_key_ctxs_alloc;
++	uint32_t	flags_ext2;
++	/*
++	 * When this bit is '1', it indicates that FW will support
++	 * timestamping on all RX packets, not just PTP type packets.
++	 */
++	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_RX_ALL_PKTS_TIMESTAMPS_SUPPORTED \
++		UINT32_C(0x1)
++	/* When this bit is '1', it indicates that HW and FW support QUIC. */
++	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_QUIC_SUPPORTED \
++		UINT32_C(0x2)
++	uint16_t	tunnel_disable_flag;
++	/*
++	 * When this bit is '1', it indicates that the VXLAN parsing
++	 * is disabled in hardware
++	 */
++	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_VXLAN \
++		UINT32_C(0x1)
++	/*
++	 * When this bit is '1', it indicates that the NGE parsing
++	 * is disabled in hardware
++	 */
++	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_NGE \
++		UINT32_C(0x2)
++	/*
++	 * When this bit is '1', it indicates that the NVGRE parsing
++	 * is disabled in hardware
++	 */
++	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_NVGRE \
++		UINT32_C(0x4)
++	/*
++	 * When this bit is '1', it indicates that the L2GRE parsing
++	 * is disabled in hardware
++	 */
++	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_L2GRE \
++		UINT32_C(0x8)
++	/*
++	 * When this bit is '1', it indicates that the GRE parsing
++	 * is disabled in hardware
++	 */
++	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_GRE \
++		UINT32_C(0x10)
++	/*
++	 * When this bit is '1', it indicates that the IPINIP parsing
++	 * is disabled in hardware
++	 */
++	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_IPINIP \
++		UINT32_C(0x20)
++	/*
++	 * When this bit is '1', it indicates that the MPLS parsing
++	 * is disabled in hardware
++	 */
++	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_MPLS \
++		UINT32_C(0x40)
++	/*
++	 * When this bit is '1', it indicates that the PPPOE parsing
++	 * is disabled in hardware
++	 */
++	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_PPPOE \
++		UINT32_C(0x80)
+ 	uint8_t	unused_1;
+ 	/*
+ 	 * This field is used in Output records to indicate that the output
+-- 
+2.35.1
+

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

* patch 'net/mlx5: fix RSS hash types adjustment' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (113 preceding siblings ...)
  2022-06-21  8:03 ` patch 'net/bnxt: fix tunnel stateless offloads' " Xueming Li
@ 2022-06-21  8:03 ` Xueming Li
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
  115 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-06-21  8:03 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/40b12a05613e84f38acffcfc2965b752edc3c7b9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 40b12a05613e84f38acffcfc2965b752edc3c7b9 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Mon, 20 Jun 2022 10:37:28 +0000
Subject: [PATCH] net/mlx5: fix RSS hash types adjustment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d2fa2632a4a17b491f9a15834d9e13c6a6e5a1b9 ]

When an indirect action was created with an RSS action configured to
hash on both source and destination L3 addresses (or L4 ports), it caused
shared hrxq to be configured to hash only on destination address
(or port).

This patch fixes this behavior by refining RSS types specified in
configuration before calculating hash types used for hrxq. Refining RSS
types removes *_SRC_ONLY and *_DST_ONLY flags if they are both set.

Fixes: 212d17b6a650 ("net/mlx5: fix missing shared RSS hash types")
Cc: stable@dpdk.org

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index aa22e85f6a..c1505b69e6 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -11567,8 +11567,8 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
  * MLX5_RSS_HASH_IPV4_DST_ONLY are mutually exclusive so they can share
  * same slot in mlx5_rss_hash_fields.
  *
- * @param[in] rss
- *   Pointer to the shared action RSS conf.
+ * @param[in] orig_rss_types
+ *   RSS type as provided in shared RSS action.
  * @param[in, out] hash_field
  *   hash_field variable needed to be adjusted.
  *
@@ -11576,10 +11576,10 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
  *   void
  */
 static void
-__flow_dv_action_rss_l34_hash_adjust(struct mlx5_shared_action_rss *rss,
+__flow_dv_action_rss_l34_hash_adjust(uint64_t orig_rss_types,
 				     uint64_t *hash_field)
 {
-	uint64_t rss_types = rss->origin.types;
+	uint64_t rss_types = rte_eth_rss_hf_refine(orig_rss_types);
 
 	switch (*hash_field & ~IBV_RX_HASH_INNER) {
 	case MLX5_RSS_HASH_IPV4:
@@ -11680,7 +11680,8 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev,
 		uint64_t hash_fields = mlx5_rss_hash_fields[i];
 		int tunnel = 0;
 
-		__flow_dv_action_rss_l34_hash_adjust(shared_rss, &hash_fields);
+		__flow_dv_action_rss_l34_hash_adjust(shared_rss->origin.types,
+						     &hash_fields);
 		if (shared_rss->origin.level > 1) {
 			hash_fields |= IBV_RX_HASH_INNER;
 			tunnel = 1;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:54.354196046 +0800
+++ 0115-net-mlx5-fix-RSS-hash-types-adjustment.patch	2022-06-21 15:37:49.287785472 +0800
@@ -1 +1 @@
-From d2fa2632a4a17b491f9a15834d9e13c6a6e5a1b9 Mon Sep 17 00:00:00 2001
+From 40b12a05613e84f38acffcfc2965b752edc3c7b9 Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Thu, 21 Apr 2022 20:36:56 +0000
+Date: Mon, 20 Jun 2022 10:37:28 +0000
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d2fa2632a4a17b491f9a15834d9e13c6a6e5a1b9 ]
@@ -21,2 +24,2 @@
- drivers/net/mlx5/mlx5_flow_dv.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
+ drivers/net/mlx5/mlx5_flow_dv.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
@@ -25 +28 @@
-index da2ddd58cd..cb5006bb11 100644
+index aa22e85f6a..c1505b69e6 100644
@@ -28 +31 @@
-@@ -14793,8 +14793,8 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
+@@ -11567,8 +11567,8 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
@@ -32,2 +35,2 @@
-- * @param[in] rss_types
-- *   RSS type.
+- * @param[in] rss
+- *   Pointer to the shared action RSS conf.
@@ -39 +42 @@
-@@ -14802,9 +14802,11 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
+@@ -11576,10 +11576,10 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
@@ -42,4 +45,4 @@
- void
--flow_dv_action_rss_l34_hash_adjust(uint64_t rss_types,
-+flow_dv_action_rss_l34_hash_adjust(uint64_t orig_rss_types,
- 				   uint64_t *hash_field)
+ static void
+-__flow_dv_action_rss_l34_hash_adjust(struct mlx5_shared_action_rss *rss,
++__flow_dv_action_rss_l34_hash_adjust(uint64_t orig_rss_types,
+ 				     uint64_t *hash_field)
@@ -46,0 +50 @@
+-	uint64_t rss_types = rss->origin.types;
@@ -48 +52 @@
-+
+ 
@@ -51 +55,10 @@
- 		if (rss_types & MLX5_IPV4_LAYER_TYPES) {
+@@ -11680,7 +11680,8 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev,
+ 		uint64_t hash_fields = mlx5_rss_hash_fields[i];
+ 		int tunnel = 0;
+ 
+-		__flow_dv_action_rss_l34_hash_adjust(shared_rss, &hash_fields);
++		__flow_dv_action_rss_l34_hash_adjust(shared_rss->origin.types,
++						     &hash_fields);
+ 		if (shared_rss->origin.level > 1) {
+ 			hash_fields |= IBV_RX_HASH_INNER;
+ 			tunnel = 1;

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

* patch 'vdpa/ifc: fix build with GCC 12' has been queued to stable release 20.11.6
  2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
                   ` (114 preceding siblings ...)
  2022-06-21  8:03 ` patch 'net/mlx5: fix RSS hash types adjustment' " Xueming Li
@ 2022-07-20  8:20 ` Xueming Li
  2022-07-20  8:20   ` patch 'app/flow-perf: " Xueming Li
                     ` (61 more replies)
  115 siblings, 62 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: David Marchand; +Cc: xuemingl, Xiao Wang, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b089558de0e5b14c38ee700bd3b0885574fb8c11

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b089558de0e5b14c38ee700bd3b0885574fb8c11 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 18 May 2022 12:16:54 +0200
Subject: [PATCH] vdpa/ifc: fix build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2a213b794fdd255fde7581a7c9bd034ab39e9b6a ]

GCC 12 raises the following warning:

../drivers/vdpa/ifc/ifcvf_vdpa.c: In function ‘vdpa_enable_vfio_intr’:
../drivers/vdpa/ifc/ifcvf_vdpa.c:383:62: error: writing 4 bytes into a
    region of size 0 [-Werror=stringop-overflow=]
  383 |                         fd_ptr[RTE_INTR_VEC_RXTX_OFFSET + i] = fd;
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
../drivers/vdpa/ifc/ifcvf_vdpa.c:348:14: note: at offset 32 into
    destination object ‘irq_set_buf’ of size 32
  348 |         char irq_set_buf[MSIX_IRQ_SET_BUF_LEN];
      |              ^~~~~~~~~~~

Validate number of vrings to avoid out of bound access.

Bugzilla ID: 855

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index 6a1b44bc77..85bca09377 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -357,6 +357,8 @@ vdpa_enable_vfio_intr(struct ifcvf_internal *internal, bool m_rx)
 	vring.callfd = -1;
 
 	nr_vring = rte_vhost_get_vring_num(internal->vid);
+	if (nr_vring > IFCVF_MAX_QUEUES * 2)
+		return -1;
 
 	irq_set = (struct vfio_irq_set *)irq_set_buf;
 	irq_set->argsz = sizeof(irq_set_buf);
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:58.883526527 +0800
+++ 0001-vdpa-ifc-fix-build-with-GCC-12.patch	2022-07-20 15:00:58.637667282 +0800
@@ -1 +1 @@
-From 2a213b794fdd255fde7581a7c9bd034ab39e9b6a Mon Sep 17 00:00:00 2001
+From b089558de0e5b14c38ee700bd3b0885574fb8c11 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2a213b794fdd255fde7581a7c9bd034ab39e9b6a ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -34 +36 @@
-index 40a18b2507..8bc971cb12 100644
+index 6a1b44bc77..85bca09377 100644
@@ -37 +39 @@
-@@ -388,6 +388,8 @@ vdpa_enable_vfio_intr(struct ifcvf_internal *internal, bool m_rx)
+@@ -357,6 +357,8 @@ vdpa_enable_vfio_intr(struct ifcvf_internal *internal, bool m_rx)

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

* patch 'app/flow-perf: fix build with GCC 12' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'trace: fix init with long file prefix' " Xueming Li
                     ` (60 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: David Marchand; +Cc: xuemingl, Bruce Richardson, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3582b40156df314c5d129fc89d39634c17edc98d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3582b40156df314c5d129fc89d39634c17edc98d Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 18 May 2022 12:16:56 +0200
Subject: [PATCH] app/flow-perf: fix build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5fc2eece8d4530988e5681fdc8a35e14d69b2a6f ]

GCC 12 raises the following warning:

../app/test-flow-perf/main.c: In function ‘start_forwarding’:
../app/test-flow-perf/main.c:1737:28: error: ‘sprintf’ may write a
    terminating nul past the end of the destination
    [-Werror=format-overflow=]
 1737 |         sprintf(p[i++], "%d", (int)n);
      |                            ^
In function ‘pretty_number’,
    inlined from ‘packet_per_second_stats’ at
        ../app/test-flow-perf/main.c:1792:4,
    inlined from ‘start_forwarding’ at
        ../app/test-flow-perf/main.c:1831:3:
[...]

We can simplify this code and rely on libc integer formatting via
this system locales.

Bugzilla ID: 856

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test-flow-perf/main.c | 48 ++++++++-------------------------------
 1 file changed, 9 insertions(+), 39 deletions(-)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index 3b3ecdc75e..899f6c93b6 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -16,6 +16,7 @@
  * gives packet per second measurement.
  */
 
+#include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -1044,36 +1045,6 @@ do_tx(struct lcore_info *li, uint16_t cnt, uint16_t tx_port,
 		rte_pktmbuf_free(li->pkts[i]);
 }
 
-/*
- * Method to convert numbers into pretty numbers that easy
- * to read. The design here is to add comma after each three
- * digits and set all of this inside buffer.
- *
- * For example if n = 1799321, the output will be
- * 1,799,321 after this method which is easier to read.
- */
-static char *
-pretty_number(uint64_t n, char *buf)
-{
-	char p[6][4];
-	int i = 0;
-	int off = 0;
-
-	while (n > 1000) {
-		sprintf(p[i], "%03d", (int)(n % 1000));
-		n /= 1000;
-		i += 1;
-	}
-
-	sprintf(p[i++], "%d", (int)n);
-
-	while (i--)
-		off += sprintf(buf + off, "%s,", p[i]);
-	buf[strlen(buf) - 1] = '\0';
-
-	return buf;
-}
-
 static void
 packet_per_second_stats(void)
 {
@@ -1095,7 +1066,6 @@ packet_per_second_stats(void)
 		uint64_t total_rx_pkts = 0;
 		uint64_t total_tx_drops = 0;
 		uint64_t tx_delta, rx_delta, drops_delta;
-		char buf[3][32];
 		int nr_valid_core = 0;
 
 		sleep(1);
@@ -1120,10 +1090,8 @@ packet_per_second_stats(void)
 			tx_delta    = li->tx_pkts  - oli->tx_pkts;
 			rx_delta    = li->rx_pkts  - oli->rx_pkts;
 			drops_delta = li->tx_drops - oli->tx_drops;
-			printf("%6d %16s %16s %16s\n", i,
-				pretty_number(tx_delta,    buf[0]),
-				pretty_number(drops_delta, buf[1]),
-				pretty_number(rx_delta,    buf[2]));
+			printf("%6d %'16"PRId64" %'16"PRId64" %'16"PRId64"\n",
+				i, tx_delta, drops_delta, rx_delta);
 
 			total_tx_pkts  += tx_delta;
 			total_rx_pkts  += rx_delta;
@@ -1134,10 +1102,9 @@ packet_per_second_stats(void)
 		}
 
 		if (nr_valid_core > 1) {
-			printf("%6s %16s %16s %16s\n", "total",
-				pretty_number(total_tx_pkts,  buf[0]),
-				pretty_number(total_tx_drops, buf[1]),
-				pretty_number(total_rx_pkts,  buf[2]));
+			printf("%6s %'16"PRId64" %'16"PRId64" %'16"PRId64"\n",
+				"total", total_tx_pkts, total_tx_drops,
+				total_rx_pkts);
 			nr_lines += 1;
 		}
 
@@ -1441,6 +1408,9 @@ main(int argc, char **argv)
 	if (argc > 1)
 		args_parse(argc, argv);
 
+	/* For more fancy, localised integer formatting. */
+	setlocale(LC_NUMERIC, "");
+
 	init_port();
 
 	nb_lcores = rte_lcore_count();
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:58.921991922 +0800
+++ 0002-app-flow-perf-fix-build-with-GCC-12.patch	2022-07-20 15:00:58.641000610 +0800
@@ -1 +1 @@
-From 5fc2eece8d4530988e5681fdc8a35e14d69b2a6f Mon Sep 17 00:00:00 2001
+From 3582b40156df314c5d129fc89d39634c17edc98d Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5fc2eece8d4530988e5681fdc8a35e14d69b2a6f ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +40 @@
-index 56d43734e3..f375097028 100644
+index 3b3ecdc75e..899f6c93b6 100644
@@ -49 +51 @@
-@@ -1713,36 +1714,6 @@ do_tx(struct lcore_info *li, uint16_t cnt, uint16_t tx_port,
+@@ -1044,36 +1045,6 @@ do_tx(struct lcore_info *li, uint16_t cnt, uint16_t tx_port,
@@ -86 +88 @@
-@@ -1764,7 +1735,6 @@ packet_per_second_stats(void)
+@@ -1095,7 +1066,6 @@ packet_per_second_stats(void)
@@ -94 +96 @@
-@@ -1789,10 +1759,8 @@ packet_per_second_stats(void)
+@@ -1120,10 +1090,8 @@ packet_per_second_stats(void)
@@ -107 +109 @@
-@@ -1803,10 +1771,9 @@ packet_per_second_stats(void)
+@@ -1134,10 +1102,9 @@ packet_per_second_stats(void)
@@ -121 +123 @@
-@@ -2139,6 +2106,9 @@ main(int argc, char **argv)
+@@ -1441,6 +1408,9 @@ main(int argc, char **argv)

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

* patch 'trace: fix init with long file prefix' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
  2022-07-20  8:20   ` patch 'app/flow-perf: " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'eal/x86: drop export of internal alignment macro' " Xueming Li
                     ` (59 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: xuemingl, David Marchand, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a6388c75952c77411d8bdea305433283428ada55

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a6388c75952c77411d8bdea305433283428ada55 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 17 Jun 2022 10:29:11 +0800
Subject: [PATCH] trace: fix init with long file prefix
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d59a940667989461e2916207e7fbb8148504c44f ]

Bug scenario:
1. start testpmd:
  $ dpdk-testpmd -l 4-6 -a 0000:7d:00.0 --trace=.* \
    --file-prefix=trace_autotest -- -i
2. then observed:
  EAL: eal_trace_init():93 failed to initialize trace [File exists]
  EAL: FATAL: Cannot init trace
  EAL: Cannot init trace
  EAL: Error - exiting with code: 1

The root cause it that the offset set wrong with long file-prefix and
then lead the strftime return failed.

At the same time, trace_session_name_generate() uses errno as the return
value, but the errno was not set if strftime returned zero.
A previously set errno (EEXIST or ENOENT from call to mkdir for creating
the runtime configuration directory) was returned in this case.
This is fragile and may lead to incorrect logic if errno was set
to 0 previously.
This also resulted in inaccurate prompting.
Set errno to ENOSPC if strftime return zero.

Fixes: 321dd5f8fa62 ("trace: add internal init and fini interface")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/librte_eal/common/eal_common_trace_utils.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_trace_utils.c b/lib/librte_eal/common/eal_common_trace_utils.c
index 64f58fb66a..2b55dbec65 100644
--- a/lib/librte_eal/common/eal_common_trace_utils.c
+++ b/lib/librte_eal/common/eal_common_trace_utils.c
@@ -104,13 +104,15 @@ trace_session_name_generate(char *trace_dir)
 	rc = rte_strscpy(trace_dir, eal_get_hugefile_prefix(),
 			TRACE_PREFIX_LEN);
 	if (rc == -E2BIG)
-		rc = TRACE_PREFIX_LEN;
+		rc = TRACE_PREFIX_LEN - 1;
 	trace_dir[rc++] = '-';
 
 	rc = strftime(trace_dir + rc, TRACE_DIR_STR_LEN - rc,
 			"%Y-%m-%d-%p-%I-%M-%S", tm_result);
-	if (rc == 0)
+	if (rc == 0) {
+		errno = ENOSPC;
 		goto fail;
+	}
 
 	return rc;
 fail:
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:58.963368636 +0800
+++ 0003-trace-fix-init-with-long-file-prefix.patch	2022-07-20 15:00:58.641000610 +0800
@@ -1 +1 @@
-From d59a940667989461e2916207e7fbb8148504c44f Mon Sep 17 00:00:00 2001
+From a6388c75952c77411d8bdea305433283428ada55 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d59a940667989461e2916207e7fbb8148504c44f ]
@@ -29 +31,0 @@
-Cc: stable@dpdk.org
@@ -35 +37 @@
- lib/eal/common/eal_common_trace_utils.c | 6 ++++--
+ lib/librte_eal/common/eal_common_trace_utils.c | 6 ++++--
@@ -38 +40 @@
-diff --git a/lib/eal/common/eal_common_trace_utils.c b/lib/eal/common/eal_common_trace_utils.c
+diff --git a/lib/librte_eal/common/eal_common_trace_utils.c b/lib/librte_eal/common/eal_common_trace_utils.c
@@ -40,2 +42,2 @@
---- a/lib/eal/common/eal_common_trace_utils.c
-+++ b/lib/eal/common/eal_common_trace_utils.c
+--- a/lib/librte_eal/common/eal_common_trace_utils.c
++++ b/lib/librte_eal/common/eal_common_trace_utils.c

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

* patch 'eal/x86: drop export of internal alignment macro' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
  2022-07-20  8:20   ` patch 'app/flow-perf: " Xueming Li
  2022-07-20  8:20   ` patch 'trace: fix init with long file prefix' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'baseband/acc100: update companion PF configure function' " Xueming Li
                     ` (58 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: David Marchand; +Cc: xuemingl, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/10cdabfc105d755bbc5fcab507fb807c2024dd21

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 10cdabfc105d755bbc5fcab507fb807c2024dd21 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 21 Jun 2022 16:13:25 +0200
Subject: [PATCH] eal/x86: drop export of internal alignment macro
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 11f61ea2f6fcdd88df2a81b82235ddb7033c3e5d ]

ALIGNMENT_MASK is only used internally.
Besides it lacks a DPDK-related prefix.
Hide it from external eyes.

Fixes: f5472703c0bd ("eal: optimize aligned memcpy on x86")

Reported-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/x86/include/rte_memcpy.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h
index 18aa4e43a7..b678b5c942 100644
--- a/lib/librte_eal/x86/include/rte_memcpy.h
+++ b/lib/librte_eal/x86/include/rte_memcpy.h
@@ -851,6 +851,8 @@ rte_memcpy(void *dst, const void *src, size_t n)
 		return rte_memcpy_generic(dst, src, n);
 }
 
+#undef ALIGNMENT_MASK
+
 #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
 #pragma GCC diagnostic pop
 #endif
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.004076628 +0800
+++ 0004-eal-x86-drop-export-of-internal-alignment-macro.patch	2022-07-20 15:00:58.641000610 +0800
@@ -1 +1 @@
-From 11f61ea2f6fcdd88df2a81b82235ddb7033c3e5d Mon Sep 17 00:00:00 2001
+From 10cdabfc105d755bbc5fcab507fb807c2024dd21 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 11f61ea2f6fcdd88df2a81b82235ddb7033c3e5d ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/eal/x86/include/rte_memcpy.h | 2 ++
+ lib/librte_eal/x86/include/rte_memcpy.h | 2 ++
@@ -22 +24 @@
-diff --git a/lib/eal/x86/include/rte_memcpy.h b/lib/eal/x86/include/rte_memcpy.h
+diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h
@@ -24,2 +26,2 @@
---- a/lib/eal/x86/include/rte_memcpy.h
-+++ b/lib/eal/x86/include/rte_memcpy.h
+--- a/lib/librte_eal/x86/include/rte_memcpy.h
++++ b/lib/librte_eal/x86/include/rte_memcpy.h

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

* patch 'baseband/acc100: update companion PF configure function' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (2 preceding siblings ...)
  2022-07-20  8:20   ` patch 'eal/x86: drop export of internal alignment macro' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'baseband/acc100: add protection for some negative scenario' " Xueming Li
                     ` (57 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: xuemingl, Hernan Vargas, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/34d98de156c15de15fbe53f3c82edc762b50e96c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 34d98de156c15de15fbe53f3c82edc762b50e96c Mon Sep 17 00:00:00 2001
From: Nicolas Chautru <nicolas.chautru@intel.com>
Date: Tue, 31 May 2022 15:31:42 -0700
Subject: [PATCH] baseband/acc100: update companion PF configure function
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 60a623408bf3df2e15f7d497b3c36359612fb183 ]

Update of the device configuration function from PF used for bbdev-test
to latest sequence for ACC199 PRQ device and matching version in
pf_bb_config 22.03.

Fixes: b17d70922d5d ("baseband/acc100: add configure function")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Hernan Vargas <hernan.vargas@intel.com>
---
 drivers/baseband/acc100/acc100_pf_enum.h |  18 +++
 drivers/baseband/acc100/rte_acc100_pmd.c | 163 +++++++++++++++++------
 drivers/baseband/acc100/rte_acc100_pmd.h |  20 ++-
 3 files changed, 153 insertions(+), 48 deletions(-)

diff --git a/drivers/baseband/acc100/acc100_pf_enum.h b/drivers/baseband/acc100/acc100_pf_enum.h
index a1ee416d26..2fba667627 100644
--- a/drivers/baseband/acc100/acc100_pf_enum.h
+++ b/drivers/baseband/acc100/acc100_pf_enum.h
@@ -238,6 +238,24 @@ enum {
 	HWPfPermonBTotalLatLowBusMon          =  0x00BAC504,
 	HWPfPermonBTotalLatUpperBusMon        =  0x00BAC508,
 	HWPfPermonBTotalReqCntBusMon          =  0x00BAC50C,
+	HwPfFabI2MArbCntrlReg                 =  0x00BB0000,
+	HWPfFabricMode                        =  0x00BB1000,
+	HwPfFabI2MGrp0DebugReg                =  0x00BBF000,
+	HwPfFabI2MGrp1DebugReg                =  0x00BBF004,
+	HwPfFabI2MGrp2DebugReg                =  0x00BBF008,
+	HwPfFabI2MGrp3DebugReg                =  0x00BBF00C,
+	HwPfFabI2MBuf0DebugReg                =  0x00BBF010,
+	HwPfFabI2MBuf1DebugReg                =  0x00BBF014,
+	HwPfFabI2MBuf2DebugReg                =  0x00BBF018,
+	HwPfFabI2MBuf3DebugReg                =  0x00BBF01C,
+	HwPfFabM2IBuf0Grp0DebugReg            =  0x00BBF020,
+	HwPfFabM2IBuf1Grp0DebugReg            =  0x00BBF024,
+	HwPfFabM2IBuf0Grp1DebugReg            =  0x00BBF028,
+	HwPfFabM2IBuf1Grp1DebugReg            =  0x00BBF02C,
+	HwPfFabM2IBuf0Grp2DebugReg            =  0x00BBF030,
+	HwPfFabM2IBuf1Grp2DebugReg            =  0x00BBF034,
+	HwPfFabM2IBuf0Grp3DebugReg            =  0x00BBF038,
+	HwPfFabM2IBuf1Grp3DebugReg            =  0x00BBF03C,
 	HWPfFecUl5gCntrlReg                   =  0x00BC0000,
 	HWPfFecUl5gI2MThreshReg               =  0x00BC0004,
 	HWPfFecUl5gVersionReg                 =  0x00BC0100,
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index c13eb454f9..29b2f14807 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -141,8 +141,8 @@ aqDepth(int qg_idx, struct rte_acc100_conf *acc100_conf)
 	int acc_enum = accFromQgid(qg_idx, acc100_conf);
 	qtopFromAcc(&q_top, acc_enum, acc100_conf);
 	if (unlikely(q_top == NULL))
-		return 0;
-	return q_top->aq_depth_log2;
+		return 1;
+	return RTE_MAX(1, q_top->aq_depth_log2);
 }
 
 /* Return the AQ depth for a Queue Group Index */
@@ -4406,7 +4406,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 {
 	rte_bbdev_log(INFO, "rte_acc100_configure");
 	uint32_t value, address, status;
-	int qg_idx, template_idx, vf_idx, acc, i;
+	int qg_idx, template_idx, vf_idx, acc, i, j;
 	struct rte_bbdev *bbdev = rte_bbdev_get_named_dev(dev_name);
 
 	/* Compile time checks */
@@ -4426,6 +4426,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	/* Store configuration */
 	rte_memcpy(&d->acc100_conf, conf, sizeof(d->acc100_conf));
 
+	value = acc100_reg_read(d, HwPfPcieGpexBridgeControl);
+	bool firstCfg = (value != ACC100_CFG_PCI_BRIDGE);
+
 	/* PCIe Bridge configuration */
 	acc100_reg_write(d, HwPfPcieGpexBridgeControl, ACC100_CFG_PCI_BRIDGE);
 	for (i = 1; i < ACC100_GPEX_AXIMAP_NUM; i++)
@@ -4446,20 +4449,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	value = 1;
 	acc100_reg_write(d, address, value);
 
-	/* DDR Configuration */
-	address = HWPfDdrBcTim6;
-	value = acc100_reg_read(d, address);
-	value &= 0xFFFFFFFB; /* Bit 2 */
-#ifdef ACC100_DDR_ECC_ENABLE
-	value |= 0x4;
-#endif
-	acc100_reg_write(d, address, value);
-	address = HWPfDdrPhyDqsCountNum;
-#ifdef ACC100_DDR_ECC_ENABLE
-	value = 9;
-#else
-	value = 8;
-#endif
+	/* Enable granular dynamic clock gating */
+	address = HWPfHiClkGateHystReg;
+	value = ACC100_CLOCK_GATING_EN;
 	acc100_reg_write(d, address, value);
 
 	/* Set default descriptor signature */
@@ -4477,6 +4469,17 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	address = HWPfDmaAxcacheReg;
 	acc100_reg_write(d, address, value);
 
+	/* Adjust PCIe Lane adaptation */
+	for (i = 0; i < ACC100_QUAD_NUMS; i++)
+		for (j = 0; j < ACC100_LANES_PER_QUAD; j++)
+			acc100_reg_write(d, HwPfPcieLnAdaptctrl + i * ACC100_PCIE_QUAD_OFFSET
+					+ j * ACC100_PCIE_LANE_OFFSET, ACC100_ADAPT);
+
+	/* Enable PCIe live adaptation */
+	for (i = 0; i < ACC100_QUAD_NUMS; i++)
+		acc100_reg_write(d, HwPfPciePcsEqControl +
+				i * ACC100_PCIE_QUAD_OFFSET, ACC100_PCS_EQ);
+
 	/* Default DMA Configuration (Qmgr Enabled) */
 	address = HWPfDmaConfig0Reg;
 	value = 0;
@@ -4495,6 +4498,11 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	value = HWPfQmgrEgressQueuesTemplate;
 	acc100_reg_write(d, address, value);
 
+	/* Default Fabric Mode */
+	address = HWPfFabricMode;
+	value = ACC100_FABRIC_MODE;
+	acc100_reg_write(d, address, value);
+
 	/* ===== Qmgr Configuration ===== */
 	/* Configuration of the AQueue Depth QMGR_GRP_0_DEPTH_LOG2 for UL */
 	int totalQgs = conf->q_ul_4g.num_qgroups +
@@ -4513,22 +4521,17 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	}
 
 	/* Template Priority in incremental order */
-	for (template_idx = 0; template_idx < ACC100_NUM_TMPL;
-			template_idx++) {
-		address = HWPfQmgrGrpTmplateReg0Indx +
-		ACC100_BYTES_IN_WORD * (template_idx % 8);
+	for (template_idx = 0; template_idx < ACC100_NUM_TMPL; template_idx++) {
+		address = HWPfQmgrGrpTmplateReg0Indx + ACC100_BYTES_IN_WORD * template_idx;
 		value = ACC100_TMPL_PRI_0;
 		acc100_reg_write(d, address, value);
-		address = HWPfQmgrGrpTmplateReg1Indx +
-		ACC100_BYTES_IN_WORD * (template_idx % 8);
+		address = HWPfQmgrGrpTmplateReg1Indx + ACC100_BYTES_IN_WORD * template_idx;
 		value = ACC100_TMPL_PRI_1;
 		acc100_reg_write(d, address, value);
-		address = HWPfQmgrGrpTmplateReg2indx +
-		ACC100_BYTES_IN_WORD * (template_idx % 8);
+		address = HWPfQmgrGrpTmplateReg2indx + ACC100_BYTES_IN_WORD * template_idx;
 		value = ACC100_TMPL_PRI_2;
 		acc100_reg_write(d, address, value);
-		address = HWPfQmgrGrpTmplateReg3Indx +
-		ACC100_BYTES_IN_WORD * (template_idx % 8);
+		address = HWPfQmgrGrpTmplateReg3Indx + ACC100_BYTES_IN_WORD * template_idx;
 		value = ACC100_TMPL_PRI_3;
 		acc100_reg_write(d, address, value);
 	}
@@ -4579,9 +4582,6 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 			numEngines++;
 		} else
 			acc100_reg_write(d, address, 0);
-#if RTE_ACC100_SINGLE_FEC == 1
-		value = 0;
-#endif
 	}
 	printf("Number of 5GUL engines %d\n", numEngines);
 	/* 4GDL */
@@ -4596,9 +4596,6 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 		address = HWPfQmgrGrpTmplateReg4Indx
 				+ ACC100_BYTES_IN_WORD * template_idx;
 		acc100_reg_write(d, address, value);
-#if RTE_ACC100_SINGLE_FEC == 1
-			value = 0;
-#endif
 	}
 	/* 5GDL */
 	numQqsAcc += numQgs;
@@ -4612,13 +4609,10 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 		address = HWPfQmgrGrpTmplateReg4Indx
 				+ ACC100_BYTES_IN_WORD * template_idx;
 		acc100_reg_write(d, address, value);
-#if RTE_ACC100_SINGLE_FEC == 1
-		value = 0;
-#endif
 	}
 
 	/* Queue Group Function mapping */
-	int qman_func_id[5] = {0, 2, 1, 3, 4};
+	int qman_func_id[8] = {0, 2, 1, 3, 4, 0, 0, 0};
 	address = HWPfQmgrGrpFunction0;
 	value = 0;
 	for (qg_idx = 0; qg_idx < 8; qg_idx++) {
@@ -4649,7 +4643,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 		}
 	}
 
-	/* This pointer to ARAM (256kB) is shifted by 2 (4B per register) */
+	/* This pointer to ARAM (128kB) is shifted by 2 (4B per register) */
 	uint32_t aram_address = 0;
 	for (qg_idx = 0; qg_idx < totalQgs; qg_idx++) {
 		for (vf_idx = 0; vf_idx < conf->num_vf_bundles; vf_idx++) {
@@ -4674,6 +4668,11 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 
 	/* ==== HI Configuration ==== */
 
+	/* No Info Ring/MSI by default */
+	acc100_reg_write(d, HWPfHiInfoRingIntWrEnRegPf, 0);
+	acc100_reg_write(d, HWPfHiInfoRingVf2pfLoWrEnReg, 0);
+	acc100_reg_write(d, HWPfHiCfgMsiIntWrEnRegPf, 0xFFFFFFFF);
+	acc100_reg_write(d, HWPfHiCfgMsiVf2pfLoWrEnReg, 0xFFFFFFFF);
 	/* Prevent Block on Transmit Error */
 	address = HWPfHiBlockTransmitOnErrorEn;
 	value = 0;
@@ -4686,10 +4685,6 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	address = HWPfHiPfMode;
 	value = (conf->pf_mode_en) ? ACC100_PF_VAL : 0;
 	acc100_reg_write(d, address, value);
-	/* Enable Error Detection in HW */
-	address = HWPfDmaErrorDetectionEn;
-	value = 0x3D7;
-	acc100_reg_write(d, address, value);
 
 	/* QoS overflow init */
 	value = 1;
@@ -4699,7 +4694,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	acc100_reg_write(d, address, value);
 
 	/* HARQ DDR Configuration */
-	unsigned int ddrSizeInMb = 512; /* Fixed to 512 MB per VF for now */
+	unsigned int ddrSizeInMb = ACC100_HARQ_DDR;
 	for (vf_idx = 0; vf_idx < conf->num_vf_bundles; vf_idx++) {
 		address = HWPfDmaVfDdrBaseRw + vf_idx
 				* 0x10;
@@ -4713,6 +4708,88 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	if (numEngines < (ACC100_SIG_UL_5G_LAST + 1))
 		poweron_cleanup(bbdev, d, conf);
 
+	uint32_t version = 0;
+	for (i = 0; i < 4; i++)
+		version += acc100_reg_read(d,
+				HWPfDdrPhyIdtmFwVersion + 4 * i) << (8 * i);
+	if (version != ACC100_PRQ_DDR_VER) {
+		printf("* Note: Not on DDR PRQ version %8x != %08x\n",
+				version, ACC100_PRQ_DDR_VER);
+	} else if (firstCfg) {
+		/* ---- DDR configuration at boot up --- */
+		/* Read Clear Ddr training status */
+		acc100_reg_read(d, HWPfChaDdrStDoneStatus);
+		/* Reset PHY/IDTM/UMMC */
+		acc100_reg_write(d, HWPfChaDdrWbRstCfg, 3);
+		acc100_reg_write(d, HWPfChaDdrApbRstCfg, 2);
+		acc100_reg_write(d, HWPfChaDdrPhyRstCfg, 2);
+		acc100_reg_write(d, HWPfChaDdrCpuRstCfg, 3);
+		acc100_reg_write(d, HWPfChaDdrSifRstCfg, 2);
+		usleep(ACC100_MS_IN_US);
+		/* Reset WB and APB resets */
+		acc100_reg_write(d, HWPfChaDdrWbRstCfg, 2);
+		acc100_reg_write(d, HWPfChaDdrApbRstCfg, 3);
+		/* Configure PHY-IDTM */
+		acc100_reg_write(d, HWPfDdrPhyIdletimeout, 0x3e8);
+		/* IDTM timing registers */
+		acc100_reg_write(d, HWPfDdrPhyRdLatency, 0x13);
+		acc100_reg_write(d, HWPfDdrPhyRdLatencyDbi, 0x15);
+		acc100_reg_write(d, HWPfDdrPhyWrLatency, 0x10011);
+		/* Configure SDRAM MRS registers */
+		acc100_reg_write(d, HWPfDdrPhyMr01Dimm, 0x3030b70);
+		acc100_reg_write(d, HWPfDdrPhyMr01DimmDbi, 0x3030b50);
+		acc100_reg_write(d, HWPfDdrPhyMr23Dimm, 0x30);
+		acc100_reg_write(d, HWPfDdrPhyMr67Dimm, 0xc00);
+		acc100_reg_write(d, HWPfDdrPhyMr45Dimm, 0x4000000);
+		/* Configure active lanes */
+		acc100_reg_write(d, HWPfDdrPhyDqsCountMax, 0x9);
+		acc100_reg_write(d, HWPfDdrPhyDqsCountNum, 0x9);
+		/* Configure WR/RD leveling timing registers */
+		acc100_reg_write(d, HWPfDdrPhyWrlvlWwRdlvlRr, 0x101212);
+		/* Configure what trainings to execute */
+		acc100_reg_write(d, HWPfDdrPhyTrngType, 0x2d3c);
+		/* Releasing PHY reset */
+		acc100_reg_write(d, HWPfChaDdrPhyRstCfg, 3);
+		/* Configure Memory Controller registers */
+		acc100_reg_write(d, HWPfDdrMemInitPhyTrng0, 0x3);
+		acc100_reg_write(d, HWPfDdrBcDram, 0x3c232003);
+		acc100_reg_write(d, HWPfDdrBcAddrMap, 0x31);
+		/* Configure UMMC BC timing registers */
+		acc100_reg_write(d, HWPfDdrBcRef, 0xa22);
+		acc100_reg_write(d, HWPfDdrBcTim0, 0x4050501);
+		acc100_reg_write(d, HWPfDdrBcTim1, 0xf0b0476);
+		acc100_reg_write(d, HWPfDdrBcTim2, 0x103);
+		acc100_reg_write(d, HWPfDdrBcTim3, 0x144050a1);
+		acc100_reg_write(d, HWPfDdrBcTim4, 0x23300);
+		acc100_reg_write(d, HWPfDdrBcTim5, 0x4230276);
+		acc100_reg_write(d, HWPfDdrBcTim6, 0x857914);
+		acc100_reg_write(d, HWPfDdrBcTim7, 0x79100232);
+		acc100_reg_write(d, HWPfDdrBcTim8, 0x100007ce);
+		acc100_reg_write(d, HWPfDdrBcTim9, 0x50020);
+		acc100_reg_write(d, HWPfDdrBcTim10, 0x40ee);
+		/* Configure UMMC DFI timing registers */
+		acc100_reg_write(d, HWPfDdrDfiInit, 0x5000);
+		acc100_reg_write(d, HWPfDdrDfiTim0, 0x15030006);
+		acc100_reg_write(d, HWPfDdrDfiTim1, 0x11305);
+		acc100_reg_write(d, HWPfDdrDfiPhyUpdEn, 0x1);
+		acc100_reg_write(d, HWPfDdrUmmcIntEn, 0x1f);
+		/* Release IDTM CPU out of reset */
+		acc100_reg_write(d, HWPfChaDdrCpuRstCfg, 0x2);
+		/* Wait PHY-IDTM to finish static training */
+		for (i = 0; i < ACC100_DDR_TRAINING_MAX; i++) {
+			usleep(ACC100_MS_IN_US);
+			value = acc100_reg_read(d,
+					HWPfChaDdrStDoneStatus);
+			if (value & 1)
+				break;
+		}
+		printf("DDR Training completed in %d ms", i);
+		/* Enable Memory Controller */
+		acc100_reg_write(d, HWPfDdrUmmcCtrl, 0x401);
+		/* Release AXI interface reset */
+		acc100_reg_write(d, HWPfChaDdrSifRstCfg, 3);
+	}
+
 	rte_bbdev_log_debug("PF Tip configuration complete for %s", dev_name);
 	return 0;
 }
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.h b/drivers/baseband/acc100/rte_acc100_pmd.h
index cbcece2966..071b37cf9d 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.h
+++ b/drivers/baseband/acc100/rte_acc100_pmd.h
@@ -31,11 +31,6 @@
 #define RTE_ACC100_PF_DEVICE_ID        (0x0d5c)
 #define RTE_ACC100_VF_DEVICE_ID        (0x0d5d)
 
-/* Define as 1 to use only a single FEC engine */
-#ifndef RTE_ACC100_SINGLE_FEC
-#define RTE_ACC100_SINGLE_FEC 0
-#endif
-
 /* Values used in filling in descriptors */
 #define ACC100_DMA_DESC_TYPE           2
 #define ACC100_DMA_CODE_BLK_MODE       0
@@ -153,6 +148,12 @@
 #define ACC100_CFG_QMGR_HI_P    0x0F0F
 #define ACC100_CFG_PCI_AXI      0xC003
 #define ACC100_CFG_PCI_BRIDGE   0x40006033
+#define ACC100_QUAD_NUMS        4
+#define ACC100_LANES_PER_QUAD   4
+#define ACC100_PCIE_LANE_OFFSET 0x200
+#define ACC100_PCIE_QUAD_OFFSET 0x2000
+#define ACC100_PCS_EQ           0x6007
+#define ACC100_ADAPT            0x8400
 #define ACC100_ENGINE_OFFSET    0x1000
 #define ACC100_RESET_HI         0x20100
 #define ACC100_RESET_LO         0x20000
@@ -160,6 +161,15 @@
 #define ACC100_ENGINES_MAX      9
 #define ACC100_LONG_WAIT        1000
 #define ACC100_GPEX_AXIMAP_NUM  17
+#define ACC100_CLOCK_GATING_EN  0x30000
+#define ACC100_FABRIC_MODE      0xB
+/* DDR Size per VF - 512MB by default
+ * Can be increased up to 4 GB with single PF/VF
+ */
+#define ACC100_HARQ_DDR         (512 * 1)
+#define ACC100_PRQ_DDR_VER       0x10092020
+#define ACC100_MS_IN_US         (1000)
+#define ACC100_DDR_TRAINING_MAX (5000)
 
 /* ACC100 DMA Descriptor triplet */
 struct acc100_dma_triplet {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.046135520 +0800
+++ 0005-baseband-acc100-update-companion-PF-configure-functi.patch	2022-07-20 15:00:58.647667266 +0800
@@ -1 +1 @@
-From 60a623408bf3df2e15f7d497b3c36359612fb183 Mon Sep 17 00:00:00 2001
+From 34d98de156c15de15fbe53f3c82edc762b50e96c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 60a623408bf3df2e15f7d497b3c36359612fb183 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -51 +53 @@
-index de7e4bcef4..79bee4345d 100644
+index c13eb454f9..29b2f14807 100644
@@ -65 +67 @@
-@@ -4411,7 +4411,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4406,7 +4406,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -74 +76 @@
-@@ -4431,6 +4431,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4426,6 +4426,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -84 +86 @@
-@@ -4451,20 +4454,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4446,20 +4449,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -108 +110 @@
-@@ -4482,6 +4474,17 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4477,6 +4469,17 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -126 +128 @@
-@@ -4500,6 +4503,11 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4495,6 +4498,11 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -138 +140 @@
-@@ -4518,22 +4526,17 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4513,22 +4521,17 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -166 +168 @@
-@@ -4584,9 +4587,6 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4579,9 +4582,6 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -176 +178 @@
-@@ -4601,9 +4601,6 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4596,9 +4596,6 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -186 +188 @@
-@@ -4617,13 +4614,10 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4612,13 +4609,10 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -201 +203 @@
-@@ -4654,7 +4648,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4649,7 +4643,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -210 +212 @@
-@@ -4679,6 +4673,11 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4674,6 +4668,11 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -222 +224 @@
-@@ -4691,10 +4690,6 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4686,10 +4685,6 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -233 +235 @@
-@@ -4704,7 +4699,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4699,7 +4694,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -242 +244 @@
-@@ -4718,6 +4713,88 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4713,6 +4708,88 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)

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

* patch 'baseband/acc100: add protection for some negative scenario' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (3 preceding siblings ...)
  2022-07-20  8:20   ` patch 'baseband/acc100: update companion PF configure function' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'baseband/acc100: remove RTE prefix for internal macros' " Xueming Li
                     ` (56 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: xuemingl, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/437389abd9170b9792966555653e9806c41cd453

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 437389abd9170b9792966555653e9806c41cd453 Mon Sep 17 00:00:00 2001
From: Nicolas Chautru <nicolas.chautru@intel.com>
Date: Tue, 31 May 2022 15:31:43 -0700
Subject: [PATCH] baseband/acc100: add protection for some negative scenario
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8454d94825181d7b833ea8346671e15b8dde5640 ]

Catch exception in PMD in case of invalid input parameter.

Fixes: 5ad5060f8f7a ("baseband/acc100: add LDPC processing functions")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc100/rte_acc100_pmd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 29b2f14807..cc3f54ef29 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -1234,6 +1234,8 @@ get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index)
 			return (bg == 1 ? ACC100_K0_3_1 : ACC100_K0_3_2) * z_c;
 	}
 	/* LBRM case - includes a division by N */
+	if (unlikely(z_c == 0))
+		return 0;
 	if (rv_index == 1)
 		return (((bg == 1 ? ACC100_K0_1_1 : ACC100_K0_1_2) * n_cb)
 				/ n) * z_c;
@@ -1758,6 +1760,10 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
 
 	/* Soft output */
 	if (check_bit(op->turbo_dec.op_flags, RTE_BBDEV_TURBO_SOFT_OUTPUT)) {
+		if (op->turbo_dec.soft_output.data == 0) {
+			rte_bbdev_log(ERR, "Soft output is not defined");
+			return -1;
+		}
 		if (check_bit(op->turbo_dec.op_flags,
 				RTE_BBDEV_TURBO_EQUALIZER))
 			*s_out_length = e;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.092564452 +0800
+++ 0006-baseband-acc100-add-protection-for-some-negative-sce.patch	2022-07-20 15:00:58.651000594 +0800
@@ -1 +1 @@
-From 8454d94825181d7b833ea8346671e15b8dde5640 Mon Sep 17 00:00:00 2001
+From 437389abd9170b9792966555653e9806c41cd453 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8454d94825181d7b833ea8346671e15b8dde5640 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 79bee4345d..32c8bc2b34 100644
+index 29b2f14807..cc3f54ef29 100644
@@ -21 +23 @@
-@@ -1236,6 +1236,8 @@ get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index)
+@@ -1234,6 +1234,8 @@ get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index)
@@ -30 +32 @@
-@@ -1764,6 +1766,10 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
+@@ -1758,6 +1760,10 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,

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

* patch 'baseband/acc100: remove RTE prefix for internal macros' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (4 preceding siblings ...)
  2022-07-20  8:20   ` patch 'baseband/acc100: add protection for some negative scenario' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'common/cpt: fix build with GCC 12' " Xueming Li
                     ` (55 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: xuemingl, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0af3e2fef90cc20ea801e27d6755c5772f0151bf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0af3e2fef90cc20ea801e27d6755c5772f0151bf Mon Sep 17 00:00:00 2001
From: Nicolas Chautru <nicolas.chautru@intel.com>
Date: Tue, 31 May 2022 15:31:44 -0700
Subject: [PATCH] baseband/acc100: remove RTE prefix for internal macros
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7936b764ecb91b58dfd7b1d81a053fa085e7eef8 ]

Cosmetic update to remove RTE_ prefix for a define
kept internal.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc100/rte_acc100_pmd.c | 4 ++--
 drivers/baseband/acc100/rte_acc100_pmd.h | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index cc3f54ef29..9254207969 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -1131,7 +1131,7 @@ static const struct rte_bbdev_ops acc100_bbdev_ops = {
 /* ACC100 PCI PF address map */
 static struct rte_pci_id pci_id_acc100_pf_map[] = {
 	{
-		RTE_PCI_DEVICE(RTE_ACC100_VENDOR_ID, RTE_ACC100_PF_DEVICE_ID)
+		RTE_PCI_DEVICE(ACC100_VENDOR_ID, ACC100_PF_DEVICE_ID)
 	},
 	{.device_id = 0},
 };
@@ -1139,7 +1139,7 @@ static struct rte_pci_id pci_id_acc100_pf_map[] = {
 /* ACC100 PCI VF address map */
 static struct rte_pci_id pci_id_acc100_vf_map[] = {
 	{
-		RTE_PCI_DEVICE(RTE_ACC100_VENDOR_ID, RTE_ACC100_VF_DEVICE_ID)
+		RTE_PCI_DEVICE(ACC100_VENDOR_ID, ACC100_VF_DEVICE_ID)
 	},
 	{.device_id = 0},
 };
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.h b/drivers/baseband/acc100/rte_acc100_pmd.h
index 071b37cf9d..b3956e9928 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.h
+++ b/drivers/baseband/acc100/rte_acc100_pmd.h
@@ -27,9 +27,9 @@
 #define ACC100VF_DRIVER_NAME           intel_acc100_vf
 
 /* ACC100 PCI vendor & device IDs */
-#define RTE_ACC100_VENDOR_ID           (0x8086)
-#define RTE_ACC100_PF_DEVICE_ID        (0x0d5c)
-#define RTE_ACC100_VF_DEVICE_ID        (0x0d5d)
+#define ACC100_VENDOR_ID           (0x8086)
+#define ACC100_PF_DEVICE_ID        (0x0d5c)
+#define ACC100_VF_DEVICE_ID        (0x0d5d)
 
 /* Values used in filling in descriptors */
 #define ACC100_DMA_DESC_TYPE           2
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.135449358 +0800
+++ 0007-baseband-acc100-remove-RTE-prefix-for-internal-macro.patch	2022-07-20 15:00:58.654333922 +0800
@@ -1 +1 @@
-From 7936b764ecb91b58dfd7b1d81a053fa085e7eef8 Mon Sep 17 00:00:00 2001
+From 0af3e2fef90cc20ea801e27d6755c5772f0151bf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7936b764ecb91b58dfd7b1d81a053fa085e7eef8 ]
@@ -17 +20 @@
-index 32c8bc2b34..210028bb15 100644
+index cc3f54ef29..9254207969 100644
@@ -20 +23 @@
-@@ -1133,7 +1133,7 @@ static const struct rte_bbdev_ops acc100_bbdev_ops = {
+@@ -1131,7 +1131,7 @@ static const struct rte_bbdev_ops acc100_bbdev_ops = {
@@ -29 +32 @@
-@@ -1141,7 +1141,7 @@ static struct rte_pci_id pci_id_acc100_pf_map[] = {
+@@ -1139,7 +1139,7 @@ static struct rte_pci_id pci_id_acc100_pf_map[] = {

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

* patch 'common/cpt: fix build with GCC 12' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (5 preceding siblings ...)
  2022-07-20  8:20   ` patch 'baseband/acc100: remove RTE prefix for internal macros' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'test/ipsec: " Xueming Li
                     ` (54 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Ankur Dwivedi
  Cc: xuemingl, Anoob Joseph, Jerin Jacob, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5dbe3a6dad424b42e3f5b647940e3244526d38ea

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5dbe3a6dad424b42e3f5b647940e3244526d38ea Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Fri, 17 Jun 2022 19:09:29 +0530
Subject: [PATCH] common/cpt: fix build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3aa16821ab3e0a21052880fbf4dcb76801380c31 ]

The following warning is observed with GCC 12 compilation:

In function ‘fill_sg_comp_from_iov’,
    inlined from ‘cpt_zuc_snow3g_enc_prep’ at
        ../drivers/common/cpt/cpt_ucode.h:1672:9,
    inlined from ‘cpt_fc_enc_hmac_prep’ at
        ../drivers/common/cpt/cpt_ucode.h:2472:3,
    inlined from ‘fill_digest_params’ at
        ../drivers/common/cpt/cpt_ucode.h:3548:14,
    inlined from ‘otx_cpt_enq_single_sym’ at
        ../drivers/crypto/octeontx/otx_cryptodev_ops.c:541:9,
    inlined from ‘otx_cpt_enq_single_sym_sessless’ at
        ../drivers/crypto/octeontx/otx_cryptodev_ops.c:584:8,
    inlined from ‘otx_cpt_enq_single’ at
        ../drivers/crypto/octeontx/otx_cryptodev_ops.c:611:11,
    inlined from ‘otx_cpt_pkt_enqueue’ at
        ../drivers/crypto/octeontx/otx_cryptodev_ops.c:643:9,
    inlined from ‘otx_cpt_enqueue_sym’ at
        ../drivers/crypto/octeontx/otx_cryptodev_ops.c:668:9:
../drivers/common/cpt/cpt_ucode.h:415:36: warning: array subscript 0 is
outside array bounds of ‘buf_ptr_t[0]’ {aka ‘struct buf_ptr[]’}
[-Warray-bounds]
  415 |                         e_dma_addr = bufs[j].dma_addr;
      |                         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../drivers/common/cpt/cpt_ucode.h:416:48: warning: array subscript 0 is
outside array bounds of ‘buf_ptr_t[0]’ {aka ‘struct buf_ptr[]’}
[-Warray-bounds]
  416 |                         e_len = (size > bufs[j].size) ?
      |                                         ~~~~~~~^~~~~

This patch resolves the warning.

Bugzilla ID: 861
Fixes: 9be415daf469 ("common/cpt: add common defines for microcode")
Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: David Marchand <david.marchand@redhat.com>
---
 drivers/common/cpt/cpt_mcode_defines.h |  2 +-
 drivers/common/cpt/cpt_ucode.h         | 21 ++++++++++-----------
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/common/cpt/cpt_mcode_defines.h b/drivers/common/cpt/cpt_mcode_defines.h
index 56a745f419..188f9f7511 100644
--- a/drivers/common/cpt/cpt_mcode_defines.h
+++ b/drivers/common/cpt/cpt_mcode_defines.h
@@ -366,7 +366,7 @@ typedef struct buf_ptr {
 /* IOV Pointer */
 typedef struct{
 	int buf_cnt;
-	buf_ptr_t bufs[0];
+	buf_ptr_t bufs[];
 } iov_ptr_t;
 
 typedef struct fc_params {
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index d9f702fc19..b7e89de964 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -394,27 +394,26 @@ fill_sg_comp_from_iov(sg_comp_t *list,
 	int32_t j;
 	uint32_t extra_len = extra_buf ? extra_buf->size : 0;
 	uint32_t size = *psize;
-	buf_ptr_t *bufs;
 
-	bufs = from->bufs;
 	for (j = 0; (j < from->buf_cnt) && size; j++) {
+		phys_addr_t dma_addr = from->bufs[j].dma_addr;
+		uint32_t buf_sz = from->bufs[j].size;
+		sg_comp_t *to = &list[i >> 2];
 		phys_addr_t e_dma_addr;
 		uint32_t e_len;
-		sg_comp_t *to = &list[i >> 2];
 
 		if (unlikely(from_offset)) {
-			if (from_offset >= bufs[j].size) {
-				from_offset -= bufs[j].size;
+			if (from_offset >= buf_sz) {
+				from_offset -= buf_sz;
 				continue;
 			}
-			e_dma_addr = bufs[j].dma_addr + from_offset;
-			e_len = (size > (bufs[j].size - from_offset)) ?
-				(bufs[j].size - from_offset) : size;
+			e_dma_addr = dma_addr + from_offset;
+			e_len = (size > (buf_sz - from_offset)) ?
+				(buf_sz - from_offset) : size;
 			from_offset = 0;
 		} else {
-			e_dma_addr = bufs[j].dma_addr;
-			e_len = (size > bufs[j].size) ?
-				bufs[j].size : size;
+			e_dma_addr = dma_addr;
+			e_len = (size > buf_sz) ? buf_sz : size;
 		}
 
 		to->u.s.len[i % 4] = rte_cpu_to_be_16(e_len);
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.178274352 +0800
+++ 0008-common-cpt-fix-build-with-GCC-12.patch	2022-07-20 15:00:58.657667250 +0800
@@ -1 +1 @@
-From 3aa16821ab3e0a21052880fbf4dcb76801380c31 Mon Sep 17 00:00:00 2001
+From 5dbe3a6dad424b42e3f5b647940e3244526d38ea Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3aa16821ab3e0a21052880fbf4dcb76801380c31 ]
@@ -44 +46,0 @@
-Cc: stable@dpdk.org
@@ -56 +58 @@
-index f16ee44297..e6dcb7674c 100644
+index 56a745f419..188f9f7511 100644
@@ -59 +61 @@
-@@ -387,7 +387,7 @@ typedef struct buf_ptr {
+@@ -366,7 +366,7 @@ typedef struct buf_ptr {
@@ -69 +71 @@
-index e1f2f6005d..22aabab6ac 100644
+index d9f702fc19..b7e89de964 100644

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

* patch 'test/ipsec: fix build with GCC 12' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (6 preceding siblings ...)
  2022-07-20  8:20   ` patch 'common/cpt: fix build with GCC 12' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'crypto/scheduler: fix queue pair in scheduler failover' " Xueming Li
                     ` (53 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: David Marchand; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/df7022dae82dc77ba99c5bb3a3e5d29b219aa51b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From df7022dae82dc77ba99c5bb3a3e5d29b219aa51b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 16 Jun 2022 11:33:20 +0200
Subject: [PATCH] test/ipsec: fix build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6e108b6a7c0c0699e6304f7b5706736b34d32607 ]

GCC 12 raises the following warning:

In function ‘_mm256_loadu_si256’,
    inlined from ‘rte_mov32’ at
        ../lib/eal/x86/include/rte_memcpy.h:319:9,
    inlined from ‘rte_mov128’ at
        ../lib/eal/x86/include/rte_memcpy.h:344:2,
    inlined from ‘rte_memcpy_generic’ at
        ../lib/eal/x86/include/rte_memcpy.h:438:4,
    inlined from ‘rte_memcpy’ at
        ../lib/eal/x86/include/rte_memcpy.h:882:10,
    inlined from ‘setup_test_string.constprop’ at
        ../app/test/test_ipsec.c:572:4:
/usr/lib/gcc/x86_64-redhat-linux/12/include/avxintrin.h:929:10: error:
    array subscript ‘__m256i_u[3]’ is partly outside array bounds of
    ‘const char[108]’ [-Werror=array-bounds]
  929 |   return *__P;
      |          ^~~~
../app/test/test_ipsec.c: In function ‘setup_test_string.constprop’:
../app/test/test_ipsec.c:539:12: note: at offset 96 into object
    ‘null_plain_data’ of size 108
  539 | const char null_plain_data[] =
      |            ^~~~~~~~~~~~~~~

Add a hint so that the compiler understands the copied data is within
the passed string boundaries.

Bugzilla ID: 848
Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_ipsec.c | 35 ++++++++++++++++++++++-------------
 1 file changed, 22 insertions(+), 13 deletions(-)

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index fc77539bc7..39531ff667 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -544,12 +544,14 @@ struct rte_ipv4_hdr ipv4_outer  = {
 };
 
 static struct rte_mbuf *
-setup_test_string(struct rte_mempool *mpool,
-		const char *string, size_t len, uint8_t blocksize)
+setup_test_string(struct rte_mempool *mpool, const char *string,
+	size_t string_len, size_t len, uint8_t blocksize)
 {
 	struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
 	size_t t_len = len - (blocksize ? (len % blocksize) : 0);
 
+	RTE_VERIFY(len <= string_len);
+
 	if (m) {
 		memset(m->buf_addr, 0, m->buf_len);
 		char *dst = rte_pktmbuf_append(m, t_len);
@@ -1355,7 +1357,8 @@ test_ipsec_crypto_outb_burst_null_null(int i)
 	/* Generate input mbuf data */
 	for (j = 0; j < num_pkts && rc == 0; j++) {
 		ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool,
-			null_plain_data, test_cfg[i].pkt_sz, 0);
+			null_plain_data, sizeof(null_plain_data),
+			test_cfg[i].pkt_sz, 0);
 		if (ut_params->ibuf[j] == NULL)
 			rc = TEST_FAILED;
 		else {
@@ -1473,7 +1476,8 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
 			/* Generate test mbuf data */
 			ut_params->obuf[j] = setup_test_string(
 				ts_params->mbuf_pool,
-				null_plain_data, test_cfg[i].pkt_sz, 0);
+				null_plain_data, sizeof(null_plain_data),
+				test_cfg[i].pkt_sz, 0);
 			if (ut_params->obuf[j] == NULL)
 				rc = TEST_FAILED;
 		}
@@ -1541,16 +1545,17 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
 
 	/* Generate inbound mbuf data */
 	for (j = 0; j < num_pkts && rc == 0; j++) {
-		ut_params->ibuf[j] = setup_test_string(
-			ts_params->mbuf_pool,
-			null_plain_data, test_cfg[i].pkt_sz, 0);
+		ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool,
+			null_plain_data, sizeof(null_plain_data),
+			test_cfg[i].pkt_sz, 0);
 		if (ut_params->ibuf[j] == NULL)
 			rc = TEST_FAILED;
 		else {
 			/* Generate test mbuf data */
 			ut_params->obuf[j] = setup_test_string(
 				ts_params->mbuf_pool,
-				null_plain_data, test_cfg[i].pkt_sz, 0);
+				null_plain_data, sizeof(null_plain_data),
+				test_cfg[i].pkt_sz, 0);
 			if (ut_params->obuf[j] == NULL)
 				rc = TEST_FAILED;
 		}
@@ -1650,7 +1655,8 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
 	/* Generate test mbuf data */
 	for (j = 0; j < num_pkts && rc == 0; j++) {
 		ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool,
-			null_plain_data, test_cfg[i].pkt_sz, 0);
+			null_plain_data, sizeof(null_plain_data),
+			test_cfg[i].pkt_sz, 0);
 		if (ut_params->ibuf[0] == NULL)
 			rc = TEST_FAILED;
 
@@ -1728,15 +1734,17 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
 	/* Generate test mbuf data */
 	for (j = 0; j < num_pkts && rc == 0; j++) {
 		ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool,
-			null_plain_data, test_cfg[i].pkt_sz, 0);
+			null_plain_data, sizeof(null_plain_data),
+			test_cfg[i].pkt_sz, 0);
 		if (ut_params->ibuf[0] == NULL)
 			rc = TEST_FAILED;
 
 		if (rc == 0) {
 			/* Generate test tunneled mbuf data for comparison */
 			ut_params->obuf[j] = setup_test_string(
-					ts_params->mbuf_pool,
-					null_plain_data, test_cfg[i].pkt_sz, 0);
+				ts_params->mbuf_pool, null_plain_data,
+				sizeof(null_plain_data), test_cfg[i].pkt_sz,
+				0);
 			if (ut_params->obuf[j] == NULL)
 				rc = TEST_FAILED;
 		}
@@ -1805,7 +1813,8 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)
 	for (j = 0; j < num_pkts && rc == 0; j++) {
 		/* packet with sequence number 0 is invalid */
 		ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool,
-			null_encrypted_data, test_cfg[i].pkt_sz, 0);
+			null_encrypted_data, sizeof(null_encrypted_data),
+			test_cfg[i].pkt_sz, 0);
 		if (ut_params->ibuf[j] == NULL)
 			rc = TEST_FAILED;
 	}
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.221975012 +0800
+++ 0009-test-ipsec-fix-build-with-GCC-12.patch	2022-07-20 15:00:58.661000577 +0800
@@ -1 +1 @@
-From 6e108b6a7c0c0699e6304f7b5706736b34d32607 Mon Sep 17 00:00:00 2001
+From df7022dae82dc77ba99c5bb3a3e5d29b219aa51b Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6e108b6a7c0c0699e6304f7b5706736b34d32607 ]
@@ -38 +40,0 @@
-Cc: stable@dpdk.org
@@ -46 +48 @@
-index 8da025bf66..7047e17960 100644
+index fc77539bc7..39531ff667 100644
@@ -49 +51 @@
-@@ -554,12 +554,14 @@ struct rte_ipv4_hdr ipv4_outer  = {
+@@ -544,12 +544,14 @@ struct rte_ipv4_hdr ipv4_outer  = {
@@ -66 +68 @@
-@@ -1365,7 +1367,8 @@ test_ipsec_crypto_outb_burst_null_null(int i)
+@@ -1355,7 +1357,8 @@ test_ipsec_crypto_outb_burst_null_null(int i)
@@ -76 +78 @@
-@@ -1483,7 +1486,8 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
+@@ -1473,7 +1476,8 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
@@ -86 +88 @@
-@@ -1551,16 +1555,17 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
+@@ -1541,16 +1545,17 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
@@ -108 +110 @@
-@@ -1660,7 +1665,8 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
+@@ -1650,7 +1655,8 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
@@ -118 +120 @@
-@@ -1738,15 +1744,17 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
+@@ -1728,15 +1734,17 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
@@ -139 +141 @@
-@@ -1815,7 +1823,8 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)
+@@ -1805,7 +1813,8 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)

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

* patch 'crypto/scheduler: fix queue pair in scheduler failover' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (7 preceding siblings ...)
  2022-07-20  8:20   ` patch 'test/ipsec: " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'test/crypto: fix cipher offset for ZUC' " Xueming Li
                     ` (52 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Jakub Wysocki; +Cc: xuemingl, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cb03983da4a412584a0527d5891d6071319aae33

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cb03983da4a412584a0527d5891d6071319aae33 Mon Sep 17 00:00:00 2001
From: Jakub Wysocki <jakubx.wysocki@intel.com>
Date: Wed, 15 Jun 2022 14:13:49 +0100
Subject: [PATCH] crypto/scheduler: fix queue pair in scheduler failover
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b302708673017b560644b954ed78ef6cdba1aa2d ]

This commit fixes wrong qp_id value in cryptodev scheduler in failover
mode.

Fixes: 37f075dad1e9 ("crypto/scheduler: add fail-over scheduling mode")

Signed-off-by: Jakub Wysocki <jakubx.wysocki@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/crypto/scheduler/scheduler_failover.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/crypto/scheduler/scheduler_failover.c b/drivers/crypto/scheduler/scheduler_failover.c
index 844312dd1b..7c82bc5464 100644
--- a/drivers/crypto/scheduler/scheduler_failover.c
+++ b/drivers/crypto/scheduler/scheduler_failover.c
@@ -157,6 +157,9 @@ scheduler_start(struct rte_cryptodev *dev)
 			((struct scheduler_qp_ctx *)
 				dev->data->queue_pairs[i])->private_qp_ctx;
 
+		sched_ctx->workers[PRIMARY_WORKER_IDX].qp_id = i;
+		sched_ctx->workers[SECONDARY_WORKER_IDX].qp_id = i;
+
 		rte_memcpy(&qp_ctx->primary_worker,
 				&sched_ctx->workers[PRIMARY_WORKER_IDX],
 				sizeof(struct scheduler_worker));
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.263219255 +0800
+++ 0010-crypto-scheduler-fix-queue-pair-in-scheduler-failove.patch	2022-07-20 15:00:58.661000577 +0800
@@ -1 +1 @@
-From b302708673017b560644b954ed78ef6cdba1aa2d Mon Sep 17 00:00:00 2001
+From cb03983da4a412584a0527d5891d6071319aae33 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b302708673017b560644b954ed78ef6cdba1aa2d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 5023577ef8..2a0e29fa72 100644
+index 844312dd1b..7c82bc5464 100644

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

* patch 'test/crypto: fix cipher offset for ZUC' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (8 preceding siblings ...)
  2022-07-20  8:20   ` patch 'crypto/scheduler: fix queue pair in scheduler failover' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'test/ipsec: fix performance test' " Xueming Li
                     ` (51 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Ciara Power; +Cc: xuemingl, Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8d49e2f6d19e495fb3372dd0671ce69aab7ce1de

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8d49e2f6d19e495fb3372dd0671ce69aab7ce1de Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Tue, 21 Jun 2022 11:41:32 +0000
Subject: [PATCH] test/crypto: fix cipher offset for ZUC
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7a0f8fe76bd03dc8b61965040a66409996afa717 ]

The cipher offset in bits was not being used in ZUC encryption test
functions when creating the operation, it was hardcoded to 0.
This is fixed to use the offset from the test vector as intended.

Fixes: fd01a9be38d5 ("test/crypto: move IV to crypto op private data")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 app/test/test_cryptodev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 441193c0f6..c254650f39 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -5538,7 +5538,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
 	retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
 					tdata->cipher_iv.len,
 					tdata->plaintext.len,
-					0);
+					tdata->validCipherOffsetInBits.len);
 	if (retval < 0)
 		return retval;
 
@@ -5638,7 +5638,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
 	/* Create ZUC operation */
 	retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
 			tdata->cipher_iv.len, tdata->plaintext.len,
-			0);
+			tdata->validCipherOffsetInBits.len);
 	if (retval < 0)
 		return retval;
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.302788448 +0800
+++ 0011-test-crypto-fix-cipher-offset-for-ZUC.patch	2022-07-20 15:00:58.671000561 +0800
@@ -1 +1 @@
-From 7a0f8fe76bd03dc8b61965040a66409996afa717 Mon Sep 17 00:00:00 2001
+From 8d49e2f6d19e495fb3372dd0671ce69aab7ce1de Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7a0f8fe76bd03dc8b61965040a66409996afa717 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 15df53a1f0..1cac76a64a 100644
+index 441193c0f6..c254650f39 100644
@@ -23 +25 @@
-@@ -6033,7 +6033,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
+@@ -5538,7 +5538,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
@@ -32 +34 @@
-@@ -6128,7 +6128,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
+@@ -5638,7 +5638,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)

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

* patch 'test/ipsec: fix performance test' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (9 preceding siblings ...)
  2022-07-20  8:20   ` patch 'test/crypto: fix cipher offset for ZUC' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'eventdev/eth_tx: fix adapter creation' " Xueming Li
                     ` (50 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b39e829bacedb6a80327ba31813aa24f05c721ba

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b39e829bacedb6a80327ba31813aa24f05c721ba Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Tue, 21 Jun 2022 13:30:45 +0000
Subject: [PATCH] test/ipsec: fix performance test
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3ab95f3d1cebc1e064e30f83ddef1453fbcd9ae1 ]

This patch initializes with 0 rte_ipsec_sa_prm inside the
ipsec_sa struct.
Before it was passed uninitialized to rte_ipsec_sa_init(),
which does not check whether prm->ipsec_xform.esn.value is
greater than sa->sqn_mask.

Bugzilla ID: 1023
Fixes: f7f3ac6dcbe2 ("test/ipsec: add performance cases")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 app/test/test_ipsec_perf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/test_ipsec_perf.c b/app/test/test_ipsec_perf.c
index 92106bf374..7e07805ea3 100644
--- a/app/test/test_ipsec_perf.c
+++ b/app/test/test_ipsec_perf.c
@@ -580,8 +580,8 @@ testsuite_teardown(void)
 static int
 test_libipsec_perf(void)
 {
-	struct ipsec_sa sa_out;
-	struct ipsec_sa sa_in;
+	struct ipsec_sa sa_out = { .sa_prm = { 0 } };
+	struct ipsec_sa sa_in = { .sa_prm = { 0 } };
 	uint32_t i;
 	int ret;
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.351567599 +0800
+++ 0012-test-ipsec-fix-performance-test.patch	2022-07-20 15:00:58.671000561 +0800
@@ -1 +1 @@
-From 3ab95f3d1cebc1e064e30f83ddef1453fbcd9ae1 Mon Sep 17 00:00:00 2001
+From b39e829bacedb6a80327ba31813aa24f05c721ba Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3ab95f3d1cebc1e064e30f83ddef1453fbcd9ae1 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 0eca003282..b5d0c2e036 100644
+index 92106bf374..7e07805ea3 100644
@@ -25 +27 @@
-@@ -592,8 +592,8 @@ testsuite_teardown(void)
+@@ -580,8 +580,8 @@ testsuite_teardown(void)

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

* patch 'eventdev/eth_tx: fix adapter creation' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (10 preceding siblings ...)
  2022-07-20  8:20   ` patch 'test/ipsec: fix performance test' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'net/bonding: fix RSS inconsistency between ports' " Xueming Li
                     ` (49 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Naga Harish K S V; +Cc: xuemingl, Jay Jayatheerthan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a6ae86b161dc19dbdfeecabb41c106c4214f79da

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a6ae86b161dc19dbdfeecabb41c106c4214f79da Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Thu, 16 Jun 2022 10:44:58 +0530
Subject: [PATCH] eventdev/eth_tx: fix adapter creation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3d6e9dd493784d077b9a214a0937331fa05f8abf ]

During adapter create, memory is allocated for storing event port
configuration which is freed during adapter free. The following
error is seen during free "EAL: Error: Invalid memory"

The service data pointer storage for txa_service_data_array is
allocated during adapter create with incorrect size which is less
than the required size.
Initialization of this memory causes buffer overflow and result in
metadata overwrite of event port config memory allocated above
and results in the above error message during free.

Allocating the correct size of memory for txa_service_data_array
prevents overwriting other memory areas like event port config
memory.

Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
 lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index 21155362f9..6474056c90 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -224,7 +224,7 @@ txa_service_data_init(void)
 	if (txa_service_data_array == NULL) {
 		txa_service_data_array =
 				txa_memzone_array_get("txa_service_data_array",
-					sizeof(int),
+					sizeof(*txa_service_data_array),
 					RTE_EVENT_ETH_TX_ADAPTER_MAX_INSTANCE);
 		if (txa_service_data_array == NULL)
 			return -ENOMEM;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.390457866 +0800
+++ 0013-eventdev-eth_tx-fix-adapter-creation.patch	2022-07-20 15:00:58.671000561 +0800
@@ -1 +1 @@
-From 3d6e9dd493784d077b9a214a0937331fa05f8abf Mon Sep 17 00:00:00 2001
+From a6ae86b161dc19dbdfeecabb41c106c4214f79da Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3d6e9dd493784d077b9a214a0937331fa05f8abf ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
- lib/eventdev/rte_event_eth_tx_adapter.c | 2 +-
+ lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +-
@@ -30,4 +32,4 @@
-diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
-index 1b304f0a73..c700fb7b1f 100644
---- a/lib/eventdev/rte_event_eth_tx_adapter.c
-+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
+diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+index 21155362f9..6474056c90 100644
+--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c

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

* patch 'net/bonding: fix RSS inconsistency between ports' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (11 preceding siblings ...)
  2022-07-20  8:20   ` patch 'eventdev/eth_tx: fix adapter creation' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'test/bonding: fix RSS test when disable RSS' " Xueming Li
                     ` (48 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Huisong Li; +Cc: xuemingl, Dongdong Liu, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/da86d09eacf4c74957b0e85e05c2ee6cd0512351

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From da86d09eacf4c74957b0e85e05c2ee6cd0512351 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 8 Jun 2022 19:45:47 +0800
Subject: [PATCH] net/bonding: fix RSS inconsistency between ports
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9e0fb72c75cd03c40fc7cedc39d3a342f447b6ee ]

Currently, RSS configuration of slave is set only when RSS is enabled for
bonded port. If RSS is enabled for the slaves port before adding to the
bonded port with disabling RSS, it will run into that the RSS enabled state
of bonded and slaves port is inconsistent after starting bonded port.
So the RSS configuration of slave should also be set when RSS is disabled
for bonded port.

Fixes: 734ce47f71e0 ("bonding: support RSS dynamic configuration")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 43383db319..4fa523201f 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1715,6 +1715,12 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 				bonded_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
 		slave_eth_dev->data->dev_conf.rxmode.mq_mode =
 				bonded_eth_dev->data->dev_conf.rxmode.mq_mode;
+	} else {
+		slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len = 0;
+		slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key = NULL;
+		slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf = 0;
+		slave_eth_dev->data->dev_conf.rxmode.mq_mode =
+				bonded_eth_dev->data->dev_conf.rxmode.mq_mode;
 	}
 
 	slave_eth_dev->data->dev_conf.txmode.offloads |=
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.430462476 +0800
+++ 0014-net-bonding-fix-RSS-inconsistency-between-ports.patch	2022-07-20 15:00:58.674333889 +0800
@@ -1 +1 @@
-From 9e0fb72c75cd03c40fc7cedc39d3a342f447b6ee Mon Sep 17 00:00:00 2001
+From da86d09eacf4c74957b0e85e05c2ee6cd0512351 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9e0fb72c75cd03c40fc7cedc39d3a342f447b6ee ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index ace8f8b45e..73e6972035 100644
+index 43383db319..4fa523201f 100644
@@ -27 +29 @@
-@@ -1707,6 +1707,12 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
+@@ -1715,6 +1715,12 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
@@ -39 +41 @@
- 	slave_eth_dev->data->dev_conf.rxmode.mtu =
+ 	slave_eth_dev->data->dev_conf.txmode.offloads |=

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

* patch 'test/bonding: fix RSS test when disable RSS' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (12 preceding siblings ...)
  2022-07-20  8:20   ` patch 'net/bonding: fix RSS inconsistency between ports' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'net/hns3: fix an unreasonable memset' " Xueming Li
                     ` (47 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Huisong Li; +Cc: xuemingl, Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1adbdac76c2277546bedfb664a37d6e7e5339721

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1adbdac76c2277546bedfb664a37d6e7e5339721 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 8 Jun 2022 19:45:48 +0800
Subject: [PATCH] test/bonding: fix RSS test when disable RSS
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6496922368fe03be9ab4137f2d615dba1a766f39 ]

The "test_rss_lazy" test is used for testing bonding RSS functions
when bonded port disable RSS. Currently, this test case can update
RSS functions of bonded and slave port if bonded port turns off RSS.
It is unreasonable and has been adjusted to be non-updateable in
following patch:
"93e1ea6dfa99 ethdev: fix RSS update when RSS is disabled"

So this patch fixes this test code.

Fixes: 43b630244e7e ("app/test: add dynamic bonding RSS configuration")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 app/test/test_link_bonding_rssconf.c | 78 ++++++++++++++++++++++++++--
 1 file changed, 73 insertions(+), 5 deletions(-)

diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c
index 5dac60ca1e..514f09bf19 100644
--- a/app/test/test_link_bonding_rssconf.c
+++ b/app/test/test_link_bonding_rssconf.c
@@ -466,15 +466,85 @@ test_rss(void)
 
 	TEST_ASSERT_SUCCESS(test_propagate(), "Propagation test failed");
 
-	TEST_ASSERT(slave_remove_and_add() == 1, "New slave should be synced");
+	TEST_ASSERT(slave_remove_and_add() == 1, "remove and add slaves success.");
 
 	remove_slaves_and_stop_bonded_device();
 
 	return TEST_SUCCESS;
 }
 
+
+/**
+ * Test RSS configuration over bonded and slaves.
+ */
+static int
+test_rss_config_lazy(void)
+{
+	struct rte_eth_rss_conf bond_rss_conf = {0};
+	struct slave_conf *port;
+	uint8_t rss_key[40];
+	uint64_t rss_hf;
+	int retval;
+	uint16_t i;
+	uint8_t n;
+
+	retval = rte_eth_dev_info_get(test_params.bond_port_id,
+				      &test_params.bond_dev_info);
+	TEST_ASSERT((retval == 0), "Error during getting device (port %u) info: %s\n",
+		    test_params.bond_port_id, strerror(-retval));
+
+	rss_hf = test_params.bond_dev_info.flow_type_rss_offloads;
+	if (rss_hf != 0) {
+		bond_rss_conf.rss_key = NULL;
+		bond_rss_conf.rss_hf = rss_hf;
+		retval = rte_eth_dev_rss_hash_update(test_params.bond_port_id,
+						     &bond_rss_conf);
+		TEST_ASSERT(retval != 0, "Succeeded in setting bonded port hash function");
+	}
+
+	/* Set all keys to zero for all slaves */
+	FOR_EACH_PORT(n, port) {
+		port = &test_params.slave_ports[n];
+		retval = rte_eth_dev_rss_hash_conf_get(port->port_id,
+						       &port->rss_conf);
+		TEST_ASSERT_SUCCESS(retval, "Cannot get slaves RSS configuration");
+		memset(port->rss_key, 0, sizeof(port->rss_key));
+		port->rss_conf.rss_key = port->rss_key;
+		port->rss_conf.rss_key_len = sizeof(port->rss_key);
+		retval = rte_eth_dev_rss_hash_update(port->port_id,
+						     &port->rss_conf);
+		TEST_ASSERT(retval != 0, "Succeeded in setting slaves RSS keys");
+	}
+
+	/* Set RSS keys for bonded port */
+	memset(rss_key, 1, sizeof(rss_key));
+	bond_rss_conf.rss_hf = rss_hf;
+	bond_rss_conf.rss_key = rss_key;
+	bond_rss_conf.rss_key_len = sizeof(rss_key);
+
+	retval = rte_eth_dev_rss_hash_update(test_params.bond_port_id,
+					     &bond_rss_conf);
+	TEST_ASSERT(retval != 0, "Succeeded in setting bonded port RSS keys");
+
+	/*  Test RETA propagation */
+	for (i = 0; i < RXTX_QUEUE_COUNT; i++) {
+		FOR_EACH_PORT(n, port) {
+			port = &test_params.slave_ports[n];
+			retval = reta_set(port->port_id, (i + 1) % RXTX_QUEUE_COUNT,
+					  port->dev_info.reta_size);
+			TEST_ASSERT(retval != 0, "Succeeded in setting slaves RETA");
+		}
+
+		retval = reta_set(test_params.bond_port_id, i % RXTX_QUEUE_COUNT,
+				  test_params.bond_dev_info.reta_size);
+		TEST_ASSERT(retval != 0, "Succeeded in setting bonded port RETA");
+	}
+
+	return TEST_SUCCESS;
+}
+
 /**
- * Test propagation logic, when RX_RSS mq_mode is turned off for bonding port
+ * Test RSS function logic, when RX_RSS mq_mode is turned off for bonding port
  */
 static int
 test_rss_lazy(void)
@@ -495,9 +565,7 @@ test_rss_lazy(void)
 	TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params.bond_port_id),
 			"Failed to start bonding port (%d).", test_params.bond_port_id);
 
-	TEST_ASSERT_SUCCESS(test_propagate(), "Propagation test failed");
-
-	TEST_ASSERT(slave_remove_and_add() == 0, "New slave shouldn't be synced");
+	TEST_ASSERT_SUCCESS(test_rss_config_lazy(), "Succeeded in setting RSS hash when RX_RSS mq_mode is turned off");
 
 	remove_slaves_and_stop_bonded_device();
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.472228269 +0800
+++ 0015-test-bonding-fix-RSS-test-when-disable-RSS.patch	2022-07-20 15:00:58.677667217 +0800
@@ -1 +1 @@
-From 6496922368fe03be9ab4137f2d615dba1a766f39 Mon Sep 17 00:00:00 2001
+From 1adbdac76c2277546bedfb664a37d6e7e5339721 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6496922368fe03be9ab4137f2d615dba1a766f39 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 7228965ced..b3d71c6f3a 100644
+index 5dac60ca1e..514f09bf19 100644
@@ -28 +30 @@
-@@ -468,15 +468,85 @@ test_rss(void)
+@@ -466,15 +466,85 @@ test_rss(void)
@@ -116 +118 @@
-@@ -497,9 +567,7 @@ test_rss_lazy(void)
+@@ -495,9 +565,7 @@ test_rss_lazy(void)

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

* patch 'net/hns3: fix an unreasonable memset' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (13 preceding siblings ...)
  2022-07-20  8:20   ` patch 'test/bonding: fix RSS test when disable RSS' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'net/hns3: remove duplicate definition' " Xueming Li
                     ` (46 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Huisong Li; +Cc: xuemingl, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5b5935a922e11beb4d15673465e2842002cec96f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5b5935a922e11beb4d15673465e2842002cec96f Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 1 Jun 2022 11:52:44 +0800
Subject: [PATCH] net/hns3: fix an unreasonable memset
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ea1ef0b937417f177fe50485f96122c1c2407848 ]

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index a3a9d8e844..1675da1b08 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -762,7 +762,7 @@ hns3vf_reset_all_tqps(struct hns3_hw *hw)
 	int ret;
 	int i;
 
-	memset(msg_data, 0, sizeof(uint16_t));
+	memset(msg_data, 0, sizeof(msg_data));
 	ret = hns3_send_mbx_msg(hw, HNS3_MBX_QUEUE_RESET, 0, msg_data,
 				sizeof(msg_data), true, &reset_status,
 				sizeof(reset_status));
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.511557388 +0800
+++ 0016-net-hns3-fix-an-unreasonable-memset.patch	2022-07-20 15:00:58.681000545 +0800
@@ -1 +1 @@
-From ea1ef0b937417f177fe50485f96122c1c2407848 Mon Sep 17 00:00:00 2001
+From 5b5935a922e11beb4d15673465e2842002cec96f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ea1ef0b937417f177fe50485f96122c1c2407848 ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
-index be4ab16dcc..dcb1cdf168 100644
+index a3a9d8e844..1675da1b08 100644
@@ -19 +21 @@
-@@ -773,7 +773,7 @@ hns3vf_reset_all_tqps(struct hns3_hw *hw)
+@@ -762,7 +762,7 @@ hns3vf_reset_all_tqps(struct hns3_hw *hw)
@@ -21 +23 @@
- 	uint16_t i;
+ 	int i;

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

* patch 'net/hns3: remove duplicate definition' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (14 preceding siblings ...)
  2022-07-20  8:20   ` patch 'net/hns3: fix an unreasonable memset' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'net/hns3: fix return value for unsupported tuple' " Xueming Li
                     ` (45 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Huisong Li; +Cc: xuemingl, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ecb5bc37dd37c7b6834ca6371b9fb99949baabb6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ecb5bc37dd37c7b6834ca6371b9fb99949baabb6 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 1 Jun 2022 11:52:45 +0800
Subject: [PATCH] net/hns3: remove duplicate definition
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d7050da870a9d259a6422e253d54fa552cbfa7c8 ]

The default hash key array is defined twice. Remove the extra one.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 9 ---------
 drivers/net/hns3/hns3_rss.c  | 6 ++----
 drivers/net/hns3/hns3_rss.h  | 2 ++
 3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 3d30070ee3..a1acb0ebd5 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -9,15 +9,6 @@
 #include "hns3_ethdev.h"
 #include "hns3_logs.h"
 
-/* Default default keys */
-static uint8_t hns3_hash_key[] = {
-	0x6D, 0x5A, 0x56, 0xDA, 0x25, 0x5B, 0x0E, 0xC2,
-	0x41, 0x67, 0x25, 0x3D, 0x43, 0xA3, 0x8F, 0xB0,
-	0xD0, 0xCA, 0x2B, 0xCB, 0xAE, 0x7B, 0x30, 0xB4,
-	0x77, 0xCB, 0x2D, 0xA3, 0x80, 0x30, 0xF2, 0x0C,
-	0x6A, 0x42, 0xB7, 0x3B, 0xBE, 0xAC, 0x01, 0xFA
-};
-
 static const uint8_t full_mask[VNI_OR_TNI_LEN] = { 0xFF, 0xFF, 0xFF };
 static const uint8_t zero_mask[VNI_OR_TNI_LEN] = { 0x00, 0x00, 0x00 };
 
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 50c4f21da3..6a4ba26b7e 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -9,10 +9,8 @@
 #include "hns3_ethdev.h"
 #include "hns3_logs.h"
 
-/*
- * The hash key used for rss initialization.
- */
-static const uint8_t hns3_hash_key[] = {
+/* Default hash keys */
+const uint8_t hns3_hash_key[] = {
 	0x6D, 0x5A, 0x56, 0xDA, 0x25, 0x5B, 0x0E, 0xC2,
 	0x41, 0x67, 0x25, 0x3D, 0x43, 0xA3, 0x8F, 0xB0,
 	0xD0, 0xCA, 0x2B, 0xCB, 0xAE, 0x7B, 0x30, 0xB4,
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 685d76491e..7493292a1a 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -88,6 +88,8 @@ static inline uint32_t roundup_pow_of_two(uint32_t x)
 	return 1UL << fls(x - 1);
 }
 
+extern const uint8_t hns3_hash_key[];
+
 struct hns3_adapter;
 
 int hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.553606977 +0800
+++ 0017-net-hns3-remove-duplicate-definition.patch	2022-07-20 15:00:58.684333873 +0800
@@ -1 +1 @@
-From d7050da870a9d259a6422e253d54fa552cbfa7c8 Mon Sep 17 00:00:00 2001
+From ecb5bc37dd37c7b6834ca6371b9fb99949baabb6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d7050da870a9d259a6422e253d54fa552cbfa7c8 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 86ebbf69b6..ca9edc5244 100644
+index 3d30070ee3..a1acb0ebd5 100644
@@ -23 +25,2 @@
-@@ -10,15 +10,6 @@
+@@ -9,15 +9,6 @@
+ #include "hns3_ethdev.h"
@@ -25 +27,0 @@
- #include "hns3_flow.h"
@@ -40 +42 @@
-index 4c546c9363..1003daf03e 100644
+index 50c4f21da3..6a4ba26b7e 100644
@@ -57 +59 @@
-index 55d5718ffc..56627cbd4c 100644
+index 685d76491e..7493292a1a 100644

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

* patch 'net/hns3: fix return value for unsupported tuple' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (15 preceding siblings ...)
  2022-07-20  8:20   ` patch 'net/hns3: remove duplicate definition' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'app/testpmd: fix bonding slave devices not released' " Xueming Li
                     ` (44 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Huisong Li; +Cc: xuemingl, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/35768b682bc30151315f919a9a7b62b857bf3c7c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 35768b682bc30151315f919a9a7b62b857bf3c7c Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 1 Jun 2022 11:52:47 +0800
Subject: [PATCH] net/hns3: fix return value for unsupported tuple
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 66689dc09f0cf92af03abcba58b7474fa8ac847e ]

Driver should return false for unsupported tuple.

Fixes: 18a4b4c3fa80 ("net/hns3: add default to switch when parsing fd tuple")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_fdir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 693d9c731a..4e1667d2f8 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -618,7 +618,7 @@ static bool hns3_fd_convert_tuple(struct hns3_hw *hw,
 		break;
 	default:
 		hns3_warn(hw, "not support tuple of (%u)", tuple);
-		break;
+		return false;
 	}
 	return true;
 }
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.599142119 +0800
+++ 0018-net-hns3-fix-return-value-for-unsupported-tuple.patch	2022-07-20 15:00:58.684333873 +0800
@@ -1 +1 @@
-From 66689dc09f0cf92af03abcba58b7474fa8ac847e Mon Sep 17 00:00:00 2001
+From 35768b682bc30151315f919a9a7b62b857bf3c7c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 66689dc09f0cf92af03abcba58b7474fa8ac847e ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 2a7978ac07..a0d6598e57 100644
+index 693d9c731a..4e1667d2f8 100644
@@ -21 +23 @@
-@@ -631,7 +631,7 @@ static bool hns3_fd_convert_tuple(struct hns3_hw *hw,
+@@ -618,7 +618,7 @@ static bool hns3_fd_convert_tuple(struct hns3_hw *hw,

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

* patch 'app/testpmd: fix bonding slave devices not released' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (16 preceding siblings ...)
  2022-07-20  8:20   ` patch 'net/hns3: fix return value for unsupported tuple' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'net/txgbe: fix register polling' " Xueming Li
                     ` (43 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Huisong Li; +Cc: xuemingl, Min Hu, Dongdong Liu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/50c6ddd64239edff3d2c3dc00c3b10569443127a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 50c6ddd64239edff3d2c3dc00c3b10569443127a Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 9 Jun 2022 19:49:21 +0800
Subject: [PATCH] app/testpmd: fix bonding slave devices not released
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3889a3220c9b93f07dfdf95e30b2661e6e3f698f ]

Currently, some eth devices are added to bond device, these devices are
not released when the quit command is executed in testpmd. This patch
adds the release operation for all active slaves under a bond device.

Fixes: 0e545d3047fe ("app/testpmd: check stopping port is not in bonding")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 app/test-pmd/cmdline.c |  1 +
 app/test-pmd/testpmd.c | 41 +++++++++++++++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h |  2 ++
 3 files changed, 44 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index a84568aeea..83bb041484 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8233,6 +8233,7 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result,
 			    __rte_unused void *data)
 {
 	cmdline_quit(cl);
+	cl_quit = 1;
 }
 
 cmdline_parse_token_string_t cmd_quit_quit =
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 96e0f2d212..c29f1f153c 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -217,6 +217,7 @@ uint16_t stats_period; /**< Period to show statistics (disabled by default) */
  * option. Set flag to exit stats period loop after received SIGINT/SIGTERM.
  */
 uint8_t f_quit;
+uint8_t cl_quit; /* Quit testpmd from cmdline. */
 
 /*
  * Configuration of packet segments used to scatter received packets
@@ -2857,11 +2858,39 @@ remove_invalid_ports(void)
 	nb_cfg_ports = nb_fwd_ports;
 }
 
+static void
+clear_bonding_slave_device(portid_t *slave_pids, uint16_t num_slaves)
+{
+	struct rte_port *port;
+	portid_t slave_pid;
+	uint16_t i;
+
+	for (i = 0; i < num_slaves; i++) {
+		slave_pid = slave_pids[i];
+		if (port_is_started(slave_pid) == 1) {
+			if (rte_eth_dev_stop(slave_pid) != 0)
+				fprintf(stderr, "rte_eth_dev_stop failed for port %u\n",
+					slave_pid);
+
+			port = &ports[slave_pid];
+			port->port_status = RTE_PORT_STOPPED;
+		}
+
+		clear_port_slave_flag(slave_pid);
+
+		/* Close slave device when testpmd quit or is killed. */
+		if (cl_quit == 1 || f_quit == 1)
+			rte_eth_dev_close(slave_pid);
+	}
+}
+
 void
 close_port(portid_t pid)
 {
 	portid_t pi;
 	struct rte_port *port;
+	portid_t slave_pids[RTE_MAX_ETHPORTS];
+	int num_slaves = 0;
 
 	if (port_id_is_invalid(pid, ENABLED_WARN))
 		return;
@@ -2891,7 +2920,19 @@ close_port(portid_t pid)
 
 		mcast_addr_pool_destroy(pi);
 		port_flow_flush(pi);
+#ifdef RTE_NET_BOND
+			if (port->bond_flag == 1)
+				num_slaves = rte_eth_bond_slaves_get(pi,
+						slave_pids, RTE_MAX_ETHPORTS);
+#endif
 		rte_eth_dev_close(pi);
+			/*
+			 * If this port is bonded device, all slaves under the
+			 * device need to be removed or closed.
+			 */
+			if (port->bond_flag == 1 && num_slaves > 0)
+				clear_bonding_slave_device(slave_pids,
+							num_slaves);
 	}
 
 	remove_invalid_ports();
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index e97ab5d2a8..745e673b8d 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -24,6 +24,8 @@
 #define RTE_PORT_CLOSED         (uint16_t)2
 #define RTE_PORT_HANDLING       (uint16_t)3
 
+extern uint8_t cl_quit;
+
 /*
  * It is used to allocate the memory for hash key.
  * The hash key size is NIC dependent.
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.647279332 +0800
+++ 0019-app-testpmd-fix-bonding-slave-devices-not-released.patch	2022-07-20 15:00:58.704333841 +0800
@@ -1 +1 @@
-From 3889a3220c9b93f07dfdf95e30b2661e6e3f698f Mon Sep 17 00:00:00 2001
+From 50c6ddd64239edff3d2c3dc00c3b10569443127a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3889a3220c9b93f07dfdf95e30b2661e6e3f698f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 56a369e104..a59e6166d5 100644
+index a84568aeea..83bb041484 100644
@@ -27 +29 @@
-@@ -8918,6 +8918,7 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result,
+@@ -8233,6 +8233,7 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result,
@@ -34 +36 @@
- static cmdline_parse_token_string_t cmd_quit_quit =
+ cmdline_parse_token_string_t cmd_quit_quit =
@@ -36 +38 @@
-index 04c39adc21..205d98ee3d 100644
+index 96e0f2d212..c29f1f153c 100644
@@ -39 +41 @@
-@@ -229,6 +229,7 @@ unsigned int xstats_display_num; /**< Size of extended statistics to show */
+@@ -217,6 +217,7 @@ uint16_t stats_period; /**< Period to show statistics (disabled by default) */
@@ -46,2 +48,2 @@
-  * Max Rx frame size, set by '--max-pkt-len' parameter.
-@@ -3202,11 +3203,39 @@ remove_invalid_ports(void)
+  * Configuration of packet segments used to scatter received packets
+@@ -2857,11 +2858,39 @@ remove_invalid_ports(void)
@@ -87,4 +89,4 @@
-@@ -3242,7 +3271,19 @@ close_port(portid_t pid)
- 			port_flow_flush(pi);
- 			port_flex_item_flush(pi);
- 			port_action_handle_flush(pi);
+@@ -2891,7 +2920,19 @@ close_port(portid_t pid)
+ 
+ 		mcast_addr_pool_destroy(pi);
+ 		port_flow_flush(pi);
@@ -96 +98 @@
- 			rte_eth_dev_close(pi);
+ 		rte_eth_dev_close(pi);
@@ -104 +106 @@
- 		}
+ 	}
@@ -106 +108 @@
- 		free_xstats_display_info(pi);
+ 	remove_invalid_ports();
@@ -108 +110 @@
-index b90bba659a..ab333c7324 100644
+index e97ab5d2a8..745e673b8d 100644
@@ -111 +113 @@
-@@ -38,6 +38,8 @@
+@@ -24,6 +24,8 @@

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

* patch 'net/txgbe: fix register polling' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (17 preceding siblings ...)
  2022-07-20  8:20   ` patch 'app/testpmd: fix bonding slave devices not released' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'app/testpmd: revert MAC update in checksum forwarding' " Xueming Li
                     ` (42 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9b4779bfacef303e0f417337601365b6ddb00059

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9b4779bfacef303e0f417337601365b6ddb00059 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 22 Jun 2022 14:56:09 +0800
Subject: [PATCH] net/txgbe: fix register polling
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit aa08f3eb4ecf0997fd30ac073fcd895db71ef8e3 ]

Fix to poll some specific registers, which expect bit value 0.

'w32w' is used in registers where the write command bit is set and
waits for the bit clear to complete the write.

Fixes: 24a4c76aff4d ("net/txgbe: add error types and registers")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_regs.h | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index 3314975935..2802e59e16 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1817,8 +1817,13 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
 	}
 
 	do {
-		all |= rd32(hw, reg);
-		value |= mask & all;
+		if (expect != 0) {
+			all |= rd32(hw, reg);
+			value |= mask & all;
+		} else {
+			all = rd32(hw, reg);
+			value = mask & all;
+		}
 		if (value == expect)
 			break;
 
@@ -1846,7 +1851,7 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
 
 #define wr32w(hw, reg, val, mask, slice) do { \
 	wr32((hw), reg, val); \
-	po32m((hw), reg, mask, mask, NULL, 5, slice); \
+	po32m((hw), reg, mask, 0, NULL, 5, slice); \
 } while (0)
 
 #define TXGBE_XPCS_IDAADDR    0x13000
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.710167757 +0800
+++ 0020-net-txgbe-fix-register-polling.patch	2022-07-20 15:00:58.704333841 +0800
@@ -1 +1 @@
-From aa08f3eb4ecf0997fd30ac073fcd895db71ef8e3 Mon Sep 17 00:00:00 2001
+From 9b4779bfacef303e0f417337601365b6ddb00059 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit aa08f3eb4ecf0997fd30ac073fcd895db71ef8e3 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 3139796911..911bb6e04e 100644
+index 3314975935..2802e59e16 100644
@@ -23 +25 @@
-@@ -1864,8 +1864,13 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
+@@ -1817,8 +1817,13 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
@@ -39 +41 @@
-@@ -1898,7 +1903,7 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
+@@ -1846,7 +1851,7 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,

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

* patch 'app/testpmd: revert MAC update in checksum forwarding' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (18 preceding siblings ...)
  2022-07-20  8:20   ` patch 'net/txgbe: fix register polling' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'vhost: fix missing enqueue pseudo-header calculation' " Xueming Li
                     ` (41 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: xuemingl, Chenbo Xia, Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bbba8ef0cd92ddf853dcd6035e64b62df464bbb8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bbba8ef0cd92ddf853dcd6035e64b62df464bbb8 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 8 Jun 2022 14:49:41 +0200
Subject: [PATCH] app/testpmd: revert MAC update in checksum forwarding
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9b4ea7ae77faa8f8aba8c7510c821f75d7863b16 ]

This patch reverts
commit 10f4620f02e1 ("app/testpmd: modify mac in csum forwarding"),
as the checksum forwarding is expected to only perform
checksum and not also overwrites the source and destination MAC addresses.

Doing so, we can test checksum offloading with real traffic
without breaking broadcast packets.

Fixes: 10f4620f02e1 ("app/testpmd: modify mac in csum forwarding")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/csumonly.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 8adac07cb6..ffec25f308 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -888,10 +888,6 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 		 * and inner headers */
 
 		eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
-		rte_ether_addr_copy(&peer_eth_addrs[fs->peer_addr],
-				&eth_hdr->d_addr);
-		rte_ether_addr_copy(&ports[fs->tx_port].eth_addr,
-				&eth_hdr->s_addr);
 		parse_ethernet(eth_hdr, &info);
 		l3_hdr = (char *)eth_hdr + info.l2_len;
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.756426957 +0800
+++ 0021-app-testpmd-revert-MAC-update-in-checksum-forwarding.patch	2022-07-20 15:00:58.707667169 +0800
@@ -1 +1 @@
-From 9b4ea7ae77faa8f8aba8c7510c821f75d7863b16 Mon Sep 17 00:00:00 2001
+From bbba8ef0cd92ddf853dcd6035e64b62df464bbb8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9b4ea7ae77faa8f8aba8c7510c821f75d7863b16 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 7df201e047..1a3fd9ce8a 100644
+index 8adac07cb6..ffec25f308 100644
@@ -28 +30 @@
-@@ -916,10 +916,6 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
+@@ -888,10 +888,6 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
@@ -33 +35 @@
--				&eth_hdr->dst_addr);
+-				&eth_hdr->d_addr);
@@ -35 +37 @@
--				&eth_hdr->src_addr);
+-				&eth_hdr->s_addr);

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

* patch 'vhost: fix missing enqueue pseudo-header calculation' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (19 preceding siblings ...)
  2022-07-20  8:20   ` patch 'app/testpmd: revert MAC update in checksum forwarding' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'vhost/crypto: fix build with GCC 12' " Xueming Li
                     ` (40 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: xuemingl, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/338b9cbeb49b4e8ec6f576c99790b938141e7916

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 338b9cbeb49b4e8ec6f576c99790b938141e7916 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 8 Jun 2022 14:49:42 +0200
Subject: [PATCH] vhost: fix missing enqueue pseudo-header calculation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7316b4fd610fe945a0bc20054ba5ab61b98bb155 ]

The Virtio specification requires that in case of checksum
offloading, the pseudo-header checksum must be set in the
L4 header.

When received from another Vhost-user port, the packet
checksum might already contain the pseudo-header checksum
but we have no way to know it. So we have no other choice
than doing the pseudo-header checksum systematically.

This patch handles this using the rte_net_intel_cksum_prepare()
helper.

Fixes: 859b480d5afd ("vhost: add guest offload setting")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/virtio_net.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index d4e9da308a..485a93e313 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -428,6 +428,16 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
 		csum_l4 |= PKT_TX_TCP_CKSUM;
 
 	if (csum_l4) {
+		/*
+		 * Pseudo-header checksum must be set as per Virtio spec.
+		 *
+		 * Note: We don't propagate rte_net_intel_cksum_prepare()
+		 * errors, as it would have an impact on performance, and an
+		 * error would mean the packet is dropped by the guest instead
+		 * of being dropped here.
+		 */
+		rte_net_intel_cksum_prepare(m_buf);
+
 		net_hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
 		net_hdr->csum_start = m_buf->l2_len + m_buf->l3_len;
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.797886762 +0800
+++ 0022-vhost-fix-missing-enqueue-pseudo-header-calculation.patch	2022-07-20 15:00:58.707667169 +0800
@@ -1 +1 @@
-From 7316b4fd610fe945a0bc20054ba5ab61b98bb155 Mon Sep 17 00:00:00 2001
+From 338b9cbeb49b4e8ec6f576c99790b938141e7916 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7316b4fd610fe945a0bc20054ba5ab61b98bb155 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
- lib/vhost/virtio_net.c | 10 ++++++++++
+ lib/librte_vhost/virtio_net.c | 10 ++++++++++
@@ -27,6 +29,6 @@
-diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
-index 68a26eb17d..ce22e3ac79 100644
---- a/lib/vhost/virtio_net.c
-+++ b/lib/vhost/virtio_net.c
-@@ -596,6 +596,16 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
- 		csum_l4 |= RTE_MBUF_F_TX_TCP_CKSUM;
+diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
+index d4e9da308a..485a93e313 100644
+--- a/lib/librte_vhost/virtio_net.c
++++ b/lib/librte_vhost/virtio_net.c
+@@ -428,6 +428,16 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
+ 		csum_l4 |= PKT_TX_TCP_CKSUM;

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

* patch 'vhost/crypto: fix build with GCC 12' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (20 preceding siblings ...)
  2022-07-20  8:20   ` patch 'vhost: fix missing enqueue pseudo-header calculation' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'vhost/crypto: fix descriptor processing' " Xueming Li
                     ` (39 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: David Marchand; +Cc: xuemingl, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8aa20e45c65bb806718cda71aef85132486b1cd7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8aa20e45c65bb806718cda71aef85132486b1cd7 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 16 Jun 2022 16:46:50 +0200
Subject: [PATCH] vhost/crypto: fix build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4414bb67010dfec2559af52efe8f479b26d55447 ]

GCC 12 raises the following warning:

In file included from ../lib/mempool/rte_mempool.h:46,
                 from ../lib/mbuf/rte_mbuf.h:38,
                 from ../lib/vhost/vhost_crypto.c:7:
../lib/vhost/vhost_crypto.c: In function ‘rte_vhost_crypto_fetch_requests’:
../lib/eal/x86/include/rte_memcpy.h:371:9: warning: array subscript 1 is
     outside array bounds of ‘struct virtio_crypto_op_data_req[1]’
     [-Warray-bounds]
  371 | rte_mov32((uint8_t *)dst + 3 * 32, (const uint8_t *)src + 3 * 32);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/vhost/vhost_crypto.c:1178:42: note: while referencing ‘req’
 1178 |         struct virtio_crypto_op_data_req req;
      |                                          ^~~

Split this function and separate the per descriptor copy.
This makes the code clearer, and the compiler happier.

Note: logs for errors have been moved to callers to avoid duplicates.

Fixes: 3c79609fda7c ("vhost/crypto: handle virtually non-contiguous buffers")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_crypto.c | 123 ++++++++++++--------------------
 1 file changed, 46 insertions(+), 77 deletions(-)

diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index 926b5c0bd9..293960d350 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -565,94 +565,58 @@ get_data_ptr(struct vhost_crypto_data_req *vc_req,
 	return data;
 }
 
-static __rte_always_inline int
-copy_data(void *dst_data, struct vhost_crypto_data_req *vc_req,
-		struct vhost_crypto_desc *head,
-		struct vhost_crypto_desc **cur_desc,
-		uint32_t size, uint32_t max_n_descs)
+static __rte_always_inline uint32_t
+copy_data_from_desc(void *dst, struct vhost_crypto_data_req *vc_req,
+	struct vhost_crypto_desc *desc, uint32_t size)
 {
-	struct vhost_crypto_desc *desc = *cur_desc;
-	uint64_t remain, addr, dlen, len;
-	uint32_t to_copy;
-	uint8_t *data = dst_data;
-	uint8_t *src;
-	int left = size;
-
-	to_copy = RTE_MIN(desc->len, (uint32_t)left);
-	dlen = to_copy;
-	src = IOVA_TO_VVA(uint8_t *, vc_req, desc->addr, &dlen,
-			VHOST_ACCESS_RO);
-	if (unlikely(!src || !dlen))
-		return -1;
+	uint64_t remain;
+	uint64_t addr;
+
+	remain = RTE_MIN(desc->len, size);
+	addr = desc->addr;
+	do {
+		uint64_t len;
+		void *src;
+
+		len = remain;
+		src = IOVA_TO_VVA(void *, vc_req, addr, &len, VHOST_ACCESS_RO);
+		if (unlikely(src == NULL || len == 0))
+			return 0;
 
-	rte_memcpy((uint8_t *)data, src, dlen);
-	data += dlen;
+		rte_memcpy(dst, src, len);
+		remain -= len;
+		/* cast is needed for 32-bit architecture */
+		dst = RTE_PTR_ADD(dst, (size_t)len);
+		addr += len;
+	} while (unlikely(remain != 0));
 
-	if (unlikely(dlen < to_copy)) {
-		remain = to_copy - dlen;
-		addr = desc->addr + dlen;
+	return RTE_MIN(desc->len, size);
+}
 
-		while (remain) {
-			len = remain;
-			src = IOVA_TO_VVA(uint8_t *, vc_req, addr, &len,
-					VHOST_ACCESS_RO);
-			if (unlikely(!src || !len)) {
-				VC_LOG_ERR("Failed to map descriptor");
-				return -1;
-			}
 
-			rte_memcpy(data, src, len);
-			addr += len;
-			remain -= len;
-			data += len;
-		}
-	}
+static __rte_always_inline int
+copy_data(void *data, struct vhost_crypto_data_req *vc_req,
+	struct vhost_crypto_desc *head, struct vhost_crypto_desc **cur_desc,
+	uint32_t size, uint32_t max_n_descs)
+{
+	struct vhost_crypto_desc *desc = *cur_desc;
+	uint32_t left = size;
 
-	left -= to_copy;
+	do {
+		uint32_t copied;
 
-	while (desc >= head && desc - head < (int)max_n_descs && left) {
-		desc++;
-		to_copy = RTE_MIN(desc->len, (uint32_t)left);
-		dlen = to_copy;
-		src = IOVA_TO_VVA(uint8_t *, vc_req, desc->addr, &dlen,
-				VHOST_ACCESS_RO);
-		if (unlikely(!src || !dlen)) {
-			VC_LOG_ERR("Failed to map descriptor");
+		copied = copy_data_from_desc(data, vc_req, desc, left);
+		if (copied == 0)
 			return -1;
-		}
-
-		rte_memcpy(data, src, dlen);
-		data += dlen;
-
-		if (unlikely(dlen < to_copy)) {
-			remain = to_copy - dlen;
-			addr = desc->addr + dlen;
-
-			while (remain) {
-				len = remain;
-				src = IOVA_TO_VVA(uint8_t *, vc_req, addr, &len,
-						VHOST_ACCESS_RO);
-				if (unlikely(!src || !len)) {
-					VC_LOG_ERR("Failed to map descriptor");
-					return -1;
-				}
-
-				rte_memcpy(data, src, len);
-				addr += len;
-				remain -= len;
-				data += len;
-			}
-		}
-
-		left -= to_copy;
-	}
+		left -= copied;
+		data = RTE_PTR_ADD(data, copied);
+		desc++;
+	} while (desc < head + max_n_descs && left != 0);
 
-	if (unlikely(left > 0)) {
-		VC_LOG_ERR("Incorrect virtio descriptor");
+	if (unlikely(left != 0))
 		return -1;
-	}
 
-	if (unlikely(desc - head == (int)max_n_descs))
+	if (unlikely(desc == head + max_n_descs))
 		*cur_desc = NULL;
 	else
 		*cur_desc = desc + 1;
@@ -852,6 +816,7 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 	/* iv */
 	if (unlikely(copy_data(iv_data, vc_req, head, &desc,
 			cipher->para.iv_len, max_n_descs))) {
+		VC_LOG_ERR("Incorrect virtio descriptor");
 		ret = VIRTIO_CRYPTO_BADMSG;
 		goto error_exit;
 	}
@@ -883,6 +848,7 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 		if (unlikely(copy_data(rte_pktmbuf_mtod(m_src, uint8_t *),
 				vc_req, head, &desc, cipher->para.src_data_len,
 				max_n_descs) < 0)) {
+			VC_LOG_ERR("Incorrect virtio descriptor");
 			ret = VIRTIO_CRYPTO_BADMSG;
 			goto error_exit;
 		}
@@ -1006,6 +972,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 	/* iv */
 	if (unlikely(copy_data(iv_data, vc_req, head, &desc,
 			chain->para.iv_len, max_n_descs) < 0)) {
+		VC_LOG_ERR("Incorrect virtio descriptor");
 		ret = VIRTIO_CRYPTO_BADMSG;
 		goto error_exit;
 	}
@@ -1037,6 +1004,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 		if (unlikely(copy_data(rte_pktmbuf_mtod(m_src, uint8_t *),
 				vc_req, head, &desc, chain->para.src_data_len,
 				max_n_descs) < 0)) {
+			VC_LOG_ERR("Incorrect virtio descriptor");
 			ret = VIRTIO_CRYPTO_BADMSG;
 			goto error_exit;
 		}
@@ -1121,6 +1089,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 		if (unlikely(copy_data(digest_addr, vc_req, head, &digest_desc,
 				chain->para.hash_result_len,
 				max_n_descs) < 0)) {
+			VC_LOG_ERR("Incorrect virtio descriptor");
 			ret = VIRTIO_CRYPTO_BADMSG;
 			goto error_exit;
 		}
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.843384947 +0800
+++ 0023-vhost-crypto-fix-build-with-GCC-12.patch	2022-07-20 15:00:58.711000496 +0800
@@ -1 +1 @@
-From 4414bb67010dfec2559af52efe8f479b26d55447 Mon Sep 17 00:00:00 2001
+From 8aa20e45c65bb806718cda71aef85132486b1cd7 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4414bb67010dfec2559af52efe8f479b26d55447 ]
@@ -30 +32,0 @@
-Cc: stable@dpdk.org
@@ -35 +37 @@
- lib/vhost/vhost_crypto.c | 123 +++++++++++++++------------------------
+ lib/librte_vhost/vhost_crypto.c | 123 ++++++++++++--------------------
@@ -38,4 +40,4 @@
-diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
-index b1c0eb6a0f..96ffb82a5d 100644
---- a/lib/vhost/vhost_crypto.c
-+++ b/lib/vhost/vhost_crypto.c
+diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
+index 926b5c0bd9..293960d350 100644
+--- a/lib/librte_vhost/vhost_crypto.c
++++ b/lib/librte_vhost/vhost_crypto.c

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

* patch 'vhost/crypto: fix descriptor processing' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (21 preceding siblings ...)
  2022-07-20  8:20   ` patch 'vhost/crypto: fix build with GCC 12' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'malloc: fix allocation of almost hugepage size' " Xueming Li
                     ` (38 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: David Marchand
  Cc: xuemingl, Jakub Poczatek, Maxime Coquelin, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a0f0c7d9c5158e0611bf6fdd6e1a2a97ebfcc541

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a0f0c7d9c5158e0611bf6fdd6e1a2a97ebfcc541 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 22 Jun 2022 17:30:20 +0200
Subject: [PATCH] vhost/crypto: fix descriptor processing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2fbada91545c004f04449500af0c6276900317ab ]

copy_data was returning a pointer to an increased (off by one) descriptor.
Subsequent calls to copy_data in the library were then failing.
Fix this by incrementing the descriptor only if there is some left data
to copy.

Fixes: 4414bb67010d ("vhost/crypto: fix build with GCC 12")

Reported-by: Jakub Poczatek <jakub.poczatek@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Jakub Poczatek <jakub.poczatek@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 lib/librte_vhost/vhost_crypto.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index 293960d350..7d1d6a1861 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -610,8 +610,7 @@ copy_data(void *data, struct vhost_crypto_data_req *vc_req,
 			return -1;
 		left -= copied;
 		data = RTE_PTR_ADD(data, copied);
-		desc++;
-	} while (desc < head + max_n_descs && left != 0);
+	} while (left != 0 && ++desc < head + max_n_descs);
 
 	if (unlikely(left != 0))
 		return -1;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.885923988 +0800
+++ 0024-vhost-crypto-fix-descriptor-processing.patch	2022-07-20 15:00:58.711000496 +0800
@@ -1 +1 @@
-From 2fbada91545c004f04449500af0c6276900317ab Mon Sep 17 00:00:00 2001
+From a0f0c7d9c5158e0611bf6fdd6e1a2a97ebfcc541 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2fbada91545c004f04449500af0c6276900317ab ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
- lib/vhost/vhost_crypto.c | 3 +--
+ lib/librte_vhost/vhost_crypto.c | 3 +--
@@ -23,4 +25,4 @@
-diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
-index 96ffb82a5d..54946f46d9 100644
---- a/lib/vhost/vhost_crypto.c
-+++ b/lib/vhost/vhost_crypto.c
+diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
+index 293960d350..7d1d6a1861 100644
+--- a/lib/librte_vhost/vhost_crypto.c
++++ b/lib/librte_vhost/vhost_crypto.c

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

* patch 'malloc: fix allocation of almost hugepage size' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (22 preceding siblings ...)
  2022-07-20  8:20   ` patch 'vhost/crypto: fix descriptor processing' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'config: fix C++ cross compiler for Arm and PPC' " Xueming Li
                     ` (37 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Fidaullah Noonari; +Cc: xuemingl, Dmitry Kozlyuk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/dbbdee4c12fca634bf094e703465cb59eba8ca51

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dbbdee4c12fca634bf094e703465cb59eba8ca51 Mon Sep 17 00:00:00 2001
From: Fidaullah Noonari <fidaullah.noonari@emumba.com>
Date: Wed, 25 May 2022 10:18:37 +0500
Subject: [PATCH] malloc: fix allocation of almost hugepage size
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ce2f7d472e80c1b6779f230a1c7b137157f5ff3d ]

If called to allocate memory of size is between multiple of hugepage
size minus malloc_header_len and hugepage size, rte_malloc fails.

This fix replaces malloc_elem_trailer_len with malloc_elem_overhead in
try_expand_heap() to include malloc_elem_header_len when calculating
n_seg.

Bugzilla ID: 800
Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug")

Signed-off-by: Fidaullah Noonari <fidaullah.noonari@emumba.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/librte_eal/common/malloc_heap.c | 2 +-
 lib/librte_eal/common/malloc_mp.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c
index 350ff97ee0..f4e20eab92 100644
--- a/lib/librte_eal/common/malloc_heap.c
+++ b/lib/librte_eal/common/malloc_heap.c
@@ -397,7 +397,7 @@ try_expand_heap_primary(struct malloc_heap *heap, uint64_t pg_sz,
 	bool callback_triggered = false;
 
 	alloc_sz = RTE_ALIGN_CEIL(align + elt_size +
-			MALLOC_ELEM_TRAILER_LEN, pg_sz);
+			MALLOC_ELEM_OVERHEAD, pg_sz);
 	n_segs = alloc_sz / pg_sz;
 
 	/* we can't know in advance how many pages we'll need, so we malloc */
diff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c
index dd814ef53a..f9d558ba64 100644
--- a/lib/librte_eal/common/malloc_mp.c
+++ b/lib/librte_eal/common/malloc_mp.c
@@ -186,7 +186,7 @@ handle_alloc_request(const struct malloc_mp_req *m,
 	void *map_addr;
 
 	alloc_sz = RTE_ALIGN_CEIL(ar->align + ar->elt_size +
-			MALLOC_ELEM_TRAILER_LEN, ar->page_sz);
+			MALLOC_ELEM_OVERHEAD, ar->page_sz);
 	n_segs = alloc_sz / ar->page_sz;
 
 	heap = ar->heap;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.929132765 +0800
+++ 0025-malloc-fix-allocation-of-almost-hugepage-size.patch	2022-07-20 15:00:58.711000496 +0800
@@ -1 +1 @@
-From ce2f7d472e80c1b6779f230a1c7b137157f5ff3d Mon Sep 17 00:00:00 2001
+From dbbdee4c12fca634bf094e703465cb59eba8ca51 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ce2f7d472e80c1b6779f230a1c7b137157f5ff3d ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -20,2 +22,2 @@
- lib/eal/common/malloc_heap.c | 2 +-
- lib/eal/common/malloc_mp.c   | 2 +-
+ lib/librte_eal/common/malloc_heap.c | 2 +-
+ lib/librte_eal/common/malloc_mp.c   | 2 +-
@@ -24,5 +26,5 @@
-diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c
-index a3d26fcbea..27a52266ad 100644
---- a/lib/eal/common/malloc_heap.c
-+++ b/lib/eal/common/malloc_heap.c
-@@ -403,7 +403,7 @@ try_expand_heap_primary(struct malloc_heap *heap, uint64_t pg_sz,
+diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c
+index 350ff97ee0..f4e20eab92 100644
+--- a/lib/librte_eal/common/malloc_heap.c
++++ b/lib/librte_eal/common/malloc_heap.c
+@@ -397,7 +397,7 @@ try_expand_heap_primary(struct malloc_heap *heap, uint64_t pg_sz,
@@ -37,6 +39,6 @@
-diff --git a/lib/eal/common/malloc_mp.c b/lib/eal/common/malloc_mp.c
-index 207b90847e..2b8eb51067 100644
---- a/lib/eal/common/malloc_mp.c
-+++ b/lib/eal/common/malloc_mp.c
-@@ -250,7 +250,7 @@ handle_alloc_request(const struct malloc_mp_req *m,
- 	}
+diff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c
+index dd814ef53a..f9d558ba64 100644
+--- a/lib/librte_eal/common/malloc_mp.c
++++ b/lib/librte_eal/common/malloc_mp.c
+@@ -186,7 +186,7 @@ handle_alloc_request(const struct malloc_mp_req *m,
+ 	void *map_addr;
@@ -49 +51 @@
- 	/* we can't know in advance how many pages we'll need, so we malloc */
+ 	heap = ar->heap;

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

* patch 'config: fix C++ cross compiler for Arm and PPC' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (23 preceding siblings ...)
  2022-07-20  8:20   ` patch 'malloc: fix allocation of almost hugepage size' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'ci: enable C++ check " Xueming Li
                     ` (36 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Stanislaw Kardach; +Cc: xuemingl, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/45eb4af45623cf627cbb873c20bc859ce05ade61

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 45eb4af45623cf627cbb873c20bc859ce05ade61 Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Tue, 21 Jun 2022 14:28:23 +0200
Subject: [PATCH] config: fix C++ cross compiler for Arm and PPC
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f75dd6d3b1215c2e7cdbdc290b5789517c8cfe10 ]

Through some mixup all cross-files for ARM and PowerPC platforms were
using C Preprocessor (cpp) instead of GCC (g++).
This caused meson to fail detecting the C++ compiler presence and
therefore disabling some targets (i.e. C++ include file checks).

Fixes: e53a5299d219 ("build: support vendor specific ARM cross builds")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/arm/arm64_armada_linux_gcc    | 2 +-
 config/arm/arm64_armv8_linux_gcc     | 2 +-
 config/arm/arm64_bluefield_linux_gcc | 2 +-
 config/arm/arm64_dpaa_linux_gcc      | 2 +-
 config/arm/arm64_emag_linux_gcc      | 2 +-
 config/arm/arm64_graviton2_linux_gcc | 2 +-
 config/arm/arm64_n1sdp_linux_gcc     | 2 +-
 config/arm/arm64_octeontx2_linux_gcc | 2 +-
 config/arm/arm64_stingray_linux_gcc  | 2 +-
 config/arm/arm64_thunderx2_linux_gcc | 2 +-
 config/arm/arm64_thunderx_linux_gcc  | 2 +-
 config/ppc/ppc64le-power8-linux-gcc  | 2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/config/arm/arm64_armada_linux_gcc b/config/arm/arm64_armada_linux_gcc
index fa40c0398f..d78c99e8e8 100644
--- a/config/arm/arm64_armada_linux_gcc
+++ b/config/arm/arm64_armada_linux_gcc
@@ -1,6 +1,6 @@
 [binaries]
 c = 'aarch64-linux-gnu-gcc'
-cpp = 'aarch64-linux-gnu-cpp'
+cpp = 'aarch64-linux-gnu-g++'
 ar = 'aarch64-linux-gnu-ar'
 as = 'aarch64-linux-gnu-as'
 strip = 'aarch64-linux-gnu-strip'
diff --git a/config/arm/arm64_armv8_linux_gcc b/config/arm/arm64_armv8_linux_gcc
index 88f0ff9dae..057d70bbdd 100644
--- a/config/arm/arm64_armv8_linux_gcc
+++ b/config/arm/arm64_armv8_linux_gcc
@@ -1,6 +1,6 @@
 [binaries]
 c = 'aarch64-linux-gnu-gcc'
-cpp = 'aarch64-linux-gnu-cpp'
+cpp = 'aarch64-linux-gnu-g++'
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
diff --git a/config/arm/arm64_bluefield_linux_gcc b/config/arm/arm64_bluefield_linux_gcc
index 86797d23cd..616e633495 100644
--- a/config/arm/arm64_bluefield_linux_gcc
+++ b/config/arm/arm64_bluefield_linux_gcc
@@ -1,6 +1,6 @@
 [binaries]
 c = 'aarch64-linux-gnu-gcc'
-cpp = 'aarch64-linux-gnu-cpp'
+cpp = 'aarch64-linux-gnu-g++'
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
diff --git a/config/arm/arm64_dpaa_linux_gcc b/config/arm/arm64_dpaa_linux_gcc
index 1a46821543..0108bb952a 100644
--- a/config/arm/arm64_dpaa_linux_gcc
+++ b/config/arm/arm64_dpaa_linux_gcc
@@ -1,6 +1,6 @@
 [binaries]
 c = 'aarch64-linux-gnu-gcc'
-cpp = 'aarch64-linux-gnu-cpp'
+cpp = 'aarch64-linux-gnu-g++'
 ar = 'aarch64-linux-gnu-ar'
 as = 'aarch64-linux-gnu-as'
 strip = 'aarch64-linux-gnu-strip'
diff --git a/config/arm/arm64_emag_linux_gcc b/config/arm/arm64_emag_linux_gcc
index 8edcd3e976..3bb5134224 100644
--- a/config/arm/arm64_emag_linux_gcc
+++ b/config/arm/arm64_emag_linux_gcc
@@ -1,6 +1,6 @@
 [binaries]
 c = 'aarch64-linux-gnu-gcc'
-cpp = 'aarch64-linux-gnu-cpp'
+cpp = 'aarch64-linux-gnu-g++'
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
diff --git a/config/arm/arm64_graviton2_linux_gcc b/config/arm/arm64_graviton2_linux_gcc
index 022e063039..421d06c77f 100644
--- a/config/arm/arm64_graviton2_linux_gcc
+++ b/config/arm/arm64_graviton2_linux_gcc
@@ -1,6 +1,6 @@
 [binaries]
 c = 'aarch64-linux-gnu-gcc'
-cpp = 'aarch64-linux-gnu-cpp'
+cpp = 'aarch64-linux-gnu-g++'
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
diff --git a/config/arm/arm64_n1sdp_linux_gcc b/config/arm/arm64_n1sdp_linux_gcc
index 022e063039..421d06c77f 100644
--- a/config/arm/arm64_n1sdp_linux_gcc
+++ b/config/arm/arm64_n1sdp_linux_gcc
@@ -1,6 +1,6 @@
 [binaries]
 c = 'aarch64-linux-gnu-gcc'
-cpp = 'aarch64-linux-gnu-cpp'
+cpp = 'aarch64-linux-gnu-g++'
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
diff --git a/config/arm/arm64_octeontx2_linux_gcc b/config/arm/arm64_octeontx2_linux_gcc
index 365bd7cbdd..0d7a66c97e 100644
--- a/config/arm/arm64_octeontx2_linux_gcc
+++ b/config/arm/arm64_octeontx2_linux_gcc
@@ -1,6 +1,6 @@
 [binaries]
 c = 'aarch64-linux-gnu-gcc'
-cpp = 'aarch64-linux-gnu-cpp'
+cpp = 'aarch64-linux-gnu-g++'
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
diff --git a/config/arm/arm64_stingray_linux_gcc b/config/arm/arm64_stingray_linux_gcc
index 86797d23cd..616e633495 100644
--- a/config/arm/arm64_stingray_linux_gcc
+++ b/config/arm/arm64_stingray_linux_gcc
@@ -1,6 +1,6 @@
 [binaries]
 c = 'aarch64-linux-gnu-gcc'
-cpp = 'aarch64-linux-gnu-cpp'
+cpp = 'aarch64-linux-gnu-g++'
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
diff --git a/config/arm/arm64_thunderx2_linux_gcc b/config/arm/arm64_thunderx2_linux_gcc
index 2b41acc615..24346ffe71 100644
--- a/config/arm/arm64_thunderx2_linux_gcc
+++ b/config/arm/arm64_thunderx2_linux_gcc
@@ -1,6 +1,6 @@
 [binaries]
 c = 'aarch64-linux-gnu-gcc'
-cpp = 'aarch64-linux-gnu-cpp'
+cpp = 'aarch64-linux-gnu-g++'
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
diff --git a/config/arm/arm64_thunderx_linux_gcc b/config/arm/arm64_thunderx_linux_gcc
index 6572ab615d..cbf60bac73 100644
--- a/config/arm/arm64_thunderx_linux_gcc
+++ b/config/arm/arm64_thunderx_linux_gcc
@@ -1,6 +1,6 @@
 [binaries]
 c = 'aarch64-linux-gnu-gcc'
-cpp = 'aarch64-linux-gnu-cpp'
+cpp = 'aarch64-linux-gnu-g++'
 ar = 'aarch64-linux-gnu-gcc-ar'
 strip = 'aarch64-linux-gnu-strip'
 pkgconfig = 'aarch64-linux-gnu-pkg-config'
diff --git a/config/ppc/ppc64le-power8-linux-gcc b/config/ppc/ppc64le-power8-linux-gcc
index 51f7ceebf3..784c33df9e 100644
--- a/config/ppc/ppc64le-power8-linux-gcc
+++ b/config/ppc/ppc64le-power8-linux-gcc
@@ -1,6 +1,6 @@
 [binaries]
 c = 'powerpc64le-linux-gcc'
-cpp = 'powerpc64le-linux-cpp'
+cpp = 'powerpc64le-linux-g++'
 ar = 'powerpc64le-linux-gcc-ar'
 strip = 'powerpc64le-linux-strip'
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.972904920 +0800
+++ 0026-config-fix-C-cross-compiler-for-Arm-and-PPC.patch	2022-07-20 15:00:58.714333824 +0800
@@ -1 +1 @@
-From f75dd6d3b1215c2e7cdbdc290b5789517c8cfe10 Mon Sep 17 00:00:00 2001
+From 45eb4af45623cf627cbb873c20bc859ce05ade61 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f75dd6d3b1215c2e7cdbdc290b5789517c8cfe10 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,21 +19,13 @@
- config/arm/arm32_armv8_linux_gcc           | 2 +-
- config/arm/arm64_armada_linux_gcc          | 2 +-
- config/arm/arm64_armv8_linux_gcc           | 2 +-
- config/arm/arm64_bluefield_linux_gcc       | 2 +-
- config/arm/arm64_centriq2400_linux_gcc     | 2 +-
- config/arm/arm64_cn10k_linux_gcc           | 2 +-
- config/arm/arm64_cn9k_linux_gcc            | 2 +-
- config/arm/arm64_dpaa_linux_gcc            | 2 +-
- config/arm/arm64_emag_linux_gcc            | 2 +-
- config/arm/arm64_graviton2_linux_gcc       | 2 +-
- config/arm/arm64_kunpeng920_linux_gcc      | 2 +-
- config/arm/arm64_kunpeng930_linux_gcc      | 2 +-
- config/arm/arm64_n1sdp_linux_gcc           | 2 +-
- config/arm/arm64_n2_linux_gcc              | 2 +-
- config/arm/arm64_stingray_linux_gcc        | 2 +-
- config/arm/arm64_thunderx2_linux_gcc       | 2 +-
- config/arm/arm64_thunderxt83_linux_gcc     | 2 +-
- config/arm/arm64_thunderxt88_linux_gcc     | 2 +-
- config/ppc/ppc64le-power8-linux-gcc        | 2 +-
- config/ppc/ppc64le-power8-linux-gcc-ubuntu | 2 +-
- 20 files changed, 20 insertions(+), 20 deletions(-)
+ config/arm/arm64_armada_linux_gcc    | 2 +-
+ config/arm/arm64_armv8_linux_gcc     | 2 +-
+ config/arm/arm64_bluefield_linux_gcc | 2 +-
+ config/arm/arm64_dpaa_linux_gcc      | 2 +-
+ config/arm/arm64_emag_linux_gcc      | 2 +-
+ config/arm/arm64_graviton2_linux_gcc | 2 +-
+ config/arm/arm64_n1sdp_linux_gcc     | 2 +-
+ config/arm/arm64_octeontx2_linux_gcc | 2 +-
+ config/arm/arm64_stingray_linux_gcc  | 2 +-
+ config/arm/arm64_thunderx2_linux_gcc | 2 +-
+ config/arm/arm64_thunderx_linux_gcc  | 2 +-
+ config/ppc/ppc64le-power8-linux-gcc  | 2 +-
+ 12 files changed, 12 insertions(+), 12 deletions(-)
@@ -39,12 +32,0 @@
-diff --git a/config/arm/arm32_armv8_linux_gcc b/config/arm/arm32_armv8_linux_gcc
-index 7f2977e49d..269a60ba19 100644
---- a/config/arm/arm32_armv8_linux_gcc
-+++ b/config/arm/arm32_armv8_linux_gcc
-@@ -1,6 +1,6 @@
- [binaries]
- c = ['ccache', 'arm-linux-gnueabihf-gcc']
--cpp = ['ccache', 'arm-linux-gnueabihf-cpp']
-+cpp = ['ccache', 'arm-linux-gnueabihf-g++']
- ar = 'arm-linux-gnueabihf-gcc-ar'
- strip = 'arm-linux-gnueabihf-strip'
- pkgconfig = 'arm-linux-gnueabihf-pkg-config'
@@ -52 +34 @@
-index 1566999101..635b4946a3 100644
+index fa40c0398f..d78c99e8e8 100644
@@ -57,3 +39,3 @@
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
+ c = 'aarch64-linux-gnu-gcc'
+-cpp = 'aarch64-linux-gnu-cpp'
++cpp = 'aarch64-linux-gnu-g++'
@@ -64 +46 @@
-index 048c2d9f29..529694b49d 100644
+index 88f0ff9dae..057d70bbdd 100644
@@ -69,3 +51,3 @@
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
+ c = 'aarch64-linux-gnu-gcc'
+-cpp = 'aarch64-linux-gnu-cpp'
++cpp = 'aarch64-linux-gnu-g++'
@@ -76 +58 @@
-index 38df3c198b..1286227915 100644
+index 86797d23cd..616e633495 100644
@@ -81,39 +63,3 @@
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-diff --git a/config/arm/arm64_centriq2400_linux_gcc b/config/arm/arm64_centriq2400_linux_gcc
-index 0966eef2c5..bc8737e072 100644
---- a/config/arm/arm64_centriq2400_linux_gcc
-+++ b/config/arm/arm64_centriq2400_linux_gcc
-@@ -1,6 +1,6 @@
- [binaries]
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-diff --git a/config/arm/arm64_cn10k_linux_gcc b/config/arm/arm64_cn10k_linux_gcc
-index 201e0ccd59..05d2d64cf2 100644
---- a/config/arm/arm64_cn10k_linux_gcc
-+++ b/config/arm/arm64_cn10k_linux_gcc
-@@ -1,6 +1,6 @@
- [binaries]
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-diff --git a/config/arm/arm64_cn9k_linux_gcc b/config/arm/arm64_cn9k_linux_gcc
-index a9b4d51958..7416454de0 100644
---- a/config/arm/arm64_cn9k_linux_gcc
-+++ b/config/arm/arm64_cn9k_linux_gcc
-@@ -1,6 +1,6 @@
- [binaries]
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
+ c = 'aarch64-linux-gnu-gcc'
+-cpp = 'aarch64-linux-gnu-cpp'
++cpp = 'aarch64-linux-gnu-g++'
@@ -124 +70 @@
-index 0d5761bd72..8465b5097b 100644
+index 1a46821543..0108bb952a 100644
@@ -129,3 +75,3 @@
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
+ c = 'aarch64-linux-gnu-gcc'
+-cpp = 'aarch64-linux-gnu-cpp'
++cpp = 'aarch64-linux-gnu-g++'
@@ -136 +82 @@
-index 16ec49fc32..248169ed68 100644
+index 8edcd3e976..3bb5134224 100644
@@ -141,3 +87,3 @@
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
+ c = 'aarch64-linux-gnu-gcc'
+-cpp = 'aarch64-linux-gnu-cpp'
++cpp = 'aarch64-linux-gnu-g++'
@@ -148 +94 @@
-index 094c540f50..fdb298bb11 100644
+index 022e063039..421d06c77f 100644
@@ -153,27 +99,3 @@
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-diff --git a/config/arm/arm64_kunpeng920_linux_gcc b/config/arm/arm64_kunpeng920_linux_gcc
-index fc057c9063..193fb48a61 100644
---- a/config/arm/arm64_kunpeng920_linux_gcc
-+++ b/config/arm/arm64_kunpeng920_linux_gcc
-@@ -1,6 +1,6 @@
- [binaries]
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-diff --git a/config/arm/arm64_kunpeng930_linux_gcc b/config/arm/arm64_kunpeng930_linux_gcc
-index 5f43941fae..e4281ceb4f 100644
---- a/config/arm/arm64_kunpeng930_linux_gcc
-+++ b/config/arm/arm64_kunpeng930_linux_gcc
-@@ -1,6 +1,6 @@
- [binaries]
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
+ c = 'aarch64-linux-gnu-gcc'
+-cpp = 'aarch64-linux-gnu-cpp'
++cpp = 'aarch64-linux-gnu-g++'
@@ -184 +106 @@
-index fc123ab53f..2806a4241b 100644
+index 022e063039..421d06c77f 100644
@@ -189,3 +111,3 @@
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
+ c = 'aarch64-linux-gnu-gcc'
+-cpp = 'aarch64-linux-gnu-cpp'
++cpp = 'aarch64-linux-gnu-g++'
@@ -195,4 +117,4 @@
-diff --git a/config/arm/arm64_n2_linux_gcc b/config/arm/arm64_n2_linux_gcc
-index 930bd5c236..7404bd197b 100644
---- a/config/arm/arm64_n2_linux_gcc
-+++ b/config/arm/arm64_n2_linux_gcc
+diff --git a/config/arm/arm64_octeontx2_linux_gcc b/config/arm/arm64_octeontx2_linux_gcc
+index 365bd7cbdd..0d7a66c97e 100644
+--- a/config/arm/arm64_octeontx2_linux_gcc
++++ b/config/arm/arm64_octeontx2_linux_gcc
@@ -201,3 +123,3 @@
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
+ c = 'aarch64-linux-gnu-gcc'
+-cpp = 'aarch64-linux-gnu-cpp'
++cpp = 'aarch64-linux-gnu-g++'
@@ -208 +130 @@
-index 5dfcd974fd..08148b5c3d 100644
+index 86797d23cd..616e633495 100644
@@ -213,3 +135,3 @@
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
+ c = 'aarch64-linux-gnu-gcc'
+-cpp = 'aarch64-linux-gnu-cpp'
++cpp = 'aarch64-linux-gnu-g++'
@@ -220 +142 @@
-index c1f5995d93..32ae938e95 100644
+index 2b41acc615..24346ffe71 100644
@@ -225,15 +147,3 @@
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-diff --git a/config/arm/arm64_thunderxt83_linux_gcc b/config/arm/arm64_thunderxt83_linux_gcc
-index 52746e2e59..e9d9e62d44 100644
---- a/config/arm/arm64_thunderxt83_linux_gcc
-+++ b/config/arm/arm64_thunderxt83_linux_gcc
-@@ -1,6 +1,6 @@
- [binaries]
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
+ c = 'aarch64-linux-gnu-gcc'
+-cpp = 'aarch64-linux-gnu-cpp'
++cpp = 'aarch64-linux-gnu-g++'
@@ -243,4 +153,4 @@
-diff --git a/config/arm/arm64_thunderxt88_linux_gcc b/config/arm/arm64_thunderxt88_linux_gcc
-index fed7eb791e..c6e5a5656a 100644
---- a/config/arm/arm64_thunderxt88_linux_gcc
-+++ b/config/arm/arm64_thunderxt88_linux_gcc
+diff --git a/config/arm/arm64_thunderx_linux_gcc b/config/arm/arm64_thunderx_linux_gcc
+index 6572ab615d..cbf60bac73 100644
+--- a/config/arm/arm64_thunderx_linux_gcc
++++ b/config/arm/arm64_thunderx_linux_gcc
@@ -249,3 +159,3 @@
- c = ['ccache', 'aarch64-linux-gnu-gcc']
--cpp = ['ccache', 'aarch64-linux-gnu-cpp']
-+cpp = ['ccache', 'aarch64-linux-gnu-g++']
+ c = 'aarch64-linux-gnu-gcc'
+-cpp = 'aarch64-linux-gnu-cpp'
++cpp = 'aarch64-linux-gnu-g++'
@@ -256 +166 @@
-index 465044e427..8c2db89382 100644
+index 51f7ceebf3..784c33df9e 100644
@@ -261,3 +171,3 @@
- c = ['ccache', 'powerpc64le-linux-gcc']
--cpp = ['ccache', 'powerpc64le-linux-cpp']
-+cpp = ['ccache', 'powerpc64le-linux-g++']
+ c = 'powerpc64le-linux-gcc'
+-cpp = 'powerpc64le-linux-cpp'
++cpp = 'powerpc64le-linux-g++'
@@ -266,12 +175,0 @@
- 
-diff --git a/config/ppc/ppc64le-power8-linux-gcc-ubuntu b/config/ppc/ppc64le-power8-linux-gcc-ubuntu
-index 44d7e0100a..3027d66f8d 100644
---- a/config/ppc/ppc64le-power8-linux-gcc-ubuntu
-+++ b/config/ppc/ppc64le-power8-linux-gcc-ubuntu
-@@ -1,6 +1,6 @@
- [binaries]
- c = ['ccache', 'powerpc64le-linux-gnu-gcc']
--cpp = ['ccache', 'powerpc64le-linux-gnu-cpp']
-+cpp = ['ccache', 'powerpc64le-linux-gnu-g++']
- ar = 'powerpc64le-linux-gnu-ar'
- strip = 'powerpc64le-linux-gnu-strip'

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

* patch 'ci: enable C++ check for Arm and PPC' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (24 preceding siblings ...)
  2022-07-20  8:20   ` patch 'config: fix C++ cross compiler for Arm and PPC' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'net/octeontx: fix port close' " Xueming Li
                     ` (35 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Stanislaw Kardach; +Cc: xuemingl, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c9f6c89d9aa3bdaa0e049f186f83586346d14cc0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c9f6c89d9aa3bdaa0e049f186f83586346d14cc0 Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Tue, 21 Jun 2022 14:28:24 +0200
Subject: [PATCH] ci: enable C++ check for Arm and PPC
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c65e343c141d362ae00df717c9ce9af1f9310647 ]

The crossbuild-essential-<arch> packages contain all necessary
dependencies to cross-compile binaries for a given architecture
including C and C++ compilers. Therefore use those instead of listing
packages directly. This way C++ compiler is also installed and C++
include checks will be checked in CI for ARM and PowerPC.

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 .github/workflows/build.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4093b326c8..fa79f05955 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -102,8 +102,7 @@ jobs:
       run: sudo apt install -y gcc-multilib
     - name: Install aarch64 cross compiling packages
       if: env.AARCH64 == 'true'
-      run: sudo apt install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
-        pkg-config-aarch64-linux-gnu
+      run: sudo apt install -y crossbuild-essential-arm64
     - name: Install test tools packages
       if: env.AARCH64 != 'true' || env.RUN_TESTS == 'true'
       run: sudo apt install -y gdb
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.067499300 +0800
+++ 0027-ci-enable-C-check-for-Arm-and-PPC.patch	2022-07-20 15:00:58.714333824 +0800
@@ -1 +1 @@
-From c65e343c141d362ae00df717c9ce9af1f9310647 Mon Sep 17 00:00:00 2001
+From c9f6c89d9aa3bdaa0e049f186f83586346d14cc0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c65e343c141d362ae00df717c9ce9af1f9310647 ]
@@ -12,2 +14,0 @@
-Cc: stable@dpdk.org
-
@@ -17,2 +18,2 @@
- .github/workflows/build.yml | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
+ .github/workflows/build.yml | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
@@ -21 +22 @@
-index c0d2829d0e..1106256539 100644
+index 4093b326c8..fa79f05955 100644
@@ -24,2 +25,2 @@
-@@ -128,15 +128,13 @@ jobs:
-       run: sudo apt install -y gcc-multilib g++-multilib
+@@ -102,8 +102,7 @@ jobs:
+       run: sudo apt install -y gcc-multilib
@@ -31,11 +32,3 @@
-     - name: Install mingw cross compiling packages
-       if: env.MINGW == 'true'
-       run: sudo apt install -y mingw-w64 mingw-w64-tools
-     - name: Install ppc64le cross compiling packages
-       if: env.PPC64LE == 'true'
--      run: sudo apt install -y gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross
--        pkg-config-powerpc-linux-gnu
-+      run: sudo apt install -y crossbuild-essential-ppc64el
-     - name: Install riscv64 cross compiling packages
-       if: env.RISCV64 == 'true'
-       run: sudo apt install -y crossbuild-essential-riscv64
+     - name: Install test tools packages
+       if: env.AARCH64 != 'true' || env.RUN_TESTS == 'true'
+       run: sudo apt install -y gdb

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

* patch 'net/octeontx: fix port close' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (25 preceding siblings ...)
  2022-07-20  8:20   ` patch 'ci: enable C++ check " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'net/qede: fix build with GCC 13' " Xueming Li
                     ` (34 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Harman Kalra; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ac50182289fb01dbd0206fa6aa15099755ce60d6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ac50182289fb01dbd0206fa6aa15099755ce60d6 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Tue, 24 May 2022 14:12:26 +0530
Subject: [PATCH] net/octeontx: fix port close
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 39e07170331f869c581ce4d3cdc0360f7b6b444a ]

Segmentation fault has been observed while closing the ethernet
port. Reason for the segfault is, eth port close also shuts down
event device while other ethernet port is still using the event
device.

Fixes: da6c687471a3 ("net/octeontx: add start and stop support")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index d531a21c95..cf01155c82 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -25,6 +25,11 @@
 #include "octeontx_rxtx.h"
 #include "octeontx_logs.h"
 
+/* Useful in stopping/closing event device if no of
+ * eth ports are using it.
+ */
+uint16_t evdev_refcnt;
+
 struct evdev_priv_data {
 	OFFLOAD_FLAGS; /*Sequence should not be changed */
 } __rte_cache_aligned;
@@ -490,7 +495,11 @@ octeontx_dev_close(struct rte_eth_dev *dev)
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
-	rte_event_dev_close(nic->evdev);
+	/* Stopping/closing event device once all eth ports are closed. */
+	if (__atomic_sub_fetch(&evdev_refcnt, 1, __ATOMIC_ACQUIRE) == 0) {
+		rte_event_dev_stop(nic->evdev);
+		rte_event_dev_close(nic->evdev);
+	}
 
 	octeontx_dev_flow_ctrl_fini(dev);
 
@@ -681,8 +690,6 @@ octeontx_dev_stop(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	rte_event_dev_stop(nic->evdev);
-
 	ret = octeontx_port_stop(nic);
 	if (ret < 0) {
 		octeontx_log_err("failed to req stop port %d res=%d",
@@ -1346,6 +1353,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
 	nic->pko_vfid = pko_vfid;
 	nic->port_id = port;
 	nic->evdev = evdev;
+	__atomic_add_fetch(&evdev_refcnt, 1, __ATOMIC_ACQUIRE);
 
 	res = octeontx_port_open(nic);
 	if (res < 0)
@@ -1595,6 +1603,7 @@ octeontx_probe(struct rte_vdev_device *dev)
 		}
 	}
 
+	__atomic_store_n(&evdev_refcnt, 0, __ATOMIC_RELEASE);
 	/*
 	 * Do 1:1 links for ports & queues. All queues would be mapped to
 	 * one port. If there are more ports than queues, then some ports
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.111785026 +0800
+++ 0028-net-octeontx-fix-port-close.patch	2022-07-20 15:00:58.714333824 +0800
@@ -1 +1 @@
-From 39e07170331f869c581ce4d3cdc0360f7b6b444a Mon Sep 17 00:00:00 2001
+From ac50182289fb01dbd0206fa6aa15099755ce60d6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 39e07170331f869c581ce4d3cdc0360f7b6b444a ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index f5ea9de8ef..6469fd0a96 100644
+index d531a21c95..cf01155c82 100644
@@ -23 +25 @@
-@@ -26,6 +26,11 @@
+@@ -25,6 +25,11 @@
@@ -35 +37 @@
-@@ -491,7 +496,11 @@ octeontx_dev_close(struct rte_eth_dev *dev)
+@@ -490,7 +495,11 @@ octeontx_dev_close(struct rte_eth_dev *dev)
@@ -48 +50 @@
-@@ -671,8 +680,6 @@ octeontx_dev_stop(struct rte_eth_dev *dev)
+@@ -681,8 +690,6 @@ octeontx_dev_stop(struct rte_eth_dev *dev)
@@ -57 +59 @@
-@@ -1333,6 +1340,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
+@@ -1346,6 +1353,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
@@ -65 +67 @@
-@@ -1582,6 +1590,7 @@ octeontx_probe(struct rte_vdev_device *dev)
+@@ -1595,6 +1603,7 @@ octeontx_probe(struct rte_vdev_device *dev)

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

* patch 'net/qede: fix build with GCC 13' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (26 preceding siblings ...)
  2022-07-20  8:20   ` patch 'net/octeontx: fix port close' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:20   ` patch 'net/ice/base: fix build with GCC 12' " Xueming Li
                     ` (33 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: xuemingl, Devendra Singh Rawat, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b9db1042c38b542426e4ee4780856578f5ecf68a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b9db1042c38b542426e4ee4780856578f5ecf68a Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@xilinx.com>
Date: Thu, 16 Jun 2022 18:02:09 +0100
Subject: [PATCH] net/qede: 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 721ef3f54578e33905f75c7196439981dc264289 ]

Reproduced with "gcc (GCC) 13.0.0 20220616 (experimental)"

Build error:
In file included from ../drivers/net/qede/qede_debug.c:9:
../drivers/net/qede/qede_debug.c: In function ‘qed_grc_dump_addr_range’:
../drivers/net/qede/base/ecore.h:95:17:
	warning: overflow in conversion from ‘int’ to ‘u8’
	{aka ‘unsigned char’} changes value from ‘(int)vf_id << 8 | 128’
	to ‘128’ [-Woverflow]
   95 |                 ((_value & _name##_MASK) << _name##_SHIFT)
      |                 ^
../drivers/net/qede/qede_debug.c:1907:31:
	note: in expansion of macro ‘FIELD_VALUE’
 1907 |         fid = FIELD_VALUE(PXP_PRETEND_CONCRETE_FID_VFVALID, 1)
      |               ^~~~~~~~~~~

To prevent overflow converting 'fib' to uint16_t,
while updating it also updated 'vf_id' to 16 bit too.

Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection")

Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Acked-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
---
 drivers/net/qede/qede_debug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_debug.c b/drivers/net/qede/qede_debug.c
index 9383a6d677..18f2d988fb 100644
--- a/drivers/net/qede/qede_debug.c
+++ b/drivers/net/qede/qede_debug.c
@@ -1809,7 +1809,8 @@ static u32 qed_grc_dump_addr_range(struct ecore_hwfn *p_hwfn,
 				   u8 split_id)
 {
 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
-	u8 port_id = 0, pf_id = 0, vf_id = 0, fid = 0;
+	u8 port_id = 0, pf_id = 0;
+	u16 vf_id = 0, fid = 0;
 	bool read_using_dmae = false;
 	u32 thresh;
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.157302109 +0800
+++ 0029-net-qede-fix-build-with-GCC-13.patch	2022-07-20 15:00:58.721000480 +0800
@@ -1 +1 @@
-From 721ef3f54578e33905f75c7196439981dc264289 Mon Sep 17 00:00:00 2001
+From b9db1042c38b542426e4ee4780856578f5ecf68a Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 721ef3f54578e33905f75c7196439981dc264289 ]
@@ -29 +31,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice/base: fix build with GCC 12' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (27 preceding siblings ...)
  2022-07-20  8:20   ` patch 'net/qede: fix build with GCC 13' " Xueming Li
@ 2022-07-20  8:20   ` Xueming Li
  2022-07-20  8:21   ` patch 'net/qede: " Xueming Li
                     ` (32 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:20 UTC (permalink / raw)
  To: Wenxuan Wu; +Cc: xuemingl, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d26e0087571814f789ccd35ff22a94ca01305c8b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d26e0087571814f789ccd35ff22a94ca01305c8b Mon Sep 17 00:00:00 2001
From: Wenxuan Wu <wenxuanx.wu@intel.com>
Date: Thu, 23 Jun 2022 17:01:05 +0800
Subject: [PATCH] net/ice/base: fix build with GCC 12
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3e87e12dc8bcb1d06dafcb302b056fee51deb090 ]

GCC 12 with -O2 flag would raise the following warning:
../drivers/net/ice/base/ice_switch.c:7220:61: error: writing 1 byte into a
region of size 0 [-Werror=stringop-overflow=]
 7220 |           buf[recps].content.lkup_indx[i + 1] = entry->fv_idx[i];
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~

This patch changed the type of fv_idx in struct ice_recp_grp_entry to
align with its callers which are also u8 type.

Fixes: 04b8ec1ea807 ("net/ice/base: add protocol structures and defines")

Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_flex_pipe.c     | 2 +-
 drivers/net/ice/base/ice_flex_pipe.h     | 2 +-
 drivers/net/ice/base/ice_protocol_type.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index 67afb7bbba..ed3363c869 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -2252,7 +2252,7 @@ ice_destroy_tunnel_end:
  * @off: variable to receive the protocol offset
  */
 enum ice_status
-ice_find_prot_off(struct ice_hw *hw, enum ice_block blk, u8 prof, u16 fv_idx,
+ice_find_prot_off(struct ice_hw *hw, enum ice_block blk, u8 prof, u8 fv_idx,
 		  u8 *prot, u16 *off)
 {
 	struct ice_fv_word *fv_ext;
diff --git a/drivers/net/ice/base/ice_flex_pipe.h b/drivers/net/ice/base/ice_flex_pipe.h
index 214c7a2837..9ae3c82b40 100644
--- a/drivers/net/ice/base/ice_flex_pipe.h
+++ b/drivers/net/ice/base/ice_flex_pipe.h
@@ -25,7 +25,7 @@ enum ice_status
 ice_acquire_change_lock(struct ice_hw *hw, enum ice_aq_res_access_type access);
 void ice_release_change_lock(struct ice_hw *hw);
 enum ice_status
-ice_find_prot_off(struct ice_hw *hw, enum ice_block blk, u8 prof, u16 fv_idx,
+ice_find_prot_off(struct ice_hw *hw, enum ice_block blk, u8 prof, u8 fv_idx,
 		  u8 *prot, u16 *off);
 enum ice_status
 ice_find_label_value(struct ice_seg *ice_seg, char const *name, u32 type,
diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
index 023d661341..8e0557b212 100644
--- a/drivers/net/ice/base/ice_protocol_type.h
+++ b/drivers/net/ice/base/ice_protocol_type.h
@@ -394,7 +394,7 @@ struct ice_recp_grp_entry {
 #define ICE_INVAL_CHAIN_IND 0xFF
 	u16 rid;
 	u8 chain_idx;
-	u16 fv_idx[ICE_NUM_WORDS_RECIPE];
+	u8 fv_idx[ICE_NUM_WORDS_RECIPE];
 	u16 fv_mask[ICE_NUM_WORDS_RECIPE];
 	struct ice_pref_recipe_group r_group;
 };
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.205600723 +0800
+++ 0030-net-ice-base-fix-build-with-GCC-12.patch	2022-07-20 15:00:58.724333808 +0800
@@ -1 +1 @@
-From 3e87e12dc8bcb1d06dafcb302b056fee51deb090 Mon Sep 17 00:00:00 2001
+From d26e0087571814f789ccd35ff22a94ca01305c8b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3e87e12dc8bcb1d06dafcb302b056fee51deb090 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +26 @@
- drivers/net/ice/base/ice_switch.h        | 2 +-
- 4 files changed, 4 insertions(+), 4 deletions(-)
+ 3 files changed, 3 insertions(+), 3 deletions(-)
@@ -28 +29 @@
-index f6a29f87c5..3918169001 100644
+index 67afb7bbba..ed3363c869 100644
@@ -31 +32 @@
-@@ -2564,7 +2564,7 @@ ice_destroy_tunnel_end:
+@@ -2252,7 +2252,7 @@ ice_destroy_tunnel_end:
@@ -41 +42 @@
-index 23ba45564a..ab897de4f3 100644
+index 214c7a2837..9ae3c82b40 100644
@@ -54 +55 @@
-index 8fb95a8a8d..74107de988 100644
+index 023d661341..8e0557b212 100644
@@ -57 +58 @@
-@@ -424,7 +424,7 @@ struct ice_recp_grp_entry {
+@@ -394,7 +394,7 @@ struct ice_recp_grp_entry {
@@ -66,13 +66,0 @@
-diff --git a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h
-index a2b3c80107..c67cd09d21 100644
---- a/drivers/net/ice/base/ice_switch.h
-+++ b/drivers/net/ice/base/ice_switch.h
-@@ -203,7 +203,7 @@ struct ice_fltr_info {
- 
- struct ice_update_recipe_lkup_idx_params {
- 	u16 rid;
--	u16 fv_idx;
-+	u8 fv_idx;
- 	bool ignore_valid;
- 	u16 mask;
- 	bool mask_valid;

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

* patch 'net/qede: fix build with GCC 12' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (28 preceding siblings ...)
  2022-07-20  8:20   ` patch 'net/ice/base: fix build with GCC 12' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'net/mlx5: fix build with clang 14' " Xueming Li
                     ` (31 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/35ab757a023b4399d926e662d40cfb7e9c906b80

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 35ab757a023b4399d926e662d40cfb7e9c906b80 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 7 Jun 2022 10:17:40 -0700
Subject: [PATCH] net/qede: fix build with GCC 12
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4200c4d62586985d70ad69ed7bee526a282b8777 ]

The x86 version of rte_memcpy can cause warnings. The driver does
not need to use rte_memcpy for everything. Standard memcpy is
just as fast and safer; the compiler and static analysis tools
treat memcpy specially.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/qede/base/bcm_osal.h |  3 +--
 drivers/net/qede/qede_ethdev.c   |  2 +-
 drivers/net/qede/qede_filter.c   | 16 ++++++----------
 drivers/net/qede/qede_main.c     | 13 ++++++-------
 drivers/net/qede/qede_sriov.c    |  6 +++---
 5 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h
index c5b5399282..9ea579bfc8 100644
--- a/drivers/net/qede/base/bcm_osal.h
+++ b/drivers/net/qede/base/bcm_osal.h
@@ -14,7 +14,6 @@
 #include <rte_spinlock.h>
 #include <rte_malloc.h>
 #include <rte_atomic.h>
-#include <rte_memcpy.h>
 #include <rte_log.h>
 #include <rte_cycles.h>
 #include <rte_debug.h>
@@ -99,7 +98,7 @@ typedef intptr_t osal_int_ptr_t;
 	} while (0)
 #define OSAL_VFREE(dev, memory) OSAL_FREE(dev, memory)
 #define OSAL_MEM_ZERO(mem, size) bzero(mem, size)
-#define OSAL_MEMCPY(dst, src, size) rte_memcpy(dst, src, size)
+#define OSAL_MEMCPY(dst, src, size) memcpy(dst, src, size)
 #define OSAL_MEMCMP(s1, s2, size) memcmp(s1, s2, size)
 #define OSAL_MEMSET(dst, val, length) \
 	memset(dst, val, length)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 5570f68b5e..02a1d8945a 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -358,7 +358,7 @@ qede_assign_rxtx_handlers(struct rte_eth_dev *dev, bool is_dummy)
 static void
 qede_alloc_etherdev(struct qede_dev *qdev, struct qed_dev_eth_info *info)
 {
-	rte_memcpy(&qdev->dev_info, info, sizeof(*info));
+	qdev->dev_info = *info;
 	qdev->ops = qed_ops;
 }
 
diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
index df5c07dfe5..5590b9d214 100644
--- a/drivers/net/qede/qede_filter.c
+++ b/drivers/net/qede/qede_filter.c
@@ -388,10 +388,8 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev,
 		ip6->vtc_flow =
 			rte_cpu_to_be_32(QEDE_FDIR_IPV6_DEFAULT_VTC_FLOW);
 
-		rte_memcpy(&ip6->src_addr, arfs->tuple.src_ipv6,
-			   IPV6_ADDR_LEN);
-		rte_memcpy(&ip6->dst_addr, arfs->tuple.dst_ipv6,
-			   IPV6_ADDR_LEN);
+		memcpy(&ip6->src_addr, arfs->tuple.src_ipv6, IPV6_ADDR_LEN);
+		memcpy(&ip6->dst_addr, arfs->tuple.dst_ipv6, IPV6_ADDR_LEN);
 		len += sizeof(struct rte_ipv6_hdr);
 		params->ipv6 = true;
 
@@ -821,12 +819,10 @@ qede_flow_parse_pattern(__rte_unused struct rte_eth_dev *dev,
 				const struct rte_flow_item_ipv6 *spec;
 
 				spec = pattern->spec;
-				rte_memcpy(flow->entry.tuple.src_ipv6,
-					   spec->hdr.src_addr,
-					   IPV6_ADDR_LEN);
-				rte_memcpy(flow->entry.tuple.dst_ipv6,
-					   spec->hdr.dst_addr,
-					   IPV6_ADDR_LEN);
+				memcpy(flow->entry.tuple.src_ipv6,
+				       spec->hdr.src_addr, IPV6_ADDR_LEN);
+				memcpy(flow->entry.tuple.dst_ipv6,
+				       spec->hdr.dst_addr, IPV6_ADDR_LEN);
 				flow->entry.tuple.eth_proto =
 					RTE_ETHER_TYPE_IPV6;
 			}
diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index caa9d1d4f6..e987b1b390 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -381,7 +381,7 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info)
 	dev_info->mtu = ECORE_LEADING_HWFN(edev)->hw_info.mtu;
 	dev_info->dev_type = edev->type;
 
-	rte_memcpy(&dev_info->hw_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
+	memcpy(&dev_info->hw_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
 	       RTE_ETHER_ADDR_LEN);
 
 	dev_info->fw_major = FW_MAJOR_VERSION;
@@ -449,7 +449,7 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info)
 		info->num_vlan_filters = RESC_NUM(&edev->hwfns[0], ECORE_VLAN) -
 					 max_vf_vlan_filters;
 
-		rte_memcpy(&info->port_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
+		memcpy(&info->port_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
 			   RTE_ETHER_ADDR_LEN);
 	} else {
 		ecore_vf_get_num_rxqs(ECORE_LEADING_HWFN(edev),
@@ -480,7 +480,7 @@ static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE])
 {
 	int i;
 
-	rte_memcpy(edev->name, name, NAME_SIZE);
+	memcpy(edev->name, name, NAME_SIZE);
 	for_each_hwfn(edev, i) {
 		snprintf(edev->hwfns[i].name, NAME_SIZE, "%s-%d", name, i);
 	}
@@ -522,10 +522,9 @@ static void qed_fill_link(struct ecore_hwfn *hwfn,
 
 	/* Prepare source inputs */
 	if (IS_PF(hwfn->p_dev)) {
-		rte_memcpy(&params, ecore_mcp_get_link_params(hwfn),
-		       sizeof(params));
-		rte_memcpy(&link, ecore_mcp_get_link_state(hwfn), sizeof(link));
-		rte_memcpy(&link_caps, ecore_mcp_get_link_capabilities(hwfn),
+		memcpy(&params, ecore_mcp_get_link_params(hwfn), sizeof(params));
+		memcpy(&link, ecore_mcp_get_link_state(hwfn), sizeof(link));
+		memcpy(&link_caps, ecore_mcp_get_link_capabilities(hwfn),
 		       sizeof(link_caps));
 	} else {
 		ecore_vf_read_bulletin(hwfn, &change);
diff --git a/drivers/net/qede/qede_sriov.c b/drivers/net/qede/qede_sriov.c
index 0b99a8d6fe..937d339fb8 100644
--- a/drivers/net/qede/qede_sriov.c
+++ b/drivers/net/qede/qede_sriov.c
@@ -203,10 +203,10 @@ void qed_inform_vf_link_state(struct ecore_hwfn *hwfn)
 	if (!hwfn->pf_iov_info)
 		return;
 
-	rte_memcpy(&params, ecore_mcp_get_link_params(lead_hwfn),
+	memcpy(&params, ecore_mcp_get_link_params(lead_hwfn),
 		   sizeof(params));
-	rte_memcpy(&link, ecore_mcp_get_link_state(lead_hwfn), sizeof(link));
-	rte_memcpy(&caps, ecore_mcp_get_link_capabilities(lead_hwfn),
+	memcpy(&link, ecore_mcp_get_link_state(lead_hwfn), sizeof(link));
+	memcpy(&caps, ecore_mcp_get_link_capabilities(lead_hwfn),
 		   sizeof(caps));
 
 	/* Update bulletin of all future possible VFs with link configuration */
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.255371531 +0800
+++ 0031-net-qede-fix-build-with-GCC-12.patch	2022-07-20 15:00:58.731000464 +0800
@@ -1 +1 @@
-From 4200c4d62586985d70ad69ed7bee526a282b8777 Mon Sep 17 00:00:00 2001
+From 35ab757a023b4399d926e662d40cfb7e9c906b80 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4200c4d62586985d70ad69ed7bee526a282b8777 ]
@@ -11,2 +13,0 @@
-Cc: stable@dpdk.org
-
@@ -44 +45 @@
-index ea6b71f093..a4923670d6 100644
+index 5570f68b5e..02a1d8945a 100644
@@ -57 +58 @@
-index 440440423a..ca3165d972 100644
+index df5c07dfe5..5590b9d214 100644
@@ -91 +92 @@
-index ad101194d6..03039038ad 100644
+index caa9d1d4f6..e987b1b390 100644
@@ -94 +95 @@
-@@ -372,7 +372,7 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info)
+@@ -381,7 +381,7 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info)
@@ -103 +104 @@
-@@ -440,7 +440,7 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info)
+@@ -449,7 +449,7 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info)
@@ -112 +113 @@
-@@ -471,7 +471,7 @@ static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE])
+@@ -480,7 +480,7 @@ static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE])
@@ -121 +122 @@
-@@ -513,10 +513,9 @@ static void qed_fill_link(struct ecore_hwfn *hwfn,
+@@ -522,10 +522,9 @@ static void qed_fill_link(struct ecore_hwfn *hwfn,

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

* patch 'net/mlx5: fix build with clang 14' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (29 preceding siblings ...)
  2022-07-20  8:21   ` patch 'net/qede: " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'net/mlx5: fix RSS expansion for patterns with ICMP item' " Xueming Li
                     ` (30 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Ali Alnubani; +Cc: xuemingl, Thomas Monjalon, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/06375d5c71ad0349621ad3f711d0f9368e7b083a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 06375d5c71ad0349621ad3f711d0f9368e7b083a Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@nvidia.com>
Date: Wed, 11 May 2022 19:41:09 +0300
Subject: [PATCH] net/mlx5: fix build with clang 14
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bae645a23a41c7656928b742e0418fbf41095202 ]

Use fgets instead of fscanf to resolve the following warning
reported by clang 14.0.0 in Fedora 37 (Rawhide):

drivers/net/mlx5/linux/mlx5_ethdev_os.c:1137:52: error:
  'fscanf' may overflow; destination buffer in argument 3 has size 16,
  but the corresponding specifier may require size 17
  [-Werror,-Wfortify-source]
  ret = fscanf(file, "%" RTE_STR(IF_NAMESIZE) "s", port_name);

Fixes: 63d1db710fbc ("net/mlx5: fix unlimited parsing of switch info")

Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index e89d16aace..b15fc7e5e0 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -1087,7 +1087,6 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
 	bool port_switch_id_set = false;
 	bool device_dir = false;
 	char c;
-	int ret;
 
 	if (!if_indextoname(ifindex, ifname)) {
 		rte_errno = errno;
@@ -1103,10 +1102,9 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
 
 	file = fopen(phys_port_name, "rb");
 	if (file != NULL) {
-		ret = fscanf(file, "%" RTE_STR(IF_NAMESIZE) "s", port_name);
-		fclose(file);
-		if (ret == 1)
+		if (fgets(port_name, IF_NAMESIZE, file) != NULL)
 			mlx5_translate_port_name(port_name, &data);
+		fclose(file);
 	}
 	file = fopen(phys_switch_id, "rb");
 	if (file == NULL) {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.300084372 +0800
+++ 0032-net-mlx5-fix-build-with-clang-14.patch	2022-07-20 15:00:58.731000464 +0800
@@ -1 +1 @@
-From bae645a23a41c7656928b742e0418fbf41095202 Mon Sep 17 00:00:00 2001
+From 06375d5c71ad0349621ad3f711d0f9368e7b083a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bae645a23a41c7656928b742e0418fbf41095202 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 8d30ad0994..2a1cf04431 100644
+index e89d16aace..b15fc7e5e0 100644
@@ -29 +31 @@
-@@ -1118,7 +1118,6 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
+@@ -1087,7 +1087,6 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
@@ -37 +39 @@
-@@ -1134,10 +1133,9 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
+@@ -1103,10 +1102,9 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)

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

* patch 'net/mlx5: fix RSS expansion for patterns with ICMP item' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (30 preceding siblings ...)
  2022-07-20  8:21   ` patch 'net/mlx5: fix build with clang 14' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'net/mlx5: fix stack buffer overflow in drop action' " Xueming Li
                     ` (29 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: xuemingl, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f371572a7670ed7d52a25173af7fb463cbb4ee53

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f371572a7670ed7d52a25173af7fb463cbb4ee53 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Fri, 17 Jun 2022 08:22:38 +0300
Subject: [PATCH] net/mlx5: fix RSS expansion for patterns with ICMP item
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 57d6a458a8b8d2f41598b6f8f8d9459b34d1dd8f ]

MLX5 PMD RSS expansion implementation added L4 UDP or TCP
headers after ICMP.
For example:
ETH / IPv4 / ICMP expanded into  ETH / IPv4 / ICMP / {UDP | TCP}
ETH / IPv6 / ICMPv6 expanded into  ETH / IPv6 / ICMPv6 / {UDP | TCP}

The patch updates PMD expansion scheme to handle ICMP and ICMPv6 types
as non-expandable for RSS.

Fixes: c7870bfe09dc ("ethdev: move RSS expansion code to mlx5 driver")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index cee8bc3418..7a149ab761 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -148,6 +148,8 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
 	case RTE_FLOW_ITEM_TYPE_IPV6:
 	case RTE_FLOW_ITEM_TYPE_UDP:
 	case RTE_FLOW_ITEM_TYPE_TCP:
+	case RTE_FLOW_ITEM_TYPE_ICMP:
+	case RTE_FLOW_ITEM_TYPE_ICMP6:
 	case RTE_FLOW_ITEM_TYPE_VXLAN:
 	case RTE_FLOW_ITEM_TYPE_NVGRE:
 	case RTE_FLOW_ITEM_TYPE_GRE:
@@ -557,9 +559,11 @@ enum mlx5_expansion {
 	MLX5_EXPANSION_OUTER_IPV4,
 	MLX5_EXPANSION_OUTER_IPV4_UDP,
 	MLX5_EXPANSION_OUTER_IPV4_TCP,
+	MLX5_EXPANSION_OUTER_IPV4_ICMP,
 	MLX5_EXPANSION_OUTER_IPV6,
 	MLX5_EXPANSION_OUTER_IPV6_UDP,
 	MLX5_EXPANSION_OUTER_IPV6_TCP,
+	MLX5_EXPANSION_OUTER_IPV6_ICMP6,
 	MLX5_EXPANSION_VXLAN,
 	MLX5_EXPANSION_STD_VXLAN,
 	MLX5_EXPANSION_L3_VXLAN,
@@ -573,9 +577,11 @@ enum mlx5_expansion {
 	MLX5_EXPANSION_IPV4,
 	MLX5_EXPANSION_IPV4_UDP,
 	MLX5_EXPANSION_IPV4_TCP,
+	MLX5_EXPANSION_IPV4_ICMP,
 	MLX5_EXPANSION_IPV6,
 	MLX5_EXPANSION_IPV6_UDP,
 	MLX5_EXPANSION_IPV6_TCP,
+	MLX5_EXPANSION_IPV6_ICMP6,
 	MLX5_EXPANSION_IPV6_FRAG_EXT,
 	MLX5_EXPANSION_GTP,
 	MLX5_EXPANSION_GENEVE,
@@ -610,6 +616,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT
 			(MLX5_EXPANSION_OUTER_IPV4_UDP,
 			 MLX5_EXPANSION_OUTER_IPV4_TCP,
+			 MLX5_EXPANSION_OUTER_IPV4_ICMP,
 			 MLX5_EXPANSION_GRE,
 			 MLX5_EXPANSION_NVGRE,
 			 MLX5_EXPANSION_IPV4,
@@ -631,10 +638,14 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.type = RTE_FLOW_ITEM_TYPE_TCP,
 		.rss_types = ETH_RSS_NONFRAG_IPV4_TCP,
 	},
+	[MLX5_EXPANSION_OUTER_IPV4_ICMP] = {
+		.type = RTE_FLOW_ITEM_TYPE_ICMP,
+	},
 	[MLX5_EXPANSION_OUTER_IPV6] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT
 			(MLX5_EXPANSION_OUTER_IPV6_UDP,
 			 MLX5_EXPANSION_OUTER_IPV6_TCP,
+			 MLX5_EXPANSION_OUTER_IPV6_ICMP6,
 			 MLX5_EXPANSION_IPV4,
 			 MLX5_EXPANSION_IPV6,
 			 MLX5_EXPANSION_GRE,
@@ -656,6 +667,9 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.type = RTE_FLOW_ITEM_TYPE_TCP,
 		.rss_types = ETH_RSS_NONFRAG_IPV6_TCP,
 	},
+	[MLX5_EXPANSION_OUTER_IPV6_ICMP6] = {
+		.type = RTE_FLOW_ITEM_TYPE_ICMP6,
+	},
 	[MLX5_EXPANSION_VXLAN] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_ETH,
 						  MLX5_EXPANSION_IPV4,
@@ -715,7 +729,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 	},
 	[MLX5_EXPANSION_IPV4] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4_UDP,
-						  MLX5_EXPANSION_IPV4_TCP),
+						  MLX5_EXPANSION_IPV4_TCP,
+						  MLX5_EXPANSION_IPV4_ICMP),
 		.type = RTE_FLOW_ITEM_TYPE_IPV4,
 		.rss_types = ETH_RSS_IPV4 | ETH_RSS_FRAG_IPV4 |
 			ETH_RSS_NONFRAG_IPV4_OTHER,
@@ -728,9 +743,13 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.type = RTE_FLOW_ITEM_TYPE_TCP,
 		.rss_types = ETH_RSS_NONFRAG_IPV4_TCP,
 	},
+	[MLX5_EXPANSION_IPV4_ICMP] = {
+		.type = RTE_FLOW_ITEM_TYPE_ICMP,
+	},
 	[MLX5_EXPANSION_IPV6] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV6_UDP,
 						  MLX5_EXPANSION_IPV6_TCP,
+						  MLX5_EXPANSION_IPV6_ICMP6,
 						  MLX5_EXPANSION_IPV6_FRAG_EXT),
 		.type = RTE_FLOW_ITEM_TYPE_IPV6,
 		.rss_types = ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 |
@@ -747,6 +766,9 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 	[MLX5_EXPANSION_IPV6_FRAG_EXT] = {
 		.type = RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT,
 	},
+	[MLX5_EXPANSION_IPV6_ICMP6] = {
+		.type = RTE_FLOW_ITEM_TYPE_ICMP6,
+	},
 	[MLX5_EXPANSION_GTP] = {
 			.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
 							  MLX5_EXPANSION_IPV6),
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.341781287 +0800
+++ 0033-net-mlx5-fix-RSS-expansion-for-patterns-with-ICMP-it.patch	2022-07-20 15:00:58.737667120 +0800
@@ -1 +1 @@
-From 57d6a458a8b8d2f41598b6f8f8d9459b34d1dd8f Mon Sep 17 00:00:00 2001
+From f371572a7670ed7d52a25173af7fb463cbb4ee53 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 57d6a458a8b8d2f41598b6f8f8d9459b34d1dd8f ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 090de0366b..900ec8e4bc 100644
+index cee8bc3418..7a149ab761 100644
@@ -28 +30,2 @@
-@@ -150,6 +150,8 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
+@@ -148,6 +148,8 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
+ 	case RTE_FLOW_ITEM_TYPE_IPV6:
@@ -31 +33,0 @@
- 	case RTE_FLOW_ITEM_TYPE_ESP:
@@ -37 +39,2 @@
-@@ -563,10 +565,12 @@ enum mlx5_expansion {
+@@ -557,9 +559,11 @@ enum mlx5_expansion {
+ 	MLX5_EXPANSION_OUTER_IPV4,
@@ -40 +42,0 @@
- 	MLX5_EXPANSION_OUTER_IPV4_ESP,
@@ -45 +46,0 @@
- 	MLX5_EXPANSION_OUTER_IPV6_ESP,
@@ -50 +51,2 @@
-@@ -581,10 +585,12 @@ enum mlx5_expansion {
+@@ -573,9 +577,11 @@ enum mlx5_expansion {
+ 	MLX5_EXPANSION_IPV4,
@@ -53 +54,0 @@
- 	MLX5_EXPANSION_IPV4_ESP,
@@ -58 +58,0 @@
- 	MLX5_EXPANSION_IPV6_ESP,
@@ -63 +63,2 @@
-@@ -620,6 +626,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+@@ -610,6 +616,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 		.next = MLX5_FLOW_EXPAND_RSS_NEXT
@@ -66 +66,0 @@
- 			 MLX5_EXPANSION_OUTER_IPV4_ESP,
@@ -71,3 +71,3 @@
-@@ -645,11 +652,15 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
- 		.type = RTE_FLOW_ITEM_TYPE_ESP,
- 		.rss_types = RTE_ETH_RSS_ESP,
+@@ -631,10 +638,14 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 		.type = RTE_FLOW_ITEM_TYPE_TCP,
+ 		.rss_types = ETH_RSS_NONFRAG_IPV4_TCP,
@@ -82 +81,0 @@
- 			 MLX5_EXPANSION_OUTER_IPV6_ESP,
@@ -87,3 +86,3 @@
-@@ -675,6 +686,9 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
- 		.type = RTE_FLOW_ITEM_TYPE_ESP,
- 		.rss_types = RTE_ETH_RSS_ESP,
+@@ -656,6 +667,9 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 		.type = RTE_FLOW_ITEM_TYPE_TCP,
+ 		.rss_types = ETH_RSS_NONFRAG_IPV6_TCP,
@@ -97 +96,2 @@
-@@ -735,7 +749,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+@@ -715,7 +729,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 	},
@@ -100,3 +100,2 @@
- 						  MLX5_EXPANSION_IPV4_TCP,
--						  MLX5_EXPANSION_IPV4_ESP),
-+						  MLX5_EXPANSION_IPV4_ESP,
+-						  MLX5_EXPANSION_IPV4_TCP),
++						  MLX5_EXPANSION_IPV4_TCP,
@@ -105,5 +104,5 @@
- 		.rss_types = RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_FRAG_IPV4 |
- 			RTE_ETH_RSS_NONFRAG_IPV4_OTHER,
-@@ -752,10 +767,14 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
- 		.type = RTE_FLOW_ITEM_TYPE_ESP,
- 		.rss_types = RTE_ETH_RSS_ESP,
+ 		.rss_types = ETH_RSS_IPV4 | ETH_RSS_FRAG_IPV4 |
+ 			ETH_RSS_NONFRAG_IPV4_OTHER,
+@@ -728,9 +743,13 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 		.type = RTE_FLOW_ITEM_TYPE_TCP,
+ 		.rss_types = ETH_RSS_NONFRAG_IPV4_TCP,
@@ -117 +115,0 @@
- 						  MLX5_EXPANSION_IPV6_ESP,
@@ -121,2 +119,2 @@
- 		.rss_types = RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_FRAG_IPV6 |
-@@ -776,6 +795,9 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 		.rss_types = ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 |
+@@ -747,6 +766,9 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
@@ -130,2 +128,2 @@
- 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
- 						  MLX5_EXPANSION_IPV6),
+ 			.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
+ 							  MLX5_EXPANSION_IPV6),

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

* patch 'net/mlx5: fix stack buffer overflow in drop action' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (31 preceding siblings ...)
  2022-07-20  8:21   ` patch 'net/mlx5: fix RSS expansion for patterns with ICMP item' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'raw/ioat: fix build when ioat dmadev enabled' " Xueming Li
                     ` (28 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: xuemingl, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/40538d0b04ca679aa426a4cfb20d1c7833be23b1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 40538d0b04ca679aa426a4cfb20d1c7833be23b1 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 24 Dec 2021 11:06:19 +0800
Subject: [PATCH] net/mlx5: fix stack buffer overflow in drop action
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a73b78554aee830605c8d8714239dc53fa443d5e ]

The mlx5_drop_action_create function use mlx5_malloc for allocating
'hrxq', but don't allocate for 'rss_key'. This is wrong and it can
cause buffer overflow.

Detected with address sanitizer:
0 (/usr/lib64/libasan.so.4+0x7b8e2)
1 in mlx5_devx_tir_attr_set ../drivers/net/mlx5/mlx5_devx.c:765
2 in mlx5_devx_hrxq_new ../drivers/net/mlx5/mlx5_devx.c:800
3 in mlx5_devx_drop_action_create ../drivers/net/mlx5/mlx5_devx.c:1051
4 in mlx5_drop_action_create ../drivers/net/mlx5/mlx5_rxq.c:2846
5 in mlx5_dev_spawn ../drivers/net/mlx5/linux/mlx5_os.c:1743
6 in mlx5_os_pci_probe_pf ../drivers/net/mlx5/linux/mlx5_os.c:2501
7 in mlx5_os_pci_probe ../drivers/net/mlx5/linux/mlx5_os.c:2647
8 in mlx5_os_net_probe ../drivers/net/mlx5/linux/mlx5_os.c:2722
9 in drivers_probe ../drivers/common/mlx5/mlx5_common.c:657
10 in mlx5_common_dev_probe ../drivers/common/mlx5/mlx5_common.c:711
11 in mlx5_common_pci_probe ../drivers/common/mlx5/mlx5_common_pci.c:150
12 in rte_pci_probe_one_driver ../drivers/bus/pci/pci_common.c:269
13 in pci_probe_all_drivers ../drivers/bus/pci/pci_common.c:353
14 in pci_probe ../drivers/bus/pci/pci_common.c:380
15 in rte_bus_probe ../lib/eal/common/eal_common_bus.c:72
16 in rte_eal_init ../lib/eal/linux/eal.c:1286
17 in main ../app/test-pmd/testpmd.c:4112

Fixes: 0c762e81da9b ("net/mlx5: share Rx queue drop action code")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index cb743a773c..ac7482c211 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -2554,7 +2554,7 @@ mlx5_drop_action_create(struct rte_eth_dev *dev)
 
 	if (priv->drop_queue.hrxq)
 		return priv->drop_queue.hrxq;
-	hrxq = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*hrxq), 0, SOCKET_ID_ANY);
+	hrxq = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*hrxq) + MLX5_RSS_HASH_KEY_LEN, 0, SOCKET_ID_ANY);
 	if (!hrxq) {
 		DRV_LOG(WARNING,
 			"Port %u cannot allocate memory for drop queue.",
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.389183768 +0800
+++ 0034-net-mlx5-fix-stack-buffer-overflow-in-drop-action.patch	2022-07-20 15:00:58.741000448 +0800
@@ -1 +1 @@
-From a73b78554aee830605c8d8714239dc53fa443d5e Mon Sep 17 00:00:00 2001
+From 40538d0b04ca679aa426a4cfb20d1c7833be23b1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a73b78554aee830605c8d8714239dc53fa443d5e ]
@@ -31 +33,0 @@
-Cc: stable@dpdk.org
@@ -40 +42 @@
-index a2d03f9f67..eaf23d0df4 100644
+index cb743a773c..ac7482c211 100644
@@ -43 +45 @@
-@@ -3078,7 +3078,7 @@ mlx5_drop_action_create(struct rte_eth_dev *dev)
+@@ -2554,7 +2554,7 @@ mlx5_drop_action_create(struct rte_eth_dev *dev)

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

* patch 'raw/ioat: fix build when ioat dmadev enabled' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (32 preceding siblings ...)
  2022-07-20  8:21   ` patch 'net/mlx5: fix stack buffer overflow in drop action' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'rib: fix references for IPv6 implementation' " Xueming Li
                     ` (27 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/eb88adfe309ce5f366f566c17b4c42347d9bf93a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eb88adfe309ce5f366f566c17b4c42347d9bf93a Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 23 Jun 2022 14:49:32 +0100
Subject: [PATCH] raw/ioat: fix build when ioat dmadev enabled
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7580f35ea7a6f56f3fb65a3fa8601a6c21515805 ]

The build of the raw/ioat driver only occurs when the equivalent dmadev
drivers are disabled. Complications occur when the ioat dmadev is being
built but not the idxd. In this case, only the idxd part of raw/ioat
gets built, but the definition of the logtype is in the ioat part,
causing build errors.

  .../raw_ioat_idxd_bus.c.o: In function `idxd_vdev_mmap_wq':
  idxd_bus.c:(.text+0x116): undefined reference to `ioat_pmd_logtype'

Fix this by moving the logtype definition to the common C file, and
renaming it to avoid conflicts with a similarly named value in the
dma/ioat driver.

Fixes: ff06fa2cf3ba ("raw/ioat: probe idxd PCI")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/raw/ioat/ioat_common.c  | 2 ++
 drivers/raw/ioat/ioat_private.h | 4 ++--
 drivers/raw/ioat/ioat_rawdev.c  | 2 --
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/raw/ioat/ioat_common.c b/drivers/raw/ioat/ioat_common.c
index 142e171bc9..414b753be7 100644
--- a/drivers/raw/ioat/ioat_common.c
+++ b/drivers/raw/ioat/ioat_common.c
@@ -9,6 +9,8 @@
 
 #include "ioat_private.h"
 
+RTE_LOG_REGISTER(ioat_rawdev_logtype, rawdev.ioat, INFO);
+
 static const char * const xstat_names[] = {
 		"failed_enqueues", "successful_enqueues",
 		"copies_started", "copies_completed"
diff --git a/drivers/raw/ioat/ioat_private.h b/drivers/raw/ioat/ioat_private.h
index 6c423811ec..2564eb51e4 100644
--- a/drivers/raw/ioat/ioat_private.h
+++ b/drivers/raw/ioat/ioat_private.h
@@ -18,10 +18,10 @@
 #include <rte_rawdev_pmd.h>
 #include "rte_ioat_rawdev.h"
 
-extern int ioat_pmd_logtype;
+extern int ioat_rawdev_logtype;
 
 #define IOAT_PMD_LOG(level, fmt, args...) rte_log(RTE_LOG_ ## level, \
-		ioat_pmd_logtype, "%s(): " fmt "\n", __func__, ##args)
+		ioat_rawdev_logtype, "%s(): " fmt "\n", __func__, ##args)
 
 #define IOAT_PMD_DEBUG(fmt, args...)  IOAT_PMD_LOG(DEBUG, fmt, ## args)
 #define IOAT_PMD_INFO(fmt, args...)   IOAT_PMD_LOG(INFO, fmt, ## args)
diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c
index 2c88b4369f..ea193f9d11 100644
--- a/drivers/raw/ioat/ioat_rawdev.c
+++ b/drivers/raw/ioat/ioat_rawdev.c
@@ -28,8 +28,6 @@ static struct rte_pci_driver ioat_pmd_drv;
 #define IOAT_DEVICE_ID_BDXF	0x6f2F
 #define IOAT_DEVICE_ID_ICX	0x0b00
 
-RTE_LOG_REGISTER(ioat_pmd_logtype, rawdev.ioat, INFO);
-
 #define DESC_SZ sizeof(struct rte_ioat_generic_hw_desc)
 #define COMPLETION_SZ sizeof(__m128i)
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.432143239 +0800
+++ 0035-raw-ioat-fix-build-when-ioat-dmadev-enabled.patch	2022-07-20 15:00:58.744333776 +0800
@@ -1 +1 @@
-From 7580f35ea7a6f56f3fb65a3fa8601a6c21515805 Mon Sep 17 00:00:00 2001
+From eb88adfe309ce5f366f566c17b4c42347d9bf93a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7580f35ea7a6f56f3fb65a3fa8601a6c21515805 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index 60de41152a..e44e181e58 100644
+index 142e171bc9..414b753be7 100644
@@ -37 +39 @@
-+RTE_LOG_REGISTER_DEFAULT(ioat_rawdev_logtype, INFO);
++RTE_LOG_REGISTER(ioat_rawdev_logtype, rawdev.ioat, INFO);
@@ -43 +45 @@
-index f032d5fe3d..7fb685a3d7 100644
+index 6c423811ec..2564eb51e4 100644
@@ -54,2 +56,2 @@
--		ioat_pmd_logtype, "IOAT: %s(): " fmt "\n", __func__, ##args)
-+		ioat_rawdev_logtype, "IOAT: %s(): " fmt "\n", __func__, ##args)
+-		ioat_pmd_logtype, "%s(): " fmt "\n", __func__, ##args)
++		ioat_rawdev_logtype, "%s(): " fmt "\n", __func__, ##args)
@@ -60 +62 @@
-index 5396671d4f..11341fcf5d 100644
+index 2c88b4369f..ea193f9d11 100644
@@ -67 +69 @@
--RTE_LOG_REGISTER_DEFAULT(ioat_pmd_logtype, INFO);
+-RTE_LOG_REGISTER(ioat_pmd_logtype, rawdev.ioat, INFO);

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

* patch 'rib: fix references for IPv6 implementation' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (33 preceding siblings ...)
  2022-07-20  8:21   ` patch 'raw/ioat: fix build when ioat dmadev enabled' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'test/hash: fix out of bound access' " Xueming Li
                     ` (26 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: xuemingl, Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ed1bd718de32c7f7639f0aaf8bfa2254c8487b74

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ed1bd718de32c7f7639f0aaf8bfa2254c8487b74 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 22 Jun 2022 13:41:28 -0700
Subject: [PATCH] rib: fix references for IPv6 implementation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 26f5a0d5a6bb3d839d0361aac4ff46b6358bd2a7 ]

The comments in rte_rib6 were cut-and-pasted from rte_rib
and because of that some references to rte_rib_node were
not updated.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/librte_rib/rte_rib6.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h
index dbd52928a2..3ff3e593fd 100644
--- a/lib/librte_rib/rte_rib6.h
+++ b/lib/librte_rib/rte_rib6.h
@@ -44,12 +44,12 @@ struct rte_rib6_node;
 /** RIB configuration structure */
 struct rte_rib6_conf {
 	/**
-	 * Size of extension block inside rte_rib_node.
+	 * Size of extension block inside rte_rib6_node.
 	 * This space could be used to store additional user
 	 * defined data.
 	 */
 	size_t	ext_sz;
-	/* size of rte_rib_node's pool */
+	/* size of rte_rib6_node's pool */
 	int	max_nodes;
 };
 
@@ -323,7 +323,7 @@ rte_rib6_create(const char *name, int socket_id,
  * Find an existing RIB object and return a pointer to it.
  *
  * @param name
- *  Name of the rib object as passed to rte_rib_create()
+ *  Name of the rib object as passed to rte_rib6_create()
  * @return
  *  Pointer to RIB object on success
  *  NULL otherwise with rte_errno indicating reason for failure.
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.474107713 +0800
+++ 0036-rib-fix-references-for-IPv6-implementation.patch	2022-07-20 15:00:58.744333776 +0800
@@ -1 +1 @@
-From 26f5a0d5a6bb3d839d0361aac4ff46b6358bd2a7 Mon Sep 17 00:00:00 2001
+From ed1bd718de32c7f7639f0aaf8bfa2254c8487b74 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 26f5a0d5a6bb3d839d0361aac4ff46b6358bd2a7 ]
@@ -13 +16 @@
- lib/rib/rte_rib6.h | 6 +++---
+ lib/librte_rib/rte_rib6.h | 6 +++---
@@ -16,5 +19,5 @@
-diff --git a/lib/rib/rte_rib6.h b/lib/rib/rte_rib6.h
-index 8bd99c4ab5..49d5b99b70 100644
---- a/lib/rib/rte_rib6.h
-+++ b/lib/rib/rte_rib6.h
-@@ -39,12 +39,12 @@ struct rte_rib6_node;
+diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h
+index dbd52928a2..3ff3e593fd 100644
+--- a/lib/librte_rib/rte_rib6.h
++++ b/lib/librte_rib/rte_rib6.h
+@@ -44,12 +44,12 @@ struct rte_rib6_node;
@@ -35 +38 @@
-@@ -306,7 +306,7 @@ rte_rib6_create(const char *name, int socket_id,
+@@ -323,7 +323,7 @@ rte_rib6_create(const char *name, int socket_id,

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

* patch 'test/hash: fix out of bound access' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (34 preceding siblings ...)
  2022-07-20  8:21   ` patch 'rib: fix references for IPv6 implementation' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'app/procinfo: show all non-owned ports' " Xueming Li
                     ` (25 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: xuemingl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/67350d412d9cb471f77a95ff8da9a41304f48839

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 67350d412d9cb471f77a95ff8da9a41304f48839 Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Sat, 4 Jun 2022 10:37:11 +0200
Subject: [PATCH] test/hash: fix out of bound access
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8343fd749ff7c494c2f303f20a83b8873c6f0797 ]

rwc_non_lf_results->multi_rw, rwc_lf_results->multi_rw, and
rwc_perf_results->multi_rw are accessed at indexes
[0..NUM_TEST-1][0..1][0..NUMTEST-1]. Currently the first index
overflows the array size in struct rwc_perf.

Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency")

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 app/test/test_hash_readwrite_lf_perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_hash_readwrite_lf_perf.c b/app/test/test_hash_readwrite_lf_perf.c
index 8120cf43be..32f9ec9250 100644
--- a/app/test/test_hash_readwrite_lf_perf.c
+++ b/app/test/test_hash_readwrite_lf_perf.c
@@ -59,7 +59,7 @@ struct rwc_perf {
 	uint32_t w_ks_r_hit_nsp[2][NUM_TEST];
 	uint32_t w_ks_r_hit_sp[2][NUM_TEST];
 	uint32_t w_ks_r_miss[2][NUM_TEST];
-	uint32_t multi_rw[NUM_TEST - 1][2][NUM_TEST];
+	uint32_t multi_rw[NUM_TEST][2][NUM_TEST];
 	uint32_t w_ks_r_hit_extbkt[2][NUM_TEST];
 	uint32_t writer_add_del[NUM_TEST];
 };
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.513107020 +0800
+++ 0037-test-hash-fix-out-of-bound-access.patch	2022-07-20 15:00:58.744333776 +0800
@@ -1 +1 @@
-From 8343fd749ff7c494c2f303f20a83b8873c6f0797 Mon Sep 17 00:00:00 2001
+From 67350d412d9cb471f77a95ff8da9a41304f48839 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8343fd749ff7c494c2f303f20a83b8873c6f0797 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/procinfo: show all non-owned ports' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (35 preceding siblings ...)
  2022-07-20  8:21   ` patch 'test/hash: fix out of bound access' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'test: check memory allocation for CRC' " Xueming Li
                     ` (24 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Subendu Santra
  Cc: xuemingl, Stephen Hemminger, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ef31c19b768d1c70efacc542287618ec324a6920

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ef31c19b768d1c70efacc542287618ec324a6920 Mon Sep 17 00:00:00 2001
From: Subendu Santra <subendu@arista.com>
Date: Tue, 24 May 2022 22:46:05 -0700
Subject: [PATCH] app/procinfo: show all non-owned ports
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 379e1d62f1d6d29315fc2063c71cbda3f63fe38b ]

Show all non-owned ports when no port mask is specified.

The show-port option, without the mask option,
was showing only the last non-owned port.
Show all the non-owned ports instead.

Fixes: 1dd6cffb6571 ("app/procinfo: provide way to request info on owned ports")

Signed-off-by: Subendu Santra <subendu@arista.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 app/proc-info/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 2d1bf24f1c..40bfbefad8 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1403,10 +1403,10 @@ main(int argc, char **argv)
 	if (nb_ports == 0)
 		rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
 
-	/* If no port mask was specified, then show non-owned ports */
+	/* If no port mask was specified, then show all non-owned ports */
 	if (enabled_port_mask == 0) {
 		RTE_ETH_FOREACH_DEV(i)
-			enabled_port_mask = 1ul << i;
+			enabled_port_mask |= 1ul << i;
 	}
 
 	for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.552527422 +0800
+++ 0038-app-procinfo-show-all-non-owned-ports.patch	2022-07-20 15:00:58.744333776 +0800
@@ -1 +1 @@
-From 379e1d62f1d6d29315fc2063c71cbda3f63fe38b Mon Sep 17 00:00:00 2001
+From ef31c19b768d1c70efacc542287618ec324a6920 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 379e1d62f1d6d29315fc2063c71cbda3f63fe38b ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 56070a3317..e1ccdbbaa5 100644
+index 2d1bf24f1c..40bfbefad8 100644
@@ -29 +31 @@
-@@ -1504,10 +1504,10 @@ main(int argc, char **argv)
+@@ -1403,10 +1403,10 @@ main(int argc, char **argv)

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

* patch 'test: check memory allocation for CRC' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (36 preceding siblings ...)
  2022-07-20  8:21   ` patch 'app/procinfo: show all non-owned ports' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'net/hns3: fix descriptors check with SVE' " Xueming Li
                     ` (23 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: xuemingl, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4fef76f744c320917a16e667e211e0f6f6723281

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4fef76f744c320917a16e667e211e0f6f6723281 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Mon, 19 Apr 2021 21:34:44 +0800
Subject: [PATCH] test: check memory allocation for CRC
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 52aab95476d69abb522b4a588b664281e8464a7b ]

The rte_zmalloc is called in test_crc_calc without null pointer
check. This patch adds null pointer checks on return value of
rte_zmalloc.

Fixes: 9c77b848b1c1 ("test: add CRC computation")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 app/test/test_crc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index bf1d344359..8231f81e4a 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -80,6 +80,8 @@ test_crc_calc(void)
 
 	/* 32-bit ethernet CRC: Test 2 */
 	test_data = rte_zmalloc(NULL, CRC32_VEC_LEN1, 0);
+	if (test_data == NULL)
+		return -7;
 
 	for (i = 0; i < CRC32_VEC_LEN1; i += 12)
 		rte_memcpy(&test_data[i], crc32_vec1, 12);
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.592662309 +0800
+++ 0039-test-check-memory-allocation-for-CRC.patch	2022-07-20 15:00:58.747667104 +0800
@@ -1 +1 @@
-From 52aab95476d69abb522b4a588b664281e8464a7b Mon Sep 17 00:00:00 2001
+From 4fef76f744c320917a16e667e211e0f6f6723281 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 52aab95476d69abb522b4a588b664281e8464a7b ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 0ed080e482..5edc8fb13b 100644
+index bf1d344359..8231f81e4a 100644
@@ -23 +25 @@
-@@ -79,6 +79,8 @@ test_crc_calc(void)
+@@ -80,6 +80,8 @@ test_crc_calc(void)

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

* patch 'net/hns3: fix descriptors check with SVE' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (37 preceding siblings ...)
  2022-07-20  8:21   ` patch 'test: check memory allocation for CRC' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'examples/distributor: fix distributor on Rx core' " Xueming Li
                     ` (22 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: xuemingl, Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a035314c1ed32710cae68d347263a5889ccfc914

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a035314c1ed32710cae68d347263a5889ccfc914 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 24 Jun 2022 16:59:49 +0800
Subject: [PATCH] net/hns3: fix descriptors check with SVE
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5125731f562d6f457d63b803a921523d76ab482d ]

The SVE algorithm and NEON algorithm have the same requirements for
nb-desc, but the nb-desc is verified only when using NEON.

Fixes: fa29fe45a7b4 ("net/hns3: support queue start and stop")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@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 1675da1b08..a1f301c344 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -1749,7 +1749,8 @@ hns3_rxq_conf_runtime_check(struct hns3_hw *hw, uint16_t buf_size,
 		return -EINVAL;
 	}
 
-	if (pkt_burst == hns3_recv_pkts_vec) {
+	if (pkt_burst == hns3_recv_pkts_vec ||
+	    pkt_burst == hns3_recv_pkts_vec_sve) {
 		min_vec_bds = HNS3_DEFAULT_RXQ_REARM_THRESH +
 			      HNS3_DEFAULT_RX_BURST;
 		if (nb_desc < min_vec_bds ||
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.631384787 +0800
+++ 0040-net-hns3-fix-descriptors-check-with-SVE.patch	2022-07-20 15:00:58.751000431 +0800
@@ -1 +1 @@
-From 5125731f562d6f457d63b803a921523d76ab482d Mon Sep 17 00:00:00 2001
+From a035314c1ed32710cae68d347263a5889ccfc914 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5125731f562d6f457d63b803a921523d76ab482d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index e25a91becf..7b173f9f36 100644
+index 1675da1b08..a1f301c344 100644
@@ -22 +24 @@
-@@ -1756,7 +1756,8 @@ hns3_rxq_conf_runtime_check(struct hns3_hw *hw, uint16_t buf_size,
+@@ -1749,7 +1749,8 @@ hns3_rxq_conf_runtime_check(struct hns3_hw *hw, uint16_t buf_size,

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

* patch 'examples/distributor: fix distributor on Rx core' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (38 preceding siblings ...)
  2022-07-20  8:21   ` patch 'net/hns3: fix descriptors check with SVE' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'doc: add more instructions for running as non-root' " Xueming Li
                     ` (21 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  Cc: xuemingl, Abdullah Ömer Yamaç,
	Ferruh Yigit, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3f6c57b6a39e88569b9f69e257415c3b4ba10a9d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3f6c57b6a39e88569b9f69e257415c3b4ba10a9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdullah=20=C3=96mer=20Yama=C3=A7?=
 <omer.yamac@ceng.metu.edu.tr>
Date: Mon, 20 Jun 2022 19:31:46 +0300
Subject: [PATCH] examples/distributor: fix distributor on Rx core
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 29c1e90e65e9e1592b4a200afe8d2a7ff7a77742 ]

This patch fixes the syntax error when using the single-core
for both Rx and distributor functions.

Fixes: 4a7f40c0ff9a ("examples/distributor: add dedicated core")

Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Tested-by: David Hunt <david.hunt@intel.com>
---
 examples/distributor/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index 9303a00d1b..96c0ac8046 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -265,8 +265,8 @@ lcore_rx(struct lcore_params *p)
  * packets are then send straight to the tx core.
  */
 #if 0
-	rte_distributor_process(d, bufs, nb_rx);
-	const uint16_t nb_ret = rte_distributor_returned_pktsd,
+		rte_distributor_process(p->d, bufs, nb_rx);
+		const uint16_t nb_ret = rte_distributor_returned_pkts(p->d,
 			bufs, BURST_SIZE*2);
 
 		app_stats.rx.returned_pkts += nb_ret;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.672395530 +0800
+++ 0041-examples-distributor-fix-distributor-on-Rx-core.patch	2022-07-20 15:00:58.751000431 +0800
@@ -1 +1 @@
-From 29c1e90e65e9e1592b4a200afe8d2a7ff7a77742 Mon Sep 17 00:00:00 2001
+From 3f6c57b6a39e88569b9f69e257415c3b4ba10a9d Mon Sep 17 00:00:00 2001
@@ -8,0 +9,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 29c1e90e65e9e1592b4a200afe8d2a7ff7a77742 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 02bf91f555..8995806b4e 100644
+index 9303a00d1b..96c0ac8046 100644
@@ -27 +29 @@
-@@ -261,8 +261,8 @@ lcore_rx(struct lcore_params *p)
+@@ -265,8 +265,8 @@ lcore_rx(struct lcore_params *p)

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

* patch 'doc: add more instructions for running as non-root' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (39 preceding siblings ...)
  2022-07-20  8:21   ` patch 'examples/distributor: fix distributor on Rx core' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-08-01 12:21     ` Dmitry Kozlyuk
  2022-07-20  8:21   ` patch 'net/bnxt: fix switch domain allocation' " Xueming Li
                     ` (20 subsequent siblings)
  61 siblings, 1 reply; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: xuemingl, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d4418de9d62b5bdea88f084bb431b18a93567013

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d4418de9d62b5bdea88f084bb431b18a93567013 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Fri, 24 Jun 2022 16:19:54 +0300
Subject: [PATCH] doc: add more instructions for running as non-root
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 979bb5d493fbbce77eaaf2b4a01ee98f93f76dd9 ]

The guide to run DPDK applications as non-root in Linux
did not provide specific instructions to configure the required access
and did not explain why each bit is needed.
The latter is important because running as non-root
is one of the ways to tighten security and grant minimal permissions.

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/linux_gsg/enable_func.rst | 90 +++++++++++++++++++---------
 1 file changed, 63 insertions(+), 27 deletions(-)

diff --git a/doc/guides/linux_gsg/enable_func.rst b/doc/guides/linux_gsg/enable_func.rst
index 25f87f6b1a..4f7a8a1522 100644
--- a/doc/guides/linux_gsg/enable_func.rst
+++ b/doc/guides/linux_gsg/enable_func.rst
@@ -66,13 +66,64 @@ The application can then determine what action to take, if any, if the HPET is n
 Running DPDK Applications Without Root Privileges
 -------------------------------------------------
 
-In order to run DPDK as non-root, the following Linux filesystem objects'
-permissions should be adjusted to ensure that the Linux account being used to
-run the DPDK application has access to them:
+The following sections describe generic requirements and configuration
+for running DPDK applications as non-root.
+There may be additional requirements documented for some drivers.
 
-*   All directories which serve as hugepage mount points, for example, ``/dev/hugepages``
+Hugepages
+~~~~~~~~~
 
-*   If the HPET is to be used,  ``/dev/hpet``
+Hugepages must be reserved as root before running the application as non-root,
+for example::
+
+  sudo dpdk-hugepages.py --reserve 1G
+
+If multi-process is not required, running with ``--in-memory``
+bypasses the need to access hugepage mount point and files within it.
+Otherwise, hugepage directory must be made accessible
+for writing to the unprivileged user.
+A good way for managing multiple applications using hugepages
+is to mount the filesystem with group permissions
+and add a supplementary group to each application or container.
+
+One option is to use the script provided by this project::
+
+  export HUGEDIR=$HOME/huge-1G
+  mkdir -p $HUGEDIR
+  sudo dpdk-hugepages.py --mount --directory $HUGEDIR --user `id -u` --group `id -g`
+
+In production environment, the OS can manage mount points
+(`systemd example <https://github.com/systemd/systemd/blob/main/units/dev-hugepages.mount>`_).
+
+The ``hugetlb`` filesystem has additional options to guarantee or limit
+the amount of memory that is possible to allocate using the mount point.
+Refer to the `documentation <https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt>`_.
+
+.. note::
+
+   Using ``vfio-pci`` kernel driver, if applicable, can eliminate the need
+   for physical addresses and therefore eliminate the permission requirements
+   described below.
+
+If the driver requires using physical addresses (PA),
+the executable file must be granted additional capabilities:
+
+* ``SYS_ADMIN`` to read ``/proc/self/pagemaps``
+* ``IPC_LOCK`` to lock hugepages in memory
+
+.. code-block:: console
+
+   setcap cap_ipc_lock,cap_sys_admin+ep <executable>
+
+If physical addresses are not accessible,
+the following message will appear during EAL initialization::
+
+  EAL: rte_mem_virt2phy(): cannot open /proc/self/pagemap: Permission denied
+
+It is harmless in case PA are not needed.
+
+Resource Limits
+~~~~~~~~~~~~~~~
 
 When running as non-root user, there may be some additional resource limits
 that are imposed by the system. Specifically, the following resource limits may
@@ -87,8 +138,13 @@ 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.
 
-Additionally, depending on which kernel driver is in use, the relevant
-resources also should be accessible by the user running the DPDK application.
+See `Hugepage Mapping <hugepage_mapping>`_
+section to learn how these limits affect EAL.
+
+Device Control
+~~~~~~~~~~~~~~
+
+If the HPET is to be used, ``/dev/hpet`` permissions must be adjusted.
 
 For ``vfio-pci`` kernel driver, the following Linux file system objects'
 permissions should be adjusted:
@@ -98,26 +154,6 @@ permissions should be adjusted:
 * The directories under ``/dev/vfio`` that correspond to IOMMU group numbers of
   devices intended to be used by DPDK, for example, ``/dev/vfio/50``
 
-.. note::
-
-    The instructions below will allow running DPDK with ``igb_uio`` or
-    ``uio_pci_generic`` drivers as non-root with older Linux kernel versions.
-    However, since version 4.0, the kernel does not allow unprivileged processes
-    to read the physical address information from the pagemaps file, making it
-    impossible for those processes to be used by non-privileged users. In such
-    cases, using the VFIO driver is recommended.
-
-For ``igb_uio`` or ``uio_pci_generic`` kernel drivers, the following Linux file
-system objects' permissions should be adjusted:
-
-*   The userspace-io device files in  ``/dev``, for example,  ``/dev/uio0``, ``/dev/uio1``, and so on
-
-*   The userspace-io sysfs config and resource files, for example for ``uio0``::
-
-       /sys/class/uio/uio0/device/config
-       /sys/class/uio/uio0/device/resource*
-
-
 Power Management and Power Saving Functionality
 -----------------------------------------------
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.712980901 +0800
+++ 0042-doc-add-more-instructions-for-running-as-non-root.patch	2022-07-20 15:00:58.751000431 +0800
@@ -1 +1 @@
-From 979bb5d493fbbce77eaaf2b4a01ee98f93f76dd9 Mon Sep 17 00:00:00 2001
+From d4418de9d62b5bdea88f084bb431b18a93567013 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 979bb5d493fbbce77eaaf2b4a01ee98f93f76dd9 ]
@@ -12,2 +14,0 @@
-Cc: stable@dpdk.org
-
@@ -17,3 +18,2 @@
- doc/guides/linux_gsg/enable_func.rst          | 90 +++++++++++++------
- .../prog_guide/env_abstraction_layer.rst      |  2 +
- 2 files changed, 65 insertions(+), 27 deletions(-)
+ doc/guides/linux_gsg/enable_func.rst | 90 +++++++++++++++++++---------
+ 1 file changed, 63 insertions(+), 27 deletions(-)
@@ -22 +22 @@
-index 1df3ab0255..b15bfb2f9f 100644
+index 25f87f6b1a..4f7a8a1522 100644
@@ -25 +25 @@
-@@ -13,13 +13,64 @@ Enabling Additional Functionality
+@@ -66,13 +66,64 @@ The application can then determine what action to take, if any, if the HPET is n
@@ -95 +95 @@
-@@ -34,8 +85,13 @@ need to be adjusted in order to ensure normal DPDK operation:
+@@ -87,8 +138,13 @@ need to be adjusted in order to ensure normal DPDK operation:
@@ -111 +111 @@
-@@ -45,26 +101,6 @@ permissions should be adjusted:
+@@ -98,26 +154,6 @@ permissions should be adjusted:
@@ -137,13 +136,0 @@
- 
-diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst
-index 42def41e61..67842ae272 100644
---- a/doc/guides/prog_guide/env_abstraction_layer.rst
-+++ b/doc/guides/prog_guide/env_abstraction_layer.rst
-@@ -228,6 +228,8 @@ Normally, these options do not need to be changed.
-     can later be mapped into that preallocated VA space (if dynamic memory mode
-     is enabled), and can optionally be mapped into it at startup.
- 
-+.. _hugepage_mapping:
-+
- Hugepage Mapping
- ^^^^^^^^^^^^^^^^

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

* patch 'net/bnxt: fix switch domain allocation' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (40 preceding siblings ...)
  2022-07-20  8:21   ` patch 'doc: add more instructions for running as non-root' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'net/bnxt: allow Tx only or Rx only' " Xueming Li
                     ` (19 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Ajit Khaparde
  Cc: xuemingl, Somnath Kotur, Kalesh AP, Andy Gospodarek, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/36aeaa3131cbef77786626a50072e53086f9b24c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 36aeaa3131cbef77786626a50072e53086f9b24c Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Wed, 15 Jun 2022 20:26:57 +0530
Subject: [PATCH] net/bnxt: fix switch domain allocation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit aef3baca157d8202c26c5e034a9ab920da60d414 ]

Allocate switch domain after the trusted VF capability is queried
from the FW. Currently we are calling the function earlier.
Since the switch domain is allocated only for PFs or trusted VF,
the current location of code fails to allocate the domain during init.
But during cleanup we try to free the domain incorrectly.
Fix the behavior by changing the sequence of function calls.

Fixes: 3127f99274b67 ("net/bnxt: refactor init/uninit")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 45 +++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 22 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 281c209335..288baf497c 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5194,6 +5194,25 @@ bnxt_init_locks(struct bnxt *bp)
 	return err;
 }
 
+/* This should be called after we have queried trusted VF cap */
+static int bnxt_alloc_switch_domain(struct bnxt *bp)
+{
+	int rc = 0;
+
+	if (BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp)) {
+		rc = rte_eth_switch_domain_alloc(&bp->switch_domain_id);
+		if (rc)
+			PMD_DRV_LOG(ERR,
+				    "Failed to alloc switch domain: %d\n", rc);
+		else
+			PMD_DRV_LOG(INFO,
+				    "Switch domain allocated %d\n",
+				    bp->switch_domain_id);
+	}
+
+	return rc;
+}
+
 static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
 {
 	int rc = 0;
@@ -5202,6 +5221,10 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
 	if (rc)
 		return rc;
 
+	rc = bnxt_alloc_switch_domain(bp);
+	if (rc)
+		return rc;
+
 	if (!reconfig_dev) {
 		rc = bnxt_setup_mac_addr(bp->eth_dev);
 		if (rc)
@@ -5646,24 +5669,6 @@ err:
 	return ret;
 }
 
-static int bnxt_alloc_switch_domain(struct bnxt *bp)
-{
-	int rc = 0;
-
-	if (BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp)) {
-		rc = rte_eth_switch_domain_alloc(&bp->switch_domain_id);
-		if (rc)
-			PMD_DRV_LOG(ERR,
-				    "Failed to alloc switch domain: %d\n", rc);
-		else
-			PMD_DRV_LOG(INFO,
-				    "Switch domain allocated %d\n",
-				    bp->switch_domain_id);
-	}
-
-	return rc;
-}
-
 /* Allocate and initialize various fields in bnxt struct that
  * need to be allocated/destroyed only once in the lifetime of the driver
  */
@@ -5740,10 +5745,6 @@ static int bnxt_drv_init(struct rte_eth_dev *eth_dev)
 	if (rc)
 		return rc;
 
-	rc = bnxt_alloc_switch_domain(bp);
-	if (rc)
-		return rc;
-
 	return rc;
 }
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.756388215 +0800
+++ 0043-net-bnxt-fix-switch-domain-allocation.patch	2022-07-20 15:00:58.757667088 +0800
@@ -1 +1 @@
-From aef3baca157d8202c26c5e034a9ab920da60d414 Mon Sep 17 00:00:00 2001
+From 36aeaa3131cbef77786626a50072e53086f9b24c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit aef3baca157d8202c26c5e034a9ab920da60d414 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 0f0f40b95b..34f21496a4 100644
+index 281c209335..288baf497c 100644
@@ -28 +30 @@
-@@ -5287,6 +5287,25 @@ bnxt_init_locks(struct bnxt *bp)
+@@ -5194,6 +5194,25 @@ bnxt_init_locks(struct bnxt *bp)
@@ -54 +56 @@
-@@ -5295,6 +5314,10 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
+@@ -5202,6 +5221,10 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
@@ -65 +67 @@
-@@ -5734,24 +5757,6 @@ err:
+@@ -5646,24 +5669,6 @@ err:
@@ -90 +92 @@
-@@ -5828,10 +5833,6 @@ static int bnxt_drv_init(struct rte_eth_dev *eth_dev)
+@@ -5740,10 +5745,6 @@ static int bnxt_drv_init(struct rte_eth_dev *eth_dev)

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

* patch 'net/bnxt: allow Tx only or Rx only' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (41 preceding siblings ...)
  2022-07-20  8:21   ` patch 'net/bnxt: fix switch domain allocation' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'net/bnxt: fix setting forced speed' " Xueming Li
                     ` (18 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Damodharam Ammepalli; +Cc: xuemingl, Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3918d229defccbb3cfc0e77b37cd2b6f148d50ac

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3918d229defccbb3cfc0e77b37cd2b6f148d50ac Mon Sep 17 00:00:00 2001
From: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Date: Wed, 15 Jun 2022 20:26:59 +0530
Subject: [PATCH] net/bnxt: allow Tx only or Rx only
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8b7e58a791ef7747266b77ed433f5d03a6abaad7 ]

Currently, we fail the init/probe of PMD if eth_dev->data->nb_tx_queues
or eth_dev->data->nb_rx_queues is 0. We are removing this check.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")

Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 288baf497c..57db57c2a8 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -734,7 +734,7 @@ static int bnxt_alloc_prev_ring_stats(struct bnxt *bp)
 					     sizeof(struct bnxt_ring_stats) *
 					     bp->tx_cp_nr_rings,
 					     0);
-	if (bp->prev_tx_ring_stats == NULL)
+	if (bp->tx_cp_nr_rings > 0 && bp->prev_tx_ring_stats == NULL)
 		goto error;
 
 	return 0;
@@ -1525,11 +1525,6 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 	int vlan_mask = 0;
 	int rc, retry_cnt = BNXT_IF_CHANGE_RETRY_COUNT;
 
-	if (!eth_dev->data->nb_tx_queues || !eth_dev->data->nb_rx_queues) {
-		PMD_DRV_LOG(ERR, "Queues are not configured yet!\n");
-		return -EINVAL;
-	}
-
 	if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS)
 		PMD_DRV_LOG(ERR,
 			    "RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.877394985 +0800
+++ 0044-net-bnxt-allow-Tx-only-or-Rx-only.patch	2022-07-20 15:00:58.761000415 +0800
@@ -1 +1 @@
-From 8b7e58a791ef7747266b77ed433f5d03a6abaad7 Mon Sep 17 00:00:00 2001
+From 3918d229defccbb3cfc0e77b37cd2b6f148d50ac Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8b7e58a791ef7747266b77ed433f5d03a6abaad7 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 34f21496a4..8181e1f37a 100644
+index 288baf497c..57db57c2a8 100644
@@ -23 +25 @@
-@@ -723,7 +723,7 @@ static int bnxt_alloc_prev_ring_stats(struct bnxt *bp)
+@@ -734,7 +734,7 @@ static int bnxt_alloc_prev_ring_stats(struct bnxt *bp)
@@ -32 +34 @@
-@@ -1567,11 +1567,6 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -1525,11 +1525,6 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)

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

* patch 'net/bnxt: fix setting forced speed' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (42 preceding siblings ...)
  2022-07-20  8:21   ` patch 'net/bnxt: allow Tx only or Rx only' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'test/crypto: fix authentication IV for ZUC SGL' " Xueming Li
                     ` (17 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Kalesh AP; +Cc: xuemingl, Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/baf476aa4f65cf1d4db482313820b49bd35a2649

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From baf476aa4f65cf1d4db482313820b49bd35a2649 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 15 Jun 2022 20:27:00 +0530
Subject: [PATCH] net/bnxt: fix setting forced speed
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d9ae3e9d53253418e2f9f97b19849c0a625159ed ]

The "active_fec_signal_mode" in HWRM_PORT_PHY_QCFG response
does not return correct value till the link is up. Driver cannot
rely on active_fec_signal_mode while setting forced speed.

While setting forced speed of 50G/100G/200G, check if PAM4 speeds
are supported for the port first and then populate the HWRM request
accordingly.

Also, If PAM4 speed is supported, use PAM4 supported speed while
reporting speed capabilities.

Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 11 ++++++-----
 drivers/net/bnxt/bnxt_hwrm.c   | 27 +++++++++++++++++++--------
 drivers/net/bnxt/bnxt_hwrm.h   |  3 +++
 3 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 57db57c2a8..0ca79229e6 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -917,6 +917,7 @@ static int bnxt_shutdown_nic(struct bnxt *bp)
 
 uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
 {
+	uint32_t pam4_link_speed = 0;
 	uint32_t link_speed = 0;
 	uint32_t speed_capa = 0;
 
@@ -926,8 +927,8 @@ uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
 	link_speed = bp->link_info->support_speeds;
 
 	/* If PAM4 is configured, use PAM4 supported speed */
-	if (link_speed == 0 && bp->link_info->support_pam4_speeds > 0)
-		link_speed = bp->link_info->support_pam4_speeds;
+	if (bp->link_info->support_pam4_speeds > 0)
+		pam4_link_speed = bp->link_info->support_pam4_speeds;
 
 	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100MB)
 		speed_capa |= ETH_LINK_SPEED_100M;
@@ -949,11 +950,11 @@ uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
 		speed_capa |= ETH_LINK_SPEED_50G;
 	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB)
 		speed_capa |= ETH_LINK_SPEED_100G;
-	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_50G)
+	if (pam4_link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_50G)
 		speed_capa |= ETH_LINK_SPEED_50G;
-	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_100G)
+	if (pam4_link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_100G)
 		speed_capa |= ETH_LINK_SPEED_100G;
-	if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_200G)
+	if (pam4_link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_200G)
 		speed_capa |= ETH_LINK_SPEED_200G;
 
 	if (bp->link_info->auto_mode ==
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 44070ca482..8b50e44fcf 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2861,7 +2861,7 @@ static uint16_t bnxt_check_eth_link_autoneg(uint32_t conf_link)
 }
 
 static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
-					  uint16_t pam4_link)
+					  struct bnxt_link_info *link_info)
 {
 	uint16_t eth_link_speed = 0;
 
@@ -2900,18 +2900,29 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
 			HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_40GB;
 		break;
 	case ETH_LINK_SPEED_50G:
-		eth_link_speed = pam4_link ?
-			HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_50GB :
-			HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_50GB;
+		if (link_info->support_pam4_speeds &
+		    HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_50G) {
+			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_50GB;
+			link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
+		} else {
+			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_50GB;
+			link_info->link_signal_mode = BNXT_SIG_MODE_NRZ;
+		}
 		break;
 	case ETH_LINK_SPEED_100G:
-		eth_link_speed = pam4_link ?
-			HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_100GB :
-			HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100GB;
+		if (link_info->support_pam4_speeds &
+		    HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_100G) {
+			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_100GB;
+			link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
+		} else {
+			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100GB;
+			link_info->link_signal_mode = BNXT_SIG_MODE_NRZ;
+		}
 		break;
 	case ETH_LINK_SPEED_200G:
 		eth_link_speed =
 			HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_200GB;
+		link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
 		break;
 	default:
 		PMD_DRV_LOG(ERR,
@@ -3133,7 +3144,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
 		autoneg = 0;
 
 	speed = bnxt_parse_eth_link_speed(dev_conf->link_speeds,
-					  bp->link_info->link_signal_mode);
+					  bp->link_info);
 	link_req.phy_flags = HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY;
 	/* Autoneg can be done only when the FW allows. */
 	if (autoneg == 1 &&
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 813ac333f7..769e3d7e03 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -140,6 +140,9 @@ struct bnxt_pf_resource_info {
 	 BNXT_TUNNELED_OFFLOADS_CAP_GRE_EN(bp)   &&		\
 	 BNXT_TUNNELED_OFFLOADS_CAP_IPINIP_EN(bp))
 
+#define BNXT_SIG_MODE_NRZ	HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_NRZ
+#define BNXT_SIG_MODE_PAM4	HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_PAM4
+
 int bnxt_hwrm_cfa_l2_clear_rx_mask(struct bnxt *bp,
 				   struct bnxt_vnic_info *vnic);
 int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, struct bnxt_vnic_info *vnic,
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.920383666 +0800
+++ 0045-net-bnxt-fix-setting-forced-speed.patch	2022-07-20 15:00:58.771000399 +0800
@@ -1 +1 @@
-From d9ae3e9d53253418e2f9f97b19849c0a625159ed Mon Sep 17 00:00:00 2001
+From baf476aa4f65cf1d4db482313820b49bd35a2649 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d9ae3e9d53253418e2f9f97b19849c0a625159ed ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index 8181e1f37a..4e4791c2db 100644
+index 57db57c2a8..0ca79229e6 100644
@@ -33 +35 @@
-@@ -903,6 +903,7 @@ static int bnxt_shutdown_nic(struct bnxt *bp)
+@@ -917,6 +917,7 @@ static int bnxt_shutdown_nic(struct bnxt *bp)
@@ -41 +43 @@
-@@ -912,8 +913,8 @@ uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
+@@ -926,8 +927,8 @@ uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
@@ -51,3 +53,3 @@
- 		speed_capa |= RTE_ETH_LINK_SPEED_100M;
-@@ -935,11 +936,11 @@ uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
- 		speed_capa |= RTE_ETH_LINK_SPEED_50G;
+ 		speed_capa |= ETH_LINK_SPEED_100M;
+@@ -949,11 +950,11 @@ uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
+ 		speed_capa |= ETH_LINK_SPEED_50G;
@@ -55 +57 @@
- 		speed_capa |= RTE_ETH_LINK_SPEED_100G;
+ 		speed_capa |= ETH_LINK_SPEED_100G;
@@ -58 +60 @@
- 		speed_capa |= RTE_ETH_LINK_SPEED_50G;
+ 		speed_capa |= ETH_LINK_SPEED_50G;
@@ -61 +63 @@
- 		speed_capa |= RTE_ETH_LINK_SPEED_100G;
+ 		speed_capa |= ETH_LINK_SPEED_100G;
@@ -64 +66 @@
- 		speed_capa |= RTE_ETH_LINK_SPEED_200G;
+ 		speed_capa |= ETH_LINK_SPEED_200G;
@@ -68 +70 @@
-index 9eb8b8d56d..206ac20c0c 100644
+index 44070ca482..8b50e44fcf 100644
@@ -71 +73 @@
-@@ -2970,7 +2970,7 @@ static uint16_t bnxt_check_eth_link_autoneg(uint32_t conf_link)
+@@ -2861,7 +2861,7 @@ static uint16_t bnxt_check_eth_link_autoneg(uint32_t conf_link)
@@ -80 +82 @@
-@@ -3009,18 +3009,29 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
+@@ -2900,18 +2900,29 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
@@ -83 +85 @@
- 	case RTE_ETH_LINK_SPEED_50G:
+ 	case ETH_LINK_SPEED_50G:
@@ -96 +98 @@
- 	case RTE_ETH_LINK_SPEED_100G:
+ 	case ETH_LINK_SPEED_100G:
@@ -109 +111 @@
- 	case RTE_ETH_LINK_SPEED_200G:
+ 	case ETH_LINK_SPEED_200G:
@@ -116 +118 @@
-@@ -3242,7 +3253,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
+@@ -3133,7 +3144,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
@@ -126 +128 @@
-index 77f8521406..a82d9fb3ef 100644
+index 813ac333f7..769e3d7e03 100644
@@ -129 +131 @@
-@@ -141,6 +141,9 @@ struct bnxt_pf_resource_info {
+@@ -140,6 +140,9 @@ struct bnxt_pf_resource_info {

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

* patch 'test/crypto: fix authentication IV for ZUC SGL' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (43 preceding siblings ...)
  2022-07-20  8:21   ` patch 'net/bnxt: fix setting forced speed' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'test/crypto: fix ZUC vector IV format' " Xueming Li
                     ` (16 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Ciara Power; +Cc: xuemingl, Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ed3866cd1099f8ad9fbd788e9e93c99ff7898b23

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ed3866cd1099f8ad9fbd788e9e93c99ff7898b23 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 23 Jun 2022 14:31:42 +0000
Subject: [PATCH] test/crypto: fix authentication IV for ZUC SGL
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5d170ccea5edb84eabff2c0e9b4b1df822615009 ]

The wireless operation for ZUC SGL tests was being passed NULL instead
of a pointer to the test data authentication IV, and IV length 0.
This is now corrected to use the IV from the test data.

Fixes: 11c5485bb276 ("test/crypto: add scatter-gather tests for IP and OOP")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index c254650f39..a87e5583ac 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6072,7 +6072,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
 	retval = create_wireless_algo_auth_cipher_operation(
 		tdata->digest.data, tdata->digest.len,
 		tdata->cipher_iv.data, tdata->cipher_iv.len,
-		NULL, 0,
+		tdata->auth_iv.data, tdata->auth_iv.len,
 		(tdata->digest.offset_bytes == 0 ?
 		(verify ? ciphertext_pad_len : plaintext_pad_len)
 			: tdata->digest.offset_bytes),
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.967067156 +0800
+++ 0046-test-crypto-fix-authentication-IV-for-ZUC-SGL.patch	2022-07-20 15:00:58.781000383 +0800
@@ -1 +1 @@
-From 5d170ccea5edb84eabff2c0e9b4b1df822615009 Mon Sep 17 00:00:00 2001
+From ed3866cd1099f8ad9fbd788e9e93c99ff7898b23 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5d170ccea5edb84eabff2c0e9b4b1df822615009 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index e6d8bcfb02..bd7e232847 100644
+index c254650f39..a87e5583ac 100644
@@ -23 +25 @@
-@@ -6562,7 +6562,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
+@@ -6072,7 +6072,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,

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

* patch 'test/crypto: fix ZUC vector IV format' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (44 preceding siblings ...)
  2022-07-20  8:21   ` patch 'test/crypto: fix authentication IV for ZUC SGL' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'test/crypto: fix SNOW3G " Xueming Li
                     ` (15 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Ciara Power; +Cc: xuemingl, Tejasree Kondoj, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/373d6e1d5e43d445c1cbc10a6ffa40120ac6ca23

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 373d6e1d5e43d445c1cbc10a6ffa40120ac6ca23 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 23 Jun 2022 14:42:49 +0000
Subject: [PATCH] test/crypto: fix ZUC vector IV format
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3025fe291015686f3e954dd520e7cbc130439d33 ]

Some authentication and cipher IV formats were not following the spec [1].

For ZUC128 cipher IV, an 8 byte block is repeated,
with the last 3 bytes of each being 0x0.
IV[4] and IV[12] must have the last 2 bits set to 0.

Auth IVs must also have repeated bytes with the last 3 bytes
containing 0x0 in each 8 byte block.
IV[4] and IV[12] must have the last 3 bits set to 0.
IV[8] and IV[14] may have a flipped bit based on direction.

[1] https://www.gsma.com/security/wp-content/uploads/2019/05/EEA3_EIA3_specification_v1_8.pdf

Fixes: a81a81850fb1 ("test/crypto: add ZUC test cases for QAT")
Fixes: b1c1df46878d ("test/crypto: add ZUC test cases for auth-cipher")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 app/test/test_cryptodev_zuc_test_vectors.h | 54 +++++++++++-----------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/app/test/test_cryptodev_zuc_test_vectors.h b/app/test/test_cryptodev_zuc_test_vectors.h
index cc2338e107..067fb5eb34 100644
--- a/app/test/test_cryptodev_zuc_test_vectors.h
+++ b/app/test/test_cryptodev_zuc_test_vectors.h
@@ -558,13 +558,13 @@ static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = {
 	},
 	.auth_iv = {
 		.data = {
-			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
-			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
+			0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00,
+			0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.digest = {
-		.data = {0x01, 0xFE, 0x5E, 0x38},
+		.data = {0x2F, 0x45, 0x7D, 0x7B},
 		.len  = 4
 	},
 	.validAuthLenInBits = {
@@ -631,13 +631,13 @@ static struct wireless_test_data zuc_test_case_cipher_800b_auth_120b = {
 	},
 	.auth_iv = {
 		.data = {
-			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
-			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
+			0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00,
+			0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.digest = {
-		.data = {0x9D, 0x42, 0x1C, 0xEA},
+		.data = {0xCA, 0xBB, 0x8D, 0x94},
 		.len  = 4
 	},
 	.validAuthLenInBits = {
@@ -1056,15 +1056,15 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
 	},
 	.cipher_iv = {
 		.data = {
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+			0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00,
+			0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.auth_iv = {
 		.data = {
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+			0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00,
+			0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
@@ -1091,22 +1091,22 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
 	},
 	.ciphertext = {
 		.data = {
-			0x5A, 0x5A, 0xDB, 0x3D, 0xD5, 0xB7, 0xB9, 0x58,
-			0xA5, 0xD3, 0xE3, 0xF9, 0x18, 0x73, 0xB4, 0x74,
-			0x05, 0xF0, 0xE9, 0xB6, 0x5D, 0x9A, 0xE3, 0xFA,
-			0x5D, 0xFD, 0x24, 0x51, 0xAD, 0x73, 0xCA, 0x64,
-			0x91, 0xD5, 0xB3, 0x94, 0x10, 0x91, 0x89, 0xEA,
-			0x73, 0x6F, 0xB0, 0x2A, 0x0A, 0x63, 0x0F, 0x8D,
-			0x64, 0x87, 0xA3, 0x14, 0x6B, 0x93, 0x31, 0x0F,
-			0x14, 0xAD, 0xEA, 0x62, 0x80, 0x3F, 0x44, 0xDD,
-			0x4E, 0x30, 0xFA, 0xC8, 0x0E, 0x5F, 0x46, 0xE7,
-			0x60, 0xEC, 0xDF, 0x8B, 0x94, 0x7D, 0x2E, 0x63,
-			0x48, 0xD9, 0x69, 0x06, 0x13, 0xF2, 0x20, 0x49,
-			0x54, 0xA6, 0xD4, 0x98, 0xF4, 0xF6, 0x1D, 0x4A,
-			0xC9, 0xA5, 0xDA, 0x46, 0x3D, 0xD9, 0x02, 0x47,
-			0x1C, 0x20, 0x73, 0x35, 0x17, 0x1D, 0x81, 0x8D,
-			0x2E, 0xCD, 0x70, 0x37, 0x22, 0x55, 0x3C, 0xF3,
-			0xDA, 0x70, 0x42, 0x12, 0x0E, 0xAA, 0xC4, 0xAB
+			0x5A, 0x5A, 0x94, 0xE7, 0xB8, 0xD7, 0x4E, 0xBB,
+			0x4C, 0xC3, 0xD1, 0x16, 0xFC, 0x8C, 0xE4, 0x27,
+			0x44, 0xEC, 0x04, 0x26, 0x60, 0x9C, 0xFF, 0x81,
+			0xB6, 0x2B, 0x48, 0x1D, 0xEE, 0x26, 0xF7, 0x58,
+			0x40, 0x38, 0x58, 0xEA, 0x22, 0x23, 0xE6, 0x34,
+			0x9A, 0x69, 0x32, 0x68, 0xBD, 0xDD, 0x7D, 0xA3,
+			0xC0, 0x04, 0x79, 0xF0, 0xF1, 0x58, 0x78, 0x5E,
+			0xD0, 0xDF, 0x27, 0x9A, 0x53, 0x70, 0x5D, 0xFB,
+			0x1B, 0xCA, 0xBA, 0x97, 0x12, 0x1F, 0x59, 0x6B,
+			0x75, 0x7B, 0x94, 0xF6, 0xE7, 0xFA, 0x49, 0x6B,
+			0x7D, 0x7F, 0x8F, 0x0F, 0x78, 0x56, 0x40, 0x52,
+			0x84, 0x3E, 0xA9, 0xE8, 0x84, 0x6F, 0xEF, 0xFB,
+			0x4A, 0x48, 0x3A, 0x4C, 0x81, 0x98, 0xDD, 0x17,
+			0x89, 0x66, 0x3B, 0xC0, 0xEC, 0x71, 0xDB, 0xF6,
+			0x44, 0xDF, 0xA7, 0x97, 0xB2, 0x9B, 0x84, 0xA7,
+			0x2D, 0x2D, 0xC1, 0x93, 0x12, 0x37, 0xEA, 0xD2
 		},
 		.len = 128 << 3
 	},
@@ -1123,7 +1123,7 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
 		.len = 2 << 3
 	},
 	.digest = {
-		.data = {0x0E, 0xAA, 0xC4, 0xAB},
+		.data = {0x12, 0x37, 0xEA, 0xD2},
 		.len  = 4,
 		.offset_bytes = 124
 	}
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.016932339 +0800
+++ 0047-test-crypto-fix-ZUC-vector-IV-format.patch	2022-07-20 15:00:58.781000383 +0800
@@ -1 +1 @@
-From 3025fe291015686f3e954dd520e7cbc130439d33 Mon Sep 17 00:00:00 2001
+From 373d6e1d5e43d445c1cbc10a6ffa40120ac6ca23 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3025fe291015686f3e954dd520e7cbc130439d33 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index 5d1d264579..299d7649fe 100644
+index cc2338e107..067fb5eb34 100644
@@ -67 +69 @@
-@@ -1166,15 +1166,15 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
+@@ -1056,15 +1056,15 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
@@ -87 +89 @@
-@@ -1201,22 +1201,22 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
+@@ -1091,22 +1091,22 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
@@ -126 +128 @@
-@@ -1233,7 +1233,7 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
+@@ -1123,7 +1123,7 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {

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

* patch 'test/crypto: fix SNOW3G vector IV format' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (45 preceding siblings ...)
  2022-07-20  8:21   ` patch 'test/crypto: fix ZUC vector IV format' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'baseband/acc100: remove prefix of internal file' " Xueming Li
                     ` (14 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Ciara Power; +Cc: xuemingl, Tejasree Kondoj, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ff55658ad7c9e2492f0c8ff025e9c183a9936c01

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ff55658ad7c9e2492f0c8ff025e9c183a9936c01 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 23 Jun 2022 14:42:50 +0000
Subject: [PATCH] test/crypto: fix SNOW3G vector IV format
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3271c24b295caa7ee3fe227225a2ce962757d9c4 ]

Some of the cipher and authentication IVs did not follow the spec for
SNOW3G algorithm [1].

Cipher IVs must have the last 3 bytes of each 8 byte block as 0x0.
IV[4] and IV[12] must have the last 2 bits set to 0.
Each 8 byte block is repeated.

Auth IVs must also have a repeated 8 byte block.
IV[8] and IV[14] may have a flipped bit based on direction.

[1] https://www.gsma.com/aboutus/wp-content/uploads/2014/12/uea2uia2d1v21.pdf

Fixes: 8bdf665fe6c0 ("app/test: add SNOW 3G")
Fixes: 24342ade2c9d ("test/crypto: check SNOW3G when digest is encrypted")
Fixes: 02ed7b3871d6 ("test/crypto: add SNOW3G test cases for auth-cipher")
Fixes: 11c5485bb276 ("test/crypto: add scatter-gather tests for IP and OOP")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 app/test/test_cryptodev_snow3g_test_vectors.h | 142 +++++++++---------
 1 file changed, 71 insertions(+), 71 deletions(-)

diff --git a/app/test/test_cryptodev_snow3g_test_vectors.h b/app/test/test_cryptodev_snow3g_test_vectors.h
index bbe05662be..b49a07bcf2 100644
--- a/app/test/test_cryptodev_snow3g_test_vectors.h
+++ b/app/test/test_cryptodev_snow3g_test_vectors.h
@@ -138,11 +138,11 @@ struct snow3g_test_data snow3g_test_case_2 = {
 		.len = 16
 	},
 	.cipher_iv = {
-	       .data = {
+		.data = {
 			0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00,
 			0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00
 		},
-	       .len = 16
+		.len = 16
 	},
 	.plaintext = {
 		.data = {
@@ -359,8 +359,8 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_1 = {
 	},
 	.cipher_iv = {
 		.data = {
-			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
-			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+			0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00,
+			0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
@@ -383,13 +383,13 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_1 = {
 		.len = 384
 	},
 	.ciphertext = {
-	   .data = {
-			0x95, 0x2E, 0x5A, 0xE1, 0x50, 0xB8, 0x59, 0x2A,
-			0x9B, 0xA0, 0x38, 0xA9, 0x8E, 0x2F, 0xED, 0xAB,
-			0xFD, 0xC8, 0x3B, 0x47, 0x46, 0x0B, 0x50, 0x16,
-			0xEC, 0x88, 0x45, 0xB6, 0x05, 0xC7, 0x54, 0xF8,
-			0xBD, 0x91, 0xAA, 0xB6, 0xA4, 0xDC, 0x64, 0xB4,
-			0xCB, 0xEB, 0x97, 0x06, 0x4C, 0xF7, 0x02, 0x3D
+	  .data = {
+			0x86, 0x4F, 0x4D, 0xE8, 0x86, 0xE6, 0x3E, 0x66,
+			0x52, 0x97, 0xC7, 0x62, 0xAE, 0x8E, 0xA2, 0xDB,
+			0x01, 0xD6, 0x33, 0xA9, 0xA4, 0xCE, 0x02, 0xD5,
+			0xC2, 0xC5, 0x5F, 0x90, 0xE0, 0x89, 0x48, 0xD4,
+			0x92, 0xF4, 0xE5, 0x9A, 0xDA, 0x13, 0x76, 0xFF,
+			0x6E, 0x76, 0x6B, 0x71, 0x62, 0x28, 0xB2, 0xEC
 		},
 		.len = 384
 	},
@@ -428,15 +428,15 @@ struct snow3g_test_data snow3g_test_case_7 = {
 	},
 	.cipher_iv = {
 		.data = {
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
+			0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00,
+			0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.auth_iv = {
 		.data = {
-			 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+			0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A,
+			0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A
 		},
 		.len = 16
 	},
@@ -457,28 +457,28 @@ struct snow3g_test_data snow3g_test_case_7 = {
 			0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,
 			0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,
 			0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,
-			0x5A,  0x5A,  0x5A,  0x5A,  0xF1,  0x9E,  0x2B,  0x6F,
+			0x5A,  0x5A,  0x5A,  0x5A,  0xBB,  0x2B,  0x8B,  0x15,
 		},
 		.len = 128 << 3
 	},
 	.ciphertext = {
 		.data = {
-			0x5A,  0x5A,  0xE4,  0xAD,  0x29,  0xA2,  0x6A,  0xA6,
-			0x20,  0x1D,  0xCD,  0x08,  0x50,  0xD6,  0xE6,  0x47,
-			0xBC,  0x88,  0x08,  0x01,  0x17,  0xFA,  0x47,  0x5B,
-			0x90,  0x40,  0xBA,  0x0C,  0xB5,  0x58,  0xF3,  0x0C,
-			0xA0,  0xD4,  0x98,  0x83,  0x1B,  0xCE,  0x54,  0xE3,
-			0x29,  0x00,  0x3C,  0xA4,  0xAD,  0x74,  0xEE,  0x05,
-			0xA3,  0x6C,  0xD4,  0xAC,  0xC6,  0x30,  0x33,  0xC9,
-			0x37,  0x57,  0x41,  0x9B,  0xD4,  0x73,  0xB9,  0x77,
-			0x70,  0x8B,  0x63,  0xDD,  0x22,  0xB8,  0xE1,  0x85,
-			0xB2,  0x92,  0x7C,  0x37,  0xD3,  0x2E,  0xD9,  0xF4,
-			0x4A,  0x69,  0x25,  0x30,  0xE3,  0x5B,  0x8B,  0xF6,
-			0x0F,  0xDE,  0x0B,  0x92,  0xD5,  0x25,  0x52,  0x6D,
-			0x26,  0xEB,  0x2F,  0x8A,  0x3B,  0x8B,  0x38,  0xE2,
-			0x48,  0xD3,  0x4A,  0x98,  0xF7,  0x3A,  0xC2,  0x46,
-			0x69,  0x8D,  0x73,  0x3E,  0x57,  0x88,  0x2C,  0x80,
-			0xF0,  0xF2,  0x75,  0xB8,  0x7D,  0x27,  0xC6,  0xDA,
+			0x5A,  0x5A,  0x8A,  0x35,  0xF7,  0x36,  0xDA,  0xD7,
+			0xC4,  0x2C,  0x10,  0xEA,  0x92,  0x9C,  0x00,  0xF0,
+			0xAE,  0x35,  0x5E,  0x8D,  0xB6,  0x88,  0x30,  0x66,
+			0x74,  0x8B,  0xA2,  0x82,  0x5C,  0xA7,  0xF3,  0x54,
+			0x75,  0x02,  0xA9,  0x90,  0x6B,  0x4B,  0x6A,  0x63,
+			0xFF,  0x4B,  0x08,  0xFE,  0x11,  0x3C,  0x5A,  0x53,
+			0xEE,  0x68,  0x14,  0x41,  0x17,  0xCD,  0x7B,  0x27,
+			0x88,  0xAF,  0x99,  0xE2,  0x9C,  0x86,  0x42,  0x12,
+			0x97,  0x93,  0xF0,  0xE6,  0xE2,  0xB2,  0x2D,  0xDA,
+			0x2C,  0x59,  0xB0,  0xA7,  0x09,  0xF6,  0x32,  0xC0,
+			0x35,  0x9A,  0xD3,  0xBA,  0xDC,  0x8F,  0x2E,  0x18,
+			0x97,  0x87,  0x44,  0xD6,  0x43,  0xFA,  0x86,  0x5A,
+			0xB0,  0xA2,  0x5A,  0xB8,  0x5F,  0x57,  0xE3,  0x2F,
+			0x73,  0x9C,  0x01,  0x3A,  0x02,  0x08,  0x8C,  0xEB,
+			0xA0,  0x5D,  0x74,  0x58,  0x5A,  0xA1,  0x58,  0x17,
+			0x5E,  0x86,  0x96,  0xE6,  0x9C,  0xEE,  0x8C,  0xA8
 
 		},
 		.len = 128 << 3
@@ -493,7 +493,7 @@ struct snow3g_test_data snow3g_test_case_7 = {
 	},
 	.digest = {
 		.data = {
-			0x7D, 0x27, 0xC6, 0xDA
+			0x9C, 0xEE, 0x8C, 0xA8
 		},
 		.len = 4,
 		.offset_bytes = 124
@@ -520,15 +520,15 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = {
 	},
 	.cipher_iv = {
 		.data = {
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
+			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
+			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.auth_iv = {
 		.data = {
-			 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+			0x3E, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0xD8, 0xE2,
+			0x3E, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0xD8, 0xE2
 		},
 		.len = 16
 	},
@@ -556,22 +556,22 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = {
 	},
 	.ciphertext = {
 		.data = {
-			0x5A,  0x5A,  0xE4,  0xAD,  0x29,  0xA2,  0x6A,  0xA6,
-			0x20,  0x1D,  0xCD,  0x08,  0x50,  0xD6,  0xE6,  0x47,
-			0xBC,  0x88,  0x08,  0x01,  0x17,  0xFA,  0x47,  0x5B,
-			0x90,  0x40,  0xBA,  0x0C,  0xB5,  0x58,  0xF3,  0x0C,
-			0xA0,  0xD4,  0x98,  0x83,  0x1B,  0xCE,  0x54,  0xE3,
-			0x29,  0x00,  0x3C,  0xA4,  0xAD,  0x74,  0xEE,  0x05,
-			0xA3,  0x6C,  0xD4,  0xAC,  0xC6,  0x30,  0x33,  0xC9,
-			0x37,  0x57,  0x41,  0x9B,  0xD4,  0x73,  0xB9,  0x77,
-			0x70,  0x8B,  0x63,  0xDD,  0x22,  0xB8,  0xE1,  0x85,
-			0xB2,  0x92,  0x7C,  0x37,  0xD3,  0x2E,  0xD9,  0xF4,
-			0x4A,  0x69,  0x25,  0x30,  0xE3,  0x5B,  0x8B,  0xF6,
-			0x0F,  0xDE,  0x0B,  0x92,  0xD5,  0x25,  0x52,  0x6D,
-			0x26,  0xEB,  0x2F,  0x8A,  0x3B,  0x8B,  0x38,  0xE2,
-			0x48,  0xD3,  0x4A,  0x98,  0xF7,  0x3A,  0xC2,  0x46,
-			0x69,  0x8D,  0x73,  0x3E,  0x57,  0x88,  0x2C,  0x80,
-			0xF0,  0xF2,  0x75,  0xB8,  0x7D,  0x27,  0xC6,  0xDA,
+			0x5A,  0x5A,  0xCF,  0xCF,  0x3D,  0x11,  0xBF,  0xD9,
+			0xC3,  0x7F,  0x7C,  0xA8,  0x1A,  0x9F,  0x9F,  0x34,
+			0xC5,  0x6E,  0x1B,  0x2C,  0xE0,  0x81,  0x4B,  0x66,
+			0x87,  0xCB,  0xD5,  0x61,  0x04,  0xED,  0xBC,  0x69,
+			0x79,  0x86,  0x73,  0x48,  0x69,  0x4A,  0xBA,  0x55,
+			0x44,  0x6C,  0xEF,  0xD9,  0x34,  0x61,  0x59,  0x67,
+			0x80,  0x4E,  0x03,  0x95,  0x0A,  0xA1,  0x6C,  0xBA,
+			0x74,  0xBD,  0xAF,  0x11,  0x4B,  0xE6,  0x98,  0x61,
+			0x4E,  0xD4,  0x3E,  0xE4,  0x99,  0x55,  0x5C,  0x3A,
+			0x8C,  0x3E,  0xC0,  0x01,  0x6E,  0x15,  0xE1,  0x0E,
+			0x71,  0x4C,  0x89,  0x43,  0x8A,  0x48,  0x69,  0x6D,
+			0x02,  0x10,  0xC6,  0x54,  0x37,  0x18,  0xAA,  0x10,
+			0x90,  0x80,  0x0B,  0x69,  0x08,  0xB4,  0xF9,  0x4D,
+			0xD1,  0x2E,  0x43,  0xD9,  0x92,  0xAF,  0x06,  0x4A,
+			0xAF,  0x26,  0x25,  0x77,  0x37,  0xD0,  0xFC,  0x3C,
+			0xA0,  0xCB,  0xAF,  0x06,  0x95,  0x26,  0x30,  0x38,
 
 		},
 		.len = 128 << 3
@@ -586,7 +586,7 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = {
 	},
 	.digest = {
 		.data = {
-			0x7D, 0x27, 0xC6, 0xDA
+			0x95, 0x26, 0x30, 0x38
 		},
 		.len = 4,
 		.offset_bytes = 124
@@ -613,15 +613,15 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_3 = {
 	},
 	.cipher_iv = {
 		.data = {
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
+			0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00,
+			0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.auth_iv = {
 		.data = {
-			 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+			0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37,
+			0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37
 		},
 		.len = 16
 	},
@@ -636,10 +636,10 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_3 = {
 	},
 	.ciphertext = {
 		.data = {
-			0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6,
-			0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47,
-			0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B,
-			0x90, 0x40, 0xBA, 0x0C, 0xBA, 0x6D, 0x6A, 0x5E,
+			0x5A, 0x5A, 0x93, 0xB0, 0x3F, 0xA4, 0xEB, 0xD4,
+			0x51, 0x12, 0x3B, 0x95, 0x93, 0x12, 0xBF, 0xBE,
+			0xF2, 0xFE, 0xA5, 0xAE, 0xE7, 0xF4, 0x80, 0x3E,
+			0xB2, 0xD1, 0xFF, 0x5F, 0xD9, 0x32, 0x72, 0xFE,
 		},
 		.len = 32 << 3
 	},
@@ -653,7 +653,7 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_3 = {
 	},
 	.digest = {
 		.data = {
-			0xBA, 0x6D, 0x6A, 0x5E
+			0xD9, 0x32, 0x72, 0xFE
 		},
 		.len = 4,
 		.offset_bytes = 28
@@ -680,15 +680,15 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = {
 	},
 	.cipher_iv = {
 		.data = {
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
+			0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00,
+			0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.auth_iv = {
 		.data = {
-			 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD
 		},
 		.len = 16
 	},
@@ -704,9 +704,9 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = {
 	.ciphertext = {
 		.data = {
 			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
-			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0xE4, 0xAD,
-			0x29, 0xA2, 0x6A, 0xA6, 0x20, 0x1D, 0xCD, 0x08,
-			0x50, 0xD6, 0xE6, 0x47, 0xB3, 0xBD, 0xC3, 0x08
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0xA2, 0xB7,
+			0xDF, 0xA7, 0x98, 0xA1, 0xD8, 0xD4, 0x9B, 0x6E,
+			0x2C, 0x7A, 0x66, 0x15, 0xCC, 0x4C, 0xE5, 0xE0
 		},
 		.len = 32 << 3
 	},
@@ -720,7 +720,7 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = {
 	},
 	.digest = {
 		.data = {
-			0xB3, 0xBD, 0xC3, 0x08
+			0xCC, 0x4C, 0xE5, 0xE0
 		},
 		.len = 4,
 		.offset_bytes = 28
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.057631478 +0800
+++ 0048-test-crypto-fix-SNOW3G-vector-IV-format.patch	2022-07-20 15:00:58.781000383 +0800
@@ -1 +1 @@
-From 3271c24b295caa7ee3fe227225a2ce962757d9c4 Mon Sep 17 00:00:00 2001
+From ff55658ad7c9e2492f0c8ff025e9c183a9936c01 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3271c24b295caa7ee3fe227225a2ce962757d9c4 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org

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

* patch 'baseband/acc100: remove prefix of internal file' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (46 preceding siblings ...)
  2022-07-20  8:21   ` patch 'test/crypto: fix SNOW3G " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'examples/fips_validation: handle empty payload' " Xueming Li
                     ` (13 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: xuemingl, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/02e062b333fe3556996668f73ea8453380985b2e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 02e062b333fe3556996668f73ea8453380985b2e Mon Sep 17 00:00:00 2001
From: Nicolas Chautru <nicolas.chautru@intel.com>
Date: Fri, 24 Jun 2022 16:32:42 -0700
Subject: [PATCH] baseband/acc100: remove prefix of internal file
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b375108e57f2550638063dd1c6d3e23bf5d50dc9 ]

File renamed to avoid the rte_ file prefix since rte_acc100_pmd.h
is actually internal only.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/baseband/acc100/{rte_acc100_pmd.h => acc100_pmd.h} | 0
 drivers/baseband/acc100/rte_acc100_pmd.c                   | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename drivers/baseband/acc100/{rte_acc100_pmd.h => acc100_pmd.h} (100%)

diff --git a/drivers/baseband/acc100/rte_acc100_pmd.h b/drivers/baseband/acc100/acc100_pmd.h
similarity index 100%
rename from drivers/baseband/acc100/rte_acc100_pmd.h
rename to drivers/baseband/acc100/acc100_pmd.h
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 9254207969..453343cfb6 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -21,7 +21,7 @@
 
 #include <rte_bbdev.h>
 #include <rte_bbdev_pmd.h>
-#include "rte_acc100_pmd.h"
+#include "acc100_pmd.h"
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 RTE_LOG_REGISTER(acc100_logtype, pmd.bb.acc100, DEBUG);
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.098492742 +0800
+++ 0049-baseband-acc100-remove-prefix-of-internal-file.patch	2022-07-20 15:00:58.787667039 +0800
@@ -1 +1 @@
-From b375108e57f2550638063dd1c6d3e23bf5d50dc9 Mon Sep 17 00:00:00 2001
+From 02e062b333fe3556996668f73ea8453380985b2e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b375108e57f2550638063dd1c6d3e23bf5d50dc9 ]
@@ -22 +25 @@
-index 15f3c114b3..a8482bd411 100644
+index 9254207969..453343cfb6 100644
@@ -31 +33,0 @@
- #include "acc101_pmd.h"
@@ -33,0 +36 @@
+ RTE_LOG_REGISTER(acc100_logtype, pmd.bb.acc100, DEBUG);

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

* patch 'examples/fips_validation: handle empty payload' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (47 preceding siblings ...)
  2022-07-20  8:21   ` patch 'baseband/acc100: remove prefix of internal file' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'crypto/qat: fix DOCSIS crash' " Xueming Li
                     ` (12 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: xuemingl, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ff40c914b09e4bce5bb1c3d879df6931e31ba27d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ff40c914b09e4bce5bb1c3d879df6931e31ba27d Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Tue, 28 Jun 2022 18:41:09 +0530
Subject: [PATCH] examples/fips_validation: handle empty payload
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0fab1428332bdfb213b51e068625d38419488646 ]

Allocate at least onebyte to handle empty payload in a test vector
when defined.

Fixes: 3d0fad56b74 ("examples/fips_validation: add crypto FIPS application")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/fips_validation/fips_validation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index 4c3ed80c82..39dfe8e8e6 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -522,7 +522,7 @@ parse_uint8_hex_str(const char *key, char *src, struct fips_val *val)
 		val->val = NULL;
 	}
 
-	val->val = rte_zmalloc(NULL, len, 0);
+	val->val = rte_zmalloc(NULL, len + 1, 0);
 	if (!val->val)
 		return -ENOMEM;
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.141374531 +0800
+++ 0050-examples-fips_validation-handle-empty-payload.patch	2022-07-20 15:00:58.787667039 +0800
@@ -1 +1 @@
-From 0fab1428332bdfb213b51e068625d38419488646 Mon Sep 17 00:00:00 2001
+From ff40c914b09e4bce5bb1c3d879df6931e31ba27d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0fab1428332bdfb213b51e068625d38419488646 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 94e31abf83..324abccb14 100644
+index 4c3ed80c82..39dfe8e8e6 100644
@@ -22 +24 @@
-@@ -630,7 +630,7 @@ parse_uint8_hex_str(const char *key, char *src, struct fips_val *val)
+@@ -522,7 +522,7 @@ parse_uint8_hex_str(const char *key, char *src, struct fips_val *val)

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

* patch 'crypto/qat: fix DOCSIS crash' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (48 preceding siblings ...)
  2022-07-20  8:21   ` patch 'examples/fips_validation: handle empty payload' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'doc: fix grammar and formatting in compressdev guide' " Xueming Li
                     ` (11 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Rebecca Troy; +Cc: xuemingl, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5a12a4c1fa0e030e9c4197dc01751d82087a68af

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5a12a4c1fa0e030e9c4197dc01751d82087a68af Mon Sep 17 00:00:00 2001
From: Rebecca Troy <rebecca.troy@intel.com>
Date: Wed, 29 Jun 2022 16:10:36 +0000
Subject: [PATCH] crypto/qat: fix DOCSIS crash
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 03f0e3608d44d468b22ed17c30144d87edeb3ee9 ]

Currently if AES or DES algorithms fail for DOCSIS test suite,
a segmentation fault occurs when cryptodev_qat_autotest is ran.

This is due to a duplicate call of EVP_CIPHER_CTX_free for the
session context. Ctx is freed firstly in the bpi_cipher_ctx_init
function and then again at the end of qat_sym_session_configure_cipher
function.

This commit fixes this bug by removing the first instance
of EVP_CIPHER_CTX_free, leaving just the dedicated function in
the upper level to free the ctx.

Fixes: 98f060891615 ("crypto/qat: add symmetric session file")

Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/crypto/qat/qat_sym_session.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index aa9ce1236b..2a9b2712f6 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -103,8 +103,10 @@ bpi_cipher_ctx_init(enum rte_crypto_cipher_algorithm cryptodev_algo,
 	return 0;
 
 ctx_init_err:
-	if (*ctx != NULL)
+	if (*ctx != NULL) {
 		EVP_CIPHER_CTX_free(*ctx);
+		*ctx = NULL;
+	}
 	return ret;
 }
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.181766889 +0800
+++ 0051-crypto-qat-fix-DOCSIS-crash.patch	2022-07-20 15:00:58.791000367 +0800
@@ -1 +1 @@
-From 03f0e3608d44d468b22ed17c30144d87edeb3ee9 Mon Sep 17 00:00:00 2001
+From 5a12a4c1fa0e030e9c4197dc01751d82087a68af Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 03f0e3608d44d468b22ed17c30144d87edeb3ee9 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index e40c042ba9..b30396487e 100644
+index aa9ce1236b..2a9b2712f6 100644
@@ -31 +33 @@
-@@ -136,8 +136,10 @@ bpi_cipher_ctx_init(enum rte_crypto_cipher_algorithm cryptodev_algo,
+@@ -103,8 +103,10 @@ bpi_cipher_ctx_init(enum rte_crypto_cipher_algorithm cryptodev_algo,

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

* patch 'doc: fix grammar and formatting in compressdev guide' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (49 preceding siblings ...)
  2022-07-20  8:21   ` patch 'crypto/qat: fix DOCSIS crash' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'doc: fix grammar and parameters in l2fwd-crypto " Xueming Li
                     ` (10 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Ciara Power; +Cc: xuemingl, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/92962694e870727efa84358a3323c58ee1c2d8a0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 92962694e870727efa84358a3323c58ee1c2d8a0 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Mon, 30 May 2022 16:03:42 +0000
Subject: [PATCH] doc: fix grammar and formatting in compressdev guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4c9484373fcd0aa4a240fdb2e797269eb2f26b9b ]

Small improvements made to the compressdev programmer's guide.
This includes rephrasing some sentences, fixing grammar,
and aligning formatting.

Fixes: a584d3bea902 ("doc: add compressdev library guide")
Fixes: f7095d41bba6 ("doc: clarify data plane error handling in compressdev")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 doc/guides/prog_guide/compressdev.rst | 283 ++++++++++++++------------
 1 file changed, 148 insertions(+), 135 deletions(-)

diff --git a/doc/guides/prog_guide/compressdev.rst b/doc/guides/prog_guide/compressdev.rst
index 07d1a62a63..2a59c434c1 100644
--- a/doc/guides/prog_guide/compressdev.rst
+++ b/doc/guides/prog_guide/compressdev.rst
@@ -2,7 +2,7 @@
     Copyright(c) 2017-2018 Cavium Networks.
 
 Compression Device Library
-===========================
+==========================
 
 The compression framework provides a generic set of APIs to perform compression services
 as well as to query and configure compression devices both physical(hardware) and virtual(software)
@@ -32,10 +32,10 @@ From the command line using the --vdev EAL option
 
 .. Note::
 
-   * If DPDK application requires multiple software compression PMD devices then required
-     number of ``--vdev`` with appropriate libraries are to be added.
+   * If a DPDK application requires multiple software compression PMD devices then the
+     required number of ``--vdev`` args with appropriate libraries are to be added.
 
-   * An Application with multiple compression device instances exposed by the same PMD must
+   * An application with multiple compression device instances exposed by the same PMD must
      specify a unique name for each device.
 
    Example: ``--vdev  'pmd0' --vdev  'pmd1'``
@@ -53,7 +53,7 @@ All virtual compression devices support the following initialization parameters:
 Device Identification
 ~~~~~~~~~~~~~~~~~~~~~
 
-Each device, whether virtual or physical is uniquely designated by two
+Each device, whether virtual or physical, is uniquely designated by two
 identifiers:
 
 - A unique device index used to designate the compression device in all functions
@@ -76,7 +76,7 @@ The ``rte_compressdev_configure`` API is used to configure a compression device.
 The ``rte_compressdev_config`` structure is used to pass the configuration
 parameters.
 
-See *DPDK API Reference* for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
 Configuration of Queue Pairs
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -85,87 +85,88 @@ Each compression device queue pair is individually configured through the
 ``rte_compressdev_queue_pair_setup`` API.
 
 The ``max_inflight_ops`` is used to pass maximum number of
-rte_comp_op that could be present in a queue at-a-time.
-PMD then can allocate resources accordingly on a specified socket.
+``rte_comp_op`` that could be present in a queue at a time.
+The PMD can then allocate resources accordingly on a specified socket.
 
-See *DPDK API Reference* for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
-Logical Cores, Memory and Queues Pair Relationships
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Logical Cores, Memory and Queue Pair Relationships
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Library supports NUMA similarly as described in Cryptodev library section.
+The Compressdev library supports NUMA similarly as described in Cryptodev library section.
 
-A queue pair cannot be shared and should be exclusively used by a single processing
-context for enqueuing operations or dequeuing operations on the same compression device
+A queue pair cannot be shared, and should be exclusively used by a single processing
+context for enqueuing operations or dequeuing operations on the same compression device,
 since sharing would require global locks and hinder performance. It is however possible
 to use a different logical core to dequeue an operation on a queue pair from the logical
-core on which it was enqueued. This means that a compression burst enqueue/dequeue
+core on which it was enqueued. This means that for a compression burst, enqueue/dequeue
 APIs are a logical place to transition from one logical core to another in a
 data processing pipeline.
 
 Device Features and Capabilities
----------------------------------
+--------------------------------
 
 Compression devices define their functionality through two mechanisms, global device
-features and algorithm features. Global devices features identify device
-wide level features which are applicable to the whole device such as supported hardware
+features and algorithm features. Global device features identify device
+wide level features which are applicable to the whole device, such as supported hardware
 acceleration and CPU features. List of compression device features can be seen in the
 RTE_COMPDEV_FF_XXX macros.
 
-The algorithm features lists individual algo feature which device supports per-algorithm,
-such as a stateful compression/decompression, checksums operation etc. List of algorithm
-features can be seen in the RTE_COMP_FF_XXX macros.
+The algorithm features are features which the device supports per-algorithm,
+such as a stateful compression/decompression, checksums operation etc.
+The list of algorithm features can be seen in the RTE_COMP_FF_XXX macros.
 
 Capabilities
 ~~~~~~~~~~~~
 Each PMD has a list of capabilities, including algorithms listed in
-enum ``rte_comp_algorithm`` and its associated feature flag and
-sliding window range in log base 2 value. Sliding window tells
-the minimum and maximum size of lookup window that algorithm uses
+the enum ``rte_comp_algorithm``, its associated feature flag, and
+sliding window range in log base 2 value. The sliding window range
+defines the minimum and maximum size of a lookup window that an algorithm uses
 to find duplicates.
 
-See *DPDK API Reference* for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
 Each Compression poll mode driver defines its array of capabilities
-for each algorithm it supports. See PMD implementation for capability
+for each algorithm it supports. See the PMD implementation for capability
 initialization.
 
 Capabilities Discovery
 ~~~~~~~~~~~~~~~~~~~~~~
 
-PMD capability and features are discovered via ``rte_compressdev_info_get`` function.
+PMD capability and features are discovered via the ``rte_compressdev_info_get`` function.
 
 The ``rte_compressdev_info`` structure contains all the relevant information for the device.
 
-See *DPDK API Reference* for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
 Compression Operation
-----------------------
+---------------------
 
 DPDK compression supports two types of compression methodologies:
 
-- Stateless, data associated to a compression operation is compressed without any reference
+- Stateless - data associated with a compression operation is compressed without any reference
   to another compression operation.
 
-- Stateful, data in each compression operation is compressed with reference to previous compression
+- Stateful - data in each compression operation is compressed with reference to previous compression
   operations in the same data stream i.e. history of data is maintained between the operations.
 
-For more explanation, please refer RFC https://www.ietf.org/rfc/rfc1951.txt
+For more explanation, please refer to the RFC https://www.ietf.org/rfc/rfc1951.txt
 
 Operation Representation
 ~~~~~~~~~~~~~~~~~~~~~~~~
 
-Compression operation is described via ``struct rte_comp_op``, which contains both input and
+A compression operation is described via ``struct rte_comp_op``, which contains both input and
 output data. The operation structure includes the operation type (stateless or stateful),
-the operation status and the priv_xform/stream handle, source, destination and checksum buffer
+the operation status, the priv_xform/stream handle, source, destination and checksum buffer
 pointers. It also contains the source mempool from which the operation is allocated.
-PMD updates consumed field with amount of data read from source buffer and produced
-field with amount of data of written into destination buffer along with status of
-operation. See section *Produced, Consumed And Operation Status* for more details.
-
-Compression operations mempool also has an ability to allocate private memory with the
-operation for application's purposes. Application software is responsible for specifying
-all the operation specific fields in the ``rte_comp_op`` structure which are then used
+The PMD updates the consumed field with the amount of data read from the source buffer,
+and the produced field with the amount of data written into the destination buffer,
+along with status of operation.
+See the section :ref:`compressdev_prod_cons_op_status`: for more details.
+
+The compression operations mempool also has the ability to allocate private memory with the
+operation for the application's use. The application software is responsible for specifying
+all the operation specific fields in the ``rte_comp_op`` structure, which are then used
 by the compression PMD to process the requested operation.
 
 
@@ -181,27 +182,27 @@ A ``rte_comp_op`` contains a field indicating the pool it originated from.
 
 ``rte_comp_op_alloc()`` and ``rte_comp_op_bulk_alloc()`` are used to allocate
 compression operations from a given compression operation mempool.
-The operation gets reset before being returned to a user so that operation
+The operation gets reset before being returned to a user so that the operation
 is always in a good known state before use by the application.
 
 ``rte_comp_op_free()`` is called by the application to return an operation to
 its allocating pool.
 
-See *DPDK API Reference* for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
 Passing source data as mbuf-chain
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 If input data is scattered across several different buffers, then
-Application can either parse through all such buffers and make one
+the application can either parse through all such buffers and make one
 mbuf-chain and enqueue it for processing or, alternatively, it can
-make multiple sequential enqueue_burst() calls for each of them
-processing them statefully. See *Compression API Stateful Operation*
+make multiple sequential enqueue_burst() calls for each of them,
+processing them statefully. See :ref:`compressdev_stateful_op`:
 for stateful processing of ops.
 
 Operation Status
 ~~~~~~~~~~~~~~~~
-Each operation carries a status information updated by PMD after it is processed.
-Following are currently supported:
+Each operation carries status information updated by the PMD after it is processed.
+The following are currently supported:
 
 - RTE_COMP_OP_STATUS_SUCCESS,
     Operation is successfully completed
@@ -225,22 +226,25 @@ Following are currently supported:
 - RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE,
     Output buffer ran out of space before operation completed, but this
     is not an error case. Output data up to op.produced can be used and
-    next op in the stream should continue on from op.consumed+1.
+    the next op in the stream should continue on from op.consumed+1.
 
 Operation status after enqueue / dequeue
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Some of the above values may arise in the op after an
-``rte_compressdev_enqueue_burst()``. If number ops enqueued < number ops requested then
-the app should check the op.status of nb_enqd+1. If status is RTE_COMP_OP_STATUS_NOT_PROCESSED,
-it likely indicates a full-queue case for a hardware device and a retry after dequeuing some ops is likely
-to be successful. If the op holds any other status, e.g. RTE_COMP_OP_STATUS_INVALID_ARGS, a retry with
+``rte_compressdev_enqueue_burst()``. If the number of ops enqueued < the number of ops requested
+then the app should check the op.status of nb_enqd+1.
+If the status is RTE_COMP_OP_STATUS_NOT_PROCESSED, it likely indicates a full-queue case for a
+hardware device, and a retry after dequeuing some ops is likely to be successful.
+If the op holds any other status, e.g. RTE_COMP_OP_STATUS_INVALID_ARGS, a retry with
 the same op is unlikely to be successful.
 
 
+.. _compressdev_prod_cons_op_status:
+
 Produced, Consumed And Operation Status
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-- If status is RTE_COMP_OP_STATUS_SUCCESS,
+- If the status is RTE_COMP_OP_STATUS_SUCCESS,
     consumed = amount of data read from input buffer, and
     produced = amount of data written in destination buffer
 - If status is RTE_COMP_OP_STATUS_ERROR,
@@ -253,37 +257,37 @@ Produced, Consumed And Operation Status
 - If status is RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE,
     consumed = amount of data read, and
     produced = amount of data successfully produced until
-    out of space condition hit. PMD has ability to recover
-    from here, so application can submit next op from
-    consumed+1 and a destination buffer with available space.
+    out of space condition hit. The PMD has ability to recover
+    from here, so an application can submit the next op from
+    consumed+1, and a destination buffer with available space.
 
 Transforms
 ----------
 
 Compression transforms (``rte_comp_xform``) are the mechanism
 to specify the details of the compression operation such as algorithm,
-window size and checksum.
+window size, and checksum.
 
 Compression API Hash support
 ----------------------------
 
-Compression API allows application to enable digest calculation
+The compression API allows an application to enable digest calculation
 alongside compression and decompression of data. A PMD reflects its
 support for hash algorithms via capability algo feature flags.
-If supported, PMD calculates digest always on plaintext i.e.
+If supported, the PMD always calculates the digest on plaintext i.e.
 before compression and after decompression.
 
 Currently supported list of hash algos are SHA-1 and SHA2 family
 SHA256.
 
-See *DPDK API Reference* for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
-If required, application should set valid hash algo in compress
+If required, the application should set the valid hash algo in compress
 or decompress xforms during ``rte_compressdev_stream_create()``
-or ``rte_compressdev_private_xform_create()`` and pass a valid
+or ``rte_compressdev_private_xform_create()``, and pass a valid
 output buffer in ``rte_comp_op`` hash field struct to store the
-resulting digest. Buffer passed should be contiguous and large
-enough to store digest which is 20 bytes for SHA-1 and
+resulting digest. The buffer passed should be contiguous and large
+enough to store digest, which is 20 bytes for SHA-1 and
 32 bytes for SHA2-256.
 
 Compression API Stateless operation
@@ -295,20 +299,21 @@ An op is processed stateless if it has
 (required only on compression side),
 - All required input in source buffer
 
-When all of the above conditions are met, PMD initiates stateless processing
+When all of the above conditions are met, the PMD initiates stateless processing
 and releases acquired resources after processing of current operation is
-complete. Application can enqueue multiple stateless ops in a single burst
+complete. The application can enqueue multiple stateless ops in a single burst
 and must attach priv_xform handle to such ops.
 
 priv_xform in Stateless operation
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-priv_xform is PMD internally managed private data that it maintains to do stateless processing.
-priv_xforms are initialized provided a generic xform structure by an application via making call
-to ``rte_compressdev_private_xform_create``, at an output PMD returns an opaque priv_xform reference.
-If PMD support SHAREABLE priv_xform indicated via algorithm feature flag, then application can
-attach same priv_xform with many stateless ops at-a-time. If not, then application needs to
-create as many priv_xforms as it expects to have stateless operations in-flight.
+A priv_xform is private data managed internally by the PMD to do stateless processing.
+A priv_xform is initialized by an application providing a generic xform structure
+to ``rte_compressdev_private_xform_create``, which returns an opaque priv_xform reference.
+If the PMD supports SHAREABLE priv_xform, indicated via algorithm feature flag,
+then the application can attach the same priv_xform with many stateless ops at a time.
+If not, then the application needs to create as many priv_xforms as it expects to have
+stateless operations in-flight.
 
 .. figure:: img/stateless-op.*
 
@@ -320,8 +325,9 @@ create as many priv_xforms as it expects to have stateless operations in-flight.
    Stateless Ops using Shareable priv_xform
 
 
-Application should call ``rte_compressdev_private_xform_create()`` and attach to stateless op before
-enqueuing them for processing and free via ``rte_compressdev_private_xform_free()`` during termination.
+The application should call ``rte_compressdev_private_xform_create()`` and attach it to a stateless
+op before enqueuing them for processing and free via ``rte_compressdev_private_xform_free()``
+during termination.
 
 An example pseudocode to setup and process NUM_OPS stateless ops with each of length OP_LEN
 using priv_xform would look like:
@@ -399,75 +405,80 @@ using priv_xform would look like:
 
 
 Stateless and OUT_OF_SPACE
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-OUT_OF_SPACE is a condition when output buffer runs out of space and where PMD
-still has more data to produce. If PMD runs into such condition, then PMD returns
-RTE_COMP_OP_OUT_OF_SPACE_TERMINATED error. In such case, PMD resets itself and can set
+OUT_OF_SPACE is a condition when the output buffer runs out of space and where the PMD
+still has more data to produce. If the PMD runs into such condition, then the PMD returns
+RTE_COMP_OP_OUT_OF_SPACE_TERMINATED error. In such case, the PMD resets itself and can set
 consumed=0 and produced=amount of output it could produce before hitting out_of_space.
-Application would need to resubmit the whole input with a larger output buffer, if it
+The application would need to resubmit the whole input with a larger output buffer, if it
 wants the operation to be completed.
 
 Hash in Stateless
 ~~~~~~~~~~~~~~~~~
-If hash is enabled, digest buffer will contain valid data after op is successfully
+If hash is enabled, the digest buffer will contain valid data after an op is successfully
 processed i.e. dequeued with status = RTE_COMP_OP_STATUS_SUCCESS.
 
 Checksum in Stateless
 ~~~~~~~~~~~~~~~~~~~~~
-If checksum is enabled, checksum will only be available after op is successfully
+If checksum is enabled, checksum will only be available after an op is successfully
 processed i.e. dequeued with status = RTE_COMP_OP_STATUS_SUCCESS.
 
+.. _compressdev_stateful_op:
+
 Compression API Stateful operation
 -----------------------------------
 
-Compression API provide RTE_COMP_FF_STATEFUL_COMPRESSION and
-RTE_COMP_FF_STATEFUL_DECOMPRESSION feature flag for PMD to reflect
+The compression API provides RTE_COMP_FF_STATEFUL_COMPRESSION and
+RTE_COMP_FF_STATEFUL_DECOMPRESSION feature flag for the PMD to reflect
 its support for Stateful operations.
 
-A Stateful operation in DPDK compression means application invokes enqueue
-burst() multiple times to process related chunk of data because
-application broke data into several ops.
+A Stateful operation in DPDK compression means the application invokes enqueue
+burst() multiple times to process a related chunk of data because the
+application broke the data into several ops.
 
-In such case
+In such cases
 - ops are setup with op_type RTE_COMP_OP_STATEFUL,
-- all ops except last set to flush value = RTE_COMP_FLUSH_NONE/SYNC
-and last set to flush value RTE_COMP_FLUSH_FULL/FINAL.
+- all ops except the last are set with flush value = RTE_COMP_FLUSH_NONE/SYNC
+and the last is set with flush value RTE_COMP_FLUSH_FULL/FINAL.
 
-In case of either one or all of the above conditions, PMD initiates
-stateful processing and releases acquired resources after processing
+In case of either one or all of the above conditions, the PMD initiates
+stateful processing and releases acquired resources after processing the
 operation with flush value = RTE_COMP_FLUSH_FULL/FINAL is complete.
-Unlike stateless, application can enqueue only one stateful op from
-a particular stream at a time and must attach stream handle
+Unlike stateless, the application can enqueue only one stateful op from
+a particular stream at a time and must attach a stream handle
 to each op.
 
 Stream in Stateful operation
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-`stream` in DPDK compression is a logical entity which identifies related set of ops, say, a one large
-file broken into multiple chunks then file is represented by a stream and each chunk of that file is
-represented by compression op `rte_comp_op`. Whenever application wants a stateful processing of such
-data, then it must get a stream handle via making call to ``rte_compressdev_stream_create()``
-with xform, at an output the target PMD will return an opaque stream handle to application which
-it must attach to all of the ops carrying data of that stream. In stateful processing, every op
-requires previous op data for compression/decompression. A PMD allocates and set up resources such
-as history, states, etc. within a stream, which are maintained during the processing of the related ops.
+A stream in DPDK compression is a logical entity which identifies a related set of ops.
+For example, one large file broken into multiple chunks, then the file is represented by a stream,
+and each chunk of that file is represented by a compression op ``rte_comp_op``.
+Whenever an application wants stateful processing of such data, then it must get a stream handle
+via making call to ``rte_compressdev_stream_create()`` with an xform, which will return an opaque
+stream handle to attach to all of the ops carrying data of that stream.
+In stateful processing, every op requires previous op data for compression/decompression.
+A PMD allocates and sets up resources such as history, states, etc. within a stream,
+which are maintained during the processing of related ops.
 
-Unlike priv_xforms, stream is always a NON_SHAREABLE entity. One stream handle must be attached to only
-one set of related ops and cannot be reused until all of them are processed with status Success or failure.
+Unlike priv_xforms, a stream is always a NON_SHAREABLE entity. One stream handle must be attached
+to only one set of related ops and cannot be reused until all of them are processed with a
+success/failure status.
 
 .. figure:: img/stateful-op.*
 
    Stateful Ops
 
 
-Application should call ``rte_compressdev_stream_create()`` and attach to op before
+An application should call ``rte_compressdev_stream_create()`` and attach it to the op before
 enqueuing them for processing and free via ``rte_compressdev_stream_free()`` during
-termination. All ops that are to be processed statefully should carry *same* stream.
+termination. All ops that are to be processed statefully should carry the *same* stream.
 
-See *DPDK API Reference* document for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
-An example pseudocode to set up and process a stream having NUM_CHUNKS with each chunk size of CHUNK_LEN would look like:
+An example pseudocode to set up and process a stream having NUM_CHUNKS,
+with each chunk size of CHUNK_LEN, would look like:
 
 .. code-block:: c
 
@@ -549,64 +560,65 @@ An example pseudocode to set up and process a stream having NUM_CHUNKS with each
 
 
 Stateful and OUT_OF_SPACE
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~
 
-If PMD supports stateful operation, then OUT_OF_SPACE status is not an actual
-error for the PMD. In such case, PMD returns with status
+If a PMD supports stateful operation, then an OUT_OF_SPACE status is not an actual
+error for the PMD. In such a case, the PMD returns with status
 RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE with consumed = number of input bytes
-read and produced = length of complete output buffer.
-Application should enqueue next op with source starting at consumed+1 and an
+read, and produced = length of complete output buffer.
+The application should enqueue the next op with source starting at consumed+1, and an
 output buffer with available space.
 
 Hash in Stateful
 ~~~~~~~~~~~~~~~~
-If enabled, digest buffer will contain valid digest after last op in stream
+If enabled, the digest buffer will contain valid digest after the last op in a stream
 (having flush = RTE_COMP_FLUSH_FINAL) is successfully processed i.e. dequeued
 with status = RTE_COMP_OP_STATUS_SUCCESS.
 
 Checksum in Stateful
 ~~~~~~~~~~~~~~~~~~~~
-If enabled, checksum will only be available after last op in stream
+If enabled, the checksum will only be available after the last op in a stream
 (having flush = RTE_COMP_FLUSH_FINAL) is successfully processed i.e. dequeued
 with status = RTE_COMP_OP_STATUS_SUCCESS.
 
 Burst in compression API
--------------------------
+------------------------
 
 Scheduling of compression operations on DPDK's application data path is
 performed using a burst oriented asynchronous API set. A queue pair on a compression
-device accepts a burst of compression operations using enqueue burst API. On physical
-devices the enqueue burst API will place the operations to be processed
+device accepts a burst of compression operations using the enqueue burst API.
+On physical devices the enqueue burst API will place the operations to be processed
 on the device's hardware input queue, for virtual devices the processing of the
 operations is usually completed during the enqueue call to the compression
 device. The dequeue burst API will retrieve any processed operations available
 from the queue pair on the compression device, from physical devices this is usually
-directly from the devices processed queue, and for virtual device's from a
+directly from the devices processed queue, and for virtual device's from an
 ``rte_ring`` where processed operations are placed after being processed on the
 enqueue call.
 
-A burst in DPDK compression can be a combination of stateless and stateful operations with a condition
-that for stateful ops only one op at-a-time should be enqueued from a particular stream i.e. no-two ops
-should belong to same stream in a single burst. However a burst may contain multiple stateful ops as long
-as each op is attached to a different stream i.e. a burst can look like:
+A burst in DPDK compression can be a combination of stateless and stateful operations with a
+condition that for stateful ops only one op at a time should be enqueued from a particular stream
+i.e. two ops should never belong to the same stream in a single burst.
+However, a burst may contain multiple stateful ops, as long as each op is attached to a different
+stream, i.e. a burst can look like:
 
 +---------------+--------------+--------------+-----------------+--------------+--------------+
 | enqueue_burst | op1.no_flush | op2.no_flush | op3.flush_final | op4.no_flush | op5.no_flush |
 +---------------+--------------+--------------+-----------------+--------------+--------------+
 
-Where, op1 .. op5 all belong to different independent data units. op1, op2, op4, op5 must be stateful
-as stateless ops can only use flush full or final and op3 can be of type stateless or stateful.
-Every op with type set to RTE_COMP_OP_STATELESS must be attached to priv_xform and
-Every op with type set to RTE_COMP_OP_STATEFUL *must* be attached to stream.
+Where, op1 .. op5 all belong to different independent data units. op1, op2, op4, op5 must be
+stateful as stateless ops can only use flush full or final and op3 can be of type stateless or
+stateful. Every op with type set to RTE_COMP_OP_STATELESS must be attached to priv_xform and
+every op with type set to RTE_COMP_OP_STATEFUL *must* be attached to stream.
 
 Since each operation in a burst is independent and thus can be completed
-out-of-order, applications which need ordering, should setup per-op user data
-area with reordering information so that it can determine enqueue order at
+out of order, applications which need ordering should setup a per-op user data
+area, with reordering information so that it can determine enqueue order at
 dequeue.
 
-Also if multiple threads calls enqueue_burst() on same queue pair then it’s
-application onus to use proper locking mechanism to ensure exclusive enqueuing
-of operations.
+Also, if multiple threads calls enqueue_burst() on the same queue pair then it's
+the application's responsibility to use a proper locking mechanism to ensure
+exclusive enqueuing of operations.
 
 Enqueue / Dequeue Burst APIs
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -629,9 +641,10 @@ Sample code
 -----------
 
 There are unit test applications that show how to use the compressdev library inside
-app/test/test_compressdev.c
+``app/test/test_compressdev.c``
 
 Compression Device API
 ~~~~~~~~~~~~~~~~~~~~~~
 
-The compressdev Library API is described in the *DPDK API Reference* document.
+The compressdev Library API is described in the
+`DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_.
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.222998600 +0800
+++ 0052-doc-fix-grammar-and-formatting-in-compressdev-guide.patch	2022-07-20 15:00:58.791000367 +0800
@@ -1 +1 @@
-From 4c9484373fcd0aa4a240fdb2e797269eb2f26b9b Mon Sep 17 00:00:00 2001
+From 92962694e870727efa84358a3323c58ee1c2d8a0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4c9484373fcd0aa4a240fdb2e797269eb2f26b9b ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'doc: fix grammar and parameters in l2fwd-crypto guide' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (50 preceding siblings ...)
  2022-07-20  8:21   ` patch 'doc: fix grammar and formatting in compressdev guide' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'eventdev/eth_tx: fix queue delete' " Xueming Li
                     ` (9 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Jakub Poczatek; +Cc: xuemingl, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/974f26b22c1522b08bbcef946374066a8540697b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 974f26b22c1522b08bbcef946374066a8540697b Mon Sep 17 00:00:00 2001
From: Jakub Poczatek <jakub.poczatek@intel.com>
Date: Wed, 1 Jun 2022 09:35:52 +0000
Subject: [PATCH] doc: fix grammar and parameters in l2fwd-crypto guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7fe84b0de25105952cf4e07970e5ea46788a2e2c ]

Doc was updated with fixed grammar in most cases. These
include adding periods to ends of sentences and capitalizing
some words. Some instances of "a" were changed to "an". The
option "-n 4" has also been removed from the example of
running the application.

Fixes: ba7b86b1419 ("doc: add l2fwd-crypto sample app guide")
Fixes: 2661f4fbe93 ("examples/l2fwd-crypto: add AEAD parameters")
Fixes: 4790f99d2d3 ("examples/l2fwd-crypto: use cryptodev algorithm parser")
Fixes: 5949e30dae6 ("doc: fix typo in l2fwd-crypto usage")
Fixes: acf8616901b ("cryptodev: add auth IV")
Fixes: b79e4c00af0 ("cryptodev: use AES-GCM/CCM as AEAD algorithms")
Fixes: d2797f51cc6 ("examples/l2fwd-crypto: add cryptodev mask option")
Fixes: e2a94f9ad3e ("doc: remove references to make from apps guide")
Fixes: 10b9d471a6f ("doc: update minimum requirement of l2fwd-crypto")
Fixes: 3cc28001a33 ("doc: fix typo in l2fwd-crypto guide")

Signed-off-by: Jakub Poczatek <jakub.poczatek@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 .../sample_app_ug/l2_forward_crypto.rst       | 72 +++++++++----------
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/doc/guides/sample_app_ug/l2_forward_crypto.rst b/doc/guides/sample_app_ug/l2_forward_crypto.rst
index e2c0f9f1ec..b24f16a479 100644
--- a/doc/guides/sample_app_ug/l2_forward_crypto.rst
+++ b/doc/guides/sample_app_ug/l2_forward_crypto.rst
@@ -15,7 +15,7 @@ Overview
 The L2 Forwarding with Crypto sample application performs a crypto operation (cipher/hash)
 specified by the user from command line (or using the default values),
 with a crypto device capable of doing that operation,
-for each packet that is received on a RX_PORT and performs L2 forwarding.
+for each packet that is received on an RX_PORT and performs L2 forwarding.
 The destination port is the adjacent port from the enabled portmask, that is,
 if the first four ports are enabled (portmask 0xf),
 ports 0 and 1 forward into each other, and ports 2 and 3 forward into each other.
@@ -53,35 +53,35 @@ The application requires a number of command line options:
 
 where,
 
-*   p PORTMASK: A hexadecimal bitmask of the ports to configure (default is all the ports)
+*   p PORTMASK: A hexadecimal bitmask of the ports to configure. (Default is all the ports.)
 
-*   q NQ: A number of queues (=ports) per lcore (default is 1)
+*   q NQ: A number of queues (=ports) per lcore. (Default is 1.)
 
-*   s: manage all ports from single core
+*   s: manage all ports from a single core.
 
-*   T PERIOD: statistics will be refreshed each PERIOD seconds
+*   T PERIOD: statistics will be refreshed each PERIOD seconds.
 
-    (0 to disable, 10 default, 86400 maximum)
+    (0 to disable, 10 default, 86400 maximum.)
 
-*   cdev_type: select preferred crypto device type: HW, SW or anything (ANY)
+*   cdev_type: select preferred crypto device type: HW, SW or anything (ANY).
 
-    (default is ANY)
+    (Default is ANY.)
 
 *   chain: select the operation chaining to perform: Cipher->Hash (CIPHER_HASH),
 
     Hash->Cipher (HASH_CIPHER), Cipher (CIPHER_ONLY), Hash (HASH_ONLY)
 
-    or AEAD (AEAD)
+    or AEAD (AEAD).
 
-    (default is Cipher->Hash)
+    (Default is Cipher->Hash.)
 
-*   cipher_algo: select the ciphering algorithm (default is aes-cbc)
+*   cipher_algo: select the ciphering algorithm. (Default is aes-cbc.)
 
-*   cipher_op: select the ciphering operation to perform: ENCRYPT or DECRYPT
+*   cipher_op: select the ciphering operation to perform: ENCRYPT or DECRYPT.
 
-    (default is ENCRYPT)
+    (Default is ENCRYPT.)
 
-*   cipher_key: set the ciphering key to be used. Bytes has to be separated with ":"
+*   cipher_key: set the ciphering key to be used. Bytes have to be separated with ":".
 
 *   cipher_key_random_size: set the size of the ciphering key,
 
@@ -89,19 +89,19 @@ where,
 
     Note that if --cipher_key is used, this will be ignored.
 
-*   cipher_iv: set the cipher IV to be used. Bytes has to be separated with ":"
+*   cipher_iv: set the cipher IV to be used. Bytes have to be separated with ":".
 
 *   cipher_iv_random_size: set the size of the cipher IV, which will be generated randomly.
 
     Note that if --cipher_iv is used, this will be ignored.
 
-*   auth_algo: select the authentication algorithm (default is sha1-hmac)
+*   auth_algo: select the authentication algorithm. (Default is sha1-hmac.)
 
-*   auth_op: select the authentication operation to perform: GENERATE or VERIFY
+*   auth_op: select the authentication operation to perform: GENERATE or VERIFY.
 
-    (default is GENERATE)
+    (Default is GENERATE.)
 
-*   auth_key: set the authentication key to be used. Bytes has to be separated with ":"
+*   auth_key: set the authentication key to be used. Bytes have to be separated with ":".
 
 *   auth_key_random_size: set the size of the authentication key,
 
@@ -109,19 +109,19 @@ where,
 
     Note that if --auth_key is used, this will be ignored.
 
-*   auth_iv: set the auth IV to be used. Bytes has to be separated with ":"
+*   auth_iv: set the auth IV to be used. Bytes have to be separated with ":".
 
 *   auth_iv_random_size: set the size of the auth IV, which will be generated randomly.
 
     Note that if --auth_iv is used, this will be ignored.
 
-*   aead_algo: select the AEAD algorithm (default is aes-gcm)
+*   aead_algo: select the AEAD algorithm. (Default is aes-gcm.)
 
-*   aead_op: select the AEAD operation to perform: ENCRYPT or DECRYPT
+*   aead_op: select the AEAD operation to perform: ENCRYPT or DECRYPT.
 
-    (default is ENCRYPT)
+    (Default is ENCRYPT.)
 
-*   aead_key: set the AEAD key to be used. Bytes has to be separated with ":"
+*   aead_key: set the AEAD key to be used. Bytes have to be separated with ":".
 
 *   aead_key_random_size: set the size of the AEAD key,
 
@@ -129,13 +129,13 @@ where,
 
     Note that if --aead_key is used, this will be ignored.
 
-*   aead_iv: set the AEAD IV to be used. Bytes has to be separated with ":"
+*   aead_iv: set the AEAD IV to be used. Bytes have to be separated with ":".
 
 *   aead_iv_random_size: set the size of the AEAD IV, which will be generated randomly.
 
     Note that if --aead_iv is used, this will be ignored.
 
-*   aad: set the AAD to be used. Bytes has to be separated with ":"
+*   aad: set the AAD to be used. Bytes have to be separated with ":".
 
 *   aad_random_size: set the size of the AAD, which will be generated randomly.
 
@@ -148,9 +148,9 @@ where,
 *   cryptodev_mask: A hexadecimal bitmask of the cryptodevs to be used by the
     application.
 
-    (default is all cryptodevs).
+    (Default is all cryptodevs.)
 
-*   [no-]mac-updating: Enable or disable MAC addresses updating (enabled by default).
+*   [no-]mac-updating: Enable or disable MAC addresses updating. (Enabled by default.)
 
 
 The application requires that crypto devices capable of performing
@@ -162,7 +162,7 @@ To run the application in linux environment with 2 lcores, 2 ports and 2 crypto
 
 .. code-block:: console
 
-    $ ./<build_dir>/examples/dpdk-l2fwd-crypto -l 0-1 -n 4 --vdev "crypto_aesni_mb0" \
+    $ ./<build_dir>/examples/dpdk-l2fwd-crypto -l 0-1 --vdev "crypto_aesni_mb0" \
     --vdev "crypto_aesni_mb1" -- -p 0x3 --chain CIPHER_HASH \
     --cipher_op ENCRYPT --cipher_algo aes-cbc \
     --cipher_key 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f \
@@ -176,7 +176,7 @@ and the Environment Abstraction Layer (EAL) options.
 
     * The ``l2fwd-crypto`` sample application requires IPv4 packets for crypto operation.
 
-    * If multiple Ethernet ports is passed, then equal number of crypto devices are to be passed.
+    * If multiple Ethernet ports are passed, then equal number of crypto devices are to be passed.
 
     * All crypto devices shall use the same session.
 
@@ -184,7 +184,7 @@ Explanation
 -----------
 
 The L2 forward with Crypto application demonstrates the performance of a crypto operation
-on a packet received on a RX PORT before forwarding it to a TX PORT.
+on a packet received on an RX PORT before forwarding it to a TX PORT.
 
 The following figure illustrates a sample flow of a packet in the application,
 from reception until transmission.
@@ -193,7 +193,7 @@ from reception until transmission.
 
 .. figure:: img/l2_fwd_encrypt_flow.*
 
-   Encryption flow Through the L2 Forwarding with Crypto Application
+   Encryption flow through the L2 Forwarding with Crypto Application
 
 
 The following sections provide some explanation of the application.
@@ -203,8 +203,8 @@ Crypto operation specification
 
 All the packets received in all the ports get transformed by the crypto device/s
 (ciphering and/or authentication).
-The crypto operation to be performed on the packet is parsed from the command line
-(go to "Running the Application" section for all the options).
+The crypto operation to be performed on the packet is parsed from the command line.
+(Go to "Running the Application" section for all the options.)
 
 If no parameter is passed, the default crypto operation is:
 
@@ -241,7 +241,7 @@ when running the application.
 
 The initialize_cryptodevs() function performs the device initialization.
 It iterates through the list of the available crypto devices and
-check which ones are capable of performing the operation.
+checks which ones are capable of performing the operation.
 Each device has a set of capabilities associated with it,
 which are stored in the device info structure, so the function checks if the operation
 is within the structure of each device.
@@ -368,7 +368,7 @@ This session is created and is later attached to the crypto operation:
 Crypto operation creation
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Given N packets received from a RX PORT, N crypto operations are allocated
+Given N packets received from an RX PORT, N crypto operations are allocated
 and filled:
 
 .. code-block:: c
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.263186438 +0800
+++ 0053-doc-fix-grammar-and-parameters-in-l2fwd-crypto-guide.patch	2022-07-20 15:00:58.791000367 +0800
@@ -1 +1 @@
-From 7fe84b0de25105952cf4e07970e5ea46788a2e2c Mon Sep 17 00:00:00 2001
+From 974f26b22c1522b08bbcef946374066a8540697b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7fe84b0de25105952cf4e07970e5ea46788a2e2c ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index 1b4444b7d8..ce49eab96f 100644
+index e2c0f9f1ec..b24f16a479 100644
@@ -43 +45 @@
-@@ -54,37 +54,37 @@ The application requires a number of command line options:
+@@ -53,35 +53,35 @@ The application requires a number of command line options:
@@ -87,2 +88,0 @@
- *   cipher_dataunit_len: set the length of the cipher data-unit.
- 
@@ -94 +94 @@
-@@ -92,19 +92,19 @@ where,
+@@ -89,19 +89,19 @@ where,
@@ -119 +119 @@
-@@ -112,19 +112,19 @@ where,
+@@ -109,19 +109,19 @@ where,
@@ -144 +144 @@
-@@ -132,13 +132,13 @@ where,
+@@ -129,13 +129,13 @@ where,
@@ -160 +160 @@
-@@ -151,9 +151,9 @@ where,
+@@ -148,9 +148,9 @@ where,
@@ -172 +172 @@
-@@ -165,7 +165,7 @@ To run the application in linux environment with 2 lcores, 2 ports and 2 crypto
+@@ -162,7 +162,7 @@ To run the application in linux environment with 2 lcores, 2 ports and 2 crypto
@@ -181 +181 @@
-@@ -179,7 +179,7 @@ and the Environment Abstraction Layer (EAL) options.
+@@ -176,7 +176,7 @@ and the Environment Abstraction Layer (EAL) options.
@@ -190 +190 @@
-@@ -187,7 +187,7 @@ Explanation
+@@ -184,7 +184,7 @@ Explanation
@@ -199 +199 @@
-@@ -196,7 +196,7 @@ from reception until transmission.
+@@ -193,7 +193,7 @@ from reception until transmission.
@@ -208 +208 @@
-@@ -206,8 +206,8 @@ Crypto operation specification
+@@ -203,8 +203,8 @@ Crypto operation specification
@@ -219 +219 @@
-@@ -244,7 +244,7 @@ when running the application.
+@@ -241,7 +241,7 @@ when running the application.
@@ -228 +228 @@
-@@ -291,7 +291,7 @@ This session is created and is later attached to the crypto operation:
+@@ -368,7 +368,7 @@ This session is created and is later attached to the crypto operation:
@@ -236 +236 @@
- .. literalinclude:: ../../../examples/l2fwd-crypto/main.c
+ .. code-block:: c

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

* patch 'eventdev/eth_tx: fix queue delete' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (51 preceding siblings ...)
  2022-07-20  8:21   ` patch 'doc: fix grammar and parameters in l2fwd-crypto " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'app/testpmd: fix supported RSS offload display' " Xueming Li
                     ` (8 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Naga Harish K S V; +Cc: xuemingl, Jay Jayatheerthan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/377b5aac80c8b3dce8d5eb01c2c0de05fd8672be

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 377b5aac80c8b3dce8d5eb01c2c0de05fd8672be Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Thu, 23 Jun 2022 15:35:11 +0530
Subject: [PATCH] eventdev/eth_tx: fix queue delete
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 881d4b4d8587419197815db57b94fc58ee487445 ]

Add spinlock protection in queue delete function.
This protects the data path while the queue delete operation
is in progress.

Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
 lib/librte_eventdev/rte_event_eth_tx_adapter.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index 6474056c90..f2b7d36657 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -845,9 +845,10 @@ txa_service_queue_del(uint8_t id,
 
 	txa = txa_service_id_to_data(id);
 
+	rte_spinlock_lock(&txa->tx_lock);
 	tqi = txa_service_queue(txa, port_id, tx_queue_id);
 	if (tqi == NULL || !tqi->added)
-		return 0;
+		goto ret_unlock;
 
 	tb = tqi->tx_buf;
 	tqi->added = 0;
@@ -857,6 +858,9 @@ txa_service_queue_del(uint8_t id,
 	txa->txa_ethdev[port_id].nb_queues--;
 
 	txa_service_queue_array_free(txa, port_id);
+
+ret_unlock:
+	rte_spinlock_unlock(&txa->tx_lock);
 	return 0;
 }
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.303003670 +0800
+++ 0054-eventdev-eth_tx-fix-queue-delete.patch	2022-07-20 15:00:58.794333695 +0800
@@ -1 +1 @@
-From 881d4b4d8587419197815db57b94fc58ee487445 Mon Sep 17 00:00:00 2001
+From 377b5aac80c8b3dce8d5eb01c2c0de05fd8672be Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 881d4b4d8587419197815db57b94fc58ee487445 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/eventdev/rte_event_eth_tx_adapter.c | 6 +++++-
+ lib/librte_eventdev/rte_event_eth_tx_adapter.c | 6 +++++-
@@ -19,5 +21,5 @@
-diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
-index c700fb7b1f..b4b37f1cae 100644
---- a/lib/eventdev/rte_event_eth_tx_adapter.c
-+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
-@@ -891,9 +891,10 @@ txa_service_queue_del(uint8_t id,
+diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+index 6474056c90..f2b7d36657 100644
+--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+@@ -845,9 +845,10 @@ txa_service_queue_del(uint8_t id,
@@ -35 +37 @@
-@@ -903,6 +904,9 @@ txa_service_queue_del(uint8_t id,
+@@ -857,6 +858,9 @@ txa_service_queue_del(uint8_t id,

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

* patch 'app/testpmd: fix supported RSS offload display' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (52 preceding siblings ...)
  2022-07-20  8:21   ` patch 'eventdev/eth_tx: fix queue delete' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'net/netvsc: fix vmbus device reference in multi-process' " Xueming Li
                     ` (7 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Huisong Li; +Cc: xuemingl, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/88660d765353a6369ab0e37126b26b7387c3797e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 88660d765353a6369ab0e37126b26b7387c3797e Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 29 Jun 2022 16:34:44 +0800
Subject: [PATCH] app/testpmd: fix supported RSS offload display
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3c23ee6cdddf28641f52f31ced84d3feb867027c ]

The rte_eth_dev_info.flow_type_rss_offloads is populated in terms of
RTE_ETH_RSS_* bits. If PMD sets RTE_ETH_RSS_L3_SRC_ONLY to
dev_info->flow_type_rss_offloads. testpmd will display "user defined 63"
when run 'show port info 0'. Because testpmd use flowtype_to_str()
to display the supported RSS offload of PMD. In fact, the function is
used to display flow type in FDIR commands for i40e or ixgbe. This patch
uses the RTE_ETH_RSS_* bits to display supported RSS offload of PMD.

Fixes: b12964f621dc ("ethdev: unification of RSS offload types")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 app/test-pmd/config.c  | 36 ++++++++++++++++++++++++------------
 app/test-pmd/testpmd.h |  2 ++
 2 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index d24fb7763e..f3ffc23ecd 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -63,8 +63,6 @@
 
 #define NS_PER_SEC 1E9
 
-static char *flowtype_to_str(uint16_t flow_type);
-
 static const struct {
 	enum tx_pkt_split split;
 	const char *name;
@@ -566,6 +564,19 @@ skip_parse:
 	};
 }
 
+const char *
+rsstypes_to_str(uint64_t rss_type)
+{
+	uint16_t i;
+
+	for (i = 0; rss_type_table[i].str != NULL; i++) {
+		if (rss_type_table[i].rss_type == rss_type)
+			return rss_type_table[i].str;
+	}
+
+	return NULL;
+}
+
 void
 port_infos_display(portid_t port_id)
 {
@@ -668,19 +679,20 @@ port_infos_display(portid_t port_id)
 	if (!dev_info.flow_type_rss_offloads)
 		printf("No RSS offload flow type is supported.\n");
 	else {
+		uint64_t rss_offload_types = dev_info.flow_type_rss_offloads;
 		uint16_t i;
-		char *p;
 
 		printf("Supported RSS offload flow types:\n");
-		for (i = RTE_ETH_FLOW_UNKNOWN + 1;
-		     i < sizeof(dev_info.flow_type_rss_offloads) * CHAR_BIT; i++) {
-			if (!(dev_info.flow_type_rss_offloads & (1ULL << i)))
-				continue;
-			p = flowtype_to_str(i);
-			if (p)
-				printf("  %s\n", p);
-			else
-				printf("  user defined %d\n", i);
+		for (i = 0; i < sizeof(rss_offload_types) * CHAR_BIT; i++) {
+			uint64_t rss_offload = UINT64_C(1) << i;
+			if ((rss_offload_types & rss_offload) != 0) {
+				const char *p = rsstypes_to_str(rss_offload);
+				if (p)
+					printf("  %s\n", p);
+				else
+					printf("  user defined %u\n",
+					       i);
+			}
 		}
 	}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 745e673b8d..d21d8501d5 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -1027,6 +1027,8 @@ uint16_t tx_pkt_set_dynf(uint16_t port_id, __rte_unused uint16_t queue,
 void add_tx_dynf_callback(portid_t portid);
 void remove_tx_dynf_callback(portid_t portid);
 int update_jumbo_frame_offload(portid_t portid);
+const char *rsstypes_to_str(uint64_t rss_type);
+
 
 /*
  * Work-around of a compilation error with ICC on invocations of the
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.343388684 +0800
+++ 0055-app-testpmd-fix-supported-RSS-offload-display.patch	2022-07-20 15:00:58.797667023 +0800
@@ -1 +1 @@
-From 3c23ee6cdddf28641f52f31ced84d3feb867027c Mon Sep 17 00:00:00 2001
+From 88660d765353a6369ab0e37126b26b7387c3797e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3c23ee6cdddf28641f52f31ced84d3feb867027c ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
- app/test-pmd/config.c  | 40 ++++++++++++++++++++++++++--------------
+ app/test-pmd/config.c  | 36 ++++++++++++++++++++++++------------
@@ -22 +24 @@
- 2 files changed, 28 insertions(+), 14 deletions(-)
+ 2 files changed, 26 insertions(+), 12 deletions(-)
@@ -25 +27 @@
-index 62833fe97c..a1183ad18e 100644
+index d24fb7763e..f3ffc23ecd 100644
@@ -28 +30 @@
-@@ -66,8 +66,6 @@
+@@ -63,8 +63,6 @@
@@ -37,2 +39,2 @@
-@@ -675,6 +673,19 @@ print_dev_capabilities(uint64_t capabilities)
- 	}
+@@ -566,6 +564,19 @@ skip_parse:
+ 	};
@@ -57 +59 @@
-@@ -779,19 +790,20 @@ port_infos_display(portid_t port_id)
+@@ -668,19 +679,20 @@ port_infos_display(portid_t port_id)
@@ -76 +78 @@
-+			uint64_t rss_offload = RTE_BIT64(i);
++			uint64_t rss_offload = UINT64_C(1) << i;
@@ -88,18 +89,0 @@
-@@ -5604,6 +5616,8 @@ set_record_burst_stats(uint8_t on_off)
- 	record_burst_stats = on_off;
- }
- 
-+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-+
- static char*
- flowtype_to_str(uint16_t flow_type)
- {
-@@ -5647,8 +5661,6 @@ flowtype_to_str(uint16_t flow_type)
- 	return NULL;
- }
- 
--#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
--
- static inline void
- print_fdir_mask(struct rte_eth_fdir_masks *mask)
- {
@@ -107 +91 @@
-index eeefb5e70f..195488b602 100644
+index 745e673b8d..d21d8501d5 100644
@@ -110,4 +94,4 @@
-@@ -1199,6 +1199,8 @@ extern int flow_parse(const char *src, void *result, unsigned int size,
- 		      struct rte_flow_item **pattern,
- 		      struct rte_flow_action **actions);
- 
+@@ -1027,6 +1027,8 @@ uint16_t tx_pkt_set_dynf(uint16_t port_id, __rte_unused uint16_t queue,
+ void add_tx_dynf_callback(portid_t portid);
+ void remove_tx_dynf_callback(portid_t portid);
+ int update_jumbo_frame_offload(portid_t portid);
@@ -116,3 +100,3 @@
- /* For registering driver specific testpmd commands. */
- struct testpmd_driver_commands {
- 	TAILQ_ENTRY(testpmd_driver_commands) next;
+ 
+ /*
+  * Work-around of a compilation error with ICC on invocations of the

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

* patch 'net/netvsc: fix vmbus device reference in multi-process' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (53 preceding siblings ...)
  2022-07-20  8:21   ` patch 'app/testpmd: fix supported RSS offload display' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'doc: fix readability in vhost guide' " Xueming Li
                     ` (6 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Long Li; +Cc: xuemingl, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0a3411605f9ea69e8c26facb3ac0b1ee5fa08517

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0a3411605f9ea69e8c26facb3ac0b1ee5fa08517 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Wed, 29 Jun 2022 16:29:44 -0700
Subject: [PATCH] net/netvsc: fix vmbus device reference in multi-process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7b1a614dcbe2017f1984be28a01efabcd7fed8b8 ]

The vmbus device is allocated via "calloc" before the EAL memory is
initialized. The secondary process can't reference the vmbus device as
it is not mapped correctly in the shared memory region.

Replace all references to the vmbus device (and its contents) with the
pointers/contents set by the primary process.

Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device")

Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/bus/vmbus/private.h       |  2 ++
 drivers/bus/vmbus/vmbus_channel.c | 15 +++++++--------
 drivers/net/netvsc/hn_ethdev.c    |  4 ++--
 drivers/net/netvsc/hn_nvs.c       | 14 +++++++-------
 drivers/net/netvsc/hn_rxtx.c      |  8 ++++----
 drivers/net/netvsc/hn_var.h       |  4 ++--
 6 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/drivers/bus/vmbus/private.h b/drivers/bus/vmbus/private.h
index 74ef948282..5b8b01b808 100644
--- a/drivers/bus/vmbus/private.h
+++ b/drivers/bus/vmbus/private.h
@@ -77,6 +77,8 @@ struct vmbus_channel {
 	uint16_t relid;
 	uint16_t subchannel_id;
 	uint8_t monitor_id;
+
+	struct vmbus_mon_page *monitor_page;
 };
 
 #define VMBUS_MAX_CHANNELS	64
diff --git a/drivers/bus/vmbus/vmbus_channel.c b/drivers/bus/vmbus/vmbus_channel.c
index 119b9b367e..9bd01679c3 100644
--- a/drivers/bus/vmbus/vmbus_channel.c
+++ b/drivers/bus/vmbus/vmbus_channel.c
@@ -27,7 +27,7 @@ vmbus_sync_set_bit(volatile uint32_t *addr, uint32_t mask)
 }
 
 static inline void
-vmbus_set_monitor(const struct rte_vmbus_device *dev, uint32_t monitor_id)
+vmbus_set_monitor(const struct vmbus_channel *channel, uint32_t monitor_id)
 {
 	uint32_t *monitor_addr, monitor_mask;
 	unsigned int trigger_index;
@@ -35,15 +35,14 @@ vmbus_set_monitor(const struct rte_vmbus_device *dev, uint32_t monitor_id)
 	trigger_index = monitor_id / HV_MON_TRIG_LEN;
 	monitor_mask = 1u << (monitor_id % HV_MON_TRIG_LEN);
 
-	monitor_addr = &dev->monitor_page->trigs[trigger_index].pending;
+	monitor_addr = &channel->monitor_page->trigs[trigger_index].pending;
 	vmbus_sync_set_bit(monitor_addr, monitor_mask);
 }
 
 static void
-vmbus_set_event(const struct rte_vmbus_device *dev,
-		const struct vmbus_channel *chan)
+vmbus_set_event(const struct vmbus_channel *chan)
 {
-	vmbus_set_monitor(dev, chan->monitor_id);
+	vmbus_set_monitor(chan, chan->monitor_id);
 }
 
 /*
@@ -81,7 +80,6 @@ rte_vmbus_set_latency(const struct rte_vmbus_device *dev,
 void
 rte_vmbus_chan_signal_tx(const struct vmbus_channel *chan)
 {
-	const struct rte_vmbus_device *dev = chan->device;
 	const struct vmbus_br *tbr = &chan->txbr;
 
 	/* Make sure all updates are done before signaling host */
@@ -91,7 +89,7 @@ rte_vmbus_chan_signal_tx(const struct vmbus_channel *chan)
 	if (tbr->vbr->imask)
 		return;
 
-	vmbus_set_event(dev, chan);
+	vmbus_set_event(chan);
 }
 
 
@@ -218,7 +216,7 @@ void rte_vmbus_chan_signal_read(struct vmbus_channel *chan, uint32_t bytes_read)
 	if (write_sz <= pending_sz)
 		return;
 
-	vmbus_set_event(chan->device, chan);
+	vmbus_set_event(chan);
 }
 
 int rte_vmbus_chan_recv(struct vmbus_channel *chan, void *data, uint32_t *len,
@@ -325,6 +323,7 @@ int vmbus_chan_create(const struct rte_vmbus_device *device,
 	chan->subchannel_id = subid;
 	chan->relid = relid;
 	chan->monitor_id = monitor_id;
+	chan->monitor_page = device->monitor_page;
 	*new_chan = chan;
 
 	err = vmbus_uio_map_rings(chan);
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 49f954305d..3826d66b7e 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -980,8 +980,8 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	hv->vmbus = vmbus;
-	hv->rxbuf_res = &vmbus->resource[HV_RECV_BUF_MAP];
-	hv->chim_res  = &vmbus->resource[HV_SEND_BUF_MAP];
+	hv->rxbuf_res = vmbus->resource[HV_RECV_BUF_MAP];
+	hv->chim_res  = vmbus->resource[HV_SEND_BUF_MAP];
 	hv->port_id = eth_dev->data->port_id;
 	hv->latency = HN_CHAN_LATENCY_NS;
 	hv->rx_copybreak = HN_RXCOPY_THRESHOLD;
diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
index 8d20c1e88d..4a2797bf8e 100644
--- a/drivers/net/netvsc/hn_nvs.c
+++ b/drivers/net/netvsc/hn_nvs.c
@@ -193,11 +193,11 @@ hn_nvs_conn_rxbuf(struct hn_data *hv)
 	 * Connect RXBUF to NVS.
 	 */
 	conn.type = NVS_TYPE_RXBUF_CONN;
-	conn.gpadl = hv->rxbuf_res->phys_addr;
+	conn.gpadl = hv->rxbuf_res.phys_addr;
 	conn.sig = NVS_RXBUF_SIG;
 	PMD_DRV_LOG(DEBUG, "connect rxbuff va=%p gpad=%#" PRIx64,
-		    hv->rxbuf_res->addr,
-		    hv->rxbuf_res->phys_addr);
+		    hv->rxbuf_res.addr,
+		    hv->rxbuf_res.phys_addr);
 
 	error = hn_nvs_execute(hv, &conn, sizeof(conn),
 			       &resp, sizeof(resp),
@@ -308,17 +308,17 @@ hn_nvs_conn_chim(struct hn_data *hv)
 	struct hn_nvs_chim_conn chim;
 	struct hn_nvs_chim_connresp resp;
 	uint32_t sectsz;
-	unsigned long len = hv->chim_res->len;
+	unsigned long len = hv->chim_res.len;
 	int error;
 
 	/* Connect chimney sending buffer to NVS */
 	memset(&chim, 0, sizeof(chim));
 	chim.type = NVS_TYPE_CHIM_CONN;
-	chim.gpadl = hv->chim_res->phys_addr;
+	chim.gpadl = hv->chim_res.phys_addr;
 	chim.sig = NVS_CHIM_SIG;
 	PMD_DRV_LOG(DEBUG, "connect send buf va=%p gpad=%#" PRIx64,
-		    hv->chim_res->addr,
-		    hv->chim_res->phys_addr);
+		    hv->chim_res.addr,
+		    hv->chim_res.phys_addr);
 
 	error = hn_nvs_execute(hv, &chim, sizeof(chim),
 			       &resp, sizeof(resp),
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 44a8eb4c0e..fe4ccd1c3e 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -582,7 +582,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
 		 * Use refcount to handle multiple packets in same
 		 * receive buffer section.
 		 */
-		rxbuf = hv->rxbuf_res->addr;
+		rxbuf = hv->rxbuf_res.addr;
 		iova = rte_mem_virt2iova(rxbuf) + RTE_PTR_DIFF(data, rxbuf);
 		shinfo = &rxb->shinfo;
 
@@ -765,8 +765,8 @@ hn_nvs_handle_rxbuf(struct rte_eth_dev *dev,
 {
 	const struct vmbus_chanpkt_rxbuf *pkt;
 	const struct hn_nvs_hdr *nvs_hdr = buf;
-	uint32_t rxbuf_sz = hv->rxbuf_res->len;
-	char *rxbuf = hv->rxbuf_res->addr;
+	uint32_t rxbuf_sz = hv->rxbuf_res.len;
+	char *rxbuf = hv->rxbuf_res.addr;
 	unsigned int i, hlen, count;
 	struct hn_rx_bufinfo *rxb;
 
@@ -1266,7 +1266,7 @@ hn_try_txagg(struct hn_data *hv, struct hn_tx_queue *txq,
 	if (txd->chim_index == NVS_CHIM_IDX_INVALID)
 		return NULL;
 
-	chim = (uint8_t *)hv->chim_res->addr
+	chim = (uint8_t *)hv->chim_res.addr
 			+ txd->chim_index * hv->chim_szmax;
 
 	txq->agg_txd = txd;
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index bd874c6b4d..3d3429c1a2 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -119,7 +119,7 @@ struct hn_data {
 	uint32_t	link_status;
 	uint32_t	link_speed;
 
-	struct rte_mem_resource *rxbuf_res;	/* UIO resource for Rx */
+	struct rte_mem_resource rxbuf_res;	/* UIO resource for Rx */
 	uint32_t	rxbuf_section_cnt;	/* # of Rx sections */
 	uint32_t	rx_copybreak;
 	uint32_t	rx_extmbuf_enable;
@@ -128,7 +128,7 @@ struct hn_data {
 	uint64_t	rss_offloads;
 
 	rte_spinlock_t	chim_lock;
-	struct rte_mem_resource *chim_res;	/* UIO resource for Tx */
+	struct rte_mem_resource chim_res;	/* UIO resource for Tx */
 	struct rte_bitmap *chim_bmap;		/* Send buffer map */
 	void		*chim_bmem;
 	uint32_t	tx_copybreak;
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.388175206 +0800
+++ 0056-net-netvsc-fix-vmbus-device-reference-in-multi-proce.patch	2022-07-20 15:00:58.801000350 +0800
@@ -1 +1 @@
-From 7b1a614dcbe2017f1984be28a01efabcd7fed8b8 Mon Sep 17 00:00:00 2001
+From 0a3411605f9ea69e8c26facb3ac0b1ee5fa08517 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7b1a614dcbe2017f1984be28a01efabcd7fed8b8 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 1bca147e12..658303bc27 100644
+index 74ef948282..5b8b01b808 100644
@@ -31 +33 @@
-@@ -74,6 +74,8 @@ struct vmbus_channel {
+@@ -77,6 +77,8 @@ struct vmbus_channel {
@@ -107 +109 @@
-index 0a357d3645..787139c0b2 100644
+index 49f954305d..3826d66b7e 100644
@@ -110 +112 @@
-@@ -1169,8 +1169,8 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
+@@ -980,8 +980,8 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
@@ -122 +124 @@
-index a29ac18ff4..b90280c9ff 100644
+index 8d20c1e88d..4a2797bf8e 100644
@@ -163 +165 @@
-index 1afc14f280..909c07a4ab 100644
+index 44a8eb4c0e..fe4ccd1c3e 100644
@@ -166 +168 @@
-@@ -580,7 +580,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
+@@ -582,7 +582,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
@@ -175 +177 @@
-@@ -763,8 +763,8 @@ hn_nvs_handle_rxbuf(struct rte_eth_dev *dev,
+@@ -765,8 +765,8 @@ hn_nvs_handle_rxbuf(struct rte_eth_dev *dev,
@@ -186 +188 @@
-@@ -1264,7 +1264,7 @@ hn_try_txagg(struct hn_data *hv, struct hn_tx_queue *txq,
+@@ -1266,7 +1266,7 @@ hn_try_txagg(struct hn_data *hv, struct hn_tx_queue *txq,
@@ -196 +198 @@
-index 416c042a27..98a3b83033 100644
+index bd874c6b4d..3d3429c1a2 100644
@@ -199 +201 @@
-@@ -147,7 +147,7 @@ struct hn_data {
+@@ -119,7 +119,7 @@ struct hn_data {
@@ -208 +210 @@
-@@ -156,7 +156,7 @@ struct hn_data {
+@@ -128,7 +128,7 @@ struct hn_data {

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

* patch 'doc: fix readability in vhost guide' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (54 preceding siblings ...)
  2022-07-20  8:21   ` patch 'net/netvsc: fix vmbus device reference in multi-process' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'net/vhost: fix deadlock on vring state change' " Xueming Li
                     ` (5 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Herakliusz Lipiec; +Cc: xuemingl, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a31510afb79db12b14732b3327ed7c9b345ea54e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a31510afb79db12b14732b3327ed7c9b345ea54e Mon Sep 17 00:00:00 2001
From: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Date: Thu, 23 Jun 2022 14:57:21 +0100
Subject: [PATCH] doc: fix readability in vhost guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c8a3ee49c94d72d03e2de5814bca01f7fd7d79d1 ]

fix grammar issues and readbility in vhost library programmer guide

Fixes: 768274ebbd5e ("vhost: avoid populate guest memory")

Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 doc/guides/prog_guide/vhost_lib.rst | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
index 493818bcf9..8970db8e5c 100644
--- a/doc/guides/prog_guide/vhost_lib.rst
+++ b/doc/guides/prog_guide/vhost_lib.rst
@@ -299,7 +299,7 @@ vhost-user implementation has two options:
 
      * The vhost supported features must be exactly the same before and
        after the restart. For example, if TSO is disabled and then enabled,
-       nothing will work and issues undefined might happen.
+       nothing will work and undefined issues might happen.
 
 No matter which mode is used, once a connection is established, DPDK
 vhost-user will start receiving and processing vhost messages from QEMU.
@@ -330,12 +330,12 @@ Guest memory requirement
 
 * Memory pre-allocation
 
-  For non-async data path, guest memory pre-allocation is not a
-  must. This can help save of memory. If users really want the guest memory
-  to be pre-allocated (e.g., for performance reason), we can add option
-  ``-mem-prealloc`` when starting QEMU. Or, we can lock all memory at vhost
-  side which will force memory to be allocated when mmap at vhost side;
-  option --mlockall in ovs-dpdk is an example in hand.
+  For non-async data path guest memory pre-allocation is not a
+  must but can help save memory. To do this we can add option
+  ``-mem-prealloc`` when starting QEMU, or we can lock all memory at vhost
+  side which will force memory to be allocated when it calls mmap
+  (option --mlockall in ovs-dpdk is an example in hand).
+
 
   For async data path, we force the VM memory to be pre-allocated at vhost
   lib when mapping the guest memory; and also we need to lock the memory to
@@ -343,8 +343,8 @@ Guest memory requirement
 
 * Memory sharing
 
-  Make sure ``share=on`` QEMU option is given. vhost-user will not work with
-  a QEMU version without shared memory mapping.
+  Make sure ``share=on`` QEMU option is given. The vhost-user will not work with
+  a QEMU instance without shared memory mapping.
 
 Vhost supported vSwitch reference
 ---------------------------------
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.430983845 +0800
+++ 0057-doc-fix-readability-in-vhost-guide.patch	2022-07-20 15:00:58.801000350 +0800
@@ -1 +1 @@
-From c8a3ee49c94d72d03e2de5814bca01f7fd7d79d1 Mon Sep 17 00:00:00 2001
+From a31510afb79db12b14732b3327ed7c9b345ea54e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c8a3ee49c94d72d03e2de5814bca01f7fd7d79d1 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index a4ffed9fa1..bad4d819e1 100644
+index 493818bcf9..8970db8e5c 100644
@@ -21 +23 @@
-@@ -351,7 +351,7 @@ vhost-user implementation has two options:
+@@ -299,7 +299,7 @@ vhost-user implementation has two options:
@@ -30 +32 @@
-@@ -382,12 +382,12 @@ Guest memory requirement
+@@ -330,12 +330,12 @@ Guest memory requirement
@@ -49 +51 @@
-@@ -395,8 +395,8 @@ Guest memory requirement
+@@ -343,8 +343,8 @@ Guest memory requirement

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

* patch 'net/vhost: fix deadlock on vring state change' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (55 preceding siblings ...)
  2022-07-20  8:21   ` patch 'doc: fix readability in vhost guide' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'vhost: add some trailing newline in log messages' " Xueming Li
                     ` (4 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Yuan Wang; +Cc: xuemingl, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fc9be6c79aebaa183e80f7faf2c7ff45114edcf8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fc9be6c79aebaa183e80f7faf2c7ff45114edcf8 Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Mon, 27 Jun 2022 13:51:25 +0800
Subject: [PATCH] net/vhost: fix deadlock on vring state change
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 193edd75a94fe8d0d633d1702109779fd7b7d6a0 ]

If vring state changes after pmd starts working, the locked vring
notifies pmd, thus calling update_queuing_status(), the latter
will wait for pmd to finish accessing vring, while pmd is also
waiting for vring to be unlocked, thus causing deadlock.

Actually, update_queuing_status() only needs to wait while
destroy/stopping the device, but not in other cases.

This patch adds a flag for whether or not to wait to fix this issue.

Fixes: 1ce3c7fe149f ("net/vhost: emulate device start/stop behavior")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 2df516ec21..c994f2429b 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -715,7 +715,7 @@ eth_vhost_install_intr(struct rte_eth_dev *dev)
 }
 
 static void
-update_queuing_status(struct rte_eth_dev *dev)
+update_queuing_status(struct rte_eth_dev *dev, bool wait_queuing)
 {
 	struct pmd_internal *internal = dev->data->dev_private;
 	struct vhost_queue *vq;
@@ -741,7 +741,7 @@ update_queuing_status(struct rte_eth_dev *dev)
 			rte_atomic32_set(&vq->allow_queuing, 1);
 		else
 			rte_atomic32_set(&vq->allow_queuing, 0);
-		while (rte_atomic32_read(&vq->while_queuing))
+		while (wait_queuing && rte_atomic32_read(&vq->while_queuing))
 			rte_pause();
 	}
 
@@ -753,7 +753,7 @@ update_queuing_status(struct rte_eth_dev *dev)
 			rte_atomic32_set(&vq->allow_queuing, 1);
 		else
 			rte_atomic32_set(&vq->allow_queuing, 0);
-		while (rte_atomic32_read(&vq->while_queuing))
+		while (wait_queuing && rte_atomic32_read(&vq->while_queuing))
 			rte_pause();
 	}
 }
@@ -835,7 +835,7 @@ new_device(int vid)
 	eth_dev->data->dev_link.link_status = ETH_LINK_UP;
 
 	rte_atomic32_set(&internal->dev_attached, 1);
-	update_queuing_status(eth_dev);
+	update_queuing_status(eth_dev, false);
 
 	VHOST_LOG(INFO, "Vhost device %d created\n", vid);
 
@@ -865,7 +865,7 @@ destroy_device(int vid)
 	internal = eth_dev->data->dev_private;
 
 	rte_atomic32_set(&internal->dev_attached, 0);
-	update_queuing_status(eth_dev);
+	update_queuing_status(eth_dev, true);
 
 	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
 
@@ -972,7 +972,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
 	state->max_vring = RTE_MAX(vring, state->max_vring);
 	rte_spinlock_unlock(&state->lock);
 
-	update_queuing_status(eth_dev);
+	update_queuing_status(eth_dev, false);
 
 	VHOST_LOG(INFO, "vring%u is %s\n",
 			vring, enable ? "enabled" : "disabled");
@@ -1159,7 +1159,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev)
 	}
 
 	rte_atomic32_set(&internal->started, 1);
-	update_queuing_status(eth_dev);
+	update_queuing_status(eth_dev, false);
 
 	return 0;
 }
@@ -1171,7 +1171,7 @@ eth_dev_stop(struct rte_eth_dev *dev)
 
 	dev->data->dev_started = 0;
 	rte_atomic32_set(&internal->started, 0);
-	update_queuing_status(dev);
+	update_queuing_status(dev, true);
 
 	return 0;
 }
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.470868002 +0800
+++ 0058-net-vhost-fix-deadlock-on-vring-state-change.patch	2022-07-20 15:00:58.804333679 +0800
@@ -1 +1 @@
-From 193edd75a94fe8d0d633d1702109779fd7b7d6a0 Mon Sep 17 00:00:00 2001
+From fc9be6c79aebaa183e80f7faf2c7ff45114edcf8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 193edd75a94fe8d0d633d1702109779fd7b7d6a0 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index d75d256040..7e512d94bf 100644
+index 2df516ec21..c994f2429b 100644
@@ -29 +31 @@
-@@ -741,7 +741,7 @@ eth_vhost_install_intr(struct rte_eth_dev *dev)
+@@ -715,7 +715,7 @@ eth_vhost_install_intr(struct rte_eth_dev *dev)
@@ -38 +40 @@
-@@ -767,7 +767,7 @@ update_queuing_status(struct rte_eth_dev *dev)
+@@ -741,7 +741,7 @@ update_queuing_status(struct rte_eth_dev *dev)
@@ -47 +49 @@
-@@ -779,7 +779,7 @@ update_queuing_status(struct rte_eth_dev *dev)
+@@ -753,7 +753,7 @@ update_queuing_status(struct rte_eth_dev *dev)
@@ -56,2 +58,2 @@
-@@ -868,7 +868,7 @@ new_device(int vid)
- 	vhost_dev_csum_configure(eth_dev);
+@@ -835,7 +835,7 @@ new_device(int vid)
+ 	eth_dev->data->dev_link.link_status = ETH_LINK_UP;
@@ -65 +67 @@
-@@ -898,7 +898,7 @@ destroy_device(int vid)
+@@ -865,7 +865,7 @@ destroy_device(int vid)
@@ -72 +74 @@
- 	eth_dev->data->dev_link.link_status = RTE_ETH_LINK_DOWN;
+ 	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
@@ -74 +76 @@
-@@ -1008,7 +1008,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
+@@ -972,7 +972,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
@@ -83 +85 @@
-@@ -1197,7 +1197,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev)
+@@ -1159,7 +1159,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev)
@@ -92 +94 @@
-@@ -1209,7 +1209,7 @@ eth_dev_stop(struct rte_eth_dev *dev)
+@@ -1171,7 +1171,7 @@ eth_dev_stop(struct rte_eth_dev *dev)

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

* patch 'vhost: add some trailing newline in log messages' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (56 preceding siblings ...)
  2022-07-20  8:21   ` patch 'net/vhost: fix deadlock on vring state change' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'net/igc: support multi-process' " Xueming Li
                     ` (3 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: David Marchand; +Cc: xuemingl, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/967f4198e0a72879f1c7a5b35a449caedb04289b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 967f4198e0a72879f1c7a5b35a449caedb04289b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 1 Jul 2022 09:55:08 +0200
Subject: [PATCH] vhost: add some trailing newline in log messages
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1ef468a7e9ff1a9da50b809ae04bbf60b6fbe351 ]

VHOST_LOG_* macros don't append a newline.
Add missing ones.

Fixes: e623e0c6d8a5 ("vhost: add reconnect ability")
Fixes: af1475918124 ("vhost: introduce API to start a specific driver")
Fixes: 2dfeebe26546 ("vhost: check return of mutex initialization")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/socket.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index c6548608a3..a3e5a0160b 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -501,7 +501,7 @@ vhost_user_reconnect_init(void)
 
 	ret = pthread_mutex_init(&reconn_list.mutex, NULL);
 	if (ret < 0) {
-		VHOST_LOG_CONFIG(ERR, "failed to initialize mutex");
+		VHOST_LOG_CONFIG(ERR, "failed to initialize mutex\n");
 		return ret;
 	}
 	TAILQ_INIT(&reconn_list.head);
@@ -509,10 +509,10 @@ vhost_user_reconnect_init(void)
 	ret = rte_ctrl_thread_create(&reconn_tid, "vhost_reconn", NULL,
 			     vhost_user_client_reconnect, NULL);
 	if (ret != 0) {
-		VHOST_LOG_CONFIG(ERR, "failed to create reconnect thread");
+		VHOST_LOG_CONFIG(ERR, "failed to create reconnect thread\n");
 		if (pthread_mutex_destroy(&reconn_list.mutex)) {
 			VHOST_LOG_CONFIG(ERR,
-				"failed to destroy reconnect mutex");
+				"failed to destroy reconnect mutex\n");
 		}
 	}
 
@@ -1147,8 +1147,7 @@ rte_vhost_driver_start(const char *path)
 			&vhost_user.fdset);
 		if (ret != 0) {
 			VHOST_LOG_CONFIG(ERR,
-				"failed to create fdset handling thread");
-
+				"failed to create fdset handling thread\n");
 			fdset_pipe_uninit(&vhost_user.fdset);
 			return -1;
 		}
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.511282165 +0800
+++ 0059-vhost-add-some-trailing-newline-in-log-messages.patch	2022-07-20 15:00:58.804333679 +0800
@@ -1 +1 @@
-From 1ef468a7e9ff1a9da50b809ae04bbf60b6fbe351 Mon Sep 17 00:00:00 2001
+From 967f4198e0a72879f1c7a5b35a449caedb04289b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1ef468a7e9ff1a9da50b809ae04bbf60b6fbe351 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +19,2 @@
- lib/vhost/socket.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ lib/librte_vhost/socket.c | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
@@ -20,5 +22,5 @@
-diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
-index 7a0f63af14..24d60ca149 100644
---- a/lib/vhost/socket.c
-+++ b/lib/vhost/socket.c
-@@ -499,7 +499,7 @@ vhost_user_reconnect_init(void)
+diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
+index c6548608a3..a3e5a0160b 100644
+--- a/lib/librte_vhost/socket.c
++++ b/lib/librte_vhost/socket.c
+@@ -501,7 +501,7 @@ vhost_user_reconnect_init(void)
@@ -28,2 +30,2 @@
--		VHOST_LOG_CONFIG(ERR, "%s: failed to initialize mutex", __func__);
-+		VHOST_LOG_CONFIG(ERR, "%s: failed to initialize mutex\n", __func__);
+-		VHOST_LOG_CONFIG(ERR, "failed to initialize mutex");
++		VHOST_LOG_CONFIG(ERR, "failed to initialize mutex\n");
@@ -33 +35 @@
-@@ -507,9 +507,9 @@ vhost_user_reconnect_init(void)
+@@ -509,10 +509,10 @@ vhost_user_reconnect_init(void)
@@ -39,3 +41,5 @@
- 		if (pthread_mutex_destroy(&reconn_list.mutex))
--			VHOST_LOG_CONFIG(ERR, "%s: failed to destroy reconnect mutex", __func__);
-+			VHOST_LOG_CONFIG(ERR, "%s: failed to destroy reconnect mutex\n", __func__);
+ 		if (pthread_mutex_destroy(&reconn_list.mutex)) {
+ 			VHOST_LOG_CONFIG(ERR,
+-				"failed to destroy reconnect mutex");
++				"failed to destroy reconnect mutex\n");
+ 		}
@@ -44,3 +48 @@
- 	return ret;
-@@ -1170,8 +1170,8 @@ rte_vhost_driver_start(const char *path)
- 			"vhost-events", NULL, fdset_event_dispatch,
+@@ -1147,8 +1147,7 @@ rte_vhost_driver_start(const char *path)
@@ -49 +51,2 @@
--			VHOST_LOG_CONFIG(ERR, "(%s) failed to create fdset handling thread", path);
+ 			VHOST_LOG_CONFIG(ERR,
+-				"failed to create fdset handling thread");
@@ -51,2 +54 @@
-+			VHOST_LOG_CONFIG(ERR, "(%s) failed to create fdset handling thread\n",
-+				path);
++				"failed to create fdset handling thread\n");

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

* patch 'net/igc: support multi-process' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (57 preceding siblings ...)
  2022-07-20  8:21   ` patch 'vhost: add some trailing newline in log messages' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'service: fix lingering active status' " Xueming Li
                     ` (2 subsequent siblings)
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Zhichao Zeng; +Cc: xuemingl, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e725713af30afb2ebf24d03355ed5ceac3388995

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e725713af30afb2ebf24d03355ed5ceac3388995 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Thu, 30 Jun 2022 19:03:30 +0800
Subject: [PATCH] net/igc: support multi-process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e097bf80e418b03eea1b032a37b71097b4cf0a89 ]

The Rx function was not specified in the secondary process, causing the
secondary process to segfault in a multi-process environment.

This patch specify RX/TX functions in "dev_init" to support secondary
processes.

Fixes: 66fde1b943eb ("net/igc: add skeleton")

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/igc/igc_ethdev.c | 9 ++++++++-
 drivers/net/igc/igc_txrx.c   | 8 ++++----
 drivers/net/igc/igc_txrx.h   | 6 ++++++
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 673996314b..706a847a93 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -1237,8 +1237,15 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
 	 * has already done this work. Only check we don't need a different
 	 * RX function.
 	 */
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		dev->rx_pkt_burst = igc_recv_pkts;
+		if (dev->data->scattered_rx)
+			dev->rx_pkt_burst = igc_recv_scattered_pkts;
+
+		dev->tx_pkt_burst = igc_xmit_pkts;
+		dev->tx_pkt_prepare = eth_igc_prep_pkts;
 		return 0;
+	}
 
 	rte_eth_copy_pci_info(dev, pci_dev);
 	dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c
index b23cc2b611..6c3d207a69 100644
--- a/drivers/net/igc/igc_txrx.c
+++ b/drivers/net/igc/igc_txrx.c
@@ -343,7 +343,7 @@ rx_desc_get_pkt_info(struct igc_rx_queue *rxq, struct rte_mbuf *rxm,
 	rxm->packet_type = rx_desc_pkt_info_to_pkt_type(pkt_info);
 }
 
-static uint16_t
+uint16_t
 igc_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 {
 	struct igc_rx_queue * const rxq = rx_queue;
@@ -486,7 +486,7 @@ igc_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	return nb_rx;
 }
 
-static uint16_t
+uint16_t
 igc_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 			uint16_t nb_pkts)
 {
@@ -1414,7 +1414,7 @@ eth_igc_rx_queue_setup(struct rte_eth_dev *dev,
 }
 
 /* prepare packets for transmit */
-static uint16_t
+uint16_t
 eth_igc_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 		uint16_t nb_pkts)
 {
@@ -1621,7 +1621,7 @@ tx_desc_cksum_flags_to_olinfo(uint64_t ol_flags)
 	return tmp;
 }
 
-static uint16_t
+uint16_t
 igc_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	struct igc_tx_queue * const txq = tx_queue;
diff --git a/drivers/net/igc/igc_txrx.h b/drivers/net/igc/igc_txrx.h
index f2b2d75bbc..82d67e0b9d 100644
--- a/drivers/net/igc/igc_txrx.h
+++ b/drivers/net/igc/igc_txrx.h
@@ -52,6 +52,12 @@ void eth_igc_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
 	struct rte_eth_txq_info *qinfo);
 void eth_igc_vlan_strip_queue_set(struct rte_eth_dev *dev,
 			uint16_t rx_queue_id, int on);
+uint16_t igc_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts);
+uint16_t igc_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts);
+uint16_t eth_igc_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+	uint16_t nb_pkts);
+uint16_t igc_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+	uint16_t nb_pkts);
 #ifdef __cplusplus
 }
 #endif
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.550542717 +0800
+++ 0060-net-igc-support-multi-process.patch	2022-07-20 15:00:58.807667007 +0800
@@ -1 +1 @@
-From e097bf80e418b03eea1b032a37b71097b4cf0a89 Mon Sep 17 00:00:00 2001
+From e725713af30afb2ebf24d03355ed5ceac3388995 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e097bf80e418b03eea1b032a37b71097b4cf0a89 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index b9933b395d..7f221a5d34 100644
+index 673996314b..706a847a93 100644
@@ -27 +29 @@
-@@ -1240,8 +1240,15 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
+@@ -1237,8 +1237,15 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
@@ -45 +47 @@
-index e48d5df11a..ffd219b0df 100644
+index b23cc2b611..6c3d207a69 100644
@@ -48 +50 @@
-@@ -345,7 +345,7 @@ rx_desc_get_pkt_info(struct igc_rx_queue *rxq, struct rte_mbuf *rxm,
+@@ -343,7 +343,7 @@ rx_desc_get_pkt_info(struct igc_rx_queue *rxq, struct rte_mbuf *rxm,
@@ -57 +59 @@
-@@ -488,7 +488,7 @@ igc_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -486,7 +486,7 @@ igc_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
@@ -66 +68 @@
-@@ -1397,7 +1397,7 @@ eth_igc_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -1414,7 +1414,7 @@ eth_igc_rx_queue_setup(struct rte_eth_dev *dev,
@@ -75 +77 @@
-@@ -1604,7 +1604,7 @@ tx_desc_cksum_flags_to_olinfo(uint64_t ol_flags)
+@@ -1621,7 +1621,7 @@ tx_desc_cksum_flags_to_olinfo(uint64_t ol_flags)
@@ -85 +87 @@
-index 535108a868..02a0a051bb 100644
+index f2b2d75bbc..82d67e0b9d 100644
@@ -88 +90 @@
-@@ -49,6 +49,12 @@ void eth_igc_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+@@ -52,6 +52,12 @@ void eth_igc_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,

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

* patch 'service: fix lingering active status' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (58 preceding siblings ...)
  2022-07-20  8:21   ` patch 'net/igc: support multi-process' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'gro: fix identifying fragmented packets' " Xueming Li
  2022-07-20  8:21   ` patch 'examples/link_status_interrupt: fix stats refresh rate' " Xueming Li
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: xuemingl, Naga Harish K S V, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/51b005b1a43305846a17abbb0c418201ab874559

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 51b005b1a43305846a17abbb0c418201ab874559 Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Tue, 5 Jul 2022 13:32:07 +0000
Subject: [PATCH] service: fix lingering active status
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6550113be62d1bd27b2f2dc07d7a888ad9499006 ]

This commit fixes an issue where calling rte_service_lcore_stop()
would result in a service's "active on lcore" status becoming stale.

The stale status would result in rte_service_may_be_active() always
returning "1", indicating that the service is not certainly stopped.

This is fixed by ensuring the "active on lcore" status of each service
is set to 0 when an lcore is stopped.

Fixes: e30dd31847d2 ("service: add mechanism for quiescing")
Fixes: 8929de043eb4 ("service: retrieve lcore active state")

Reported-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/rte_service.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index bd8fb72e78..e76c2baffc 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -764,7 +764,9 @@ rte_service_lcore_stop(uint32_t lcore)
 		return -EALREADY;
 
 	uint32_t i;
-	uint64_t service_mask = lcore_states[lcore].service_mask;
+	struct core_state *cs = &lcore_states[lcore];
+	uint64_t service_mask = cs->service_mask;
+
 	for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) {
 		int32_t enabled = service_mask & (UINT64_C(1) << i);
 		int32_t service_running = rte_service_runstate_get(i);
@@ -772,6 +774,11 @@ rte_service_lcore_stop(uint32_t lcore)
 			__atomic_load_n(&rte_services[i].num_mapped_cores,
 				__ATOMIC_RELAXED));
 
+		/* Switch off this core for all services, to ensure that future
+		 * calls to may_be_active() know this core is switched off.
+		 */
+		cs->service_active_on_lcore[i] = 0;
+
 		/* if the core is mapped, and the service is running, and this
 		 * is the only core that is mapped, the service would cease to
 		 * run if this core stopped, so fail instead.
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.592589680 +0800
+++ 0061-service-fix-lingering-active-status.patch	2022-07-20 15:00:58.807667007 +0800
@@ -1 +1 @@
-From 6550113be62d1bd27b2f2dc07d7a888ad9499006 Mon Sep 17 00:00:00 2001
+From 51b005b1a43305846a17abbb0c418201ab874559 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6550113be62d1bd27b2f2dc07d7a888ad9499006 ]
@@ -21 +24 @@
- lib/eal/common/rte_service.c | 9 ++++++++-
+ lib/librte_eal/common/rte_service.c | 9 ++++++++-
@@ -24,5 +27,5 @@
-diff --git a/lib/eal/common/rte_service.c b/lib/eal/common/rte_service.c
-index ef31b1f63c..d2b7275ac0 100644
---- a/lib/eal/common/rte_service.c
-+++ b/lib/eal/common/rte_service.c
-@@ -758,7 +758,9 @@ rte_service_lcore_stop(uint32_t lcore)
+diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
+index bd8fb72e78..e76c2baffc 100644
+--- a/lib/librte_eal/common/rte_service.c
++++ b/lib/librte_eal/common/rte_service.c
+@@ -764,7 +764,9 @@ rte_service_lcore_stop(uint32_t lcore)
@@ -39 +42 @@
-@@ -766,6 +768,11 @@ rte_service_lcore_stop(uint32_t lcore)
+@@ -772,6 +774,11 @@ rte_service_lcore_stop(uint32_t lcore)

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

* patch 'gro: fix identifying fragmented packets' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (59 preceding siblings ...)
  2022-07-20  8:21   ` patch 'service: fix lingering active status' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  2022-07-20  8:21   ` patch 'examples/link_status_interrupt: fix stats refresh rate' " Xueming Li
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Kumara Parameshwaran; +Cc: xuemingl, Jiayu Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6ad5ecf28dd63fb63ac70b11117b33335217d4e3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6ad5ecf28dd63fb63ac70b11117b33335217d4e3 Mon Sep 17 00:00:00 2001
From: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Date: Mon, 27 Jun 2022 16:01:14 +0530
Subject: [PATCH] gro: fix identifying fragmented packets
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bdf2f895a66044bc643e98a7262d70c245252927 ]

A packet with RTE_PTYPE_L4_FRAG(0x300) contains both RTE_PTYPE_L4_TCP
(0x100) & RTE_PTYPE_L4_UDP (0x200). A fragmented packet as defined in
rte_mbuf_ptype.h cannot be recognized as other L4 types and hence the
GRO layer should not use IS_IPV4_TCP_PKT or IS_IPV4_UDP_PKT for
RTE_PTYPE_L4_FRAG. Hence, if the packet type is RTE_PTYPE_L4_FRAG the
IP header should be parsed to recognize the appropriate IP type and
invoke the respective gro handler.

Fixes: 1ca5e6740852 ("gro: support UDP/IPv4")

Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Reviewed-by: Jiayu Hu <jiayu.hu@intel.com>
---
 lib/librte_gro/rte_gro.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_gro/rte_gro.c b/lib/librte_gro/rte_gro.c
index 8ca4da67e9..7a788523ad 100644
--- a/lib/librte_gro/rte_gro.c
+++ b/lib/librte_gro/rte_gro.c
@@ -33,6 +33,7 @@ static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = {
 
 #define IS_IPV4_TCP_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \
 		((ptype & RTE_PTYPE_L4_TCP) == RTE_PTYPE_L4_TCP) && \
+		((ptype & RTE_PTYPE_L4_FRAG) != RTE_PTYPE_L4_FRAG) && \
 		(RTE_ETH_IS_TUNNEL_PKT(ptype) == 0))
 
 #define IS_IPV4_UDP_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \
@@ -41,6 +42,7 @@ static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = {
 
 #define IS_IPV4_VXLAN_TCP4_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \
 		((ptype & RTE_PTYPE_L4_UDP) == RTE_PTYPE_L4_UDP) && \
+		((ptype & RTE_PTYPE_L4_FRAG) != RTE_PTYPE_L4_FRAG) && \
 		((ptype & RTE_PTYPE_TUNNEL_VXLAN) == \
 		 RTE_PTYPE_TUNNEL_VXLAN) && \
 		((ptype & RTE_PTYPE_INNER_L4_TCP) == \
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.631873733 +0800
+++ 0062-gro-fix-identifying-fragmented-packets.patch	2022-07-20 15:00:58.807667007 +0800
@@ -1 +1 @@
-From bdf2f895a66044bc643e98a7262d70c245252927 Mon Sep 17 00:00:00 2001
+From 6ad5ecf28dd63fb63ac70b11117b33335217d4e3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bdf2f895a66044bc643e98a7262d70c245252927 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
- lib/gro/rte_gro.c | 2 ++
+ lib/librte_gro/rte_gro.c | 2 ++
@@ -23,5 +25,5 @@
-diff --git a/lib/gro/rte_gro.c b/lib/gro/rte_gro.c
-index 6f7dd4d709..e35399fd42 100644
---- a/lib/gro/rte_gro.c
-+++ b/lib/gro/rte_gro.c
-@@ -32,6 +32,7 @@ static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = {
+diff --git a/lib/librte_gro/rte_gro.c b/lib/librte_gro/rte_gro.c
+index 8ca4da67e9..7a788523ad 100644
+--- a/lib/librte_gro/rte_gro.c
++++ b/lib/librte_gro/rte_gro.c
+@@ -33,6 +33,7 @@ static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = {
@@ -35 +37 @@
-@@ -40,6 +41,7 @@ static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = {
+@@ -41,6 +42,7 @@ static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = {

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

* patch 'examples/link_status_interrupt: fix stats refresh rate' has been queued to stable release 20.11.6
  2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
                     ` (60 preceding siblings ...)
  2022-07-20  8:21   ` patch 'gro: fix identifying fragmented packets' " Xueming Li
@ 2022-07-20  8:21   ` Xueming Li
  61 siblings, 0 replies; 180+ messages in thread
From: Xueming Li @ 2022-07-20  8:21 UTC (permalink / raw)
  To: Raja Zidane; +Cc: xuemingl, Omar Awaysa, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.6

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/22/22. So please
shout if anyone has objections.

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0e41becd40c25f53deb589cb37578c4966ea5f73

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0e41becd40c25f53deb589cb37578c4966ea5f73 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Thu, 7 Jul 2022 08:22:34 +0000
Subject: [PATCH] examples/link_status_interrupt: fix stats refresh rate
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 14d460b888c290e16c00cff4ae809d14fe799aec ]

TIMER_MILLISECOND is defined as the number of CPU cycles per millisecond.
The current definition is correct only for cores with frequency of 2GHz.

Use DPDK API to get CPU frequency, and to define timer period.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Signed-off-by: Omar Awaysa <omara@nvidia.com>
---
 examples/link_status_interrupt/main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 6cffd5a827..a022791673 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -99,9 +99,10 @@ struct lsi_port_statistics {
 struct lsi_port_statistics port_statistics[RTE_MAX_ETHPORTS];
 
 /* A tsc-based timer responsible for triggering statistics printout */
-#define TIMER_MILLISECOND 2000000ULL /* around 1ms at 2 Ghz */
+#define TIMER_MILLISECOND (rte_get_timer_hz() / 1000)
 #define MAX_TIMER_PERIOD 86400 /* 1 day max */
-static int64_t timer_period = 10 * TIMER_MILLISECOND * 1000; /* default period is 10 seconds */
+#define DEFAULT_TIMER_PERIOD 10UL /* default period is 10 seconds */
+static int64_t timer_period;
 
 /* Print out statistics on packets dropped */
 static void
@@ -365,6 +366,8 @@ lsi_parse_args(int argc, char **argv)
 		{NULL, 0, 0, 0}
 	};
 
+	timer_period = DEFAULT_TIMER_PERIOD * TIMER_MILLISECOND * 1000;
+
 	argvopt = argv;
 
 	while ((opt = getopt_long(argc, argvopt, "p:q:T:",
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:01.670822815 +0800
+++ 0063-examples-link_status_interrupt-fix-stats-refresh-rat.patch	2022-07-20 15:00:58.811000334 +0800
@@ -1 +1 @@
-From 14d460b888c290e16c00cff4ae809d14fe799aec Mon Sep 17 00:00:00 2001
+From 0e41becd40c25f53deb589cb37578c4966ea5f73 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 14d460b888c290e16c00cff4ae809d14fe799aec ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 551f0524da..9699e14ce6 100644
+index 6cffd5a827..a022791673 100644
@@ -24 +26 @@
-@@ -101,9 +101,10 @@ struct lsi_port_statistics {
+@@ -99,9 +99,10 @@ struct lsi_port_statistics {
@@ -37 +39 @@
-@@ -370,6 +371,8 @@ lsi_parse_args(int argc, char **argv)
+@@ -365,6 +366,8 @@ lsi_parse_args(int argc, char **argv)

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

* RE: patch 'doc: add more instructions for running as non-root' has been queued to stable release 20.11.6
  2022-07-20  8:21   ` patch 'doc: add more instructions for running as non-root' " Xueming Li
@ 2022-08-01 12:21     ` Dmitry Kozlyuk
  0 siblings, 0 replies; 180+ messages in thread
From: Dmitry Kozlyuk @ 2022-08-01 12:21 UTC (permalink / raw)
  To: Xueming(Steven) Li; +Cc: Bruce Richardson, dpdk stable

Hi Xueming,

Please use the backported version.
See the note about the differences from upstream.
http://inbox.dpdk.org/stable/20220801121924.2631663-1-dkozlyuk@nvidia.com/

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

end of thread, other threads:[~2022-08-01 12:21 UTC | newest]

Thread overview: 180+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21  8:01 patch has been queued to stable release 20.11.6 Xueming Li
2022-06-21  8:01 ` patch 'crypto/ipsec_mb: fix length and offset settings' " Xueming Li
2022-06-21  8:01 ` patch 'crypto/ipsec_mb: fix GMAC parameters setting' " Xueming Li
2022-06-21  8:01 ` patch 'eal/windows: fix data race when creating threads' " Xueming Li
2022-06-21  8:01 ` patch 'eal/windows: add missing C++ include guards' " Xueming Li
2022-06-21  8:01 ` patch 'examples/bond: fix invalid use of trylock' " Xueming Li
2022-06-21  8:01 ` patch 'net/iavf: fix HW ring scan method selection' " Xueming Li
2022-06-21  8:01 ` patch 'net/i40e: populate error in flow director parser' " Xueming Li
2022-06-21  8:01 ` patch 'net/netvsc: fix calculation of checksums based on mbuf flag' " Xueming Li
2022-06-21  8:01 ` patch 'net/mlx5: fix Tx when inlining is impossible' " Xueming Li
2022-06-21  8:01 ` patch 'net/mlx5: fix GTP handling in header modify action' " Xueming Li
2022-06-21  8:01 ` patch 'net/mlx5: fix Rx/Tx stats concurrency' " Xueming Li
2022-06-21  8:01 ` patch 'test/table: fix buffer overflow on lpm entry' " Xueming Li
2022-06-21  8:01 ` patch 'mem: skip attaching external memory in secondary process' " Xueming Li
2022-06-21  8:01 ` patch 'eal: fix C++ include for device event and DMA' " Xueming Li
2022-06-21  8:01 ` patch 'crypto/dpaa_sec: fix digest size' " Xueming Li
2022-06-21  8:01 ` patch 'crypto/dpaa2_sec: fix fle buffer leak' " Xueming Li
2022-06-21  8:01 ` patch 'crypto/dpaa2_sec: fix buffer pool ID check' " Xueming Li
2022-06-21  8:01 ` patch 'crypto/dpaa_sec: fix secondary process probing' " Xueming Li
2022-06-21  8:01 ` patch 'crypto/dpaa2_sec: fix operation status for simple FD' " Xueming Li
2022-06-21  8:01 ` patch 'common/dpaax: fix short MAC-I IV calculation for ZUC' " Xueming Li
2022-06-21  8:01 ` patch 'examples/l2fwd-crypto: fix stats refresh rate' " Xueming Li
2022-06-21  8:01 ` patch 'test/hash: report non HTM numbers for single thread' " Xueming Li
2022-06-21  8:01 ` patch 'net/nfp: remove unneeded header inclusion' " Xueming Li
2022-06-21  8:01 ` patch 'net/bonding: fix RSS key config with extended key length' " Xueming Li
2022-06-21  8:01 ` patch 'net/cxgbe: fix port ID in Rx mbuf' " Xueming Li
2022-06-21  8:01 ` patch 'net/cxgbe: fix Tx queue stuck with mbuf chain coalescing' " Xueming Li
2022-06-21  8:01 ` patch 'net/vhost: fix access to freed memory' " Xueming Li
2022-06-21  8:01 ` patch 'net/virtio: restore some optimisations with AVX512' " Xueming Li
2022-06-21  8:01 ` patch 'net/vhost: fix TSO feature default disablement' " Xueming Li
2022-06-21  8:01 ` patch 'vhost: fix missing virtqueue lock protection' " Xueming Li
2022-06-21  8:01 ` patch 'vdpa/mlx5: fix interrupt trash that leads to crash' " Xueming Li
2022-06-21  8:01 ` patch 'vdpa/mlx5: fix dead loop when process interrupted' " Xueming Li
2022-06-21  8:01 ` patch 'net/dpaa: fix event queue detach' " Xueming Li
2022-06-21  8:01 ` patch 'doc: update matching versions in ice guide' " Xueming Li
2022-06-21  8:01 ` patch 'net/bonding: fix stopping non-active slaves' " Xueming Li
2022-06-21  8:01 ` patch 'net/bonding: fix slave stop and remove on port close' " Xueming Li
2022-06-21  8:01 ` patch 'net/hns3: fix RSS disable' " Xueming Li
2022-06-21  8:01 ` patch 'net/hns3: fix rollback on RSS hash update' " Xueming Li
2022-06-21  8:01 ` patch 'net/hns3: remove redundant RSS tuple field' " Xueming Li
2022-06-21  8:01 ` patch 'net/hns3: remove unnecessary RSS switch' " Xueming Li
2022-06-21  8:01 ` patch 'app/testpmd: check statistics query before printing' " Xueming Li
2022-06-21  8:01 ` patch 'net/bnxt: fix reordering in NEON Rx' " Xueming Li
2022-06-21  8:01 ` patch 'net/bnxt: remove unused macro' " Xueming Li
2022-06-21  8:01 ` patch 'net/bnxt: fix device capability reporting' " Xueming Li
2022-06-21  8:01 ` patch 'net/bnxt: fix Rx configuration' " Xueming Li
2022-06-21  8:01 ` patch 'net/bnxt: fix ring group on Rx restart' " Xueming Li
2022-06-21  8:01 ` patch 'net/bnxt: avoid unnecessary endianness conversion' " Xueming Li
2022-06-21  8:01 ` patch 'net/bnxt: fix speed autonegotiation' " Xueming Li
2022-06-21  8:01 ` patch 'net/bnxt: force PHY update on certain configurations' " Xueming Li
2022-06-21  8:01 ` patch 'net/bnxt: fix link status when port is stopped' " Xueming Li
2022-06-21  8:01 ` patch 'net/bnxt: recheck FW readiness if in reset process' " Xueming Li
2022-06-21  8:01 ` patch 'net/bnxt: fix freeing VNIC filters' " Xueming Li
2022-06-21  8:01 ` patch 'eal/x86: fix unaligned access for small memcpy' " Xueming Li
2022-06-21  8:02 ` patch 'examples/l3fwd: fix scalar LPM' " Xueming Li
2022-06-21  8:02 ` patch 'test/ring: remove excessive inlining' " Xueming Li
2022-06-21  8:02 ` patch 'eal/freebsd: fix use of newer cpuset macros' " Xueming Li
2022-06-21  8:02 ` patch 'test: avoid hang if queues are full and Tx fails' " Xueming Li
2022-06-21  8:02 ` patch 'acl: fix rules with 8-byte field size' " Xueming Li
2022-06-21  8:02 ` patch 'rib: fix traversal with /32 route' " Xueming Li
2022-06-21  8:02 ` patch 'mbuf: dump outer VLAN' " Xueming Li
2022-06-21  8:02 ` patch 'doc: fix API index Markdown syntax' " Xueming Li
2022-06-21  8:02 ` patch 'devtools: fix null test for NUMA systems' " Xueming Li
2022-06-21  8:02 ` patch 'examples/ipsec-secgw: fix uninitialized memory access' " Xueming Li
2022-06-21  8:02 ` patch 'examples/ipsec-secgw: fix promiscuous mode option' " Xueming Li
2022-06-21  8:02 ` patch 'test/crypto: fix null check for ZUC authentication' " Xueming Li
2022-06-21  8:02 ` patch 'drivers/crypto: fix warnings for OpenSSL version' " Xueming Li
2022-06-21  8:02 ` patch 'doc: add missing auth algo for IPsec example' " Xueming Li
2022-06-21  8:02 ` patch 'app/testpmd: perform SW IP checksum for GRO/GSO packets' " Xueming Li
2022-06-21  8:02 ` patch 'app/testpmd: remove useless pointer checks' " Xueming Li
2022-06-21  8:02 ` patch 'ethdev: clarify null location case in xstats get' " Xueming Li
2022-06-21  8:02 ` patch 'net/hns3: fix xstats get return if xstats is null' " Xueming Li
2022-06-21  8:02 ` patch 'net/ipn3ke: " Xueming Li
2022-06-21  8:02 ` patch 'net/mvpp2: " Xueming Li
2022-06-21  8:02 ` patch 'net/axgbe: " Xueming Li
2022-06-21  8:02 ` patch 'ethdev: fix memory leak in xstats telemetry' " Xueming Li
2022-06-21  8:02 ` patch 'ethdev: fix possible null pointer access' " Xueming Li
2022-06-21  8:02 ` patch 'app/testpmd: replace hardcoded min mbuf number with macro' " Xueming Li
2022-06-21  8:02 ` patch 'app/testpmd: fix metering and policing command for RFC4115' " Xueming Li
2022-06-21  8:02 ` patch 'ethdev: prohibit polling stopped queue' " Xueming Li
2022-06-21  8:02 ` patch 'app/testpmd: do not poll stopped queues' " Xueming Li
2022-06-21  8:02 ` patch 'net/bonding: fix mbuf fast free usage' " Xueming Li
2022-06-21  8:02 ` patch 'net/memif: fix overwriting of head segment' " Xueming Li
2022-06-21  8:02 ` patch 'ethdev: fix port state when stop' " Xueming Li
2022-06-21  8:02 ` patch 'net/txgbe: fix max number of queues for SR-IOV' " Xueming Li
2022-06-21  8:02 ` patch 'net/nfp: fix disabling VLAN stripping' " Xueming Li
2022-06-21  8:02 ` patch 'ethdev: fix port close in secondary process' " Xueming Li
2022-06-21  8:02 ` patch 'net/bnxt: fix compatibility with some old firmwares' " Xueming Li
2022-06-21  8:02 ` patch 'doc: fix vhost multi-queue reconnection' " Xueming Li
2022-06-21  8:02 ` patch 'vhost: fix deadlock when message handling failed' " Xueming Li
2022-06-21  8:02 ` patch 'examples/vhost: fix crash when no VMDq' " Xueming Li
2022-06-21  8:02 ` patch 'net/mlx5: fix Tx recovery' " Xueming Li
2022-06-21  8:02 ` patch 'kni: fix build with Linux 5.18' " Xueming Li
2022-06-21  8:02 ` patch 'net/iavf: fix data path selection' " Xueming Li
2022-06-21  8:02 ` patch 'net/ixgbe: add option for link up check on pin SDP3' " Xueming Li
2022-06-21  8:02 ` patch 'net/ice/base: fix getting sched node from ID type' " Xueming Li
2022-06-21  8:02 ` patch 'net/ice: fix MTU info for DCF' " Xueming Li
2022-06-21  8:02 ` patch 'net/i40e: fix max frame size config at port level' " Xueming Li
2022-06-21  8:02 ` patch 'net/iavf: fix queue start exception handling' " Xueming Li
2022-06-21  8:02 ` patch 'net/iavf: fix mbuf release in multi-process' " Xueming Li
2022-06-21  8:02 ` patch 'net/iavf: fix Rx queue interrupt setting' " Xueming Li
2022-06-21  8:02 ` patch 'doc: update matching versions in i40e guide' " Xueming Li
2022-06-21  8:02 ` patch 'net/ice: fix outer L4 checksum in scalar Rx' " Xueming Li
2022-06-21  8:02 ` patch 'net/iavf: increase reset complete wait count' " Xueming Li
2022-06-21  8:02 ` patch 'examples/dma: fix Tx drop statistics' " Xueming Li
2022-06-21  8:02 ` patch 'raw/ifpga: unregister interrupt on close' " Xueming Li
2022-06-21  8:02 ` patch 'bus/fslmc: fix VFIO setup' " Xueming Li
2022-06-21  8:02 ` patch 'doc: fix formatting and link in BPF library guide' " Xueming Li
2022-06-21  8:02 ` patch 'app/testpmd: fix packet segment allocation' " Xueming Li
2022-06-21  8:02 ` patch 'app/testpmd: fix multicast address pool leak' " Xueming Li
2022-06-21  8:02 ` patch 'kni: use dedicated function to set random MAC address' " Xueming Li
2022-06-21  8:02 ` patch 'kni: use dedicated function to set " Xueming Li
2022-06-21  8:02 ` patch 'raw/ifpga: remove virtual devices on close' " Xueming Li
2022-06-21  8:02 ` patch 'vhost: fix async access' " Xueming Li
2022-06-21  8:03 ` patch 'net/bnxt: fix tunnel stateless offloads' " Xueming Li
2022-06-21  8:03 ` patch 'net/mlx5: fix RSS hash types adjustment' " Xueming Li
2022-07-20  8:20 ` patch 'vdpa/ifc: fix build with GCC 12' " Xueming Li
2022-07-20  8:20   ` patch 'app/flow-perf: " Xueming Li
2022-07-20  8:20   ` patch 'trace: fix init with long file prefix' " Xueming Li
2022-07-20  8:20   ` patch 'eal/x86: drop export of internal alignment macro' " Xueming Li
2022-07-20  8:20   ` patch 'baseband/acc100: update companion PF configure function' " Xueming Li
2022-07-20  8:20   ` patch 'baseband/acc100: add protection for some negative scenario' " Xueming Li
2022-07-20  8:20   ` patch 'baseband/acc100: remove RTE prefix for internal macros' " Xueming Li
2022-07-20  8:20   ` patch 'common/cpt: fix build with GCC 12' " Xueming Li
2022-07-20  8:20   ` patch 'test/ipsec: " Xueming Li
2022-07-20  8:20   ` patch 'crypto/scheduler: fix queue pair in scheduler failover' " Xueming Li
2022-07-20  8:20   ` patch 'test/crypto: fix cipher offset for ZUC' " Xueming Li
2022-07-20  8:20   ` patch 'test/ipsec: fix performance test' " Xueming Li
2022-07-20  8:20   ` patch 'eventdev/eth_tx: fix adapter creation' " Xueming Li
2022-07-20  8:20   ` patch 'net/bonding: fix RSS inconsistency between ports' " Xueming Li
2022-07-20  8:20   ` patch 'test/bonding: fix RSS test when disable RSS' " Xueming Li
2022-07-20  8:20   ` patch 'net/hns3: fix an unreasonable memset' " Xueming Li
2022-07-20  8:20   ` patch 'net/hns3: remove duplicate definition' " Xueming Li
2022-07-20  8:20   ` patch 'net/hns3: fix return value for unsupported tuple' " Xueming Li
2022-07-20  8:20   ` patch 'app/testpmd: fix bonding slave devices not released' " Xueming Li
2022-07-20  8:20   ` patch 'net/txgbe: fix register polling' " Xueming Li
2022-07-20  8:20   ` patch 'app/testpmd: revert MAC update in checksum forwarding' " Xueming Li
2022-07-20  8:20   ` patch 'vhost: fix missing enqueue pseudo-header calculation' " Xueming Li
2022-07-20  8:20   ` patch 'vhost/crypto: fix build with GCC 12' " Xueming Li
2022-07-20  8:20   ` patch 'vhost/crypto: fix descriptor processing' " Xueming Li
2022-07-20  8:20   ` patch 'malloc: fix allocation of almost hugepage size' " Xueming Li
2022-07-20  8:20   ` patch 'config: fix C++ cross compiler for Arm and PPC' " Xueming Li
2022-07-20  8:20   ` patch 'ci: enable C++ check " Xueming Li
2022-07-20  8:20   ` patch 'net/octeontx: fix port close' " Xueming Li
2022-07-20  8:20   ` patch 'net/qede: fix build with GCC 13' " Xueming Li
2022-07-20  8:20   ` patch 'net/ice/base: fix build with GCC 12' " Xueming Li
2022-07-20  8:21   ` patch 'net/qede: " Xueming Li
2022-07-20  8:21   ` patch 'net/mlx5: fix build with clang 14' " Xueming Li
2022-07-20  8:21   ` patch 'net/mlx5: fix RSS expansion for patterns with ICMP item' " Xueming Li
2022-07-20  8:21   ` patch 'net/mlx5: fix stack buffer overflow in drop action' " Xueming Li
2022-07-20  8:21   ` patch 'raw/ioat: fix build when ioat dmadev enabled' " Xueming Li
2022-07-20  8:21   ` patch 'rib: fix references for IPv6 implementation' " Xueming Li
2022-07-20  8:21   ` patch 'test/hash: fix out of bound access' " Xueming Li
2022-07-20  8:21   ` patch 'app/procinfo: show all non-owned ports' " Xueming Li
2022-07-20  8:21   ` patch 'test: check memory allocation for CRC' " Xueming Li
2022-07-20  8:21   ` patch 'net/hns3: fix descriptors check with SVE' " Xueming Li
2022-07-20  8:21   ` patch 'examples/distributor: fix distributor on Rx core' " Xueming Li
2022-07-20  8:21   ` patch 'doc: add more instructions for running as non-root' " Xueming Li
2022-08-01 12:21     ` Dmitry Kozlyuk
2022-07-20  8:21   ` patch 'net/bnxt: fix switch domain allocation' " Xueming Li
2022-07-20  8:21   ` patch 'net/bnxt: allow Tx only or Rx only' " Xueming Li
2022-07-20  8:21   ` patch 'net/bnxt: fix setting forced speed' " Xueming Li
2022-07-20  8:21   ` patch 'test/crypto: fix authentication IV for ZUC SGL' " Xueming Li
2022-07-20  8:21   ` patch 'test/crypto: fix ZUC vector IV format' " Xueming Li
2022-07-20  8:21   ` patch 'test/crypto: fix SNOW3G " Xueming Li
2022-07-20  8:21   ` patch 'baseband/acc100: remove prefix of internal file' " Xueming Li
2022-07-20  8:21   ` patch 'examples/fips_validation: handle empty payload' " Xueming Li
2022-07-20  8:21   ` patch 'crypto/qat: fix DOCSIS crash' " Xueming Li
2022-07-20  8:21   ` patch 'doc: fix grammar and formatting in compressdev guide' " Xueming Li
2022-07-20  8:21   ` patch 'doc: fix grammar and parameters in l2fwd-crypto " Xueming Li
2022-07-20  8:21   ` patch 'eventdev/eth_tx: fix queue delete' " Xueming Li
2022-07-20  8:21   ` patch 'app/testpmd: fix supported RSS offload display' " Xueming Li
2022-07-20  8:21   ` patch 'net/netvsc: fix vmbus device reference in multi-process' " Xueming Li
2022-07-20  8:21   ` patch 'doc: fix readability in vhost guide' " Xueming Li
2022-07-20  8:21   ` patch 'net/vhost: fix deadlock on vring state change' " Xueming Li
2022-07-20  8:21   ` patch 'vhost: add some trailing newline in log messages' " Xueming Li
2022-07-20  8:21   ` patch 'net/igc: support multi-process' " Xueming Li
2022-07-20  8:21   ` patch 'service: fix lingering active status' " Xueming Li
2022-07-20  8:21   ` patch 'gro: fix identifying fragmented packets' " Xueming Li
2022-07-20  8:21   ` patch 'examples/link_status_interrupt: fix stats refresh rate' " 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).