patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch has been queued to stable release 22.11.3
@ 2023-06-25  6:33 Xueming Li
  2023-06-25  6:33 ` patch 'net: fix return type of IPv4 L4 packet checksum' " Xueming Li
                   ` (129 more replies)
  0 siblings, 130 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Xueming Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/15/23. So please
shout if anyone has objections.

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 11757d12eeed23bfe6da676f147c9ca9bf7ac51e Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Sun, 25 Jun 2023 14:31:58 +0800
Subject: [PATCH] *** SUBJECT HERE ***
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

Abdullah Sevincer (1):
  eventdev: fix memory size for telemetry

Akhil Goyal (1):
  doc: fix auth algos in cryptoperf app

Alvaro Karsz (1):
  dma/dpaa2: set VFA bit for route-by-port with VF

Anoob Joseph (1):
  cryptodev: clarify error codes for symmetric session

Ashwin Sekhar T K (2):
  mempool/cnxk: avoid hang when counting batch allocs
  doc: fix typo in graph guide

Boleslav Stankevich (2):
  net/virtio: propagate interrupt configuration error values
  net/virtio: fix initialization to return negative errno

Bruce Richardson (3):
  kernel/freebsd: fix function parameter list
  telemetry: fix autotest on Alpine
  eal: avoid calling cleanup twice

Chaoyong He (6):
  net/nfp: fix VLAN push flow action
  net/nfp: fix IPv6 flow item
  net/nfp: fix TOS of IPv6 VXLAN encap flow action
  net/nfp: fix TOS of IPv6 GENEVE encap flow action
  net/nfp: fix TOS of IPv6 NVGRE encap flow action
  net/nfp: fix TP flow action for UDP

Chengwen Feng (4):
  net/hns3: fix Rx multiple firmware reset interrupts
  net/hns3: fix mbuf leakage when RxQ started during reset
  net/hns3: fix mbuf leakage when RxQ started after reset
  net/hns3: fix device start return value

Ciara Power (3):
  crypto/qat: fix stack buffer overflow in SGL loop
  crypto/scheduler: fix last element for valid args
  crypto/ipsec_mb: optimize allocation in session

Dariusz Sosnowski (1):
  net/mlx5: fix drop action attribute validation

David Christensen (1):
  net/tap: set locally administered bit for fixed MAC address

David Marchand (3):
  ci: fix build for Arm cross compilation in GHA
  net/virtio-user: fix leak when initialisation fails
  net/mlx5: enhance error log for tunnel offloading

Dengdui Huang (3):
  net/hns3: fix variable type mismatch
  net/hns3: fix inaccurate log
  net/hns3: fix redundant line break in log

Devendra Singh Rawat (1):
  net/qede: fix RSS indirection table initialization

Elena Agostini (1):
  net: fix return type of IPv4 L4 packet checksum

Erik Gabriel Carrillo (1):
  eventdev/timer: fix buffer flush

Feifei Wang (1):
  ring: fix dequeue parameter name

Fengnan Chang (1):
  eal/linux: fix legacy mem init with many segments

Ferruh Yigit (1):
  kni: fix build with Linux 6.3

Huisong Li (7):
  ethdev: fix MAC address occupies two entries
  net/hns3: fix never set MAC flow control
  net/hns3: fix RTC time on initialization
  net/hns3: fix RTC time after reset
  net/hns3: uninitialize PTP
  net/hns3: extract PTP to its own header file
  net/hns3: fix IMP reset trigger

Ivan Malov (2):
  net/sfc: stop misuse of Rx ingress m-port metadata on EF100
  net/sfc: invalidate dangling MAE flow action FW resource IDs

Jerin Jacob (4):
  examples/ip_pipeline: fix build with GCC 13
  examples/ntb: fix build with GCC 13
  net/hns3: fix build warning
  doc: remove warning with Doxygen 1.9.7

Jie Hai (5):
  net/hns3: fix FEC mode for 200G ports
  net/hns3: fix FEC mode check
  net/hns3: fix missing FEC capability
  net/hns3: fix uninitialized variable
  ethdev: fix calloc arguments

Kaijun Zeng (1):
  net/vmxnet3: fix return code in initializing

Kaiwen Deng (2):
  net/ice: fix DCF RSS initialization
  net/iavf: fix virtchnl command called in interrupt

Kamalakannan R (1):
  pipeline: fix double free for table stats

Leyi Rong (1):
  eal/x86: improve multiple of 64 bytes memcpy performance

Long Li (4):
  net/mana: use datapath logging
  net/mana: avoid unnecessary assignments in data path
  net/mana: optimize completion queue by batch processing
  net/mana: return probing failure if no device found

Long Wu (3):
  net/nfp: fix control mempool creation
  net/nfp: fix representor creation
  net/nfp: fix flow hash table creation

Mattias Rönnblom (1):
  event/dsw: free rings on close

Maxime Coquelin (2):
  vhost: fix notification stats for packed ring
  vhost: fix invalid call FD handling

Michael Baum (1):
  doc: fix format in flow API guide

Mingjin Ye (2):
  net/ice: fix statistics
  net/ice: fix DCF control thread crash

Nithin Dabilpuram (1):
  common/cnxk: fix inline device VF identification

Pavan Nikhilesh (2):
  doc: fix event timer adapter guide
  event/cnxk: fix nanoseconds to ticks conversion

Philip Prindeville (1):
  vfio: fix include with musl runtime

Qi Zhang (2):
  common/idpf: remove device stop flag
  net/ice: initialize parser for double VLAN

Qiming Yang (2):
  net/ice/base: fix incorrect defines for DCBx
  net/ice/base: remove unreachable code

Qin Ke (1):
  net/nfp: fix disabling promiscuous mode

Rahul Bhansali (4):
  examples/ipsec-secgw: fix zero address in ethernet header
  common/cnxk: fix IPsec IPv6 tunnel address byte swap
  event/cnxk: fix Tx adapter data pointer
  event/cnxk: fix mempool cookies check

Rakesh Kudurumalla (1):
  common/cnxk: fix receive queue with multiple mask

Raslan Darawsheh (1):
  app/testpmd: fix GTP L2 length in checksum engine

Ronak Doshi (1):
  net/vmxnet3: fix drop of empty segments in Tx

Rongwei Liu (4):
  net/mlx5: fix matcher layout size calculation
  net/mlx5: fix VXLAN matching with zero value
  net/mlx5: forbid duplicated tag index in pattern template
  net/mlx5: fix duplicated tag index matching in SWS

Ruifeng Wang (4):
  test/malloc: fix missing free
  test/malloc: fix statistics checks
  build: fix warning when getting NUMA nodes
  test/mbuf: fix crash in a forked process

Saoirse O'Donovan (3):
  test/crypto: fix return value for SNOW3G
  crypto/openssl: fix memory free
  crypto/ipsec_mb: fix enqueue counter for SNOW3G

Satheesh Paul (2):
  common/cnxk: fix setting channel mask for SDP interfaces
  common/cnxk: fix uninitialized pointer read

Shijith Thotton (2):
  eventdev/timer: fix timeout event wait behavior
  event/cnxk: fix setting attributes in empty get work

Shiyang He (1):
  net/iavf: release large VF when closing device

Suanming Mou (1):
  ethdev: fix indirect action conversion

Tejasree Kondoj (3):
  test/crypto: fix session creation check
  crypto/cnxk: fix IPsec CCM capabilities
  test/crypto: fix IPsec AES CCM vector

Thierry Herbelot (1):
  doc: fix typo in cnxk platform guide

Thomas Monjalon (1):
  pci: fix comment referencing renamed function

Tianli Lai (1):
  net/dpaa2: fix checksum good flags

Wenjing Qiao (6):
  common/idpf/base: fix control queue send and receive
  common/idpf/base: fix ITR register definitions for AVF
  common/idpf/base: fix parameters when send msg to cp
  common/idpf/base: fix memory leaks on control queue
  net/ice: adjust timestamp mbuf register
  net/ice: fix timestamp enabling

Wenjun Wu (4):
  net/i40e: fix Rx data buffer size
  net/ice: fix Rx data buffer size
  net/iavf: fix Rx data buffer size
  net/idpf: fix Rx data buffer size

Yunjian Wang (2):
  ring: fix use after free
  net/txgbe: fix use-after-free on remove

Zhichao Zeng (1):
  net/ice: fix outer UDP checksum offload

Zhihong Wang (1):
  eal/linux: fix secondary process crash for mp hotplug requests

 .github/workflows/build.yml                   |   1 +
 .mailmap                                      |   9 +-
 app/test-pmd/csumonly.c                       |   2 +-
 app/test/test_cryptodev.c                     |  10 +-
 ...st_cryptodev_security_ipsec_test_vectors.h |   3 +-
 app/test/test_event_timer_adapter.c           | 165 +++++-------
 app/test/test_malloc.c                        |  21 +-
 app/test/test_mbuf.c                          |  50 +---
 config/meson.build                            |   2 +-
 doc/api/doxy-api.conf.in                      |   1 -
 doc/guides/nics/tap.rst                       |   8 +-
 doc/guides/platform/cnxk.rst                  |   2 +-
 doc/guides/prog_guide/event_timer_adapter.rst |   4 +-
 doc/guides/prog_guide/graph_lib.rst           |   2 +-
 doc/guides/prog_guide/rte_flow.rst            |  20 +-
 doc/guides/tools/cryptoperf.rst               |   1 -
 drivers/bus/pci/linux/pci_vfio.c              |   1 +
 drivers/common/cnxk/cnxk_security.c           |  16 ++
 drivers/common/cnxk/roc_dev.c                 |   1 +
 drivers/common/cnxk/roc_nix_inl.c             |   2 +-
 drivers/common/cnxk/roc_npa.h                 |  15 +-
 drivers/common/cnxk/roc_npc.c                 |  40 ++-
 drivers/common/cnxk/roc_npc_parse.c           |   1 +
 drivers/common/idpf/base/idpf_common.c        |  14 +-
 drivers/common/idpf/base/idpf_controlq.c      |  16 +-
 drivers/common/idpf/base/idpf_lan_pf_regs.h   |   9 +-
 drivers/common/idpf/base/idpf_lan_vf_regs.h   |  17 +-
 drivers/common/idpf/base/idpf_prototype.h     |   2 +-
 drivers/common/sfc_efx/base/efx.h             |  14 +
 drivers/common/sfc_efx/base/efx_impl.h        |   4 +
 drivers/common/sfc_efx/base/efx_mae.c         |  15 +-
 drivers/common/sfc_efx/version.map            |   1 +
 .../crypto/cnxk/cnxk_cryptodev_capabilities.c |   4 +-
 drivers/crypto/ipsec_mb/ipsec_mb_ops.c        |  17 +-
 drivers/crypto/ipsec_mb/pmd_snow3g.c          |  16 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |   6 +-
 drivers/crypto/qat/dev/qat_crypto_pmd_gens.h  |   3 +-
 drivers/crypto/scheduler/scheduler_pmd.c      |   3 +-
 drivers/dma/dpaa2/dpaa2_qdma.c                |   2 +
 drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h        |   4 +-
 drivers/event/cnxk/cn10k_worker.h             |  10 +-
 drivers/event/cnxk/cn9k_worker.h              |   6 +-
 drivers/event/cnxk/cnxk_eventdev.c            |   4 +-
 drivers/event/cnxk/cnxk_eventdev_adptr.c      |   1 +
 drivers/event/dsw/dsw_evdev.c                 |   4 +
 drivers/mempool/cnxk/cn10k_mempool_ops.c      |   3 +-
 drivers/net/dpaa2/dpaa2_rxtx.c                |  12 +-
 drivers/net/hns3/hns3_ethdev.c                | 240 ++++++++----------
 drivers/net/hns3/hns3_ethdev.h                |  15 --
 drivers/net/hns3/hns3_ethdev_vf.c             |   4 +-
 drivers/net/hns3/hns3_flow.c                  |   5 +-
 drivers/net/hns3/hns3_ptp.c                   |  46 +++-
 drivers/net/hns3/hns3_ptp.h                   |  48 ++++
 drivers/net/hns3/hns3_regs.c                  |   3 +-
 drivers/net/hns3/hns3_regs.h                  |  23 --
 drivers/net/hns3/hns3_rxtx.c                  |  37 ++-
 drivers/net/hns3/hns3_stats.c                 |   2 +-
 drivers/net/i40e/i40e_rxtx.c                  |   2 +
 drivers/net/i40e/i40e_rxtx.h                  |   3 +
 drivers/net/iavf/iavf_ethdev.c                |  17 +-
 drivers/net/iavf/iavf_rxtx.c                  |   1 +
 drivers/net/iavf/iavf_rxtx.h                  |   3 +
 drivers/net/iavf/iavf_vchnl.c                 |  71 ++++--
 drivers/net/ice/base/ice_adminq_cmd.h         |   4 +-
 drivers/net/ice/base/ice_sched.c              |  16 +-
 drivers/net/ice/base/ice_sched.h              |   5 +
 drivers/net/ice/ice_dcf.c                     |  12 +-
 drivers/net/ice/ice_dcf.h                     |   2 +
 drivers/net/ice/ice_dcf_ethdev.c              |   3 +-
 drivers/net/ice/ice_dcf_parent.c              |   6 +
 drivers/net/ice/ice_ethdev.c                  |  13 +
 drivers/net/ice/ice_generic_flow.c            |   5 +
 drivers/net/ice/ice_rxtx.c                    |  20 +-
 drivers/net/ice/ice_rxtx.h                    |   4 +
 drivers/net/idpf/idpf_ethdev.c                |   6 +-
 drivers/net/idpf/idpf_ethdev.h                |   2 -
 drivers/net/idpf/idpf_rxtx.c                  |   6 +-
 drivers/net/idpf/idpf_rxtx.h                  |   3 +
 drivers/net/mana/gdma.c                       | 115 +++++----
 drivers/net/mana/mana.c                       |  61 ++++-
 drivers/net/mana/mana.h                       |  30 +--
 drivers/net/mana/mp.c                         |   4 +-
 drivers/net/mana/mr.c                         |  77 +++---
 drivers/net/mana/rx.c                         |  58 ++---
 drivers/net/mana/tx.c                         |  94 +++----
 drivers/net/mlx5/linux/mlx5_os.c              |   4 +-
 drivers/net/mlx5/mlx5.h                       |   2 +-
 drivers/net/mlx5/mlx5_flow.c                  |  22 +-
 drivers/net/mlx5/mlx5_flow.h                  |   3 +-
 drivers/net/mlx5/mlx5_flow_dv.c               |  62 ++---
 drivers/net/mlx5/mlx5_flow_hw.c               |  25 +-
 drivers/net/mlx5/mlx5_flow_verbs.c            |   7 +-
 drivers/net/nfp/flower/nfp_flower.c           |   6 +-
 .../net/nfp/flower/nfp_flower_representor.c   |  17 +-
 drivers/net/nfp/nfp_flow.c                    |  75 ++++--
 drivers/net/nfp/nfp_flow.h                    |   1 +
 drivers/net/qede/qede_ethdev.c                |   1 +
 drivers/net/sfc/sfc_dp_rx.h                   |   1 +
 drivers/net/sfc/sfc_ef100_rx.c                |  18 +-
 drivers/net/sfc/sfc_mae.c                     |   2 +
 drivers/net/sfc/sfc_rx.c                      |   3 +
 drivers/net/tap/rte_eth_tap.c                 |   4 +-
 drivers/net/txgbe/txgbe_ethdev.c              |   3 +-
 drivers/net/virtio/virtio_ethdev.c            |  41 +--
 .../net/virtio/virtio_user/virtio_user_dev.c  |   7 +-
 drivers/net/vmxnet3/vmxnet3_rxtx.c            |  48 ++--
 examples/ip_pipeline/thread.c                 |   2 +-
 examples/ipsec-secgw/ipsec-secgw.c            |  20 +-
 examples/ipsec-secgw/ipsec-secgw.h            |   2 +-
 examples/ntb/ntb_fwd.c                        |   4 +-
 kernel/freebsd/contigmem/contigmem.c          |   4 +-
 kernel/linux/kni/kni_dev.h                    |   6 +-
 lib/cryptodev/rte_cryptodev.h                 |   7 +-
 lib/eal/common/eal_common_debug.c             |   4 +-
 lib/eal/freebsd/eal.c                         |  10 +
 lib/eal/linux/eal.c                           |  22 +-
 lib/eal/linux/eal_memory.c                    |  51 ++--
 lib/eal/x86/include/rte_memcpy.h              |   2 +-
 lib/ethdev/ethdev_driver.h                    |   6 +-
 lib/ethdev/rte_ethdev.c                       |  12 +-
 lib/ethdev/rte_ethdev.h                       |   4 +
 lib/ethdev/rte_flow.c                         |  10 +-
 lib/eventdev/rte_event_timer_adapter.c        |  17 +-
 lib/net/rte_ip.h                              |   2 +-
 lib/pci/rte_pci.h                             |   3 +-
 lib/pipeline/rte_swx_pipeline.c               |   2 +
 lib/ring/rte_ring.c                           |   8 +-
 lib/ring/rte_ring_elem_pvt.h                  |   8 +-
 lib/telemetry/telemetry.c                     |  21 +-
 lib/vhost/vhost.h                             |  10 +-
 130 files changed, 1334 insertions(+), 885 deletions(-)
 create mode 100644 drivers/net/hns3/hns3_ptp.h

--
2.25.1

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

* patch 'net: fix return type of IPv4 L4 packet checksum' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'kni: fix build with Linux 6.3' " Xueming Li
                   ` (128 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Elena Agostini; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 403d133d7f5a64347b7f79d69ce6d432a7673ea3 Mon Sep 17 00:00:00 2001
From: Elena Agostini <eagostini@nvidia.com>
Date: Thu, 6 Apr 2023 09:49:44 +0000
Subject: [PATCH] net: fix return type of IPv4 L4 packet checksum
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3b3fef9de22af80d173453ab65a80b01ce38cbfd ]

Function returns 0 or -1 but the return type is uint16_t.

Fixes: d178f693bbfe ("net: add UDP/TCP checksum in mbuf segments")

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
---
 lib/net/rte_ip.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h
index 9c8e8206f0..0cafb980ef 100644
--- a/lib/net/rte_ip.h
+++ b/lib/net/rte_ip.h
@@ -514,7 +514,7 @@ rte_ipv4_udptcp_cksum_verify(const struct rte_ipv4_hdr *ipv4_hdr,
  *   Return 0 if the checksum is correct, else -1.
  */
 __rte_experimental
-static inline uint16_t
+static inline int
 rte_ipv4_udptcp_cksum_mbuf_verify(const struct rte_mbuf *m,
 				  const struct rte_ipv4_hdr *ipv4_hdr,
 				  uint16_t l4_off)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.638496000 +0800
+++ 0001-net-fix-return-type-of-IPv4-L4-packet-checksum.patch	2023-06-25 14:31:58.285773900 +0800
@@ -1 +1 @@
-From 3b3fef9de22af80d173453ab65a80b01ce38cbfd Mon Sep 17 00:00:00 2001
+From 403d133d7f5a64347b7f79d69ce6d432a7673ea3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3b3fef9de22af80d173453ab65a80b01ce38cbfd ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index a310e9d498..e7106256aa 100644
+index 9c8e8206f0..0cafb980ef 100644

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

* patch 'kni: fix build with Linux 6.3' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
  2023-06-25  6:33 ` patch 'net: fix return type of IPv4 L4 packet checksum' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'examples/ip_pipeline: fix build with GCC 13' " Xueming Li
                   ` (127 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 156b423f54f532d3d89fa0a59276cf6751602900 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Fri, 14 Apr 2023 16:25:22 +0100
Subject: [PATCH] kni: fix build with Linux 6.3
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5f34cc454df420b9b2da8deb949fb76cba058b87 ]

KNI calls `get_user_pages_remote()` API which is using `FOLL_TOUCH`
flag, but `FOLL_TOUCH` is no more in public headers since v6.3,
causing a build error.

`FOLL_*` defines in Linux kernel first moved to another header [1],
later some of them moved to memory subsystem internal header [2] for 6.3

`get_user_pages_remote()` already sets `FOLL_TOUCH` internally,
no need to set this flag externally anyway, moving flag from the call
altogether.

[1]
Commit b5054174ac7c ("mm: move FOLL_* defs to mm_types.h")

[2]
Commit 2c2241081f7d ("mm/gup: move private gup FOLL_ flags to internal.h")

Fixes: e73831dc6c26 ("kni: support userspace VA")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 kernel/linux/kni/kni_dev.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
index a2c6d9fc1a..21bfb6890e 100644
--- a/kernel/linux/kni/kni_dev.h
+++ b/kernel/linux/kni/kni_dev.h
@@ -105,11 +105,9 @@ static inline phys_addr_t iova_to_phys(struct task_struct *tsk,
 
 	/* Read one page struct info */
 #ifdef HAVE_TSK_IN_GUP
-	ret = get_user_pages_remote(tsk, tsk->mm, iova, 1,
-				    FOLL_TOUCH, &page, NULL, NULL);
+	ret = get_user_pages_remote(tsk, tsk->mm, iova, 1, 0, &page, NULL, NULL);
 #else
-	ret = get_user_pages_remote(tsk->mm, iova, 1,
-				    FOLL_TOUCH, &page, NULL, NULL);
+	ret = get_user_pages_remote(tsk->mm, iova, 1, 0, &page, NULL, NULL);
 #endif
 	if (ret < 0)
 		return 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.661058400 +0800
+++ 0002-kni-fix-build-with-Linux-6.3.patch	2023-06-25 14:31:58.285773900 +0800
@@ -1 +1 @@
-From 5f34cc454df420b9b2da8deb949fb76cba058b87 Mon Sep 17 00:00:00 2001
+From 156b423f54f532d3d89fa0a59276cf6751602900 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5f34cc454df420b9b2da8deb949fb76cba058b87 ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org

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

* patch 'examples/ip_pipeline: fix build with GCC 13' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
  2023-06-25  6:33 ` patch 'net: fix return type of IPv4 L4 packet checksum' " Xueming Li
  2023-06-25  6:33 ` patch 'kni: fix build with Linux 6.3' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'examples/ntb: " Xueming Li
                   ` (126 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Cristian Dumitrescu, Ali Alnubani, Daxue Gao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 28aa18157845bc4794713fc01bbb450cdf8357c8 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Tue, 2 May 2023 19:20:44 +0530
Subject: [PATCH] examples/ip_pipeline: fix build with GCC 13
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit aae10e97710eb3b6a43a61e733ca0bbff47ab0c4 ]

Fix the following build issue by initializing req to NULL for
the local variable.

In function 'thread_msg_handle', inlined from 'thread_main' at
../examples/ip_pipeline/thread.c:3130:6:
../examples/ip_pipeline/thread.c:535:20: warning: 'req' may be used
uninitialized [-Wmaybe-uninitialized]
  535 |                 if (req == NULL)
      |                    ^
../examples/ip_pipeline/thread.c: In function 'thread_main':
../examples/ip_pipeline/thread.c:433:32: note: 'req' was declared here
  433 |         struct thread_msg_req *req;

Bugzilla ID: 1220
Fixes: a8bd581de397 ("examples/ip_pipeline: add thread runtime")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
---
 examples/ip_pipeline/thread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c
index 82d5f87c38..9817657ca9 100644
--- a/examples/ip_pipeline/thread.c
+++ b/examples/ip_pipeline/thread.c
@@ -430,7 +430,7 @@ thread_pipeline_disable(uint32_t thread_id,
 static inline struct thread_msg_req *
 thread_msg_recv(struct rte_ring *msgq_req)
 {
-	struct thread_msg_req *req;
+	struct thread_msg_req *req = NULL;
 
 	int status = rte_ring_sc_dequeue(msgq_req, (void **) &req);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.682167900 +0800
+++ 0003-examples-ip_pipeline-fix-build-with-GCC-13.patch	2023-06-25 14:31:58.285773900 +0800
@@ -1 +1 @@
-From aae10e97710eb3b6a43a61e733ca0bbff47ab0c4 Mon Sep 17 00:00:00 2001
+From 28aa18157845bc4794713fc01bbb450cdf8357c8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit aae10e97710eb3b6a43a61e733ca0bbff47ab0c4 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org

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

* patch 'examples/ntb: fix build with GCC 13' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (2 preceding siblings ...)
  2023-06-25  6:33 ` patch 'examples/ip_pipeline: fix build with GCC 13' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'ring: fix use after free' " Xueming Li
                   ` (125 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Ali Alnubani, Junfeng Guo, Daxue Gao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f9a20a28ecdc83ee76d696170a5ccb69afcb0518 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Thu, 4 May 2023 14:23:37 +0530
Subject: [PATCH] examples/ntb: fix build with GCC 13
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit dbff181d62c997f128b75db2bbac9f42e8dd0f8f ]

Fix the following build issue by not allowing nb_ids to be zero.
nb_ids can be zero based on rte_rawdev_xstats_get() API
documentation but it is not valid for the case when second
argument is NULL.

examples/ntb/ntb_fwd.c: In function 'ntb_stats_display':
examples/ntb/ntb_fwd.c:945:23: error: 'rte_rawdev_xstats_get'
accessing 8 bytes in a region of size 0 [-Werror=stringop-overflow=]
  945 | if (nb_ids != rte_rawdev_xstats_get(dev_id, ids, values, nb_ids)) {
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

examples/ntb/ntb_fwd.c:945:23: note: referencing argument 3
of type 'uint64_t[0]' {aka 'long unsigned int[]'}
In file included from ../examples/ntb/ntb_fwd.c:17:
lib/rawdev/rte_rawdev.h:504:1: note: in a call to function
'rte_rawdev_xstats_get'
  504 | rte_rawdev_xstats_get(uint16_t dev_id,

Fixes: 5194299d6ef5 ("examples/ntb: support more functions")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
---
 examples/ntb/ntb_fwd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index f9abed28e4..585aad9d70 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -865,7 +865,7 @@ ntb_stats_clear(void)
 
 	/* Clear NTB dev stats */
 	nb_ids = rte_rawdev_xstats_names_get(dev_id, NULL, 0);
-	if (nb_ids  < 0) {
+	if (nb_ids <= 0) {
 		printf("Error: Cannot get count of xstats\n");
 		return;
 	}
@@ -923,7 +923,7 @@ ntb_stats_display(void)
 
 	/* Get NTB dev stats and stats names */
 	nb_ids = rte_rawdev_xstats_names_get(dev_id, NULL, 0);
-	if (nb_ids  < 0) {
+	if (nb_ids <= 0) {
 		printf("Error: Cannot get count of xstats\n");
 		return;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.705277700 +0800
+++ 0004-examples-ntb-fix-build-with-GCC-13.patch	2023-06-25 14:31:58.285773900 +0800
@@ -1 +1 @@
-From dbff181d62c997f128b75db2bbac9f42e8dd0f8f Mon Sep 17 00:00:00 2001
+From f9a20a28ecdc83ee76d696170a5ccb69afcb0518 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dbff181d62c997f128b75db2bbac9f42e8dd0f8f ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org

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

* patch 'ring: fix use after free' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (3 preceding siblings ...)
  2023-06-25  6:33 ` patch 'examples/ntb: " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'vfio: fix include with musl runtime' " Xueming Li
                   ` (124 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Konstantin Ananyev, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 87427323441159c538e9f04724ae6eb55edb3804 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 5 May 2023 14:48:34 +0800
Subject: [PATCH] ring: fix use after free
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ce4bd6e14aa693c80c5218f7d896c98b3b85b54a ]

After the memzone is freed, it is not removed from the 'rte_ring_tailq'.
If rte_ring_lookup is called at this time, it will cause a use-after-free
problem. This change prevents that from happening.

Fixes: 4e32101f9b01 ("ring: support freeing")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/ring/rte_ring.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c
index cddaf6b287..d068ca4d37 100644
--- a/lib/ring/rte_ring.c
+++ b/lib/ring/rte_ring.c
@@ -332,11 +332,6 @@ rte_ring_free(struct rte_ring *r)
 		return;
 	}
 
-	if (rte_memzone_free(r->memzone) != 0) {
-		RTE_LOG(ERR, RING, "Cannot free memory\n");
-		return;
-	}
-
 	ring_list = RTE_TAILQ_CAST(rte_ring_tailq.head, rte_ring_list);
 	rte_mcfg_tailq_write_lock();
 
@@ -355,6 +350,9 @@ rte_ring_free(struct rte_ring *r)
 
 	rte_mcfg_tailq_write_unlock();
 
+	if (rte_memzone_free(r->memzone) != 0)
+		RTE_LOG(ERR, RING, "Cannot free memory\n");
+
 	rte_free(te);
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.727222000 +0800
+++ 0005-ring-fix-use-after-free.patch	2023-06-25 14:31:58.285773900 +0800
@@ -1 +1 @@
-From ce4bd6e14aa693c80c5218f7d896c98b3b85b54a Mon Sep 17 00:00:00 2001
+From 87427323441159c538e9f04724ae6eb55edb3804 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ce4bd6e14aa693c80c5218f7d896c98b3b85b54a ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 8ed455043d..057d25ff6f 100644
+index cddaf6b287..d068ca4d37 100644
@@ -24 +26 @@
-@@ -333,11 +333,6 @@ rte_ring_free(struct rte_ring *r)
+@@ -332,11 +332,6 @@ rte_ring_free(struct rte_ring *r)
@@ -36 +38 @@
-@@ -356,6 +351,9 @@ rte_ring_free(struct rte_ring *r)
+@@ -355,6 +350,9 @@ rte_ring_free(struct rte_ring *r)

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

* patch 'vfio: fix include with musl runtime' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (4 preceding siblings ...)
  2023-06-25  6:33 ` patch 'ring: fix use after free' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'kernel/freebsd: fix function parameter list' " Xueming Li
                   ` (123 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 47da40029596d48b8c183391c5eefc588677c347 Mon Sep 17 00:00:00 2001
From: Philip Prindeville <philipp@redfish-solutions.com>
Date: Sat, 20 May 2023 12:07:30 -0600
Subject: [PATCH] vfio: fix include with musl runtime
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c41a103c961ded5a0966652f4daf0a661a947352 ]

pread64() and pwrite64() are declared in <unistd.h> in MUSL and
other (i.e. not glibc) C runtimes.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 .mailmap                         | 1 +
 drivers/bus/pci/linux/pci_vfio.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/.mailmap b/.mailmap
index 5dc95a9d07..12939e3bff 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1045,6 +1045,7 @@ Peter Spreadborough <peter.spreadborough@broadcom.com>
 Petr Houska <t-pehous@microsoft.com>
 Phanendra Vukkisala <pvukkisala@marvell.com>
 Phil Yang <phil.yang@arm.com>
+Philip Prindeville <philipp@redfish-solutions.com>
 Pierre Pfister <ppfister@cisco.com>
 Piotr Azarewicz <piotr.azarewicz@intel.com> <piotrx.t.azarewicz@intel.com>
 Piotr Bartosiewicz <piotr.bartosiewicz@atendesoftware.pl>
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index fab3483d9f..fe83e1a04e 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -2,6 +2,7 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include <unistd.h>
 #include <string.h>
 #include <fcntl.h>
 #include <linux/pci_regs.h>
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.758885100 +0800
+++ 0006-vfio-fix-include-with-musl-runtime.patch	2023-06-25 14:31:58.285773900 +0800
@@ -1 +1 @@
-From c41a103c961ded5a0966652f4daf0a661a947352 Mon Sep 17 00:00:00 2001
+From 47da40029596d48b8c183391c5eefc588677c347 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c41a103c961ded5a0966652f4daf0a661a947352 ]
@@ -9,2 +11,0 @@
-Cc: stable@dpdk.org
-
@@ -19 +20 @@
-index 0443e461a9..db85cc66c6 100644
+index 5dc95a9d07..12939e3bff 100644
@@ -22 +23 @@
-@@ -1058,6 +1058,7 @@ Peter Spreadborough <peter.spreadborough@broadcom.com>
+@@ -1045,6 +1045,7 @@ Peter Spreadborough <peter.spreadborough@broadcom.com>

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

* patch 'kernel/freebsd: fix function parameter list' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (5 preceding siblings ...)
  2023-06-25  6:33 ` patch 'vfio: fix include with musl runtime' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'telemetry: fix autotest on Alpine' " Xueming Li
                   ` (122 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: John Baldwin, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f14b25d9250403c24d0c46a97a38df6f5c5b1fb8 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 22 May 2023 10:22:41 +0100
Subject: [PATCH] kernel/freebsd: fix function parameter list
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 12b7ef3c4a6262e1c0f747bd0037a3a8df38ab4c ]

Functions which take no parameters should explicitly have "(void)" as
the parameter list, rather than "()".

Reported upstream on FreeBSD ports collection [1].

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271524

Fixes: 764bf26873b9 ("add FreeBSD support")

Reported-by: John Baldwin <jhb@freebsd.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 kernel/freebsd/contigmem/contigmem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/freebsd/contigmem/contigmem.c b/kernel/freebsd/contigmem/contigmem.c
index bd72f4d620..7dd87599d9 100644
--- a/kernel/freebsd/contigmem/contigmem.c
+++ b/kernel/freebsd/contigmem/contigmem.c
@@ -111,7 +111,7 @@ static struct cdevsw contigmem_ops = {
 };
 
 static int
-contigmem_load()
+contigmem_load(void)
 {
 	char index_string[8], description[32];
 	int  i, error = 0;
@@ -178,7 +178,7 @@ error:
 }
 
 static int
-contigmem_unload()
+contigmem_unload(void)
 {
 	int i;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.784411700 +0800
+++ 0007-kernel-freebsd-fix-function-parameter-list.patch	2023-06-25 14:31:58.285773900 +0800
@@ -1 +1 @@
-From 12b7ef3c4a6262e1c0f747bd0037a3a8df38ab4c Mon Sep 17 00:00:00 2001
+From f14b25d9250403c24d0c46a97a38df6f5c5b1fb8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 12b7ef3c4a6262e1c0f747bd0037a3a8df38ab4c ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* patch 'telemetry: fix autotest on Alpine' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (6 preceding siblings ...)
  2023-06-25  6:33 ` patch 'kernel/freebsd: fix function parameter list' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'ring: fix dequeue parameter name' " Xueming Li
                   ` (121 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 57dd0e53b1cba93311a851d7d9a07084998a16ab Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 5 Apr 2023 17:03:22 +0100
Subject: [PATCH] telemetry: fix autotest on Alpine
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6ffce64857216344f02ee88d92cb69ee241b3c7b ]

On Alpine linux, the telemetry_data_autotest was failing for the
test where we had dictionaries embedded in other dictionaries up
to three levels deep. Indications are that this issue is due to
excess data being stored on the stack, so replace stack-allocated
buffer data with dynamically allocated data in the case where we
are doing recursive processing of telemetry data structures into
json.

Bugzilla ID: 1177
Fixes: c933bb5177ca ("telemetry: support array values in data object")
Fixes: d2671e642a8e ("telemetry: support dict of dicts")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/telemetry/telemetry.c | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index 7b905355cd..9c3c346ff5 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -208,7 +208,11 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
 				break;
 			case RTE_TEL_CONTAINER:
 			{
-				char temp[buf_len];
+				char *temp = malloc(buf_len);
+				if (temp == NULL)
+					break;
+				*temp = '\0';  /* ensure valid string */
+
 				const struct container *cont =
 						&v->value.container;
 				if (container_to_json(cont->data,
@@ -219,6 +223,7 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
 							v->name, temp);
 				if (!cont->keep)
 					rte_tel_data_free(cont->data);
+				free(temp);
 				break;
 			}
 			}
@@ -275,7 +280,11 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
 				break;
 			case RTE_TEL_CONTAINER:
 			{
-				char temp[buf_len];
+				char *temp = malloc(buf_len);
+				if (temp == NULL)
+					break;
+				*temp = '\0';  /* ensure valid string */
+
 				const struct container *cont =
 						&v->value.container;
 				if (container_to_json(cont->data,
@@ -286,6 +295,7 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
 							v->name, temp);
 				if (!cont->keep)
 					rte_tel_data_free(cont->data);
+				free(temp);
 			}
 			}
 		}
@@ -311,7 +321,11 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
 						buf_len, used,
 						d->data.array[i].u64val);
 			else if (d->type == RTE_TEL_ARRAY_CONTAINER) {
-				char temp[buf_len];
+				char *temp = malloc(buf_len);
+				if (temp == NULL)
+					break;
+				*temp = '\0';  /* ensure valid string */
+
 				const struct container *rec_data =
 						&d->data.array[i].container;
 				if (container_to_json(rec_data->data,
@@ -321,6 +335,7 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
 							buf_len, used, temp);
 				if (!rec_data->keep)
 					rte_tel_data_free(rec_data->data);
+				free(temp);
 			}
 		break;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.806434800 +0800
+++ 0008-telemetry-fix-autotest-on-Alpine.patch	2023-06-25 14:31:58.285773900 +0800
@@ -1 +1 @@
-From 6ffce64857216344f02ee88d92cb69ee241b3c7b Mon Sep 17 00:00:00 2001
+From 57dd0e53b1cba93311a851d7d9a07084998a16ab Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6ffce64857216344f02ee88d92cb69ee241b3c7b ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index deba7f34a3..590720bfa6 100644
+index 7b905355cd..9c3c346ff5 100644
@@ -73,2 +75,2 @@
- 						d->data.array[i].uval);
- 			else if (d->type == TEL_ARRAY_CONTAINER) {
+ 						d->data.array[i].u64val);
+ 			else if (d->type == RTE_TEL_ARRAY_CONTAINER) {

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

* patch 'ring: fix dequeue parameter name' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (7 preceding siblings ...)
  2023-06-25  6:33 ` patch 'telemetry: fix autotest on Alpine' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'pipeline: fix double free for table stats' " Xueming Li
                   ` (120 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng Wang, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cada66aff2a95228c980d8d48eaab7aacd043f69 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Fri, 7 Apr 2023 16:48:25 +0800
Subject: [PATCH] ring: fix dequeue parameter name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b632e76751ff9797e36531305638e1cbd14ffa09 ]

Ring dequeue operation's parameters name should be 'cons_xx',
rather than 'prod_xxx'.

Fixes: 1fc73390bcf5 ("ring: refactor exported headers")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/ring/rte_ring_elem_pvt.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/ring/rte_ring_elem_pvt.h b/lib/ring/rte_ring_elem_pvt.h
index e24e4492ff..4b80f58980 100644
--- a/lib/ring/rte_ring_elem_pvt.h
+++ b/lib/ring/rte_ring_elem_pvt.h
@@ -194,12 +194,12 @@ __rte_ring_dequeue_elems_32(struct rte_ring *r, const uint32_t size,
 }
 
 static __rte_always_inline void
-__rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t prod_head,
+__rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t cons_head,
 		void *obj_table, uint32_t n)
 {
 	unsigned int i;
 	const uint32_t size = r->size;
-	uint32_t idx = prod_head & r->mask;
+	uint32_t idx = cons_head & r->mask;
 	uint64_t *ring = (uint64_t *)&r[1];
 	unaligned_uint64_t *obj = (unaligned_uint64_t *)obj_table;
 	if (likely(idx + n <= size)) {
@@ -227,12 +227,12 @@ __rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t prod_head,
 }
 
 static __rte_always_inline void
-__rte_ring_dequeue_elems_128(struct rte_ring *r, uint32_t prod_head,
+__rte_ring_dequeue_elems_128(struct rte_ring *r, uint32_t cons_head,
 		void *obj_table, uint32_t n)
 {
 	unsigned int i;
 	const uint32_t size = r->size;
-	uint32_t idx = prod_head & r->mask;
+	uint32_t idx = cons_head & r->mask;
 	rte_int128_t *ring = (rte_int128_t *)&r[1];
 	rte_int128_t *obj = (rte_int128_t *)obj_table;
 	if (likely(idx + n <= size)) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.834717200 +0800
+++ 0009-ring-fix-dequeue-parameter-name.patch	2023-06-25 14:31:58.285773900 +0800
@@ -1 +1 @@
-From b632e76751ff9797e36531305638e1cbd14ffa09 Mon Sep 17 00:00:00 2001
+From cada66aff2a95228c980d8d48eaab7aacd043f69 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b632e76751ff9797e36531305638e1cbd14ffa09 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'pipeline: fix double free for table stats' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (8 preceding siblings ...)
  2023-06-25  6:33 ` patch 'ring: fix dequeue parameter name' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'test/malloc: fix missing free' " Xueming Li
                   ` (119 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Kamalakannan R; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2d3c4df8f53c505bb3dfd31311bf86fb9af5a4af Mon Sep 17 00:00:00 2001
From: Kamalakannan R <kamalakannan.r@intel.com>
Date: Mon, 17 Apr 2023 16:52:43 +0530
Subject: [PATCH] pipeline: fix double free for table stats
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2d9e10932d535ea553081b489a25f6fce7ec7996 ]

The pointer to the table statistics data structure needs to be set
to NULL after free inside the table_build_free(), as this function is
called from multiple places, leading to double memory free error.

Similar fix for the learner_build_free() function.

Fixes: 742b0a57f50e ("pipeline: add table statistics to SWX")
Fixes: 4f59d3726147 ("pipeline: support learner tables")

Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/pipeline/rte_swx_pipeline.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
index 0e631dea2b..084c614639 100644
--- a/lib/pipeline/rte_swx_pipeline.c
+++ b/lib/pipeline/rte_swx_pipeline.c
@@ -8450,6 +8450,7 @@ table_build_free(struct rte_swx_pipeline *p)
 			free(p->table_stats[i].n_pkts_action);
 
 		free(p->table_stats);
+		p->table_stats = NULL;
 	}
 }
 
@@ -9364,6 +9365,7 @@ learner_build_free(struct rte_swx_pipeline *p)
 			free(p->learner_stats[i].n_pkts_action);
 
 		free(p->learner_stats);
+		p->learner_stats = NULL;
 	}
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.859207400 +0800
+++ 0010-pipeline-fix-double-free-for-table-stats.patch	2023-06-25 14:31:58.295773900 +0800
@@ -1 +1 @@
-From 2d9e10932d535ea553081b489a25f6fce7ec7996 Mon Sep 17 00:00:00 2001
+From 2d3c4df8f53c505bb3dfd31311bf86fb9af5a4af Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2d9e10932d535ea553081b489a25f6fce7ec7996 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index dea1378095..da37eda231 100644
+index 0e631dea2b..084c614639 100644
@@ -26 +28 @@
-@@ -8665,6 +8665,7 @@ table_build_free(struct rte_swx_pipeline *p)
+@@ -8450,6 +8450,7 @@ table_build_free(struct rte_swx_pipeline *p)
@@ -34 +36 @@
-@@ -9579,6 +9580,7 @@ learner_build_free(struct rte_swx_pipeline *p)
+@@ -9364,6 +9365,7 @@ learner_build_free(struct rte_swx_pipeline *p)

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

* patch 'test/malloc: fix missing free' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (9 preceding siblings ...)
  2023-06-25  6:33 ` patch 'pipeline: fix double free for table stats' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'test/malloc: fix statistics checks' " Xueming Li
                   ` (118 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Feifei Wang, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 37e859deb8317a8208b160090eb607c4257adad6 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Fri, 19 May 2023 12:29:22 +0800
Subject: [PATCH] test/malloc: fix missing free
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ec8ef136b8d9340003118bb25390d7c6989178bf ]

Free the allocated buffer before returning.

Fixes: a40a1f8231b4 ("app: various tests update")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Feifei Wang <feifei.wang2@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_malloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index de40e50611..f144b89d88 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -937,6 +937,7 @@ test_alloc_single_socket(int32_t socket)
 	if (mem == NULL)
 		return -1;
 	if (addr_to_socket(mem) != desired_socket) {
+		rte_free(mem);
 		return -1;
 	}
 	rte_free(mem);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.885436900 +0800
+++ 0011-test-malloc-fix-missing-free.patch	2023-06-25 14:31:58.295773900 +0800
@@ -1 +1 @@
-From ec8ef136b8d9340003118bb25390d7c6989178bf Mon Sep 17 00:00:00 2001
+From 37e859deb8317a8208b160090eb607c4257adad6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ec8ef136b8d9340003118bb25390d7c6989178bf ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'test/malloc: fix statistics checks' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (10 preceding siblings ...)
  2023-06-25  6:33 ` patch 'test/malloc: fix missing free' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'eal: avoid calling cleanup twice' " Xueming Li
                   ` (117 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Feifei Wang, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6413085d5fa6c8404ba519bd56d531c3ff006bdc Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Fri, 19 May 2023 12:29:23 +0800
Subject: [PATCH] test/malloc: fix statistics checks
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 19606f83e6c1dffea9bda42a792e1cbbc6d5a043 ]

The case expects all stats to be equal.
Therefore the negative conditions in check should be logically or'ed.

Fixes: a40a1f8231b4 ("app: various tests update")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Feifei Wang <feifei.wang2@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_malloc.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index f144b89d88..ff081dd931 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -302,11 +302,11 @@ test_multi_alloc_statistics(void)
 	rte_malloc_get_socket_stats(socket,&post_stats);
 	/* Check statistics reported are correct */
 	/* All post stats should be equal to pre stats after alloc freed */
-	if ((post_stats.heap_totalsz_bytes != pre_stats.heap_totalsz_bytes) &&
-			(post_stats.heap_freesz_bytes!=pre_stats.heap_freesz_bytes) &&
-			(post_stats.heap_allocsz_bytes!=pre_stats.heap_allocsz_bytes)&&
-			(post_stats.alloc_count!=pre_stats.alloc_count)&&
-			(post_stats.free_count!=pre_stats.free_count)) {
+	if ((post_stats.heap_totalsz_bytes != pre_stats.heap_totalsz_bytes) ||
+			(post_stats.heap_freesz_bytes != pre_stats.heap_freesz_bytes) ||
+			(post_stats.heap_allocsz_bytes != pre_stats.heap_allocsz_bytes) ||
+			(post_stats.alloc_count != pre_stats.alloc_count) ||
+			(post_stats.free_count != pre_stats.free_count)) {
 		printf("Malloc statistics are incorrect - freed alloc\n");
 		return -1;
 	}
@@ -363,11 +363,11 @@ test_multi_alloc_statistics(void)
 		return -1;
 	}
 
-	if ((post_stats.heap_totalsz_bytes != pre_stats.heap_totalsz_bytes) &&
-			(post_stats.heap_freesz_bytes!=pre_stats.heap_freesz_bytes) &&
-			(post_stats.heap_allocsz_bytes!=pre_stats.heap_allocsz_bytes)&&
-			(post_stats.alloc_count!=pre_stats.alloc_count)&&
-			(post_stats.free_count!=pre_stats.free_count)) {
+	if ((post_stats.heap_totalsz_bytes != pre_stats.heap_totalsz_bytes) ||
+			(post_stats.heap_freesz_bytes != pre_stats.heap_freesz_bytes) ||
+			(post_stats.heap_allocsz_bytes != pre_stats.heap_allocsz_bytes) ||
+			(post_stats.alloc_count != pre_stats.alloc_count) ||
+			(post_stats.free_count != pre_stats.free_count)) {
 		printf("Malloc statistics are incorrect - freed alloc\n");
 		return -1;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.907995900 +0800
+++ 0012-test-malloc-fix-statistics-checks.patch	2023-06-25 14:31:58.295773900 +0800
@@ -1 +1 @@
-From 19606f83e6c1dffea9bda42a792e1cbbc6d5a043 Mon Sep 17 00:00:00 2001
+From 6413085d5fa6c8404ba519bd56d531c3ff006bdc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 19606f83e6c1dffea9bda42a792e1cbbc6d5a043 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'eal: avoid calling cleanup twice' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (11 preceding siblings ...)
  2023-06-25  6:33 ` patch 'test/malloc: fix statistics checks' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'ci: fix build for Arm cross compilation in GHA' " Xueming Li
                   ` (116 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 94babf61c59fd4d0089e5131975fb3071c4247b6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 1 Jun 2023 17:08:55 +0100
Subject: [PATCH] eal: avoid calling cleanup twice
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a4a2ac988679b3802a574e7bb72154da177449a4 ]

If an app calls rte_eal_cleanup() inside it's own code, then cleanup
could be called a second time automatically when the app exits. While
mostly harmless, we can avoid any potential issues by guaranteeing that
cleanup only gets called once, in the same way that eal_init only ever
gets called once.

Note: This patch only touches Linux and FreeBSD. Windows EAL does not
have run-once guard on the init function, so omitting it in the cleanup
function.

Fixes: aec9c13c5257 ("eal: add function to release internal resources")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/eal/common/eal_common_debug.c |  4 +++-
 lib/eal/freebsd/eal.c             | 10 ++++++++++
 lib/eal/linux/eal.c               | 10 ++++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/lib/eal/common/eal_common_debug.c b/lib/eal/common/eal_common_debug.c
index dcb554af1e..9cac9c6390 100644
--- a/lib/eal/common/eal_common_debug.c
+++ b/lib/eal/common/eal_common_debug.c
@@ -4,10 +4,12 @@
 
 #include <stdarg.h>
 #include <stdlib.h>
+#include <errno.h>
 
 #include <rte_eal.h>
 #include <rte_log.h>
 #include <rte_debug.h>
+#include <rte_errno.h>
 
 void
 __rte_panic(const char *funcname, const char *format, ...)
@@ -39,7 +41,7 @@ rte_exit(int exit_code, const char *format, ...)
 	rte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap);
 	va_end(ap);
 
-	if (rte_eal_cleanup() != 0)
+	if (rte_eal_cleanup() != 0 && rte_errno != EALREADY)
 		RTE_LOG(CRIT, EAL,
 			"EAL could not release all resources\n");
 	exit(exit_code);
diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
index 390e4257ff..122daf6c1f 100644
--- a/lib/eal/freebsd/eal.c
+++ b/lib/eal/freebsd/eal.c
@@ -889,6 +889,16 @@ rte_eal_init(int argc, char **argv)
 int
 rte_eal_cleanup(void)
 {
+	static uint32_t run_once;
+	uint32_t has_run = 0;
+
+	if (!__atomic_compare_exchange_n(&run_once, &has_run, 1, 0,
+			__ATOMIC_RELAXED, __ATOMIC_RELAXED)) {
+		RTE_LOG(WARNING, EAL, "Already called cleanup\n");
+		rte_errno = EALREADY;
+		return -1;
+	}
+
 	struct internal_config *internal_conf =
 		eal_get_internal_configuration();
 	rte_service_finalize();
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index c76f026023..7b0eafd565 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -1354,6 +1354,16 @@ mark_freeable(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
 int
 rte_eal_cleanup(void)
 {
+	static uint32_t run_once;
+	uint32_t has_run = 0;
+
+	if (!__atomic_compare_exchange_n(&run_once, &has_run, 1, 0,
+					__ATOMIC_RELAXED, __ATOMIC_RELAXED)) {
+		RTE_LOG(WARNING, EAL, "Already called cleanup\n");
+		rte_errno = EALREADY;
+		return -1;
+	}
+
 	/* if we're in a primary process, we need to mark hugepages as freeable
 	 * so that finalization can release them back to the system.
 	 */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.929963600 +0800
+++ 0013-eal-avoid-calling-cleanup-twice.patch	2023-06-25 14:31:58.295773900 +0800
@@ -1 +1 @@
-From a4a2ac988679b3802a574e7bb72154da177449a4 Mon Sep 17 00:00:00 2001
+From 94babf61c59fd4d0089e5131975fb3071c4247b6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a4a2ac988679b3802a574e7bb72154da177449a4 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -53 +55 @@
-index 7daf22e314..78ffb45c59 100644
+index 390e4257ff..122daf6c1f 100644
@@ -56 +58 @@
-@@ -902,6 +902,16 @@ rte_eal_init(int argc, char **argv)
+@@ -889,6 +889,16 @@ rte_eal_init(int argc, char **argv)
@@ -74 +76 @@
-index ae323cd492..90e05fe4de 100644
+index c76f026023..7b0eafd565 100644
@@ -77 +79 @@
-@@ -1365,6 +1365,16 @@ mark_freeable(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
+@@ -1354,6 +1354,16 @@ mark_freeable(const struct rte_memseg_list *msl, const struct rte_memseg *ms,

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

* patch 'ci: fix build for Arm cross compilation in GHA' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (12 preceding siblings ...)
  2023-06-25  6:33 ` patch 'eal: avoid calling cleanup twice' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'build: fix warning when getting NUMA nodes' " Xueming Li
                   ` (115 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 44a9b3b4f73838396e7b8afb397e7007e70c2d26 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 6 Jun 2023 12:52:47 +0200
Subject: [PATCH] ci: fix build for Arm cross compilation in GHA
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ab1e3c7eda0972454fcdb160d03863d068aa9159 ]

We are hitting a storage limit when linking binaries statically.
On the other hand, native builds are tested in other part of the CI and
the chance of breaking static linking only is relatively low, so let's
simply test linking against shared libraries.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .github/workflows/build.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 04a975c787..735c58ef2b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -53,6 +53,7 @@ jobs:
             cross: mingw
           - os: ubuntu-20.04
             compiler: gcc
+            library: shared
             cross: aarch64
           - os: ubuntu-20.04
             compiler: gcc
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.952882700 +0800
+++ 0014-ci-fix-build-for-Arm-cross-compilation-in-GHA.patch	2023-06-25 14:31:58.295773900 +0800
@@ -1 +1 @@
-From ab1e3c7eda0972454fcdb160d03863d068aa9159 Mon Sep 17 00:00:00 2001
+From 44a9b3b4f73838396e7b8afb397e7007e70c2d26 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ab1e3c7eda0972454fcdb160d03863d068aa9159 ]
@@ -11,2 +13,0 @@
-Cc: stable@dpdk.org
-
@@ -21 +22 @@
-index 7322eb59b7..3b629fcdbd 100644
+index 04a975c787..735c58ef2b 100644

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

* patch 'build: fix warning when getting NUMA nodes' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (13 preceding siblings ...)
  2023-06-25  6:33 ` patch 'ci: fix build for Arm cross compilation in GHA' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'pci: fix comment referencing renamed function' " Xueming Li
                   ` (114 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c3b5322fc3e5a4ee9cac7fa6b31820dd78208608 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Mon, 29 May 2023 13:57:51 +0800
Subject: [PATCH] build: fix warning when getting NUMA nodes
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bb7978284190c0e0dea6aa093a4eec4c6c36503a ]

Meson gives warnings on calls to run_command when there is
a missing "check" parameter. Most of the occurrences has been fixed.
Fixed the remaining one in this change.

Fixes: ecb904cc4596 ("build: fix warnings when running external commands")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/meson.build b/config/meson.build
index fc3ac99a32..7cd375e991 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -366,7 +366,7 @@ if max_numa_nodes == 'detect'
         error('Discovery of max_numa_nodes not supported for cross-compilation.')
     endif
     # overwrite the default value with discovered values
-    max_numa_nodes = run_command(get_numa_count_cmd).stdout().to_int()
+    max_numa_nodes = run_command(get_numa_count_cmd, check: true).stdout().to_int()
     message('Found @0@ numa nodes'.format(max_numa_nodes))
     dpdk_conf.set('RTE_MAX_NUMA_NODES', max_numa_nodes)
 elif max_numa_nodes != 'default'
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.974314000 +0800
+++ 0015-build-fix-warning-when-getting-NUMA-nodes.patch	2023-06-25 14:31:58.295773900 +0800
@@ -1 +1 @@
-From bb7978284190c0e0dea6aa093a4eec4c6c36503a Mon Sep 17 00:00:00 2001
+From c3b5322fc3e5a4ee9cac7fa6b31820dd78208608 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bb7978284190c0e0dea6aa093a4eec4c6c36503a ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index fa730a1b14..65087ce090 100644
+index fc3ac99a32..7cd375e991 100644

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

* patch 'pci: fix comment referencing renamed function' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (14 preceding siblings ...)
  2023-06-25  6:33 ` patch 'build: fix warning when getting NUMA nodes' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'eal/x86: improve multiple of 64 bytes memcpy performance' " Xueming Li
                   ` (113 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f4ccd390562960cff1d9e39c5f9f85f496911531 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Tue, 30 May 2023 18:02:15 +0200
Subject: [PATCH] pci: fix comment referencing renamed function
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 61f551995030e2d114ccbcaa8a63c8cc052d21b5 ]

When renaming functions eal_parse_pci_*,
a referencing comment was missed in the function rte_pci_device_name().

Fixes: ca52fccbb3b9 ("pci: remove deprecated functions")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/pci/rte_pci.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/pci/rte_pci.h b/lib/pci/rte_pci.h
index 5088157e74..aab761b918 100644
--- a/lib/pci/rte_pci.h
+++ b/lib/pci/rte_pci.h
@@ -104,8 +104,7 @@ struct rte_pci_addr {
 
 /**
  * Utility function to write a pci device name, this device name can later be
- * used to retrieve the corresponding rte_pci_addr using eal_parse_pci_*
- * BDF helpers.
+ * used to retrieve the corresponding rte_pci_addr using rte_pci_addr_parse().
  *
  * @param addr
  *	The PCI Bus-Device-Function address
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:58.995899700 +0800
+++ 0016-pci-fix-comment-referencing-renamed-function.patch	2023-06-25 14:31:58.295773900 +0800
@@ -1 +1 @@
-From 61f551995030e2d114ccbcaa8a63c8cc052d21b5 Mon Sep 17 00:00:00 2001
+From f4ccd390562960cff1d9e39c5f9f85f496911531 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 61f551995030e2d114ccbcaa8a63c8cc052d21b5 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'eal/x86: improve multiple of 64 bytes memcpy performance' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (15 preceding siblings ...)
  2023-06-25  6:33 ` patch 'pci: fix comment referencing renamed function' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'eventdev/timer: fix timeout event wait behavior' " Xueming Li
                   ` (112 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Leyi Rong
  Cc: Morten Brørup, Bruce Richardson, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5ecf2e459d480631a3dbe7b77157ace8cef76b33 Mon Sep 17 00:00:00 2001
From: Leyi Rong <leyi.rong@intel.com>
Date: Wed, 29 Mar 2023 17:16:58 +0800
Subject: [PATCH] eal/x86: improve multiple of 64 bytes memcpy performance
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2ef17be88e8b26f871cfb0265227341e36f486ea ]

In rte_memcpy_aligned(), one redundant round is taken in the 64 bytes
block copy loops if the size is a multiple of 64. So, let the catch-up
copy the last 64 bytes in this case.

Fixes: f5472703c0bd ("eal: optimize aligned memcpy on x86")

Suggested-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/eal/x86/include/rte_memcpy.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/x86/include/rte_memcpy.h b/lib/eal/x86/include/rte_memcpy.h
index d4d7a5cfc8..fd151be708 100644
--- a/lib/eal/x86/include/rte_memcpy.h
+++ b/lib/eal/x86/include/rte_memcpy.h
@@ -846,7 +846,7 @@ rte_memcpy_aligned(void *dst, const void *src, size_t n)
 	}
 
 	/* Copy 64 bytes blocks */
-	for (; n >= 64; n -= 64) {
+	for (; n > 64; n -= 64) {
 		rte_mov64((uint8_t *)dst, (const uint8_t *)src);
 		dst = (uint8_t *)dst + 64;
 		src = (const uint8_t *)src + 64;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.018237100 +0800
+++ 0017-eal-x86-improve-multiple-of-64-bytes-memcpy-performa.patch	2023-06-25 14:31:58.295773900 +0800
@@ -1 +1 @@
-From 2ef17be88e8b26f871cfb0265227341e36f486ea Mon Sep 17 00:00:00 2001
+From 5ecf2e459d480631a3dbe7b77157ace8cef76b33 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2ef17be88e8b26f871cfb0265227341e36f486ea ]

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

* patch 'eventdev/timer: fix timeout event wait behavior' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (16 preceding siblings ...)
  2023-06-25  6:33 ` patch 'eal/x86: improve multiple of 64 bytes memcpy performance' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'doc: fix event timer adapter guide' " Xueming Li
                   ` (111 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Shijith Thotton; +Cc: Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ca72f7fdba88330e11575640a89bbfaacdb9d054 Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Tue, 21 Mar 2023 10:50:23 +0530
Subject: [PATCH] eventdev/timer: fix timeout event wait behavior
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fb9c213317b5e07918c9306f2036f8cc07126a85 ]

Improved the accuracy and consistency of timeout event wait behavior by
refactoring it. Previously, the delay function used for waiting could be
inaccurate, leading to inconsistent results. This commit updates the
wait behavior to use a timeout-based approach, enabling the wait for the
exact number of timer ticks before proceeding.

The new function timeout_event_dequeue mimics the behavior of the tested
systems closely. It dequeues timer expiry events until either the
expected number of events have been dequeued or the specified time has
elapsed. The WAIT_TICKS macro defines the waiting behavior based on the
type of timer being used (software or hardware).

Fixes: d1f3385d0076 ("test: add event timer adapter auto-test")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 app/test/test_event_timer_adapter.c | 165 +++++++++++-----------------
 1 file changed, 67 insertions(+), 98 deletions(-)

diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c
index 1a440dfd10..12d5936c60 100644
--- a/app/test/test_event_timer_adapter.c
+++ b/app/test/test_event_timer_adapter.c
@@ -57,9 +57,10 @@ static uint64_t global_bkt_tck_ns;
 static uint64_t global_info_bkt_tck_ns;
 static volatile uint8_t arm_done;
 
-#define CALC_TICKS(tks)					\
-	ceil((double)(tks * global_bkt_tck_ns) / global_info_bkt_tck_ns)
+#define CALC_TICKS(tks) ceil((double)((tks) * global_bkt_tck_ns) / global_info_bkt_tck_ns)
 
+/* Wait double timeout ticks for software and an extra tick for hardware */
+#define WAIT_TICKS(tks) (using_services ? 2 * (tks) : tks + 1)
 
 static bool using_services;
 static uint32_t test_lcore1;
@@ -441,10 +442,31 @@ timdev_teardown(void)
 	rte_mempool_free(eventdev_test_mempool);
 }
 
+static inline uint16_t
+timeout_event_dequeue(struct rte_event *evs, uint64_t nb_evs, uint64_t ticks)
+{
+	uint16_t ev_cnt = 0;
+	uint64_t end_cycle;
+
+	if (using_services && nb_evs == MAX_TIMERS)
+		ticks = 2 * ticks;
+
+	end_cycle = rte_rdtsc() + ticks * global_bkt_tck_ns * rte_get_tsc_hz() / 1E9;
+
+	while (ev_cnt < nb_evs && rte_rdtsc() < end_cycle) {
+		ev_cnt += rte_event_dequeue_burst(evdev, TEST_PORT_ID, &evs[ev_cnt], nb_evs, 0);
+		rte_pause();
+	}
+
+	return ev_cnt;
+}
+
 static inline int
 test_timer_state(void)
 {
 	struct rte_event_timer *ev_tim;
+	const uint64_t max_ticks = 100;
+	uint64_t ticks, wait_ticks;
 	struct rte_event ev;
 	const struct rte_event_timer tim = {
 		.ev.op = RTE_EVENT_OP_NEW,
@@ -455,11 +477,10 @@ test_timer_state(void)
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
 	};
 
-
 	rte_mempool_get(eventdev_test_mempool, (void **)&ev_tim);
 	*ev_tim = tim;
 	ev_tim->ev.event_ptr = ev_tim;
-	ev_tim->timeout_ticks = CALC_TICKS(120);
+	ev_tim->timeout_ticks = CALC_TICKS(max_ticks + 20);
 
 	TEST_ASSERT_EQUAL(rte_event_timer_arm_burst(timdev, &ev_tim, 1), 0,
 			"Armed timer exceeding max_timeout.");
@@ -467,8 +488,9 @@ test_timer_state(void)
 			"Improper timer state set expected %d returned %d",
 			RTE_EVENT_TIMER_ERROR_TOOLATE, ev_tim->state);
 
+	ticks = 10;
 	ev_tim->state = RTE_EVENT_TIMER_NOT_ARMED;
-	ev_tim->timeout_ticks = CALC_TICKS(10);
+	ev_tim->timeout_ticks = CALC_TICKS(ticks);
 
 	TEST_ASSERT_EQUAL(rte_event_timer_arm_burst(timdev, &ev_tim, 1), 1,
 			"Failed to arm timer with proper timeout.");
@@ -477,14 +499,15 @@ test_timer_state(void)
 			RTE_EVENT_TIMER_ARMED, ev_tim->state);
 
 	if (!using_services)
-		rte_delay_us(20);
+		wait_ticks = 2 * ticks;
 	else
-		rte_delay_us(1000 + 200);
-	TEST_ASSERT_EQUAL(rte_event_dequeue_burst(evdev, 0, &ev, 1, 0), 1,
-			"Armed timer failed to trigger.");
+		wait_ticks = ticks;
+
+	TEST_ASSERT_EQUAL(timeout_event_dequeue(&ev, 1, WAIT_TICKS(wait_ticks)), 1,
+			  "Armed timer failed to trigger.");
 
 	ev_tim->state = RTE_EVENT_TIMER_NOT_ARMED;
-	ev_tim->timeout_ticks = CALC_TICKS(90);
+	ev_tim->timeout_ticks = CALC_TICKS(max_ticks - 10);
 	TEST_ASSERT_EQUAL(rte_event_timer_arm_burst(timdev, &ev_tim, 1), 1,
 			"Failed to arm timer with proper timeout.");
 	TEST_ASSERT_EQUAL(rte_event_timer_cancel_burst(timdev, &ev_tim, 1),
@@ -1208,8 +1231,9 @@ stat_inc_reset_ev_enq(void)
 	int ret, i, n;
 	int num_evtims = MAX_TIMERS;
 	struct rte_event_timer *evtims[num_evtims];
-	struct rte_event evs[BATCH_SIZE];
+	struct rte_event evs[num_evtims];
 	struct rte_event_timer_adapter_stats stats;
+	uint64_t ticks = 5;
 	const struct rte_event_timer init_tim = {
 		.ev.op = RTE_EVENT_OP_NEW,
 		.ev.queue_id = TEST_QUEUE_ID,
@@ -1217,7 +1241,7 @@ stat_inc_reset_ev_enq(void)
 		.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
 		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
-		.timeout_ticks = CALC_TICKS(5), // expire in .5 sec
+		.timeout_ticks = CALC_TICKS(ticks), /**< expire in .5 sec */
 	};
 
 	ret = rte_mempool_get_bulk(eventdev_test_mempool, (void **)evtims,
@@ -1242,31 +1266,12 @@ stat_inc_reset_ev_enq(void)
 			  "succeeded = %d, rte_errno = %s",
 			  num_evtims, ret, rte_strerror(rte_errno));
 
-	rte_delay_ms(1000);
-
-#define MAX_TRIES num_evtims
-	int sum = 0;
-	int tries = 0;
-	bool done = false;
-	while (!done) {
-		sum += rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs,
-					       RTE_DIM(evs), 10);
-		if (sum >= num_evtims || ++tries >= MAX_TRIES)
-			done = true;
-
-		rte_delay_ms(10);
-	}
-
-	TEST_ASSERT_EQUAL(sum, num_evtims, "Expected %d timer expiry events, "
-			  "got %d", num_evtims, sum);
-
-	TEST_ASSERT(tries < MAX_TRIES, "Exceeded max tries");
-
-	rte_delay_ms(100);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
+	TEST_ASSERT_EQUAL(n, num_evtims, "Expected %d timer expiry events, got %d",
+			  num_evtims, n);
 
 	/* Make sure the eventdev is still empty */
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs),
-				      10);
+	n = timeout_event_dequeue(evs, 1, WAIT_TICKS(1));
 
 	TEST_ASSERT_EQUAL(n, 0, "Dequeued unexpected number of timer expiry "
 			  "events from event device");
@@ -1303,6 +1308,7 @@ event_timer_arm(void)
 	struct rte_event_timer_adapter *adapter = timdev;
 	struct rte_event_timer *evtim = NULL;
 	struct rte_event evs[BATCH_SIZE];
+	uint64_t ticks = 5;
 	const struct rte_event_timer init_tim = {
 		.ev.op = RTE_EVENT_OP_NEW,
 		.ev.queue_id = TEST_QUEUE_ID,
@@ -1310,7 +1316,7 @@ event_timer_arm(void)
 		.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
 		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
-		.timeout_ticks = CALC_TICKS(5), // expire in .5 sec
+		.timeout_ticks = CALC_TICKS(ticks), /**< expire in .5 sec */
 	};
 
 	rte_mempool_get(eventdev_test_mempool, (void **)&evtim);
@@ -1337,10 +1343,7 @@ event_timer_arm(void)
 	TEST_ASSERT_EQUAL(rte_errno, EALREADY, "Unexpected rte_errno value "
 			  "after arming already armed timer");
 
-	/* Let timer expire */
-	rte_delay_ms(1000);
-
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
 	TEST_ASSERT_EQUAL(n, 1, "Failed to dequeue expected number of expiry "
 			  "events from event device");
 
@@ -1360,6 +1363,7 @@ event_timer_arm_double(void)
 	struct rte_event_timer_adapter *adapter = timdev;
 	struct rte_event_timer *evtim = NULL;
 	struct rte_event evs[BATCH_SIZE];
+	uint64_t ticks = 5;
 	const struct rte_event_timer init_tim = {
 		.ev.op = RTE_EVENT_OP_NEW,
 		.ev.queue_id = TEST_QUEUE_ID,
@@ -1367,7 +1371,7 @@ event_timer_arm_double(void)
 		.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
 		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
-		.timeout_ticks = CALC_TICKS(5), // expire in .5 sec
+		.timeout_ticks = CALC_TICKS(ticks), /**< expire in .5 sec */
 	};
 
 	rte_mempool_get(eventdev_test_mempool, (void **)&evtim);
@@ -1387,10 +1391,7 @@ event_timer_arm_double(void)
 	TEST_ASSERT_EQUAL(rte_errno, EALREADY, "Unexpected rte_errno value "
 			  "after double-arm");
 
-	/* Let timer expire */
-	rte_delay_ms(600);
-
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
 	TEST_ASSERT_EQUAL(n, 1, "Dequeued incorrect number of expiry events - "
 			  "expected: 1, actual: %d", n);
 
@@ -1417,6 +1418,7 @@ event_timer_arm_expiry(void)
 		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
 	};
+	uint64_t ticks = 30;
 
 	rte_mempool_get(eventdev_test_mempool, (void **)&evtim);
 	if (evtim == NULL) {
@@ -1426,7 +1428,7 @@ event_timer_arm_expiry(void)
 
 	/* Set up an event timer */
 	*evtim = init_tim;
-	evtim->timeout_ticks = CALC_TICKS(30),	// expire in 3 secs
+	evtim->timeout_ticks = CALC_TICKS(ticks); /**< expire in 3 secs */
 	evtim->ev.event_ptr = evtim;
 
 	ret = rte_event_timer_arm_burst(adapter, &evtim, 1);
@@ -1435,17 +1437,10 @@ event_timer_arm_expiry(void)
 	TEST_ASSERT_EQUAL(evtim->state, RTE_EVENT_TIMER_ARMED, "Event "
 			  "timer in incorrect state");
 
-	rte_delay_ms(2999);
-
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), ticks - 1);
 	TEST_ASSERT_EQUAL(n, 0, "Dequeued unexpected timer expiry event");
 
-	/* Delay 100 ms to account for the adapter tick window - should let us
-	 * dequeue one event
-	 */
-	rte_delay_ms(100);
-
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(1));
 	TEST_ASSERT_EQUAL(n, 1, "Dequeued incorrect number (%d) of timer "
 			  "expiry events", n);
 	TEST_ASSERT_EQUAL(evs[0].event_type, RTE_EVENT_TYPE_TIMER,
@@ -1477,6 +1472,7 @@ event_timer_arm_rearm(void)
 		.ev.event_type = RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
 	};
+	uint64_t ticks = 1;
 
 	rte_mempool_get(eventdev_test_mempool, (void **)&evtim);
 	if (evtim == NULL) {
@@ -1486,7 +1482,7 @@ event_timer_arm_rearm(void)
 
 	/* Set up a timer */
 	*evtim = init_tim;
-	evtim->timeout_ticks = CALC_TICKS(1);  // expire in 0.1 sec
+	evtim->timeout_ticks = CALC_TICKS(ticks); /**< expire in 0.1 sec */
 	evtim->ev.event_ptr = evtim;
 
 	/* Arm it */
@@ -1494,10 +1490,7 @@ event_timer_arm_rearm(void)
 	TEST_ASSERT_EQUAL(ret, 1, "Failed to arm event timer: %s\n",
 			  rte_strerror(rte_errno));
 
-	/* Add 100ms to account for the adapter tick window */
-	rte_delay_ms(100 + 100);
-
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
 	TEST_ASSERT_EQUAL(n, 1, "Failed to dequeue expected number of expiry "
 			  "events from event device");
 
@@ -1514,10 +1507,7 @@ event_timer_arm_rearm(void)
 	TEST_ASSERT_EQUAL(ret, 1, "Failed to arm event timer: %s\n",
 			  rte_strerror(rte_errno));
 
-	/* Add 100ms to account for the adapter tick window */
-	rte_delay_ms(100 + 100);
-
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
 	TEST_ASSERT_EQUAL(n, 1, "Failed to dequeue expected number of expiry "
 			  "events from event device");
 
@@ -1539,7 +1529,8 @@ event_timer_arm_max(void)
 	int ret, i, n;
 	int num_evtims = MAX_TIMERS;
 	struct rte_event_timer *evtims[num_evtims];
-	struct rte_event evs[BATCH_SIZE];
+	struct rte_event evs[num_evtims];
+	uint64_t ticks = 5;
 	const struct rte_event_timer init_tim = {
 		.ev.op = RTE_EVENT_OP_NEW,
 		.ev.queue_id = TEST_QUEUE_ID,
@@ -1547,7 +1538,7 @@ event_timer_arm_max(void)
 		.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
 		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
-		.timeout_ticks = CALC_TICKS(5), // expire in .5 sec
+		.timeout_ticks = CALC_TICKS(ticks), /**< expire in .5 sec */
 	};
 
 	ret = rte_mempool_get_bulk(eventdev_test_mempool, (void **)evtims,
@@ -1567,31 +1558,12 @@ event_timer_arm_max(void)
 			  "succeeded = %d, rte_errno = %s",
 			  num_evtims, ret, rte_strerror(rte_errno));
 
-	rte_delay_ms(1000);
-
-#define MAX_TRIES num_evtims
-	int sum = 0;
-	int tries = 0;
-	bool done = false;
-	while (!done) {
-		sum += rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs,
-					       RTE_DIM(evs), 10);
-		if (sum >= num_evtims || ++tries >= MAX_TRIES)
-			done = true;
-
-		rte_delay_ms(10);
-	}
-
-	TEST_ASSERT_EQUAL(sum, num_evtims, "Expected %d timer expiry events, "
-			  "got %d", num_evtims, sum);
-
-	TEST_ASSERT(tries < MAX_TRIES, "Exceeded max tries");
-
-	rte_delay_ms(100);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
+	TEST_ASSERT_EQUAL(n, num_evtims, "Expected %d timer expiry events, got %d",
+			  num_evtims, n);
 
 	/* Make sure the eventdev is still empty */
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs),
-				    10);
+	n = timeout_event_dequeue(evs, 1, WAIT_TICKS(1));
 
 	TEST_ASSERT_EQUAL(n, 0, "Dequeued unexpected number of timer expiry "
 			  "events from event device");
@@ -1711,6 +1683,7 @@ event_timer_cancel(void)
 		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
 	};
+	uint64_t ticks = 30;
 
 	rte_mempool_get(eventdev_test_mempool, (void **)&evtim);
 	if (evtim == NULL) {
@@ -1728,7 +1701,7 @@ event_timer_cancel(void)
 	/* Set up a timer */
 	*evtim = init_tim;
 	evtim->ev.event_ptr = evtim;
-	evtim->timeout_ticks = CALC_TICKS(30);  // expire in 3 sec
+	evtim->timeout_ticks = CALC_TICKS(ticks); /**< expire in 3 sec */
 
 	/* Check that cancelling an inited but unarmed timer fails */
 	ret = rte_event_timer_cancel_burst(adapter, &evtim, 1);
@@ -1752,10 +1725,8 @@ event_timer_cancel(void)
 	TEST_ASSERT_EQUAL(evtim->state, RTE_EVENT_TIMER_CANCELED,
 			  "evtim in incorrect state");
 
-	rte_delay_ms(3000);
-
 	/* Make sure that no expiry event was generated */
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
 	TEST_ASSERT_EQUAL(n, 0, "Dequeued unexpected timer expiry event\n");
 
 	rte_mempool_put(eventdev_test_mempool, evtim);
@@ -1778,8 +1749,8 @@ event_timer_cancel_double(void)
 		.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
 		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
-		.timeout_ticks = CALC_TICKS(5), // expire in .5 sec
 	};
+	uint64_t ticks = 30;
 
 	rte_mempool_get(eventdev_test_mempool, (void **)&evtim);
 	if (evtim == NULL) {
@@ -1790,7 +1761,7 @@ event_timer_cancel_double(void)
 	/* Set up a timer */
 	*evtim = init_tim;
 	evtim->ev.event_ptr = evtim;
-	evtim->timeout_ticks = CALC_TICKS(30);  // expire in 3 sec
+	evtim->timeout_ticks = CALC_TICKS(ticks); /**< expire in 3 sec */
 
 	ret = rte_event_timer_arm_burst(adapter, &evtim, 1);
 	TEST_ASSERT_EQUAL(ret, 1, "Failed to arm event timer: %s\n",
@@ -1812,10 +1783,8 @@ event_timer_cancel_double(void)
 	TEST_ASSERT_EQUAL(rte_errno, EALREADY, "Unexpected rte_errno value "
 			  "after double-cancel: rte_errno = %d", rte_errno);
 
-	rte_delay_ms(3000);
-
 	/* Still make sure that no expiry event was generated */
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
 	TEST_ASSERT_EQUAL(n, 0, "Dequeued unexpected timer expiry event\n");
 
 	rte_mempool_put(eventdev_test_mempool, evtim);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.040054900 +0800
+++ 0018-eventdev-timer-fix-timeout-event-wait-behavior.patch	2023-06-25 14:31:58.295773900 +0800
@@ -1 +1 @@
-From fb9c213317b5e07918c9306f2036f8cc07126a85 Mon Sep 17 00:00:00 2001
+From ca72f7fdba88330e11575640a89bbfaacdb9d054 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fb9c213317b5e07918c9306f2036f8cc07126a85 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +26,2 @@
- app/test/test_event_timer_adapter.c | 169 +++++++++++-----------------
- 1 file changed, 68 insertions(+), 101 deletions(-)
+ app/test/test_event_timer_adapter.c | 165 +++++++++++-----------------
+ 1 file changed, 67 insertions(+), 98 deletions(-)
@@ -28 +30 @@
-index 5e7feec1c7..510bebcf86 100644
+index 1a440dfd10..12d5936c60 100644
@@ -428,11 +429,0 @@
-@@ -1973,9 +1942,7 @@ test_timer_ticks_remaining(void)
- 		rte_delay_ms(100);
- 	}
- 
--	rte_delay_ms(100);
--
--	TEST_ASSERT_EQUAL(rte_event_dequeue_burst(evdev, 0, &ev, 1, 0), 1,
-+	TEST_ASSERT_EQUAL(timeout_event_dequeue(&ev, 1, WAIT_TICKS(1)), 1,
- 			  "Armed timer failed to trigger.");
- 	TEST_ASSERT_EQUAL(ev_tim->state, RTE_EVENT_TIMER_NOT_ARMED,
- 			  "Improper timer state set expected %d returned %d",

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

* patch 'doc: fix event timer adapter guide' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (17 preceding siblings ...)
  2023-06-25  6:33 ` patch 'eventdev/timer: fix timeout event wait behavior' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'event/dsw: free rings on close' " Xueming Li
                   ` (110 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c12daa6d2da4ade02971f8c0f125c71160e8741f Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Fri, 7 Apr 2023 13:44:10 +0530
Subject: [PATCH] doc: fix event timer adapter guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4b6fad5cc8a54647a2ea0c0792b25932da9504fc ]

Remove incorrect spec definition from programmers guide, it is
applications responsibility to set ev.event_ptr to a valid value.

Fixes: 30e7fbd62839 ("doc: add event timer adapter guide")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 doc/guides/prog_guide/event_timer_adapter.rst | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst
index 9106092f2d..7733424aac 100644
--- a/doc/guides/prog_guide/event_timer_adapter.rst
+++ b/doc/guides/prog_guide/event_timer_adapter.rst
@@ -229,9 +229,7 @@ Note that it is necessary to initialize the event timer state to
 RTE_EVENT_TIMER_NOT_ARMED.  Also note that we have saved a pointer to the
 ``conn`` object in the timer's event payload. This will allow us to locate
 the connection object again once we dequeue the timer expiry event from the
-event device later.  As a convenience, the application may specify no value for
-ev.event_ptr, and the adapter will by default set it to point at the event
-timer itself.
+event device later.
 
 Now we can arm the event timer with ``rte_event_timer_arm_burst()``:
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.067613700 +0800
+++ 0019-doc-fix-event-timer-adapter-guide.patch	2023-06-25 14:31:58.295773900 +0800
@@ -1 +1 @@
-From 4b6fad5cc8a54647a2ea0c0792b25932da9504fc Mon Sep 17 00:00:00 2001
+From c12daa6d2da4ade02971f8c0f125c71160e8741f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4b6fad5cc8a54647a2ea0c0792b25932da9504fc ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 2a15ed8f5c..adeddbedfc 100644
+index 9106092f2d..7733424aac 100644
@@ -22 +24 @@
-@@ -247,9 +247,7 @@ Note that it is necessary to initialize the event timer state to
+@@ -229,9 +229,7 @@ Note that it is necessary to initialize the event timer state to

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

* patch 'event/dsw: free rings on close' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (18 preceding siblings ...)
  2023-06-25  6:33 ` patch 'doc: fix event timer adapter guide' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:33 ` patch 'event/cnxk: fix setting attributes in empty get work' " Xueming Li
                   ` (109 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d0257dc16814cef046df9ae8b045c5fb73683621 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Thu, 11 May 2023 08:40:29 +0200
Subject: [PATCH] event/dsw: free rings on close
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 61e4cd6d0ad118c6f4d2724a840b651af9e9ec98 ]

The per-port data and control rings were not freed when the event
device was closed.

Fixes: 1c8e3caa3bfb ("event/dsw: add event scheduling and device start/stop")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 drivers/event/dsw/dsw_evdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
index ffabf0d23d..6c5cde2468 100644
--- a/drivers/event/dsw/dsw_evdev.c
+++ b/drivers/event/dsw/dsw_evdev.c
@@ -363,6 +363,10 @@ static int
 dsw_close(struct rte_eventdev *dev)
 {
 	struct dsw_evdev *dsw = dsw_pmd_priv(dev);
+	uint16_t port_id;
+
+	for (port_id = 0; port_id < dsw->num_ports; port_id++)
+		dsw_port_release(&dsw->ports[port_id]);
 
 	dsw->num_ports = 0;
 	dsw->num_queues = 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.089365700 +0800
+++ 0020-event-dsw-free-rings-on-close.patch	2023-06-25 14:31:58.295773900 +0800
@@ -1 +1 @@
-From 61e4cd6d0ad118c6f4d2724a840b651af9e9ec98 Mon Sep 17 00:00:00 2001
+From d0257dc16814cef046df9ae8b045c5fb73683621 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 61e4cd6d0ad118c6f4d2724a840b651af9e9ec98 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'event/cnxk: fix setting attributes in empty get work' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (19 preceding siblings ...)
  2023-06-25  6:33 ` patch 'event/dsw: free rings on close' " Xueming Li
@ 2023-06-25  6:33 ` Xueming Li
  2023-06-25  6:34 ` patch 'eventdev/timer: fix buffer flush' " Xueming Li
                   ` (108 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:33 UTC (permalink / raw)
  To: Shijith Thotton; +Cc: Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d3f784ad5f9c765eeb71534f939acfc2e1d29d27 Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Thu, 27 Apr 2023 11:58:17 +0530
Subject: [PATCH] event/cnxk: fix setting attributes in empty get work
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b310f02aa8cb202b3620816ac03cbc948e7b0027 ]

Even when no events are dequeued, it is important to update event
attributes as they provide valuable information for checking the work
slot state and other attributes.

Fixes: c0a9774f030d ("event/cnxk: move post-processing to separate function")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/cnxk/cn10k_worker.h | 3 +++
 drivers/event/cnxk/cn9k_worker.h  | 6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h
index 75a2ff244a..df37ab6380 100644
--- a/drivers/event/cnxk/cn10k_worker.h
+++ b/drivers/event/cnxk/cn10k_worker.h
@@ -316,6 +316,9 @@ cn10k_sso_hws_get_work(struct cn10k_sso_hws *ws, struct rte_event *ev,
 	ws->gw_rdata = gw.u64[0];
 	if (gw.u64[1])
 		cn10k_sso_hws_post_process(ws, gw.u64, flags);
+	else
+		gw.u64[0] = (gw.u64[0] & (0x3ull << 32)) << 6 |
+			    (gw.u64[0] & (0x3FFull << 36)) << 4 | (gw.u64[0] & 0xffffffff);
 
 	ev->event = gw.u64[0];
 	ev->u64 = gw.u64[1];
diff --git a/drivers/event/cnxk/cn9k_worker.h b/drivers/event/cnxk/cn9k_worker.h
index d3c5180fbc..0ccdb7baf3 100644
--- a/drivers/event/cnxk/cn9k_worker.h
+++ b/drivers/event/cnxk/cn9k_worker.h
@@ -353,8 +353,10 @@ cn9k_sso_hws_get_work_empty(uint64_t base, struct rte_event *ev,
 #endif
 
 	if (gw.u64[1])
-		cn9k_sso_hws_post_process(gw.u64, mbuf, flags, lookup_mem,
-					  tstamp);
+		cn9k_sso_hws_post_process(gw.u64, mbuf, flags, lookup_mem, tstamp);
+	else
+		gw.u64[0] = (gw.u64[0] & (0x3ull << 32)) << 6 |
+			    (gw.u64[0] & (0x3FFull << 36)) << 4 | (gw.u64[0] & 0xffffffff);
 
 	ev->event = gw.u64[0];
 	ev->u64 = gw.u64[1];
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.110040700 +0800
+++ 0021-event-cnxk-fix-setting-attributes-in-empty-get-work.patch	2023-06-25 14:31:58.305773900 +0800
@@ -1 +1 @@
-From b310f02aa8cb202b3620816ac03cbc948e7b0027 Mon Sep 17 00:00:00 2001
+From d3f784ad5f9c765eeb71534f939acfc2e1d29d27 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b310f02aa8cb202b3620816ac03cbc948e7b0027 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 06c71c6092..beae2be903 100644
+index 75a2ff244a..df37ab6380 100644
@@ -24 +26 @@
-@@ -282,6 +282,9 @@ cn10k_sso_hws_get_work_empty(struct cn10k_sso_hws *ws, struct rte_event *ev,
+@@ -316,6 +316,9 @@ cn10k_sso_hws_get_work(struct cn10k_sso_hws *ws, struct rte_event *ev,
@@ -35 +37 @@
-index 1ce4b044e8..47eea70b5f 100644
+index d3c5180fbc..0ccdb7baf3 100644

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

* patch 'eventdev/timer: fix buffer flush' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (20 preceding siblings ...)
  2023-06-25  6:33 ` patch 'event/cnxk: fix setting attributes in empty get work' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'event/cnxk: fix nanoseconds to ticks conversion' " Xueming Li
                   ` (107 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Erik Gabriel Carrillo; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cf79458fade2562b8062c87813de72580f35173c Mon Sep 17 00:00:00 2001
From: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Date: Wed, 12 Apr 2023 14:56:37 -0500
Subject: [PATCH] eventdev/timer: fix buffer flush
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 53b97347cc84e8df53426c7917a4b65296264c02 ]

The SW event timer adapter attempts to flush its event buffer on every
adapter tick. If events remain in the buffer after the attempt, another
attempt to flush won't occur until the next adapter tick, which delays
the enqueue of those events to the event device unnecessarily.

Move the buffer flush call so that it happens with every invocation of
the service function, rather than on every adapter tick, to avoid the
delay.

Fixes: cc7b73ea9e3b ("eventdev: add new software timer adapter")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 lib/eventdev/rte_event_timer_adapter.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index b07b3837d5..a13ddce627 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -820,17 +820,18 @@ swtim_service_func(void *arg)
 				     sw->n_expired_timers);
 		sw->n_expired_timers = 0;
 
-		event_buffer_flush(&sw->buffer,
-				   adapter->data->event_dev_id,
-				   adapter->data->event_port_id,
-				   &nb_evs_flushed,
-				   &nb_evs_invalid);
-
-		sw->stats.ev_enq_count += nb_evs_flushed;
-		sw->stats.ev_inv_count += nb_evs_invalid;
 		sw->stats.adapter_tick_count++;
 	}
 
+	event_buffer_flush(&sw->buffer,
+			   adapter->data->event_dev_id,
+			   adapter->data->event_port_id,
+			   &nb_evs_flushed,
+			   &nb_evs_invalid);
+
+	sw->stats.ev_enq_count += nb_evs_flushed;
+	sw->stats.ev_inv_count += nb_evs_invalid;
+
 	rte_event_maintain(adapter->data->event_dev_id,
 			   adapter->data->event_port_id, 0);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.135421500 +0800
+++ 0022-eventdev-timer-fix-buffer-flush.patch	2023-06-25 14:31:58.305773900 +0800
@@ -1 +1 @@
-From 53b97347cc84e8df53426c7917a4b65296264c02 Mon Sep 17 00:00:00 2001
+From cf79458fade2562b8062c87813de72580f35173c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 53b97347cc84e8df53426c7917a4b65296264c02 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 23eb1d4a7d..427c4c6287 100644
+index b07b3837d5..a13ddce627 100644
@@ -27 +29 @@
-@@ -855,17 +855,18 @@ swtim_service_func(void *arg)
+@@ -820,17 +820,18 @@ swtim_service_func(void *arg)

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

* patch 'event/cnxk: fix nanoseconds to ticks conversion' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (21 preceding siblings ...)
  2023-06-25  6:34 ` patch 'eventdev/timer: fix buffer flush' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'eal/linux: fix secondary process crash for mp hotplug' " Xueming Li
                   ` (106 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 53e6b8c3f04383209b9234d44cdbf4dde2675e9e Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Wed, 24 May 2023 14:22:32 +0530
Subject: [PATCH] event/cnxk: fix nanoseconds to ticks conversion
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8fecf1febf2c7914f642c50bc03f7860c1787426 ]

The number of timeout ticks is dependent on the global dequeue
timeout configured.

Fixes: 6223ede20361 ("event/cnxk: add event port link and unlink")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/cnxk/cnxk_eventdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index db50d193a5..93e46e1b9b 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -319,9 +319,9 @@ int
 cnxk_sso_timeout_ticks(struct rte_eventdev *event_dev, uint64_t ns,
 		       uint64_t *tmo_ticks)
 {
-	RTE_SET_USED(event_dev);
-	*tmo_ticks = NSEC2TICK(ns, rte_get_timer_hz());
+	struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
 
+	*tmo_ticks = dev->deq_tmo_ns ? ns / dev->deq_tmo_ns : 0;
 	return 0;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.157935100 +0800
+++ 0023-event-cnxk-fix-nanoseconds-to-ticks-conversion.patch	2023-06-25 14:31:58.305773900 +0800
@@ -1 +1 @@
-From 8fecf1febf2c7914f642c50bc03f7860c1787426 Mon Sep 17 00:00:00 2001
+From 53e6b8c3f04383209b9234d44cdbf4dde2675e9e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8fecf1febf2c7914f642c50bc03f7860c1787426 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 99f9cdcd0d..3a05a59c75 100644
+index db50d193a5..93e46e1b9b 100644
@@ -21 +23 @@
-@@ -323,9 +323,9 @@ int
+@@ -319,9 +319,9 @@ int

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

* patch 'eal/linux: fix secondary process crash for mp hotplug' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (22 preceding siblings ...)
  2023-06-25  6:34 ` patch 'event/cnxk: fix nanoseconds to ticks conversion' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'eal/linux: fix legacy mem init with many segments' " Xueming Li
                   ` (105 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Zhihong Wang; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f4d5f30fe439f2c316f2c51b5cdd9bb081b9639a Mon Sep 17 00:00:00 2001
From: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Date: Thu, 8 Jun 2023 15:25:53 +0800
Subject: [PATCH] eal/linux: fix secondary process crash for mp hotplug
 requests
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 ]

Secondary would crash if it tries to handle mp requests before memory
init, since globals such as eth_dev_shared_data_lock are not accessible
to it at this moment.

Fixes: 244d5130719c ("eal: enable hotplug on multi-process")

Signed-off-by: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/eal/linux/eal.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 7b0eafd565..336698379f 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -1056,12 +1056,6 @@ rte_eal_init(int argc, char **argv)
 		}
 	}
 
-	/* register multi-process action callbacks for hotplug */
-	if (eal_mp_dev_hotplug_init() < 0) {
-		rte_eal_init_alert("failed to register mp callback for hotplug");
-		return -1;
-	}
-
 	if (rte_bus_scan()) {
 		rte_eal_init_alert("Cannot scan the buses for devices");
 		rte_errno = ENODEV;
@@ -1206,6 +1200,12 @@ rte_eal_init(int argc, char **argv)
 		return -1;
 	}
 
+	/* register multi-process action callbacks for hotplug after memory init */
+	if (eal_mp_dev_hotplug_init() < 0) {
+		rte_eal_init_alert("failed to register mp callback for hotplug");
+		return -1;
+	}
+
 	if (rte_eal_tailqs_init() < 0) {
 		rte_eal_init_alert("Cannot init tail queues for objects");
 		rte_errno = EFAULT;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.181039600 +0800
+++ 0024-eal-linux-fix-secondary-process-crash-for-mp-hotplug.patch	2023-06-25 14:31:58.305773900 +0800
@@ -1 +1 @@
-From 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 Mon Sep 17 00:00:00 2001
+From f4d5f30fe439f2c316f2c51b5cdd9bb081b9639a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 90e05fe4de..99b0a59706 100644
+index 7b0eafd565..336698379f 100644
@@ -24 +26 @@
-@@ -1058,12 +1058,6 @@ rte_eal_init(int argc, char **argv)
+@@ -1056,12 +1056,6 @@ rte_eal_init(int argc, char **argv)
@@ -37 +39 @@
-@@ -1221,6 +1215,12 @@ rte_eal_init(int argc, char **argv)
+@@ -1206,6 +1200,12 @@ rte_eal_init(int argc, char **argv)

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

* patch 'eal/linux: fix legacy mem init with many segments' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (23 preceding siblings ...)
  2023-06-25  6:34 ` patch 'eal/linux: fix secondary process crash for mp hotplug' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix build warning' " Xueming Li
                   ` (104 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Fengnan Chang; +Cc: Lin Li, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 10a2ee0333a41f1e9b40f9807dd93b3d51693ce6 Mon Sep 17 00:00:00 2001
From: Fengnan Chang <changfengnan@bytedance.com>
Date: Mon, 29 May 2023 19:21:30 +0800
Subject: [PATCH] eal/linux: fix legacy mem init with many segments
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 51a5a72e2a82986b02244fcdd89c6571bc503de3 ]

Under legacy mode, if the number of continuous memsegs greater
than RTE_MAX_MEMSEG_PER_LIST, eal init will failed even though
another memseg list is empty, because only one memseg list used
to check in remap_needed_hugepages.
Fix this by make remap_segment return how many segments mapped,
remap_segment try to map most contiguous segments it can, if it
exceed its capacity, remap_needed_hugepages will continue to
map other left pages.

For example:
hugepage configure:
cat /sys/devices/system/node/node*/hugepages/hugepages-2048kB/nr_hugepages
10241
10239

startup log:
EAL: Detected memory type: socket_id:0 hugepage_sz:2097152
EAL: Detected memory type: socket_id:1 hugepage_sz:2097152
EAL: Creating 4 segment lists: n_segs:8192 socket_id:0 hugepage_sz:2097152
EAL: Creating 4 segment lists: n_segs:8192 socket_id:1 hugepage_sz:2097152
EAL: Requesting 13370 pages of size 2MB from socket 0
EAL: Requesting 7110 pages of size 2MB from socket 1
EAL: Attempting to map 14220M on socket 1
EAL: Allocated 14220M on socket 1
EAL: Attempting to map 26740M on socket 0
EAL: Could not find space for memseg. Please increase 32768 and/or 65536 in
configuration.
EAL: Couldn't remap hugepage files into memseg lists
EAL: FATAL: Cannot init memory
EAL: Cannot init memory

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")

Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
Signed-off-by: Lin Li <lilintjpu@bytedance.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 .mailmap                   |  2 +-
 lib/eal/linux/eal_memory.c | 51 +++++++++++++++++++++++++++-----------
 2 files changed, 37 insertions(+), 16 deletions(-)

diff --git a/.mailmap b/.mailmap
index 12939e3bff..e9b5482002 100644
--- a/.mailmap
+++ b/.mailmap
@@ -755,7 +755,7 @@ Liming Sun <lsun@ezchip.com> <lsun@mellanox.com>
 Linfan Hu <zhongdahulinfan@163.com>
 Lingli Chen <linglix.chen@intel.com>
 Lingyu Liu <lingyu.liu@intel.com>
-Lin Li <lilin24@baidu.com>
+Lin Li <lilintjpu@bytedance.com> <lilin24@baidu.com>
 Linsi Yuan <yuanlinsi01@baidu.com>
 Lior Margalit <lmargalit@nvidia.com>
 Li Qiang <liq3ea@163.com>
diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index 60fc8cc6ca..0876974631 100644
--- a/lib/eal/linux/eal_memory.c
+++ b/lib/eal/linux/eal_memory.c
@@ -681,6 +681,7 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
 
 	/* find free space in memseg lists */
 	for (msl_idx = 0; msl_idx < RTE_MAX_MEMSEG_LISTS; msl_idx++) {
+		int free_len;
 		bool empty;
 		msl = &mcfg->memsegs[msl_idx];
 		arr = &msl->memseg_arr;
@@ -692,18 +693,26 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
 
 		/* leave space for a hole if array is not empty */
 		empty = arr->count == 0;
-		ms_idx = rte_fbarray_find_next_n_free(arr, 0,
-				seg_len + (empty ? 0 : 1));
-
-		/* memseg list is full? */
+		/* find start of the biggest contiguous block and its size */
+		ms_idx = rte_fbarray_find_biggest_free(arr, 0);
 		if (ms_idx < 0)
 			continue;
-
+		/* hole is 1 segment long, so at least two segments long. */
+		free_len = rte_fbarray_find_contig_free(arr, ms_idx);
+		if (free_len < 2)
+			continue;
 		/* leave some space between memsegs, they are not IOVA
 		 * contiguous, so they shouldn't be VA contiguous either.
 		 */
-		if (!empty)
+		if (!empty) {
 			ms_idx++;
+			free_len--;
+		}
+
+		/* we might not get all of the space we wanted */
+		free_len = RTE_MIN(seg_len, free_len);
+		seg_end = seg_start + free_len;
+		seg_len = seg_end - seg_start;
 		break;
 	}
 	if (msl_idx == RTE_MAX_MEMSEG_LISTS) {
@@ -787,7 +796,7 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
 	}
 	RTE_LOG(DEBUG, EAL, "Allocated %" PRIu64 "M on socket %i\n",
 			(seg_len * page_sz) >> 20, socket_id);
-	return 0;
+	return seg_len;
 }
 
 static uint64_t
@@ -1022,10 +1031,16 @@ remap_needed_hugepages(struct hugepage_file *hugepages, int n_pages)
 		if (new_memseg) {
 			/* if this isn't the first time, remap segment */
 			if (cur_page != 0) {
-				ret = remap_segment(hugepages, seg_start_page,
-						cur_page);
-				if (ret != 0)
-					return -1;
+				int n_remapped = 0;
+				int n_needed = cur_page - seg_start_page;
+				while (n_remapped < n_needed) {
+					ret = remap_segment(hugepages, seg_start_page,
+							cur_page);
+					if (ret < 0)
+						return -1;
+					n_remapped += ret;
+					seg_start_page += ret;
+				}
 			}
 			/* remember where we started */
 			seg_start_page = cur_page;
@@ -1034,10 +1049,16 @@ remap_needed_hugepages(struct hugepage_file *hugepages, int n_pages)
 	}
 	/* we were stopped, but we didn't remap the last segment, do it now */
 	if (cur_page != 0) {
-		ret = remap_segment(hugepages, seg_start_page,
-				cur_page);
-		if (ret != 0)
-			return -1;
+		int n_remapped = 0;
+		int n_needed = cur_page - seg_start_page;
+		while (n_remapped < n_needed) {
+			ret = remap_segment(hugepages, seg_start_page,
+					cur_page);
+			if (ret < 0)
+				return -1;
+			n_remapped += ret;
+			seg_start_page += ret;
+		}
 	}
 	return 0;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.203715500 +0800
+++ 0025-eal-linux-fix-legacy-mem-init-with-many-segments.patch	2023-06-25 14:31:58.305773900 +0800
@@ -1 +1 @@
-From 51a5a72e2a82986b02244fcdd89c6571bc503de3 Mon Sep 17 00:00:00 2001
+From 10a2ee0333a41f1e9b40f9807dd93b3d51693ce6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 51a5a72e2a82986b02244fcdd89c6571bc503de3 ]
@@ -38 +40,0 @@
-Cc: stable@dpdk.org
@@ -49 +51 @@
-index 13167dc28b..853a89e9a4 100644
+index 12939e3bff..e9b5482002 100644
@@ -52 +54 @@
-@@ -766,7 +766,7 @@ Liming Sun <lsun@ezchip.com> <lsun@mellanox.com>
+@@ -755,7 +755,7 @@ Liming Sun <lsun@ezchip.com> <lsun@mellanox.com>

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

* patch 'net/hns3: fix build warning' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (24 preceding siblings ...)
  2023-06-25  6:34 ` patch 'eal/linux: fix legacy mem init with many segments' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/sfc: stop misuse of Rx ingress m-port metadata on EF100' " Xueming Li
                   ` (103 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a1dfa524068f94881ddb932040d79bf153d97e8b Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Tue, 4 Apr 2023 12:25:25 +0530
Subject: [PATCH] net/hns3: fix build warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 60fe5c3cfc3c28952448d2163c4eb1d22d86ccac ]

aarch64 gcc 12.2.0 build complain with below warning[1].
Move the new_link initialization upwards to fix the warning.

[1]
drivers/net/hns3/hns3_ethdev.c: In function ‘hns3_dev_link_update’:
drivers/net/hns3/hns3_ethdev.c:2249:1:
  warning: ‘new_link’ may be used uninitialized [-Wmaybe-uninitialized]

Fixes: 64308555d5bf ("net/hns3: fix link status when port is stopped")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 6babf67fce..0fe6223561 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2257,6 +2257,7 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
 	struct rte_eth_link new_link;
 	int ret;
 
+	memset(&new_link, 0, sizeof(new_link));
 	/* When port is stopped, report link down. */
 	if (eth_dev->data->dev_started == 0) {
 		new_link.link_autoneg = mac->link_autoneg;
@@ -2280,7 +2281,6 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
 		rte_delay_ms(HNS3_LINK_CHECK_INTERVAL);
 	} while (retry_cnt--);
 
-	memset(&new_link, 0, sizeof(new_link));
 	hns3_setup_linkstatus(eth_dev, &new_link);
 
 out:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.228367000 +0800
+++ 0026-net-hns3-fix-build-warning.patch	2023-06-25 14:31:58.305773900 +0800
@@ -1 +1 @@
-From 60fe5c3cfc3c28952448d2163c4eb1d22d86ccac Mon Sep 17 00:00:00 2001
+From a1dfa524068f94881ddb932040d79bf153d97e8b Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 60fe5c3cfc3c28952448d2163c4eb1d22d86ccac ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 36896f8989..a872cb8dd7 100644
+index 6babf67fce..0fe6223561 100644

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

* patch 'net/sfc: stop misuse of Rx ingress m-port metadata on EF100' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (25 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix build warning' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/tap: set locally administered bit for fixed MAC address' " Xueming Li
                   ` (102 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andy Moreton, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bd14912ab474e7dfb2b98f02a6f51ad4f58069cd Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@arknetworks.am>
Date: Wed, 12 Apr 2023 17:57:57 +0400
Subject: [PATCH] net/sfc: stop misuse of Rx ingress m-port metadata on EF100
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 462c4f083c464e2d10391c78e7f67f178dbefb27 ]

The driver supports representor functionality. In it,
packets coming from VFs to the dedicated back-end Rx
queue get demultiplexed into front-end Rx queues of
representor ethdevs as per the per-packet metadata
indicating logical HW ingress ports. On transmit,
packets are provided with symmetrical metadata
by front-end Tx queues, and the back-end queue
transforms the data into so-called Tx override
descriptors. These let the packets bypass flow
lookup and go directly to the represented VFs.

However, in the Rx part, the driver extracts
the said metadata on every HW Rx queue, that
is, not just on the one used by representors.
Doing so leads to a buggy behaviour. It is
revealed by operating testpmd as follows:

dpdk-testpmd -a 0000:c6:00.0 -a 0000:c6:00.1 -- -i

testpmd> flow create 0 transfer pattern port_representor \
 port_id is 0 / end actions port_representor port_id 1 / end
Flow rule #0 created

testpmd> set fwd io
testpmd> start tx_first

testpmd> flow destroy 0 rule 0
Flow rule #0 destroyed

testpmd> stop

  ---------------------- Forward statistics for port 0  -----------------
  RX-packets: 19196498       RX-dropped: 0             RX-total: 19196498
  TX-packets: 19196535       TX-dropped: 0             TX-total: 19196535
  -----------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  -----------------
  RX-packets: 19196503       RX-dropped: 0             RX-total: 19196503
  TX-packets: 19196530       TX-dropped: 0             TX-total: 19196530
  -----------------------------------------------------------------------

In this scenario, two physical functions of the adapter
do not have any corresponding "back-to-back" forwarder
on peer host. Packets transmitted from port 0 can only
be forwarded to port 1 by means of a special flow rule.

The flow rule indeed works, but destroying it does not
stop forwarding. Port statistics carry on incrementing.

Also, it is apparent that forwarding in the opposite
direction must not have worked in this case as the
flow is meant to target only one of the directions.

Because of the bug, the first 32 mbufs received
as a result of the flow rule operation have the
said metadata present. In io mode, testpmd does
not tamper with mbufs and passes them directly
to transmit path, so this data remains in them
instructing the PMD to override destinations
of the packets via Tx option descriptors.

Expected behaviour is as follows:

  ---------------------- Forward statistics for port 0  -----------------
  RX-packets: 0              RX-dropped: 0             RX-total: 0
  TX-packets: 15787496       TX-dropped: 0             TX-total: 15787496
  -----------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  -----------------
  RX-packets: 15787464       RX-dropped: 0             RX-total: 15787464
  TX-packets: 32             TX-dropped: 0             TX-total: 32
  -----------------------------------------------------------------------

These figures show the rule work only for one direction.
Also, removing the flow shall cause forwarding to cease.

Provided patch fixes the bug accordingly.

Fixes: d0f981a3efd8 ("net/sfc: handle ingress mport in EF100 Rx prefix")

Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/sfc/sfc_dp_rx.h    |  1 +
 drivers/net/sfc/sfc_ef100_rx.c | 18 ++++++++++++++----
 drivers/net/sfc/sfc_rx.c       |  3 +++
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/drivers/net/sfc/sfc_dp_rx.h b/drivers/net/sfc/sfc_dp_rx.h
index 246adbd87c..8a504bdcf1 100644
--- a/drivers/net/sfc/sfc_dp_rx.h
+++ b/drivers/net/sfc/sfc_dp_rx.h
@@ -69,6 +69,7 @@ struct sfc_dp_rx_qcreate_info {
 	/** Receive queue flags initializer */
 	unsigned int		flags;
 #define SFC_RXQ_FLAG_RSS_HASH	0x1
+#define SFC_RXQ_FLAG_INGRESS_MPORT	0x2
 
 	/** Rx queue size */
 	unsigned int		rxq_entries;
diff --git a/drivers/net/sfc/sfc_ef100_rx.c b/drivers/net/sfc/sfc_ef100_rx.c
index 16cd8524d3..37b754fa33 100644
--- a/drivers/net/sfc/sfc_ef100_rx.c
+++ b/drivers/net/sfc/sfc_ef100_rx.c
@@ -810,6 +810,9 @@ sfc_ef100_rx_qcreate(uint16_t port_id, uint16_t queue_id,
 	if (rxq->nic_dma_info->nb_regions > 0)
 		rxq->flags |= SFC_EF100_RXQ_NIC_DMA_MAP;
 
+	if (info->flags & SFC_RXQ_FLAG_INGRESS_MPORT)
+		rxq->flags |= SFC_EF100_RXQ_INGRESS_MPORT;
+
 	sfc_ef100_rx_debug(rxq, "RxQ doorbell is %p", rxq->doorbell);
 
 	*dp_rxqp = &rxq->dp;
@@ -876,11 +879,18 @@ sfc_ef100_rx_qstart(struct sfc_dp_rxq *dp_rxq, unsigned int evq_read_ptr,
 	else
 		rxq->flags &= ~SFC_EF100_RXQ_USER_MARK;
 
+
+	/*
+	 * At the moment, this feature is used only
+	 * by the representor proxy Rx queue and is
+	 * essential for representor support, so if
+	 * it has been requested but is unsupported,
+	 * point this inconsistency out to the user.
+	 */
 	if ((unsup_rx_prefix_fields &
-	     (1U << EFX_RX_PREFIX_FIELD_INGRESS_MPORT)) == 0)
-		rxq->flags |= SFC_EF100_RXQ_INGRESS_MPORT;
-	else
-		rxq->flags &= ~SFC_EF100_RXQ_INGRESS_MPORT;
+	     (1U << EFX_RX_PREFIX_FIELD_INGRESS_MPORT)) &&
+	    (rxq->flags & SFC_EF100_RXQ_INGRESS_MPORT))
+		return ENOTSUP;
 
 	rxq->prefix_size = pinfo->erpl_length;
 	rxq->rearm_data = sfc_ef100_mk_mbuf_rearm_data(rxq->dp.dpq.port_id,
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 5ea98187c3..edd0f0c038 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -1225,6 +1225,9 @@ sfc_rx_qinit(struct sfc_adapter *sa, sfc_sw_index_t sw_index,
 	else
 		rxq_info->rxq_flags = 0;
 
+	if (rxq_info->type_flags & EFX_RXQ_FLAG_INGRESS_MPORT)
+		rxq_info->rxq_flags |= SFC_RXQ_FLAG_INGRESS_MPORT;
+
 	rxq->buf_size = buf_size;
 
 	rc = sfc_dma_alloc(sa, "rxq", sw_index, EFX_NIC_DMA_ADDR_RX_RING,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.254805500 +0800
+++ 0027-net-sfc-stop-misuse-of-Rx-ingress-m-port-metadata-on.patch	2023-06-25 14:31:58.305773900 +0800
@@ -1 +1 @@
-From 462c4f083c464e2d10391c78e7f67f178dbefb27 Mon Sep 17 00:00:00 2001
+From bd14912ab474e7dfb2b98f02a6f51ad4f58069cd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 462c4f083c464e2d10391c78e7f67f178dbefb27 ]
@@ -85 +87,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/tap: set locally administered bit for fixed MAC address' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (26 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/sfc: stop misuse of Rx ingress m-port metadata on EF100' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/mana: use datapath logging' " Xueming Li
                   ` (101 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: David Christensen; +Cc: Stephen Hemminger, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8e27036b63097e7df03246570676b549944f8f88 Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Tue, 25 Apr 2023 16:58:06 -0400
Subject: [PATCH] net/tap: set locally administered bit for fixed MAC address
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c3006be2acab49c6b77ae9c9ef04b061e5dacbd6 ]

When the tap driver is loaded and the user selects the optional
"mac=fixed" setting, the tap driver incorrectly uses a globally
unique EUI-48 identifier (as documented in RFC 7042) of
00:64:74:61:70:<iface_idx>. Since this is a locally generated ID,
the Local bit in the MAC address should be set to 1, resulting in
the new address 02:64:74:61:70:<iface_idx>.

Bugzilla ID: 1198
Fixes: f6921783fee6 ("net/tap: add support for fixed MAC addresses")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 doc/guides/nics/tap.rst       | 8 ++++----
 drivers/net/tap/rte_eth_tap.c | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst
index 2f7417bddd..07df0d35a2 100644
--- a/doc/guides/nics/tap.rst
+++ b/doc/guides/nics/tap.rst
@@ -34,14 +34,14 @@ Using the option ``mac=fixed`` you can create a fixed known MAC address::
 
 The MAC address will have a fixed value with the last octet incrementing by one
 for each interface string containing ``mac=fixed``. The MAC address is formatted
-as 00:'d':'t':'a':'p':[00-FF]. Convert the characters to hex and you get the
-actual MAC address: ``00:64:74:61:70:[00-FF]``.
+as 02:'d':'t':'a':'p':[00-FF]. Convert the characters to hex and you get the
+actual MAC address: ``02:64:74:61:70:[00-FF]``.
 
-   --vdev=net_tap0,mac="00:64:74:61:70:11"
+   --vdev=net_tap0,mac="02:64:74:61:70:11"
 
 The MAC address will have a user value passed as string. The MAC address is in
 format with delimiter ``:``. The string is byte converted to hex and you get
-the actual MAC address: ``00:64:74:61:70:11``.
+the actual MAC address: ``02:64:74:61:70:11``.
 
 It is possible to specify a remote netdevice to capture packets from by adding
 ``remote=foo1``, for example::
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index f2a6c33a19..66595f8312 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2303,8 +2303,8 @@ set_mac_type(const char *key __rte_unused,
 	if (!strncasecmp(ETH_TAP_MAC_FIXED, value, strlen(ETH_TAP_MAC_FIXED))) {
 		static int iface_idx;
 
-		/* fixed mac = 00:64:74:61:70:<iface_idx> */
-		memcpy((char *)user_mac->addr_bytes, "\0dtap",
+		/* fixed mac = 02:64:74:61:70:<iface_idx> */
+		memcpy((char *)user_mac->addr_bytes, "\002dtap",
 			RTE_ETHER_ADDR_LEN);
 		user_mac->addr_bytes[RTE_ETHER_ADDR_LEN - 1] =
 			iface_idx++ + '0';
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.281642900 +0800
+++ 0028-net-tap-set-locally-administered-bit-for-fixed-MAC-a.patch	2023-06-25 14:31:58.315773900 +0800
@@ -1 +1 @@
-From c3006be2acab49c6b77ae9c9ef04b061e5dacbd6 Mon Sep 17 00:00:00 2001
+From 8e27036b63097e7df03246570676b549944f8f88 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c3006be2acab49c6b77ae9c9ef04b061e5dacbd6 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -49 +51 @@
-index 089ac202fa..bf98f75559 100644
+index f2a6c33a19..66595f8312 100644

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

* patch 'net/mana: use datapath logging' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (27 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/tap: set locally administered bit for fixed MAC address' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/mana: avoid unnecessary assignments in data path' " Xueming Li
                   ` (100 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 753a735ea0d5382c73b073807b8582a7fdca33b1 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Tue, 21 Feb 2023 12:42:25 -0800
Subject: [PATCH] net/mana: use datapath logging
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e2d3a3c060c415133180ad3980d2b7e564ac071f ]

Change all the logging statements on the datapath to use RTE_LOG_DP() to
reduce CPU overhead when logging is not enabled for datapath.

Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/gdma.c | 56 +++++++++++++++---------------
 drivers/net/mana/mana.h |  3 ++
 drivers/net/mana/mp.c   |  4 +--
 drivers/net/mana/mr.c   | 77 ++++++++++++++++++++---------------------
 drivers/net/mana/rx.c   | 32 ++++++++---------
 drivers/net/mana/tx.c   | 66 +++++++++++++++++------------------
 6 files changed, 120 insertions(+), 118 deletions(-)

diff --git a/drivers/net/mana/gdma.c b/drivers/net/mana/gdma.c
index 3d4039014f..f637084137 100644
--- a/drivers/net/mana/gdma.c
+++ b/drivers/net/mana/gdma.c
@@ -14,12 +14,12 @@ gdma_get_wqe_pointer(struct mana_gdma_queue *queue)
 		(queue->head * GDMA_WQE_ALIGNMENT_UNIT_SIZE) &
 		(queue->size - 1);
 
-	DRV_LOG(DEBUG, "txq sq_head %u sq_size %u offset_in_bytes %u",
-		queue->head, queue->size, offset_in_bytes);
+	DP_LOG(DEBUG, "txq sq_head %u sq_size %u offset_in_bytes %u",
+	       queue->head, queue->size, offset_in_bytes);
 
 	if (offset_in_bytes + GDMA_WQE_ALIGNMENT_UNIT_SIZE > queue->size)
-		DRV_LOG(ERR, "fatal error: offset_in_bytes %u too big",
-			offset_in_bytes);
+		DP_LOG(ERR, "fatal error: offset_in_bytes %u too big",
+		       offset_in_bytes);
 
 	return ((uint8_t *)queue->buffer) + offset_in_bytes;
 }
@@ -39,11 +39,11 @@ write_dma_client_oob(uint8_t *work_queue_buffer_pointer,
 		client_oob_size / sizeof(uint32_t);
 	header->client_data_unit = work_request->client_data_unit;
 
-	DRV_LOG(DEBUG, "queue buf %p sgl %u oob_h %u du %u oob_buf %p oob_b %u",
-		work_queue_buffer_pointer, header->num_sgl_entries,
-		header->inline_client_oob_size_in_dwords,
-		header->client_data_unit, work_request->inline_oob_data,
-		work_request->inline_oob_size_in_bytes);
+	DP_LOG(DEBUG, "queue buf %p sgl %u oob_h %u du %u oob_buf %p oob_b %u",
+	       work_queue_buffer_pointer, header->num_sgl_entries,
+	       header->inline_client_oob_size_in_dwords,
+	       header->client_data_unit, work_request->inline_oob_data,
+	       work_request->inline_oob_size_in_bytes);
 
 	p += sizeof(struct gdma_wqe_dma_oob);
 	if (work_request->inline_oob_data &&
@@ -73,8 +73,8 @@ write_scatter_gather_list(uint8_t *work_queue_head_pointer,
 	uint32_t size_to_queue_end;
 	uint32_t sge_list_size;
 
-	DRV_LOG(DEBUG, "work_queue_cur_pointer %p work_request->flags %x",
-		work_queue_cur_pointer, work_request->flags);
+	DP_LOG(DEBUG, "work_queue_cur_pointer %p work_request->flags %x",
+	       work_queue_cur_pointer, work_request->flags);
 
 	num_sge = work_request->num_sgl_elements;
 	sge_list = work_request->sgl;
@@ -110,9 +110,9 @@ write_scatter_gather_list(uint8_t *work_queue_head_pointer,
 		sge_list_size = size;
 	}
 
-	DRV_LOG(DEBUG, "sge %u address 0x%" PRIx64 " size %u key %u list_s %u",
-		num_sge, sge_list->address, sge_list->size,
-		sge_list->memory_key, sge_list_size);
+	DP_LOG(DEBUG, "sge %u address 0x%" PRIx64 " size %u key %u list_s %u",
+	       num_sge, sge_list->address, sge_list->size,
+	       sge_list->memory_key, sge_list_size);
 
 	return sge_list_size;
 }
@@ -141,13 +141,13 @@ gdma_post_work_request(struct mana_gdma_queue *queue,
 	uint32_t queue_free_units = queue->count - (queue->head - queue->tail);
 
 	if (wqe_size / GDMA_WQE_ALIGNMENT_UNIT_SIZE > queue_free_units) {
-		DRV_LOG(DEBUG, "WQE size %u queue count %u head %u tail %u",
-			wqe_size, queue->count, queue->head, queue->tail);
+		DP_LOG(DEBUG, "WQE size %u queue count %u head %u tail %u",
+		       wqe_size, queue->count, queue->head, queue->tail);
 		return -EBUSY;
 	}
 
-	DRV_LOG(DEBUG, "client_oob_size %u sgl_data_size %u wqe_size %u",
-		client_oob_size, sgl_data_size, wqe_size);
+	DP_LOG(DEBUG, "client_oob_size %u sgl_data_size %u wqe_size %u",
+	       client_oob_size, sgl_data_size, wqe_size);
 
 	if (wqe_info) {
 		wqe_info->wqe_index =
@@ -242,15 +242,15 @@ mana_ring_doorbell(void *db_page, enum gdma_queue_types queue_type,
 		break;
 
 	default:
-		DRV_LOG(ERR, "Unsupported queue type %d", queue_type);
+		DP_LOG(ERR, "Unsupported queue type %d", queue_type);
 		return -1;
 	}
 
 	/* Ensure all writes are done before ringing doorbell */
 	rte_wmb();
 
-	DRV_LOG(DEBUG, "db_page %p addr %p queue_id %u type %u tail %u arm %u",
-		db_page, addr, queue_id, queue_type, tail, arm);
+	DP_LOG(DEBUG, "db_page %p addr %p queue_id %u type %u tail %u arm %u",
+	       db_page, addr, queue_id, queue_type, tail, arm);
 
 	rte_write64(e.as_uint64, addr);
 	return 0;
@@ -274,15 +274,15 @@ gdma_poll_completion_queue(struct mana_gdma_queue *cq, struct gdma_comp *comp)
 				COMPLETION_QUEUE_OWNER_MASK;
 	cqe_owner_bits = cqe->owner_bits;
 
-	DRV_LOG(DEBUG, "comp cqe bits 0x%x owner bits 0x%x",
-		cqe_owner_bits, old_owner_bits);
+	DP_LOG(DEBUG, "comp cqe bits 0x%x owner bits 0x%x",
+	       cqe_owner_bits, old_owner_bits);
 
 	if (cqe_owner_bits == old_owner_bits)
 		return 0; /* No new entry */
 
 	if (cqe_owner_bits != new_owner_bits) {
-		DRV_LOG(ERR, "CQ overflowed, ID %u cqe 0x%x new 0x%x",
-			cq->id, cqe_owner_bits, new_owner_bits);
+		DP_LOG(ERR, "CQ overflowed, ID %u cqe 0x%x new 0x%x",
+		       cq->id, cqe_owner_bits, new_owner_bits);
 		return -1;
 	}
 
@@ -296,8 +296,8 @@ gdma_poll_completion_queue(struct mana_gdma_queue *cq, struct gdma_comp *comp)
 
 	cq->head++;
 
-	DRV_LOG(DEBUG, "comp new 0x%x old 0x%x cqe 0x%x wq %u sq %u head %u",
-		new_owner_bits, old_owner_bits, cqe_owner_bits,
-		comp->work_queue_number, comp->send_work_queue, cq->head);
+	DP_LOG(DEBUG, "comp new 0x%x old 0x%x cqe 0x%x wq %u sq %u head %u",
+	       new_owner_bits, old_owner_bits, cqe_owner_bits,
+	       comp->work_queue_number, comp->send_work_queue, cq->head);
 	return 1;
 }
diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h
index 4a05238a96..7b8c27df2a 100644
--- a/drivers/net/mana/mana.h
+++ b/drivers/net/mana/mana.h
@@ -447,6 +447,9 @@ extern int mana_logtype_init;
 	rte_log(RTE_LOG_ ## level, mana_logtype_driver, "%s(): " fmt "\n", \
 		__func__, ## args)
 
+#define DP_LOG(level, fmt, args...) \
+	RTE_LOG_DP(level, PMD, fmt, ## args)
+
 #define PMD_INIT_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, mana_logtype_init, "%s(): " fmt "\n",\
 		__func__, ## args)
diff --git a/drivers/net/mana/mp.c b/drivers/net/mana/mp.c
index 92432c431d..738487f65a 100644
--- a/drivers/net/mana/mp.c
+++ b/drivers/net/mana/mp.c
@@ -28,8 +28,8 @@ mana_mp_mr_create(struct mana_priv *priv, uintptr_t addr, uint32_t len)
 	if (!ibv_mr)
 		return -errno;
 
-	DRV_LOG(DEBUG, "MR (2nd) lkey %u addr %p len %zu",
-		ibv_mr->lkey, ibv_mr->addr, ibv_mr->length);
+	DP_LOG(DEBUG, "MR (2nd) lkey %u addr %p len %zu",
+	       ibv_mr->lkey, ibv_mr->addr, ibv_mr->length);
 
 	mr = rte_calloc("MANA MR", 1, sizeof(*mr), 0);
 	if (!mr) {
diff --git a/drivers/net/mana/mr.c b/drivers/net/mana/mr.c
index 22df0917bb..fec0dc961c 100644
--- a/drivers/net/mana/mr.c
+++ b/drivers/net/mana/mr.c
@@ -47,23 +47,23 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 
 	for (i = 0; i < pool->nb_mem_chunks; i++) {
 		if (ranges[i].len > priv->max_mr_size) {
-			DRV_LOG(ERR, "memory chunk size %u exceeding max MR",
-				ranges[i].len);
+			DP_LOG(ERR, "memory chunk size %u exceeding max MR",
+			       ranges[i].len);
 			return -ENOMEM;
 		}
 
-		DRV_LOG(DEBUG,
-			"registering memory chunk start 0x%" PRIx64 " len %u",
-			ranges[i].start, ranges[i].len);
+		DP_LOG(DEBUG,
+		       "registering memory chunk start 0x%" PRIx64 " len %u",
+		       ranges[i].start, ranges[i].len);
 
 		if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
 			/* Send a message to the primary to do MR */
 			ret = mana_mp_req_mr_create(priv, ranges[i].start,
 						    ranges[i].len);
 			if (ret) {
-				DRV_LOG(ERR,
-					"MR failed start 0x%" PRIx64 " len %u",
-					ranges[i].start, ranges[i].len);
+				DP_LOG(ERR,
+				       "MR failed start 0x%" PRIx64 " len %u",
+				       ranges[i].start, ranges[i].len);
 				return ret;
 			}
 			continue;
@@ -72,8 +72,8 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 		ibv_mr = ibv_reg_mr(priv->ib_pd, (void *)ranges[i].start,
 				    ranges[i].len, IBV_ACCESS_LOCAL_WRITE);
 		if (ibv_mr) {
-			DRV_LOG(DEBUG, "MR lkey %u addr %p len %" PRIu64,
-				ibv_mr->lkey, ibv_mr->addr, ibv_mr->length);
+			DP_LOG(DEBUG, "MR lkey %u addr %p len %" PRIu64,
+			       ibv_mr->lkey, ibv_mr->addr, ibv_mr->length);
 
 			mr = rte_calloc("MANA MR", 1, sizeof(*mr), 0);
 			mr->lkey = ibv_mr->lkey;
@@ -86,7 +86,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 			rte_spinlock_unlock(&priv->mr_btree_lock);
 			if (ret) {
 				ibv_dereg_mr(ibv_mr);
-				DRV_LOG(ERR, "Failed to add to global MR btree");
+				DP_LOG(ERR, "Failed to add to global MR btree");
 				return ret;
 			}
 
@@ -95,12 +95,12 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 				/* Don't need to clean up MR as it's already
 				 * in the global tree
 				 */
-				DRV_LOG(ERR, "Failed to add to local MR btree");
+				DP_LOG(ERR, "Failed to add to local MR btree");
 				return ret;
 			}
 		} else {
-			DRV_LOG(ERR, "MR failed at 0x%" PRIx64 " len %u",
-				ranges[i].start, ranges[i].len);
+			DP_LOG(ERR, "MR failed at 0x%" PRIx64 " len %u",
+			       ranges[i].start, ranges[i].len);
 			return -errno;
 		}
 	}
@@ -118,7 +118,7 @@ mana_del_pmd_mr(struct mana_mr_cache *mr)
 
 	ret = ibv_dereg_mr(ibv_mr);
 	if (ret)
-		DRV_LOG(ERR, "dereg MR failed ret %d", ret);
+		DP_LOG(ERR, "dereg MR failed ret %d", ret);
 }
 
 /*
@@ -133,17 +133,16 @@ mana_find_pmd_mr(struct mana_mr_btree *local_mr_btree, struct mana_priv *priv,
 	struct mana_mr_cache *mr;
 	uint16_t idx;
 
-	DRV_LOG(DEBUG, "finding mr for mbuf addr %p len %d",
-		mbuf->buf_addr, mbuf->buf_len);
+	DP_LOG(DEBUG, "finding mr for mbuf addr %p len %d",
+	       mbuf->buf_addr, mbuf->buf_len);
 
 try_again:
 	/* First try to find the MR in local queue tree */
 	mr = mana_mr_btree_lookup(local_mr_btree, &idx,
 				  (uintptr_t)mbuf->buf_addr, mbuf->buf_len);
 	if (mr) {
-		DRV_LOG(DEBUG,
-			"Local mr lkey %u addr 0x%" PRIx64 " len %" PRIu64,
-			mr->lkey, mr->addr, mr->len);
+		DP_LOG(DEBUG, "Local mr lkey %u addr 0x%" PRIx64 " len %" PRIu64,
+		       mr->lkey, mr->addr, mr->len);
 		return mr;
 	}
 
@@ -158,25 +157,25 @@ try_again:
 	if (mr) {
 		ret = mana_mr_btree_insert(local_mr_btree, mr);
 		if (ret) {
-			DRV_LOG(DEBUG, "Failed to add MR to local tree.");
+			DP_LOG(ERR, "Failed to add MR to local tree.");
 			return NULL;
 		}
 
-		DRV_LOG(DEBUG,
-			"Added local MR key %u addr 0x%" PRIx64 " len %" PRIu64,
-			mr->lkey, mr->addr, mr->len);
+		DP_LOG(DEBUG,
+		       "Added local MR key %u addr 0x%" PRIx64 " len %" PRIu64,
+		       mr->lkey, mr->addr, mr->len);
 		return mr;
 	}
 
 	if (second_try) {
-		DRV_LOG(ERR, "Internal error second try failed");
+		DP_LOG(ERR, "Internal error second try failed");
 		return NULL;
 	}
 
 	ret = mana_new_pmd_mr(local_mr_btree, priv, pool);
 	if (ret) {
-		DRV_LOG(ERR, "Failed to allocate MR ret %d addr %p len %d",
-			ret, mbuf->buf_addr, mbuf->buf_len);
+		DP_LOG(ERR, "Failed to allocate MR ret %d addr %p len %d",
+		       ret, mbuf->buf_addr, mbuf->buf_len);
 		return NULL;
 	}
 
@@ -215,11 +214,11 @@ mana_mr_btree_expand(struct mana_mr_btree *bt, int n)
 	mem = rte_realloc_socket(bt->table, n * sizeof(struct mana_mr_cache),
 				 0, bt->socket);
 	if (!mem) {
-		DRV_LOG(ERR, "Failed to expand btree size %d", n);
+		DP_LOG(ERR, "Failed to expand btree size %d", n);
 		return -1;
 	}
 
-	DRV_LOG(ERR, "Expanded btree to size %d", n);
+	DP_LOG(ERR, "Expanded btree to size %d", n);
 	bt->table = mem;
 	bt->size = n;
 
@@ -266,9 +265,9 @@ mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
 	if (addr + len <= table[base].addr + table[base].len)
 		return &table[base];
 
-	DRV_LOG(DEBUG,
-		"addr 0x%" PRIx64 " len %zu idx %u sum 0x%" PRIx64 " not found",
-		addr, len, *idx, addr + len);
+	DP_LOG(DEBUG,
+	       "addr 0x%" PRIx64 " len %zu idx %u sum 0x%" PRIx64 " not found",
+	       addr, len, *idx, addr + len);
 
 	return NULL;
 }
@@ -317,8 +316,8 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry)
 	uint16_t shift;
 
 	if (mana_mr_btree_lookup(bt, &idx, entry->addr, entry->len)) {
-		DRV_LOG(DEBUG, "Addr 0x%" PRIx64 " len %zu exists in btree",
-			entry->addr, entry->len);
+		DP_LOG(DEBUG, "Addr 0x%" PRIx64 " len %zu exists in btree",
+		       entry->addr, entry->len);
 		return 0;
 	}
 
@@ -332,17 +331,17 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry)
 	idx++;
 	shift = (bt->len - idx) * sizeof(struct mana_mr_cache);
 	if (shift) {
-		DRV_LOG(DEBUG, "Moving %u bytes from idx %u to %u",
-			shift, idx, idx + 1);
+		DP_LOG(DEBUG, "Moving %u bytes from idx %u to %u",
+		       shift, idx, idx + 1);
 		memmove(&table[idx + 1], &table[idx], shift);
 	}
 
 	table[idx] = *entry;
 	bt->len++;
 
-	DRV_LOG(DEBUG,
-		"Inserted MR b-tree table %p idx %d addr 0x%" PRIx64 " len %zu",
-		table, idx, entry->addr, entry->len);
+	DP_LOG(DEBUG,
+	       "Inserted MR b-tree table %p idx %d addr 0x%" PRIx64 " len %zu",
+	       table, idx, entry->addr, entry->len);
 
 	return 0;
 }
diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c
index 55247889c1..10392ae292 100644
--- a/drivers/net/mana/rx.c
+++ b/drivers/net/mana/rx.c
@@ -42,7 +42,7 @@ mana_rq_ring_doorbell(struct mana_rxq *rxq, uint8_t arm)
 			 arm);
 
 	if (ret)
-		DRV_LOG(ERR, "failed to ring RX doorbell ret %d", ret);
+		DP_LOG(ERR, "failed to ring RX doorbell ret %d", ret);
 
 	return ret;
 }
@@ -66,7 +66,7 @@ mana_alloc_and_post_rx_wqe(struct mana_rxq *rxq)
 
 	mr = mana_find_pmd_mr(&rxq->mr_btree, priv, mbuf);
 	if (!mr) {
-		DRV_LOG(ERR, "failed to register RX MR");
+		DP_LOG(ERR, "failed to register RX MR");
 		rte_pktmbuf_free(mbuf);
 		return -ENOMEM;
 	}
@@ -97,7 +97,7 @@ mana_alloc_and_post_rx_wqe(struct mana_rxq *rxq)
 		desc->wqe_size_in_bu = wqe_info.wqe_size_in_bu;
 		rxq->desc_ring_head = (rxq->desc_ring_head + 1) % rxq->num_desc;
 	} else {
-		DRV_LOG(ERR, "failed to post recv ret %d", ret);
+		DP_LOG(DEBUG, "failed to post recv ret %d", ret);
 		return ret;
 	}
 
@@ -116,7 +116,7 @@ mana_alloc_and_post_rx_wqes(struct mana_rxq *rxq)
 	for (i = 0; i < rxq->num_desc; i++) {
 		ret = mana_alloc_and_post_rx_wqe(rxq);
 		if (ret) {
-			DRV_LOG(ERR, "failed to post RX ret = %d", ret);
+			DP_LOG(ERR, "failed to post RX ret = %d", ret);
 			return ret;
 		}
 	}
@@ -395,8 +395,8 @@ mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			(struct mana_rx_comp_oob *)&comp.completion_data[0];
 
 		if (comp.work_queue_number != rxq->gdma_rq.id) {
-			DRV_LOG(ERR, "rxq comp id mismatch wqid=0x%x rcid=0x%x",
-				comp.work_queue_number, rxq->gdma_rq.id);
+			DP_LOG(ERR, "rxq comp id mismatch wqid=0x%x rcid=0x%x",
+			       comp.work_queue_number, rxq->gdma_rq.id);
 			rxq->stats.errors++;
 			break;
 		}
@@ -411,22 +411,22 @@ mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			break;
 
 		case CQE_RX_TRUNCATED:
-			DRV_LOG(ERR, "Drop a truncated packet");
+			DP_LOG(DEBUG, "Drop a truncated packet");
 			rxq->stats.errors++;
 			rte_pktmbuf_free(mbuf);
 			goto drop;
 
 		case CQE_RX_COALESCED_4:
-			DRV_LOG(ERR, "RX coalescing is not supported");
+			DP_LOG(ERR, "RX coalescing is not supported");
 			continue;
 
 		default:
-			DRV_LOG(ERR, "Unknown RX CQE type %d",
-				oob->cqe_hdr.cqe_type);
+			DP_LOG(ERR, "Unknown RX CQE type %d",
+			       oob->cqe_hdr.cqe_type);
 			continue;
 		}
 
-		DRV_LOG(DEBUG, "mana_rx_comp_oob CQE_RX_OKAY rxq %p", rxq);
+		DP_LOG(DEBUG, "mana_rx_comp_oob CQE_RX_OKAY rxq %p", rxq);
 
 		mbuf->data_off = RTE_PKTMBUF_HEADROOM;
 		mbuf->nb_segs = 1;
@@ -470,7 +470,7 @@ drop:
 		/* Post another request */
 		ret = mana_alloc_and_post_rx_wqe(rxq);
 		if (ret) {
-			DRV_LOG(ERR, "failed to post rx wqe ret=%d", ret);
+			DP_LOG(ERR, "failed to post rx wqe ret=%d", ret);
 			break;
 		}
 
@@ -490,8 +490,8 @@ mana_arm_cq(struct mana_rxq *rxq, uint8_t arm)
 	uint32_t head = rxq->gdma_cq.head %
 		(rxq->gdma_cq.count << COMPLETION_QUEUE_ENTRY_OWNER_BITS_SIZE);
 
-	DRV_LOG(ERR, "Ringing completion queue ID %u head %u arm %d",
-		rxq->gdma_cq.id, head, arm);
+	DP_LOG(DEBUG, "Ringing completion queue ID %u head %u arm %d",
+	       rxq->gdma_cq.id, head, arm);
 
 	return mana_ring_doorbell(priv->db_page, GDMA_QUEUE_COMPLETION,
 				  rxq->gdma_cq.id, head, arm);
@@ -521,8 +521,8 @@ mana_rx_intr_disable(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 
 	if (ret) {
 		if (ret != EAGAIN)
-			DRV_LOG(ERR, "Can't disable RX intr queue %d",
-				rx_queue_id);
+			DP_LOG(ERR, "Can't disable RX intr queue %d",
+			       rx_queue_id);
 	} else {
 		ibv_ack_cq_events(rxq->cq, 1);
 	}
diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c
index 300bf27cc1..a45b5e289c 100644
--- a/drivers/net/mana/tx.c
+++ b/drivers/net/mana/tx.c
@@ -183,17 +183,17 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			(struct mana_tx_comp_oob *)&comp.completion_data[0];
 
 		if (oob->cqe_hdr.cqe_type != CQE_TX_OKAY) {
-			DRV_LOG(ERR,
-				"mana_tx_comp_oob cqe_type %u vendor_err %u",
-				oob->cqe_hdr.cqe_type, oob->cqe_hdr.vendor_err);
+			DP_LOG(ERR,
+			       "mana_tx_comp_oob cqe_type %u vendor_err %u",
+			       oob->cqe_hdr.cqe_type, oob->cqe_hdr.vendor_err);
 			txq->stats.errors++;
 		} else {
-			DRV_LOG(DEBUG, "mana_tx_comp_oob CQE_TX_OKAY");
+			DP_LOG(DEBUG, "mana_tx_comp_oob CQE_TX_OKAY");
 			txq->stats.packets++;
 		}
 
 		if (!desc->pkt) {
-			DRV_LOG(ERR, "mana_txq_desc has a NULL pkt");
+			DP_LOG(ERR, "mana_txq_desc has a NULL pkt");
 		} else {
 			txq->stats.bytes += desc->pkt->data_len;
 			rte_pktmbuf_free(desc->pkt);
@@ -214,8 +214,8 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 
 		/* Drop the packet if it exceeds max segments */
 		if (m_pkt->nb_segs > priv->max_send_sge) {
-			DRV_LOG(ERR, "send packet segments %d exceeding max",
-				m_pkt->nb_segs);
+			DP_LOG(ERR, "send packet segments %d exceeding max",
+			       m_pkt->nb_segs);
 			continue;
 		}
 
@@ -257,7 +257,7 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 				tcp_hdr->cksum = rte_ipv6_phdr_cksum(ip_hdr,
 							m_pkt->ol_flags);
 			} else {
-				DRV_LOG(ERR, "Invalid input for TCP CKSUM");
+				DP_LOG(ERR, "Invalid input for TCP CKSUM");
 			}
 
 			tx_oob.short_oob.tx_compute_TCP_checksum = 1;
@@ -297,7 +297,7 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 							    m_pkt->ol_flags);
 
 			} else {
-				DRV_LOG(ERR, "Invalid input for UDP CKSUM");
+				DP_LOG(ERR, "Invalid input for UDP CKSUM");
 			}
 
 			tx_oob.short_oob.tx_compute_UDP_checksum = 1;
@@ -310,20 +310,20 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			get_vsq_frame_num(txq->gdma_sq.id);
 		tx_oob.short_oob.short_vport_offset = txq->tx_vp_offset;
 
-		DRV_LOG(DEBUG, "tx_oob packet_format %u ipv4 %u ipv6 %u",
-			tx_oob.short_oob.packet_format,
-			tx_oob.short_oob.tx_is_outer_ipv4,
-			tx_oob.short_oob.tx_is_outer_ipv6);
+		DP_LOG(DEBUG, "tx_oob packet_format %u ipv4 %u ipv6 %u",
+		       tx_oob.short_oob.packet_format,
+		       tx_oob.short_oob.tx_is_outer_ipv4,
+		       tx_oob.short_oob.tx_is_outer_ipv6);
 
-		DRV_LOG(DEBUG, "tx_oob checksum ip %u tcp %u udp %u offset %u",
-			tx_oob.short_oob.tx_compute_IP_header_checksum,
-			tx_oob.short_oob.tx_compute_TCP_checksum,
-			tx_oob.short_oob.tx_compute_UDP_checksum,
-			tx_oob.short_oob.tx_transport_header_offset);
+		DP_LOG(DEBUG, "tx_oob checksum ip %u tcp %u udp %u offset %u",
+		       tx_oob.short_oob.tx_compute_IP_header_checksum,
+		       tx_oob.short_oob.tx_compute_TCP_checksum,
+		       tx_oob.short_oob.tx_compute_UDP_checksum,
+		       tx_oob.short_oob.tx_transport_header_offset);
 
-		DRV_LOG(DEBUG, "pkt[%d]: buf_addr 0x%p, nb_segs %d, pkt_len %d",
-			pkt_idx, m_pkt->buf_addr, m_pkt->nb_segs,
-			m_pkt->pkt_len);
+		DP_LOG(DEBUG, "pkt[%d]: buf_addr 0x%p, nb_segs %d, pkt_len %d",
+		       pkt_idx, m_pkt->buf_addr, m_pkt->nb_segs,
+		       m_pkt->pkt_len);
 
 		/* Create SGL for packet data buffers */
 		for (seg_idx = 0; seg_idx < m_pkt->nb_segs; seg_idx++) {
@@ -331,8 +331,8 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 				mana_find_pmd_mr(&txq->mr_btree, priv, m_seg);
 
 			if (!mr) {
-				DRV_LOG(ERR, "failed to get MR, pkt_idx %u",
-					pkt_idx);
+				DP_LOG(ERR, "failed to get MR, pkt_idx %u",
+				       pkt_idx);
 				break;
 			}
 
@@ -342,11 +342,11 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			sgl.gdma_sgl[seg_idx].size = m_seg->data_len;
 			sgl.gdma_sgl[seg_idx].memory_key = mr->lkey;
 
-			DRV_LOG(DEBUG,
-				"seg idx %u addr 0x%" PRIx64 " size %x key %x",
-				seg_idx, sgl.gdma_sgl[seg_idx].address,
-				sgl.gdma_sgl[seg_idx].size,
-				sgl.gdma_sgl[seg_idx].memory_key);
+			DP_LOG(DEBUG,
+			       "seg idx %u addr 0x%" PRIx64 " size %x key %x",
+			       seg_idx, sgl.gdma_sgl[seg_idx].address,
+			       sgl.gdma_sgl[seg_idx].size,
+			       sgl.gdma_sgl[seg_idx].memory_key);
 
 			m_seg = m_seg->next;
 		}
@@ -383,11 +383,11 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 
 			pkt_sent++;
 
-			DRV_LOG(DEBUG, "nb_pkts %u pkt[%d] sent",
-				nb_pkts, pkt_idx);
+			DP_LOG(DEBUG, "nb_pkts %u pkt[%d] sent",
+			       nb_pkts, pkt_idx);
 		} else {
-			DRV_LOG(INFO, "pkt[%d] failed to post send ret %d",
-				pkt_idx, ret);
+			DP_LOG(DEBUG, "pkt[%d] failed to post send ret %d",
+			       pkt_idx, ret);
 			break;
 		}
 	}
@@ -409,7 +409,7 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 						GDMA_WQE_ALIGNMENT_UNIT_SIZE,
 					 0);
 		if (ret)
-			DRV_LOG(ERR, "mana_ring_doorbell failed ret %d", ret);
+			DP_LOG(ERR, "mana_ring_doorbell failed ret %d", ret);
 	}
 
 	return pkt_sent;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.307442700 +0800
+++ 0029-net-mana-use-datapath-logging.patch	2023-06-25 14:31:58.315773900 +0800
@@ -1 +1 @@
-From e2d3a3c060c415133180ad3980d2b7e564ac071f Mon Sep 17 00:00:00 2001
+From 753a735ea0d5382c73b073807b8582a7fdca33b1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e2d3a3c060c415133180ad3980d2b7e564ac071f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/mana: avoid unnecessary assignments in data path' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (28 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/mana: use datapath logging' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/mana: optimize completion queue by batch processing' " Xueming Li
                   ` (99 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5b1a78987f11be0d44d658feac20e72d5b517869 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 17 Mar 2023 16:32:43 -0700
Subject: [PATCH] net/mana: avoid unnecessary assignments in data path
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b5dfcaece13add5d874d805197856c8b8aa643ab ]

Unnecessary assignments involve memset and waste CPU cycles.
Removing them to reduce CPU usage.

Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/gdma.c | 11 ++---------
 drivers/net/mana/mana.h |  2 +-
 drivers/net/mana/rx.c   |  9 ++++-----
 drivers/net/mana/tx.c   | 17 ++++++++++-------
 4 files changed, 17 insertions(+), 22 deletions(-)

diff --git a/drivers/net/mana/gdma.c b/drivers/net/mana/gdma.c
index f637084137..7d5bb08927 100644
--- a/drivers/net/mana/gdma.c
+++ b/drivers/net/mana/gdma.c
@@ -123,7 +123,7 @@ write_scatter_gather_list(uint8_t *work_queue_head_pointer,
 int
 gdma_post_work_request(struct mana_gdma_queue *queue,
 		       struct gdma_work_request *work_req,
-		       struct gdma_posted_wqe_info *wqe_info)
+		       uint32_t *wqe_size_in_bu)
 {
 	uint32_t client_oob_size =
 		work_req->inline_oob_size_in_bytes >
@@ -149,14 +149,7 @@ gdma_post_work_request(struct mana_gdma_queue *queue,
 	DP_LOG(DEBUG, "client_oob_size %u sgl_data_size %u wqe_size %u",
 	       client_oob_size, sgl_data_size, wqe_size);
 
-	if (wqe_info) {
-		wqe_info->wqe_index =
-			((queue->head * GDMA_WQE_ALIGNMENT_UNIT_SIZE) &
-			 (queue->size - 1)) / GDMA_WQE_ALIGNMENT_UNIT_SIZE;
-		wqe_info->unmasked_queue_offset = queue->head;
-		wqe_info->wqe_size_in_bu =
-			wqe_size / GDMA_WQE_ALIGNMENT_UNIT_SIZE;
-	}
+	*wqe_size_in_bu = wqe_size / GDMA_WQE_ALIGNMENT_UNIT_SIZE;
 
 	wq_buffer_pointer = gdma_get_wqe_pointer(queue);
 	wq_buffer_pointer += write_dma_client_oob(wq_buffer_pointer, work_req,
diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h
index 7b8c27df2a..ce16e7efff 100644
--- a/drivers/net/mana/mana.h
+++ b/drivers/net/mana/mana.h
@@ -462,7 +462,7 @@ int mana_rq_ring_doorbell(struct mana_rxq *rxq, uint8_t arm);
 
 int gdma_post_work_request(struct mana_gdma_queue *queue,
 			   struct gdma_work_request *work_req,
-			   struct gdma_posted_wqe_info *wqe_info);
+			   uint32_t *wqe_size_in_bu);
 uint8_t *gdma_get_wqe_pointer(struct mana_gdma_queue *queue);
 
 uint16_t mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **rx_pkts,
diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c
index 10392ae292..afd153424b 100644
--- a/drivers/net/mana/rx.c
+++ b/drivers/net/mana/rx.c
@@ -52,8 +52,8 @@ mana_alloc_and_post_rx_wqe(struct mana_rxq *rxq)
 {
 	struct rte_mbuf *mbuf = NULL;
 	struct gdma_sgl_element sgl[1];
-	struct gdma_work_request request = {0};
-	struct gdma_posted_wqe_info wqe_info = {0};
+	struct gdma_work_request request;
+	uint32_t wqe_size_in_bu;
 	struct mana_priv *priv = rxq->priv;
 	int ret;
 	struct mana_mr_cache *mr;
@@ -72,7 +72,6 @@ mana_alloc_and_post_rx_wqe(struct mana_rxq *rxq)
 	}
 
 	request.gdma_header.struct_size = sizeof(request);
-	wqe_info.gdma_header.struct_size = sizeof(wqe_info);
 
 	sgl[0].address = rte_cpu_to_le_64(rte_pktmbuf_mtod(mbuf, uint64_t));
 	sgl[0].memory_key = mr->lkey;
@@ -87,14 +86,14 @@ mana_alloc_and_post_rx_wqe(struct mana_rxq *rxq)
 	request.flags = 0;
 	request.client_data_unit = NOT_USING_CLIENT_DATA_UNIT;
 
-	ret = gdma_post_work_request(&rxq->gdma_rq, &request, &wqe_info);
+	ret = gdma_post_work_request(&rxq->gdma_rq, &request, &wqe_size_in_bu);
 	if (!ret) {
 		struct mana_rxq_desc *desc =
 			&rxq->desc_ring[rxq->desc_ring_head];
 
 		/* update queue for tracking pending packets */
 		desc->pkt = mbuf;
-		desc->wqe_size_in_bu = wqe_info.wqe_size_in_bu;
+		desc->wqe_size_in_bu = wqe_size_in_bu;
 		rxq->desc_ring_head = (rxq->desc_ring_head + 1) % rxq->num_desc;
 	} else {
 		DP_LOG(DEBUG, "failed to post recv ret %d", ret);
diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c
index a45b5e289c..b593f98bb1 100644
--- a/drivers/net/mana/tx.c
+++ b/drivers/net/mana/tx.c
@@ -208,8 +208,8 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	for (uint16_t pkt_idx = 0; pkt_idx < nb_pkts; pkt_idx++) {
 		struct rte_mbuf *m_pkt = tx_pkts[pkt_idx];
 		struct rte_mbuf *m_seg = m_pkt;
-		struct transmit_oob_v2 tx_oob = {0};
-		struct one_sgl sgl = {0};
+		struct transmit_oob_v2 tx_oob;
+		struct one_sgl sgl;
 		uint16_t seg_idx;
 
 		/* Drop the packet if it exceeds max segments */
@@ -263,6 +263,8 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			tx_oob.short_oob.tx_compute_TCP_checksum = 1;
 			tx_oob.short_oob.tx_transport_header_offset =
 				m_pkt->l2_len + m_pkt->l3_len;
+		} else {
+			tx_oob.short_oob.tx_compute_TCP_checksum = 0;
 		}
 
 		if ((m_pkt->ol_flags & RTE_MBUF_F_TX_L4_MASK) ==
@@ -301,6 +303,8 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			}
 
 			tx_oob.short_oob.tx_compute_UDP_checksum = 1;
+		} else {
+			tx_oob.short_oob.tx_compute_UDP_checksum = 0;
 		}
 
 		tx_oob.short_oob.suppress_tx_CQE_generation = 0;
@@ -355,11 +359,10 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		if (seg_idx != m_pkt->nb_segs)
 			continue;
 
-		struct gdma_work_request work_req = {0};
-		struct gdma_posted_wqe_info wqe_info = {0};
+		struct gdma_work_request work_req;
+		uint32_t wqe_size_in_bu;
 
 		work_req.gdma_header.struct_size = sizeof(work_req);
-		wqe_info.gdma_header.struct_size = sizeof(wqe_info);
 
 		work_req.sgl = sgl.gdma_sgl;
 		work_req.num_sgl_elements = m_pkt->nb_segs;
@@ -370,14 +373,14 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		work_req.client_data_unit = NOT_USING_CLIENT_DATA_UNIT;
 
 		ret = gdma_post_work_request(&txq->gdma_sq, &work_req,
-					     &wqe_info);
+					     &wqe_size_in_bu);
 		if (!ret) {
 			struct mana_txq_desc *desc =
 				&txq->desc_ring[txq->desc_ring_head];
 
 			/* Update queue for tracking pending requests */
 			desc->pkt = m_pkt;
-			desc->wqe_size_in_bu = wqe_info.wqe_size_in_bu;
+			desc->wqe_size_in_bu = wqe_size_in_bu;
 			txq->desc_ring_head =
 				(txq->desc_ring_head + 1) % txq->num_desc;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.337143500 +0800
+++ 0030-net-mana-avoid-unnecessary-assignments-in-data-path.patch	2023-06-25 14:31:58.315773900 +0800
@@ -1 +1 @@
-From b5dfcaece13add5d874d805197856c8b8aa643ab Mon Sep 17 00:00:00 2001
+From 5b1a78987f11be0d44d658feac20e72d5b517869 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b5dfcaece13add5d874d805197856c8b8aa643ab ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/mana: optimize completion queue by batch processing' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (29 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/mana: avoid unnecessary assignments in data path' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/dpaa2: fix checksum good flags' " Xueming Li
                   ` (98 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ecd3e1f354f2732a67dea91eec433cad80d07332 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 17 Mar 2023 16:32:44 -0700
Subject: [PATCH] net/mana: optimize completion queue by batch processing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 311246198c5f34ca4c51573ee1811a966da7d8af ]

We can poll completion queues in a batch to speed up completion processing.
Also, the completion data doesn't need to be copied out of the hardware
queue and they can be passed as pointers to be consumed by the RX/TX code.

Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/gdma.c | 62 ++++++++++++++++++++++-------------------
 drivers/net/mana/mana.c | 22 +++++++++++++++
 drivers/net/mana/mana.h | 25 +++++++----------
 drivers/net/mana/rx.c   | 21 +++++---------
 drivers/net/mana/tx.c   | 11 +++++---
 5 files changed, 80 insertions(+), 61 deletions(-)

diff --git a/drivers/net/mana/gdma.c b/drivers/net/mana/gdma.c
index 7d5bb08927..65685fe236 100644
--- a/drivers/net/mana/gdma.c
+++ b/drivers/net/mana/gdma.c
@@ -252,45 +252,51 @@ mana_ring_doorbell(void *db_page, enum gdma_queue_types queue_type,
 /*
  * Poll completion queue for completions.
  */
-int
-gdma_poll_completion_queue(struct mana_gdma_queue *cq, struct gdma_comp *comp)
+uint32_t
+gdma_poll_completion_queue(struct mana_gdma_queue *cq,
+			   struct gdma_comp *gdma_comp, uint32_t max_comp)
 {
 	struct gdma_hardware_completion_entry *cqe;
-	uint32_t head = cq->head % cq->count;
 	uint32_t new_owner_bits, old_owner_bits;
 	uint32_t cqe_owner_bits;
+	uint32_t num_comp = 0;
 	struct gdma_hardware_completion_entry *buffer = cq->buffer;
 
-	cqe = &buffer[head];
-	new_owner_bits = (cq->head / cq->count) & COMPLETION_QUEUE_OWNER_MASK;
-	old_owner_bits = (cq->head / cq->count - 1) &
-				COMPLETION_QUEUE_OWNER_MASK;
-	cqe_owner_bits = cqe->owner_bits;
+	while (num_comp < max_comp) {
+		cqe = &buffer[cq->head % cq->count];
+		new_owner_bits = (cq->head / cq->count) &
+					COMPLETION_QUEUE_OWNER_MASK;
+		old_owner_bits = (cq->head / cq->count - 1) &
+					COMPLETION_QUEUE_OWNER_MASK;
+		cqe_owner_bits = cqe->owner_bits;
+
+		DP_LOG(DEBUG, "comp cqe bits 0x%x owner bits 0x%x",
+			cqe_owner_bits, old_owner_bits);
+
+		/* No new entry */
+		if (cqe_owner_bits == old_owner_bits)
+			break;
+
+		if (cqe_owner_bits != new_owner_bits) {
+			DRV_LOG(ERR, "CQ overflowed, ID %u cqe 0x%x new 0x%x",
+				cq->id, cqe_owner_bits, new_owner_bits);
+			break;
+		}
 
-	DP_LOG(DEBUG, "comp cqe bits 0x%x owner bits 0x%x",
-	       cqe_owner_bits, old_owner_bits);
+		gdma_comp[num_comp].cqe_data = cqe->dma_client_data;
+		num_comp++;
 
-	if (cqe_owner_bits == old_owner_bits)
-		return 0; /* No new entry */
+		cq->head++;
 
-	if (cqe_owner_bits != new_owner_bits) {
-		DP_LOG(ERR, "CQ overflowed, ID %u cqe 0x%x new 0x%x",
-		       cq->id, cqe_owner_bits, new_owner_bits);
-		return -1;
+		DP_LOG(DEBUG, "comp new 0x%x old 0x%x cqe 0x%x wq %u sq %u head %u",
+		       new_owner_bits, old_owner_bits, cqe_owner_bits,
+		       cqe->wq_num, cqe->is_sq, cq->head);
 	}
 
-	/* Ensure checking owner bits happens before reading from CQE */
+	/* Make sure the CQE owner bits are checked before we access the data
+	 * in CQE
+	 */
 	rte_rmb();
 
-	comp->work_queue_number = cqe->wq_num;
-	comp->send_work_queue = cqe->is_sq;
-
-	memcpy(comp->completion_data, cqe->dma_client_data, GDMA_COMP_DATA_SIZE);
-
-	cq->head++;
-
-	DP_LOG(DEBUG, "comp new 0x%x old 0x%x cqe 0x%x wq %u sq %u head %u",
-	       new_owner_bits, old_owner_bits, cqe_owner_bits,
-	       comp->work_queue_number, comp->send_work_queue, cq->head);
-	return 1;
+	return num_comp;
 }
diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 8a782c0d63..2463f34c1e 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -487,6 +487,15 @@ mana_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		goto fail;
 	}
 
+	txq->gdma_comp_buf = rte_malloc_socket("mana_txq_comp",
+			sizeof(*txq->gdma_comp_buf) * nb_desc,
+			RTE_CACHE_LINE_SIZE, socket_id);
+	if (!txq->gdma_comp_buf) {
+		DRV_LOG(ERR, "failed to allocate txq comp");
+		ret = -ENOMEM;
+		goto fail;
+	}
+
 	ret = mana_mr_btree_init(&txq->mr_btree,
 				 MANA_MR_BTREE_PER_QUEUE_N, socket_id);
 	if (ret) {
@@ -506,6 +515,7 @@ mana_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	return 0;
 
 fail:
+	rte_free(txq->gdma_comp_buf);
 	rte_free(txq->desc_ring);
 	rte_free(txq);
 	return ret;
@@ -518,6 +528,7 @@ mana_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
 
 	mana_mr_btree_free(&txq->mr_btree);
 
+	rte_free(txq->gdma_comp_buf);
 	rte_free(txq->desc_ring);
 	rte_free(txq);
 }
@@ -557,6 +568,15 @@ mana_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	rxq->desc_ring_head = 0;
 	rxq->desc_ring_tail = 0;
 
+	rxq->gdma_comp_buf = rte_malloc_socket("mana_rxq_comp",
+			sizeof(*rxq->gdma_comp_buf) * nb_desc,
+			RTE_CACHE_LINE_SIZE, socket_id);
+	if (!rxq->gdma_comp_buf) {
+		DRV_LOG(ERR, "failed to allocate rxq comp");
+		ret = -ENOMEM;
+		goto fail;
+	}
+
 	ret = mana_mr_btree_init(&rxq->mr_btree,
 				 MANA_MR_BTREE_PER_QUEUE_N, socket_id);
 	if (ret) {
@@ -572,6 +592,7 @@ mana_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	return 0;
 
 fail:
+	rte_free(rxq->gdma_comp_buf);
 	rte_free(rxq->desc_ring);
 	rte_free(rxq);
 	return ret;
@@ -584,6 +605,7 @@ mana_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
 
 	mana_mr_btree_free(&rxq->mr_btree);
 
+	rte_free(rxq->gdma_comp_buf);
 	rte_free(rxq->desc_ring);
 	rte_free(rxq);
 }
diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h
index ce16e7efff..b653e1dd82 100644
--- a/drivers/net/mana/mana.h
+++ b/drivers/net/mana/mana.h
@@ -142,19 +142,6 @@ struct gdma_header {
 #define COMPLETION_QUEUE_OWNER_MASK \
 	((1 << (COMPLETION_QUEUE_ENTRY_OWNER_BITS_SIZE)) - 1)
 
-struct gdma_comp {
-	struct gdma_header gdma_header;
-
-	/* Filled by GDMA core */
-	uint32_t completion_data[GDMA_COMP_DATA_SIZE_IN_UINT32];
-
-	/* Filled by GDMA core */
-	uint32_t work_queue_number;
-
-	/* Filled by GDMA core */
-	bool send_work_queue;
-};
-
 struct gdma_hardware_completion_entry {
 	char dma_client_data[GDMA_COMP_DATA_SIZE];
 	union {
@@ -391,6 +378,11 @@ struct mana_gdma_queue {
 
 #define MANA_MR_BTREE_PER_QUEUE_N	64
 
+struct gdma_comp {
+	/* Filled by GDMA core */
+	char *cqe_data;
+};
+
 struct mana_txq {
 	struct mana_priv *priv;
 	uint32_t num_desc;
@@ -399,6 +391,7 @@ struct mana_txq {
 
 	struct mana_gdma_queue gdma_sq;
 	struct mana_gdma_queue gdma_cq;
+	struct gdma_comp *gdma_comp_buf;
 
 	uint32_t tx_vp_offset;
 
@@ -433,6 +426,7 @@ struct mana_rxq {
 
 	struct mana_gdma_queue gdma_rq;
 	struct mana_gdma_queue gdma_cq;
+	struct gdma_comp *gdma_comp_buf;
 
 	struct mana_stats stats;
 	struct mana_mr_btree mr_btree;
@@ -476,8 +470,9 @@ uint16_t mana_rx_burst_removed(void *dpdk_rxq, struct rte_mbuf **pkts,
 uint16_t mana_tx_burst_removed(void *dpdk_rxq, struct rte_mbuf **pkts,
 			       uint16_t pkts_n);
 
-int gdma_poll_completion_queue(struct mana_gdma_queue *cq,
-			       struct gdma_comp *comp);
+uint32_t gdma_poll_completion_queue(struct mana_gdma_queue *cq,
+				    struct gdma_comp *gdma_comp,
+				    uint32_t max_comp);
 
 int mana_start_rx_queues(struct rte_eth_dev *dev);
 int mana_start_tx_queues(struct rte_eth_dev *dev);
diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c
index afd153424b..6e1c397be8 100644
--- a/drivers/net/mana/rx.c
+++ b/drivers/net/mana/rx.c
@@ -383,24 +383,17 @@ mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 	uint8_t wqe_posted = 0;
 	struct mana_rxq *rxq = dpdk_rxq;
 	struct mana_priv *priv = rxq->priv;
-	struct gdma_comp comp;
 	struct rte_mbuf *mbuf;
 	int ret;
+	uint32_t num_pkts;
 
-	while (pkt_received < pkts_n &&
-	       gdma_poll_completion_queue(&rxq->gdma_cq, &comp) == 1) {
-		struct mana_rxq_desc *desc;
-		struct mana_rx_comp_oob *oob =
-			(struct mana_rx_comp_oob *)&comp.completion_data[0];
-
-		if (comp.work_queue_number != rxq->gdma_rq.id) {
-			DP_LOG(ERR, "rxq comp id mismatch wqid=0x%x rcid=0x%x",
-			       comp.work_queue_number, rxq->gdma_rq.id);
-			rxq->stats.errors++;
-			break;
-		}
+	num_pkts = gdma_poll_completion_queue(&rxq->gdma_cq, rxq->gdma_comp_buf, pkts_n);
+	for (uint32_t i = 0; i < num_pkts; i++) {
+		struct mana_rx_comp_oob *oob = (struct mana_rx_comp_oob *)
+			rxq->gdma_comp_buf[i].cqe_data;
+		struct mana_rxq_desc *desc =
+			&rxq->desc_ring[rxq->desc_ring_tail];
 
-		desc = &rxq->desc_ring[rxq->desc_ring_tail];
 		rxq->gdma_rq.tail += desc->wqe_size_in_bu;
 		mbuf = desc->pkt;
 
diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c
index b593f98bb1..7f570181ad 100644
--- a/drivers/net/mana/tx.c
+++ b/drivers/net/mana/tx.c
@@ -170,17 +170,20 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	struct mana_txq *txq = dpdk_txq;
 	struct mana_priv *priv = txq->priv;
-	struct gdma_comp comp;
 	int ret;
 	void *db_page;
 	uint16_t pkt_sent = 0;
+	uint32_t num_comp;
 
 	/* Process send completions from GDMA */
-	while (gdma_poll_completion_queue(&txq->gdma_cq, &comp) == 1) {
+	num_comp = gdma_poll_completion_queue(&txq->gdma_cq,
+			txq->gdma_comp_buf, txq->num_desc);
+
+	for (uint32_t i = 0; i < num_comp; i++) {
 		struct mana_txq_desc *desc =
 			&txq->desc_ring[txq->desc_ring_tail];
-		struct mana_tx_comp_oob *oob =
-			(struct mana_tx_comp_oob *)&comp.completion_data[0];
+		struct mana_tx_comp_oob *oob = (struct mana_tx_comp_oob *)
+			txq->gdma_comp_buf[i].cqe_data;
 
 		if (oob->cqe_hdr.cqe_type != CQE_TX_OKAY) {
 			DP_LOG(ERR,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.369989200 +0800
+++ 0031-net-mana-optimize-completion-queue-by-batch-processi.patch	2023-06-25 14:31:58.315773900 +0800
@@ -1 +1 @@
-From 311246198c5f34ca4c51573ee1811a966da7d8af Mon Sep 17 00:00:00 2001
+From ecd3e1f354f2732a67dea91eec433cad80d07332 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 311246198c5f34ca4c51573ee1811a966da7d8af ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/dpaa2: fix checksum good flags' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (30 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/mana: optimize completion queue by batch processing' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'app/testpmd: fix GTP L2 length in checksum engine' " Xueming Li
                   ` (97 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Tianli Lai; +Cc: Sachin Saxena, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e7e05903384db0e25a73a9c92019c72b4a48c4ad Mon Sep 17 00:00:00 2001
From: Tianli Lai <laitianli@tom.com>
Date: Mon, 8 May 2023 18:57:25 +0800
Subject: [PATCH] net/dpaa2: fix checksum good flags
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7d83632b28db9f0b9bd36d974798aa14627f822b ]

Set check sum good flags when dpaa2 hardware set check result.

Fixes: d2ef05d5c13e ("net/dpaa2: optimize Rx/Tx path")
Fixes: 94d31549c380 ("net/dpaa2: support Rx checksum offload in slow parsing")

Signed-off-by: Tianli Lai <laitianli@tom.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/net/dpaa2/dpaa2_rxtx.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index f60e78e1fd..85910bbd8f 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -198,8 +198,12 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
 
 	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE))
 		mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
-	else if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
+	else
+		mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
+	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
 		mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+	else
+		mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
 
 	if (BIT_ISSET_AT_POS(annotation->word4, L3_IP_1_FIRST_FRAGMENT |
 	    L3_IP_1_MORE_FRAGMENT |
@@ -241,8 +245,12 @@ dpaa2_dev_rx_parse(struct rte_mbuf *mbuf, void *hw_annot_addr)
 
 	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE))
 		mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
-	else if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
+	else
+		mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
+	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
 		mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+	else
+		mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
 
 	if (dpaa2_enable_ts[mbuf->port]) {
 		*dpaa2_timestamp_dynfield(mbuf) = annotation->word2;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.395902000 +0800
+++ 0032-net-dpaa2-fix-checksum-good-flags.patch	2023-06-25 14:31:58.315773900 +0800
@@ -1 +1 @@
-From 7d83632b28db9f0b9bd36d974798aa14627f822b Mon Sep 17 00:00:00 2001
+From e7e05903384db0e25a73a9c92019c72b4a48c4ad Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7d83632b28db9f0b9bd36d974798aa14627f822b ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/testpmd: fix GTP L2 length in checksum engine' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (31 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/dpaa2: fix checksum good flags' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/nfp: fix VLAN push flow action' " Xueming Li
                   ` (96 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9d1fbdb5844757a08a2730c06e5ae88a0885f1ac Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@nvidia.com>
Date: Sun, 2 Apr 2023 15:26:19 +0300
Subject: [PATCH] app/testpmd: fix GTP L2 length in checksum engine
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit dd827fa42a30a9b0aa87a1d5614af83ea32b19e0 ]

GTP header can be followed by an optional 32 bits extension.

But, l2_len value statically set to RTE_ETHER_GTP_HLEN
which is defined to be
        (sizeof(struct rte_udp_hdr) + sizeof(struct rte_gtp_hdr))

This fixes the l2_len to take into consideration the extension size.

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

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/csumonly.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 90a59e0aa5..9ac0d05fff 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -250,7 +250,7 @@ parse_gtp(struct rte_udp_hdr *udp_hdr,
 		info->l4_proto = 0;
 	}
 
-	info->l2_len += RTE_ETHER_GTP_HLEN;
+	info->l2_len += gtp_len + sizeof(udp_hdr);
 }
 
 /* Parse a vxlan header */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.419991400 +0800
+++ 0033-app-testpmd-fix-GTP-L2-length-in-checksum-engine.patch	2023-06-25 14:31:58.315773900 +0800
@@ -1 +1 @@
-From dd827fa42a30a9b0aa87a1d5614af83ea32b19e0 Mon Sep 17 00:00:00 2001
+From 9d1fbdb5844757a08a2730c06e5ae88a0885f1ac Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dd827fa42a30a9b0aa87a1d5614af83ea32b19e0 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index fc85c22a77..b50b89367a 100644
+index 90a59e0aa5..9ac0d05fff 100644

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

* patch 'net/nfp: fix VLAN push flow action' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (32 preceding siblings ...)
  2023-06-25  6:34 ` patch 'app/testpmd: fix GTP L2 length in checksum engine' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/vmxnet3: fix drop of empty segments in Tx' " Xueming Li
                   ` (95 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From acbaa6bb5dfd4e8fe128d4c8d9503d03391b3dba Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Fri, 12 May 2023 10:03:46 +0800
Subject: [PATCH] net/nfp: fix VLAN push flow action
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2581c3bb634d905d4459ea15c3f6bd02b58069d3 ]

When process VLAN push flow action, the former logic perform the
mask and shift operations directly on the big endian data, which
cause both the pcp and VLAN id are not correct for offloaded packets.

Fix it by convert the data from big endian to CPU endian before
perform the mask and shift operations.

Fixes: eb9277cb2fd1 ("net/nfp: support VLAN push flow action")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 50b166786a..432e19c357 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -2194,6 +2194,8 @@ static int
 nfp_flow_action_push_vlan(char *act_data,
 		const struct rte_flow_action *action)
 {
+	uint8_t pcp;
+	uint16_t vid;
 	size_t act_size;
 	struct nfp_fl_act_push_vlan *push_vlan;
 	const struct rte_flow_action_of_push_vlan *push_vlan_conf;
@@ -2216,9 +2218,11 @@ nfp_flow_action_push_vlan(char *act_data,
 			(action + 1)->conf;
 	vlan_vid_conf  = (const struct rte_flow_action_of_set_vlan_vid *)
 			(action + 2)->conf;
+
+	vid = rte_be_to_cpu_16(vlan_vid_conf->vlan_vid) & 0x0fff;
+	pcp = vlan_pcp_conf->vlan_pcp & 0x07;
 	push_vlan->vlan_tpid = push_vlan_conf->ethertype;
-	push_vlan->vlan_tci = ((vlan_pcp_conf->vlan_pcp & 0x07) << 13) |
-			(vlan_vid_conf->vlan_vid & 0x0fff);
+	push_vlan->vlan_tci = rte_cpu_to_be_16(vid | (pcp << 13));
 
 	return 0;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.441941700 +0800
+++ 0034-net-nfp-fix-VLAN-push-flow-action.patch	2023-06-25 14:31:58.325773900 +0800
@@ -1 +1 @@
-From 2581c3bb634d905d4459ea15c3f6bd02b58069d3 Mon Sep 17 00:00:00 2001
+From acbaa6bb5dfd4e8fe128d4c8d9503d03391b3dba Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2581c3bb634d905d4459ea15c3f6bd02b58069d3 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 41b722f4d8..fdf5c0f40e 100644
+index 50b166786a..432e19c357 100644
@@ -29 +31 @@
-@@ -2205,6 +2205,8 @@ static int
+@@ -2194,6 +2194,8 @@ static int
@@ -38 +40 @@
-@@ -2227,9 +2229,11 @@ nfp_flow_action_push_vlan(char *act_data,
+@@ -2216,9 +2218,11 @@ nfp_flow_action_push_vlan(char *act_data,

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

* patch 'net/vmxnet3: fix drop of empty segments in Tx' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (33 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/nfp: fix VLAN push flow action' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/txgbe: fix use-after-free on remove' " Xueming Li
                   ` (94 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Ronak Doshi; +Cc: Jochen Behrens, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 799cc0612c1273aadc989d786269ecbf10752c9a Mon Sep 17 00:00:00 2001
From: Ronak Doshi <doshir@vmware.com>
Date: Mon, 8 May 2023 19:21:06 -0700
Subject: [PATCH] net/vmxnet3: fix drop of empty segments in Tx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b44f3e1381f3910be50d03c784f5c073c25245dd ]

When empty segments are dropped, some descriptor variable values are
updated in the segment processing loop before it is exited. This can
lead to a wedged queue where all subsequent packets are dropped for
this queue.

Also move the check for empty packet to catch the case of a zero
length packet with multiple segments.

Fixes: d863f19efa4f ("net/vmxnet3: skip empty segments in transmission")

Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Jochen Behrens <jbehrens@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 33 +++++++++++++++++-------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index a875ffec07..f4cade0954 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -412,8 +412,8 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 
 	nb_tx = 0;
 	while (nb_tx < nb_pkts) {
-		Vmxnet3_GenericDesc *gdesc;
-		vmxnet3_buf_info_t *tbi;
+		Vmxnet3_GenericDesc *gdesc = NULL;
+		vmxnet3_buf_info_t *tbi = NULL;
 		uint32_t first2fill, avail, dw2;
 		struct rte_mbuf *txm = tx_pkts[nb_tx];
 		struct rte_mbuf *m_seg = txm;
@@ -457,18 +457,18 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			continue;
 		}
 
+		/* Skip empty packets */
+		if (unlikely(rte_pktmbuf_pkt_len(txm) == 0)) {
+			txq->stats.drop_total++;
+			rte_pktmbuf_free(txm);
+			nb_tx++;
+			continue;
+		}
+
 		if (txm->nb_segs == 1 &&
 		    rte_pktmbuf_pkt_len(txm) <= txq->txdata_desc_size) {
 			struct Vmxnet3_TxDataDesc *tdd;
 
-			/* Skip empty packets */
-			if (unlikely(rte_pktmbuf_pkt_len(txm) == 0)) {
-				txq->stats.drop_total++;
-				rte_pktmbuf_free(txm);
-				nb_tx++;
-				continue;
-			}
-
 			tdd = (struct Vmxnet3_TxDataDesc *)
 				((uint8 *)txq->data_ring.base +
 				 txq->cmd_ring.next2fill *
@@ -481,6 +481,10 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		dw2 = (txq->cmd_ring.gen ^ 0x1) << VMXNET3_TXD_GEN_SHIFT;
 		first2fill = txq->cmd_ring.next2fill;
 		do {
+			/* Skip empty segments */
+			if (unlikely(m_seg->data_len == 0))
+				continue;
+
 			/* Remember the transmit buffer for cleanup */
 			tbi = txq->cmd_ring.buf_info + txq->cmd_ring.next2fill;
 
@@ -490,10 +494,6 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			 */
 			gdesc = txq->cmd_ring.base + txq->cmd_ring.next2fill;
 
-			/* Skip empty segments */
-			if (unlikely(m_seg->data_len == 0))
-				continue;
-
 			if (copy_size) {
 				uint64 offset =
 					(uint64)txq->cmd_ring.next2fill *
@@ -514,6 +514,11 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			/* use the right gen for non-SOP desc */
 			dw2 = txq->cmd_ring.gen << VMXNET3_TXD_GEN_SHIFT;
 		} while ((m_seg = m_seg->next) != NULL);
+		/* We must have executed the complete preceding loop at least
+		 * once without skipping an empty segment, as we can't have
+		 * a packet with only empty segments.
+		 * Thus, tbi and gdesc have been initialized.
+		 */
 
 		/* set the last buf_info for the pkt */
 		tbi->m = txm;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.466290900 +0800
+++ 0035-net-vmxnet3-fix-drop-of-empty-segments-in-Tx.patch	2023-06-25 14:31:58.325773900 +0800
@@ -1 +1 @@
-From b44f3e1381f3910be50d03c784f5c073c25245dd Mon Sep 17 00:00:00 2001
+From 799cc0612c1273aadc989d786269ecbf10752c9a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b44f3e1381f3910be50d03c784f5c073c25245dd ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 39ad0726cb..148f65383e 100644
+index a875ffec07..f4cade0954 100644
@@ -27 +29 @@
-@@ -418,8 +418,8 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -412,8 +412,8 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -38 +40 @@
-@@ -465,18 +465,18 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -457,18 +457,18 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -65 +67 @@
-@@ -489,6 +489,10 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -481,6 +481,10 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -76 +78 @@
-@@ -498,10 +502,6 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -490,10 +494,6 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -87 +89 @@
-@@ -522,6 +522,11 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -514,6 +514,11 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,

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

* patch 'net/txgbe: fix use-after-free on remove' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (34 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/vmxnet3: fix drop of empty segments in Tx' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'ethdev: fix MAC address occupies two entries' " Xueming Li
                   ` (93 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Pengfei Sun, Jiawen Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 32e0eaa22b4adb5b17ffae452a4731386314a7ca Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 18 May 2023 15:11:24 +0800
Subject: [PATCH] net/txgbe: fix use-after-free on remove
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0105788ebac6c796f30361912377550207084a17 ]

When cleaning up NIC's interrupts, it is possible to add some alarms
at the same time. However, if these alarms are not canceled, it may
cause use-after-free problems. Therefore, after cleaning up NIC's
interrupts, these alarms should also be canceled.

Fixes: d3bb4a04eac1 ("net/txgbe: add SFP hotplug identification")
Fixes: e0d876ef6bbc ("net/txgbe: support device stop and close")

Reported-by: Pengfei Sun <sunpengfei16@huawei.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 .mailmap                         | 1 +
 drivers/net/txgbe/txgbe_ethdev.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index e9b5482002..8d8c19d582 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1034,6 +1034,7 @@ Pawel Rutkowski <pawelx.rutkowski@intel.com>
 Pawel Wodkowski <pawelwod@gmail.com> <pawelx.wodkowski@intel.com> <pawelx.wdkowski@intel.com>
 Pei Chao <peichao85@gmail.com>
 Pei Zhang <pezhang@redhat.com>
+Pengfei Sun <sunpengfei16@huawei.com>
 Peng He <hepeng.0320@bytedance.com> <xnhp0320@icloud.com>
 Peng Huang <peng.huang@intel.com>
 Peng Sun <peng.a.sun@intel.com>
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 55777cb10a..e0df734946 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2019,8 +2019,9 @@ txgbe_dev_close(struct rte_eth_dev *dev)
 		rte_delay_ms(100);
 	} while (retries++ < (10 + TXGBE_LINK_UP_TIME));
 
-	/* cancel the delay handler before remove dev */
+	/* cancel all alarm handler before remove dev */
 	rte_eal_alarm_cancel(txgbe_dev_interrupt_delayed_handler, dev);
+	rte_eal_alarm_cancel(txgbe_dev_setup_link_alarm_handler, dev);
 
 	/* uninitialize PF if max_vfs not zero */
 	txgbe_pf_host_uninit(dev);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.489402500 +0800
+++ 0036-net-txgbe-fix-use-after-free-on-remove.patch	2023-06-25 14:31:58.325773900 +0800
@@ -1 +1 @@
-From 0105788ebac6c796f30361912377550207084a17 Mon Sep 17 00:00:00 2001
+From 32e0eaa22b4adb5b17ffae452a4731386314a7ca Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0105788ebac6c796f30361912377550207084a17 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -20,2 +22,2 @@
- drivers/net/txgbe/txgbe_ethdev.c | 4 +++-
- 2 files changed, 4 insertions(+), 1 deletion(-)
+ drivers/net/txgbe/txgbe_ethdev.c | 3 ++-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
@@ -24 +26 @@
-index c5dd75633d..034fb27843 100644
+index e9b5482002..8d8c19d582 100644
@@ -27 +29 @@
-@@ -1049,6 +1049,7 @@ Pawel Rutkowski <pawelx.rutkowski@intel.com>
+@@ -1034,6 +1034,7 @@ Pawel Rutkowski <pawelx.rutkowski@intel.com>
@@ -36 +38 @@
-index a502618bc5..a3d7461951 100644
+index 55777cb10a..e0df734946 100644
@@ -39 +41 @@
-@@ -2032,8 +2032,10 @@ txgbe_dev_close(struct rte_eth_dev *dev)
+@@ -2019,8 +2019,9 @@ txgbe_dev_close(struct rte_eth_dev *dev)
@@ -46 +47,0 @@
-+	rte_eal_alarm_cancel(txgbe_dev_detect_sfp, dev);

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

* patch 'ethdev: fix MAC address occupies two entries' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (35 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/txgbe: fix use-after-free on remove' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/mana: return probing failure if no device found' " Xueming Li
                   ` (92 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Huisong Li; +Cc: Chengwen Feng, Thomas Monjalon, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 631f57f5effabb6b358e47b81c71855c8336a6c9 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 19 May 2023 17:31:55 +0800
Subject: [PATCH] ethdev: fix MAC address occupies two entries
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8f02f472a29432650d999969359d6a49ea6aadca ]

The dev->data->mac_addrs[0] will be changed to a new MAC address when
applications modify the default MAC address by .mac_addr_set(). However,
if the new default one has been added as a non-default MAC address by
.mac_addr_add(), the .mac_addr_set() didn't check this address.
As a result, this MAC address occupies two entries in the list. Like:
add(MAC1)
add(MAC2)
add(MAC3)
add(MAC4)
set_default(MAC3)
default=MAC3, the rest of the list=MAC1, MAC2, MAC3, MAC4
Note: MAC3 occupies two entries.

But .mac_addr_set() cannot remove it implicitly in case of MAC address
shrinking in the list.
So this patch adds a check on whether the new default address was
already in the list and if so requires the user to remove it first.

In addition, this patch documents the position of the default MAC
address and address unique in the list.

Fixes: 854d8ad4ef68 ("ethdev: add default mac address modifier")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/ethdev_driver.h |  6 +++++-
 lib/ethdev/rte_ethdev.c    | 10 ++++++++++
 lib/ethdev/rte_ethdev.h    |  4 ++++
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
index 6a550cfc83..cd2cd89649 100644
--- a/lib/ethdev/ethdev_driver.h
+++ b/lib/ethdev/ethdev_driver.h
@@ -117,7 +117,11 @@ struct rte_eth_dev_data {
 
 	uint64_t rx_mbuf_alloc_failed; /**< Rx ring mbuf allocation failures */
 
-	/** Device Ethernet link address. @see rte_eth_dev_release_port() */
+	/**
+	 * Device Ethernet link addresses.
+	 * All entries are unique.
+	 * The first entry (index zero) is the default address.
+	 */
 	struct rte_ether_addr *mac_addrs;
 	/** Bitmap associating MAC addresses to pools */
 	uint64_t mac_pool_sel[RTE_ETH_NUM_RECEIVE_MAC_ADDR];
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index b9c8f79f8c..f21dea7150 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -4499,6 +4499,7 @@ int
 rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)
 {
 	struct rte_eth_dev *dev;
+	int index;
 	int ret;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
@@ -4517,6 +4518,15 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)
 	if (*dev->dev_ops->mac_addr_set == NULL)
 		return -ENOTSUP;
 
+	/* Keep address unique in dev->data->mac_addrs[]. */
+	index = eth_dev_get_mac_addr_index(port_id, addr);
+	if (index > 0) {
+		RTE_ETHDEV_LOG(ERR,
+			"New default address for port %u was already in the address list. Please remove it first.\n",
+			port_id);
+		return -EEXIST;
+	}
+
 	ret = (*dev->dev_ops->mac_addr_set)(dev, addr);
 	if (ret < 0)
 		return ret;
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index c129ca1eaf..0d83df42a9 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -4354,6 +4354,9 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id,
 
 /**
  * Set the default MAC address.
+ * It replaces the address at index 0 of the MAC address list.
+ * If the address was already in the MAC address list,
+ * please remove it first.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
@@ -4364,6 +4367,7 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if MAC address is invalid.
+ *   - (-EEXIST) if MAC address was already in the address list.
  */
 int rte_eth_dev_default_mac_addr_set(uint16_t port_id,
 		struct rte_ether_addr *mac_addr);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.513936300 +0800
+++ 0037-ethdev-fix-MAC-address-occupies-two-entries.patch	2023-06-25 14:31:58.335773900 +0800
@@ -1 +1 @@
-From 8f02f472a29432650d999969359d6a49ea6aadca Mon Sep 17 00:00:00 2001
+From 631f57f5effabb6b358e47b81c71855c8336a6c9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8f02f472a29432650d999969359d6a49ea6aadca ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -35,23 +37,5 @@
- doc/guides/rel_notes/release_23_07.rst |  6 ++++++
- lib/ethdev/ethdev_driver.h             |  6 +++++-
- lib/ethdev/rte_ethdev.c                | 10 ++++++++++
- lib/ethdev/rte_ethdev.h                |  4 ++++
- 4 files changed, 25 insertions(+), 1 deletion(-)
-
-diff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst
-index 11cf5c6a0c..58d4e59487 100644
---- a/doc/guides/rel_notes/release_23_07.rst
-+++ b/doc/guides/rel_notes/release_23_07.rst
-@@ -108,6 +108,12 @@ API Changes
-    Also, make sure to start the actual text at the margin.
-    =======================================================
- 
-+* ethdev: Ensured all entries in MAC address list are uniques.
-+  When setting a default MAC address with the function
-+  ``rte_eth_dev_default_mac_addr_set``,
-+  the default one needs to be removed by the user
-+  if it was already in the address list.
-+
- 
- ABI Changes
- -----------
+ lib/ethdev/ethdev_driver.h |  6 +++++-
+ lib/ethdev/rte_ethdev.c    | 10 ++++++++++
+ lib/ethdev/rte_ethdev.h    |  4 ++++
+ 3 files changed, 19 insertions(+), 1 deletion(-)
+
@@ -59 +43 @@
-index 2c9d615fb5..367c0c4878 100644
+index 6a550cfc83..cd2cd89649 100644
@@ -76 +60 @@
-index 4d03255683..d46e74504e 100644
+index b9c8f79f8c..f21dea7150 100644
@@ -79 +63 @@
-@@ -4898,6 +4898,7 @@ int
+@@ -4499,6 +4499,7 @@ int
@@ -87 +71 @@
-@@ -4916,6 +4917,15 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)
+@@ -4517,6 +4518,15 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)
@@ -104 +88 @@
-index 99fe9e238b..fe8f7466c8 100644
+index c129ca1eaf..0d83df42a9 100644
@@ -107 +91 @@
-@@ -4381,6 +4381,9 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id,
+@@ -4354,6 +4354,9 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id,
@@ -117 +101 @@
-@@ -4391,6 +4394,7 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id,
+@@ -4364,6 +4367,7 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id,

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

* patch 'net/mana: return probing failure if no device found' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (36 preceding siblings ...)
  2023-06-25  6:34 ` patch 'ethdev: fix MAC address occupies two entries' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/sfc: invalidate dangling MAE flow action FW resource IDs' " Xueming Li
                   ` (91 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Long Li; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3254062488e80c76d141858fcfa5f13349c734a8 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 5 May 2023 18:32:10 -0700
Subject: [PATCH] net/mana: return probing failure if no device found
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0595702ef21500a276fba65557f1d09d65976ec8 ]

When there is no device found on this PCI device, return probe failure
and release allocated resources for this PCI device.

Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")

Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/mana/mana.c | 39 ++++++++++++++++++++++++++++-----------
 1 file changed, 28 insertions(+), 11 deletions(-)

diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 2463f34c1e..7630118d4f 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -1343,6 +1343,7 @@ failed:
 /*
  * Goes through the IB device list to look for the IB port matching the
  * mac_addr. If found, create a rte_eth_dev for it.
+ * Return value: number of successfully probed devices
  */
 static int
 mana_pci_probe_mac(struct rte_pci_device *pci_dev,
@@ -1352,8 +1353,9 @@ mana_pci_probe_mac(struct rte_pci_device *pci_dev,
 	int ibv_idx;
 	struct ibv_context *ctx;
 	int num_devices;
-	int ret = 0;
+	int ret;
 	uint8_t port;
+	int count = 0;
 
 	ibv_list = ibv_get_device_list(&num_devices);
 	for (ibv_idx = 0; ibv_idx < num_devices; ibv_idx++) {
@@ -1383,6 +1385,12 @@ mana_pci_probe_mac(struct rte_pci_device *pci_dev,
 		ret = ibv_query_device_ex(ctx, NULL, &dev_attr);
 		ibv_close_device(ctx);
 
+		if (ret) {
+			DRV_LOG(ERR, "Failed to query IB device %s",
+				ibdev->name);
+			continue;
+		}
+
 		for (port = 1; port <= dev_attr.orig_attr.phys_port_cnt;
 		     port++) {
 			struct rte_ether_addr addr;
@@ -1394,15 +1402,17 @@ mana_pci_probe_mac(struct rte_pci_device *pci_dev,
 				continue;
 
 			ret = mana_probe_port(ibdev, &dev_attr, port, pci_dev, &addr);
-			if (ret)
+			if (ret) {
 				DRV_LOG(ERR, "Probe on IB port %u failed %d", port, ret);
-			else
+			} else {
+				count++;
 				DRV_LOG(INFO, "Successfully probed on IB port %u", port);
+			}
 		}
 	}
 
 	ibv_free_device_list(ibv_list);
-	return ret;
+	return count;
 }
 
 /*
@@ -1416,6 +1426,7 @@ mana_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	struct mana_conf conf = {0};
 	unsigned int i;
 	int ret;
+	int count = 0;
 
 	if (args && args->drv_str) {
 		ret = mana_parse_args(args, &conf);
@@ -1433,16 +1444,21 @@ mana_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	}
 
 	/* If there are no driver parameters, probe on all ports */
-	if (!conf.index)
-		return mana_pci_probe_mac(pci_dev, NULL);
+	if (conf.index) {
+		for (i = 0; i < conf.index; i++)
+			count += mana_pci_probe_mac(pci_dev,
+						    &conf.mac_array[i]);
+	} else {
+		count = mana_pci_probe_mac(pci_dev, NULL);
+	}
 
-	for (i = 0; i < conf.index; i++) {
-		ret = mana_pci_probe_mac(pci_dev, &conf.mac_array[i]);
-		if (ret)
-			return ret;
+	if (!count) {
+		rte_memzone_free(mana_shared_mz);
+		mana_shared_mz = NULL;
+		ret = -ENODEV;
 	}
 
-	return 0;
+	return ret;
 }
 
 static int
@@ -1475,6 +1491,7 @@ mana_pci_remove(struct rte_pci_device *pci_dev)
 		if (!mana_shared_data->primary_cnt) {
 			DRV_LOG(DEBUG, "free shared memezone data");
 			rte_memzone_free(mana_shared_mz);
+			mana_shared_mz = NULL;
 		}
 
 		rte_spinlock_unlock(&mana_shared_data_lock);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.547511600 +0800
+++ 0038-net-mana-return-probing-failure-if-no-device-found.patch	2023-06-25 14:31:58.335773900 +0800
@@ -1 +1 @@
-From 0595702ef21500a276fba65557f1d09d65976ec8 Mon Sep 17 00:00:00 2001
+From 3254062488e80c76d141858fcfa5f13349c734a8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0595702ef21500a276fba65557f1d09d65976ec8 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/sfc: invalidate dangling MAE flow action FW resource IDs' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (37 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/mana: return probing failure if no device found' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix never set MAC flow control' " Xueming Li
                   ` (90 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Ivan Malov
  Cc: Andy Moreton, Denis Pryazhennikov, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 88cf99ed018ef7ea2e7fdd29687835af71032806 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@arknetworks.am>
Date: Sun, 21 May 2023 12:36:31 +0400
Subject: [PATCH] net/sfc: invalidate dangling MAE flow action FW resource IDs
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cf1e1a8e869b49ac9e2e097bbd272e94cc4f2c74 ]

When reinserting a flow (on port restart, for instance)
FW resource IDs found in the action set specification
need to be invalidated so that the new (reallocated)
FW resource IDs can be accepted by libefx again.

Fixes: 1bbd1ec2348a ("net/sfc: support action VXLAN encap in MAE backend")

Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Tested-by: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 .mailmap                               |  1 +
 drivers/common/sfc_efx/base/efx.h      | 14 ++++++++++++++
 drivers/common/sfc_efx/base/efx_impl.h |  4 ++++
 drivers/common/sfc_efx/base/efx_mae.c  | 15 +++++++++++----
 drivers/common/sfc_efx/version.map     |  1 +
 drivers/net/sfc/sfc_mae.c              |  2 ++
 6 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/.mailmap b/.mailmap
index 8d8c19d582..73f729c4c6 100644
--- a/.mailmap
+++ b/.mailmap
@@ -298,6 +298,7 @@ Deepak Khandelwal <deepak.khandelwal@intel.com>
 Deepak Kumar Jain <deepak.k.jain@intel.com>
 Deirdre O'Connor <deirdre.o.connor@intel.com>
 Dekel Peled <dekelp@nvidia.com> <dekelp@mellanox.com>
+Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
 Dennis Marinus <dmarinus@amazon.com>
 Derek Chickles <derek.chickles@caviumnetworks.com>
 Des O Dea <des.j.o.dea@intel.com>
diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index f4fa88f169..49e29dcc1c 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -4748,6 +4748,20 @@ efx_mae_action_set_fill_in_counter_id(
 	__in				efx_mae_actions_t *spec,
 	__in				const efx_counter_t *counter_idp);
 
+/*
+ * Clears dangling FW object IDs (counter ID, for instance) in
+ * the action set specification. Useful for adapter restarts,
+ * when all MAE objects need to be reallocated by the driver.
+ *
+ * This method only clears the IDs in the specification.
+ * The driver is still responsible for keeping the IDs
+ * separately and freeing them when stopping the port.
+ */
+LIBEFX_API
+extern					void
+efx_mae_action_set_clear_fw_rsrc_ids(
+	__in				efx_mae_actions_t *spec);
+
 /* Action set ID */
 typedef struct efx_mae_aset_id_s {
 	uint32_t id;
diff --git a/drivers/common/sfc_efx/base/efx_impl.h b/drivers/common/sfc_efx/base/efx_impl.h
index 9a5d465fa0..45e99d01c5 100644
--- a/drivers/common/sfc_efx/base/efx_impl.h
+++ b/drivers/common/sfc_efx/base/efx_impl.h
@@ -1800,6 +1800,10 @@ typedef struct efx_mae_action_vlan_push_s {
 	uint16_t			emavp_tci_be;
 } efx_mae_action_vlan_push_t;
 
+/*
+ * Helper efx_mae_action_set_clear_fw_rsrc_ids() is responsible
+ * to initialise every field in this structure to INVALID value.
+ */
 typedef struct efx_mae_actions_rsrc_s {
 	efx_mae_mac_id_t		emar_dst_mac_id;
 	efx_mae_mac_id_t		emar_src_mac_id;
diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index 7732d99992..4c33471f28 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -1394,10 +1394,7 @@ efx_mae_action_set_spec_init(
 		goto fail1;
 	}
 
-	spec->ema_rsrc.emar_dst_mac_id.id = EFX_MAE_RSRC_ID_INVALID;
-	spec->ema_rsrc.emar_src_mac_id.id = EFX_MAE_RSRC_ID_INVALID;
-	spec->ema_rsrc.emar_eh_id.id = EFX_MAE_RSRC_ID_INVALID;
-	spec->ema_rsrc.emar_counter_id.id = EFX_MAE_RSRC_ID_INVALID;
+	efx_mae_action_set_clear_fw_rsrc_ids(spec);
 
 	/*
 	 * Helpers which populate v2 actions must reject them when v2 is not
@@ -3027,6 +3024,16 @@ fail1:
 	return (rc);
 }
 
+					void
+efx_mae_action_set_clear_fw_rsrc_ids(
+	__in				efx_mae_actions_t *spec)
+{
+	spec->ema_rsrc.emar_dst_mac_id.id = EFX_MAE_RSRC_ID_INVALID;
+	spec->ema_rsrc.emar_src_mac_id.id = EFX_MAE_RSRC_ID_INVALID;
+	spec->ema_rsrc.emar_eh_id.id = EFX_MAE_RSRC_ID_INVALID;
+	spec->ema_rsrc.emar_counter_id.id = EFX_MAE_RSRC_ID_INVALID;
+}
+
 	__checkReturn			efx_rc_t
 efx_mae_counters_alloc(
 	__in				efx_nic_t *enp,
diff --git a/drivers/common/sfc_efx/version.map b/drivers/common/sfc_efx/version.map
index aabc354118..d9b04a611d 100644
--- a/drivers/common/sfc_efx/version.map
+++ b/drivers/common/sfc_efx/version.map
@@ -89,6 +89,7 @@ INTERNAL {
 	efx_mae_action_rule_insert;
 	efx_mae_action_rule_remove;
 	efx_mae_action_set_alloc;
+	efx_mae_action_set_clear_fw_rsrc_ids;
 	efx_mae_action_set_fill_in_counter_id;
 	efx_mae_action_set_fill_in_dst_mac_id;
 	efx_mae_action_set_fill_in_eh_id;
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 29b8bb9e25..c7d28eae71 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -1180,6 +1180,8 @@ sfc_mae_action_set_disable(struct sfc_adapter *sa,
 	}
 
 	if (fw_rsrc->refcnt == 1) {
+		efx_mae_action_set_clear_fw_rsrc_ids(action_set->spec);
+
 		rc = efx_mae_action_set_free(sa->nic, &fw_rsrc->aset_id);
 		if (rc == 0) {
 			sfc_dbg(sa, "disabled action_set=%p with AS_ID=0x%08x",
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.571234300 +0800
+++ 0039-net-sfc-invalidate-dangling-MAE-flow-action-FW-resou.patch	2023-06-25 14:31:58.345773900 +0800
@@ -1 +1 @@
-From cf1e1a8e869b49ac9e2e097bbd272e94cc4f2c74 Mon Sep 17 00:00:00 2001
+From 88cf99ed018ef7ea2e7fdd29687835af71032806 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cf1e1a8e869b49ac9e2e097bbd272e94cc4f2c74 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 034fb27843..863dbecdb0 100644
+index 8d8c19d582..73f729c4c6 100644
@@ -31 +33 @@
-@@ -301,6 +301,7 @@ Deepak Khandelwal <deepak.khandelwal@intel.com>
+@@ -298,6 +298,7 @@ Deepak Khandelwal <deepak.khandelwal@intel.com>
@@ -125 +127 @@
-index e5e9257998..60b9fdc290 100644
+index 29b8bb9e25..c7d28eae71 100644

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

* patch 'net/hns3: fix never set MAC flow control' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (38 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/sfc: invalidate dangling MAE flow action FW resource IDs' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix variable type mismatch' " Xueming Li
                   ` (89 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2a7aef1dd0c51b04b7f36fea94ece654ba6893a0 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 22 May 2023 21:17:36 +0800
Subject: [PATCH] net/hns3: fix never set MAC flow control
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2350eb39f337f9e8d798f8dd1d658834e3981e9e ]

When some hardware and firmware support speed auto-negotiation
but do not support flow control auto-negotiation, driver can
never successfully set MAC flow control by flow_ctrl_set() API.
So only tell user driver doesn't support flow control autoneg
when user enable it.

Fixes: 1f411e31a826 ("net/hns3: support flow control autoneg for copper port")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 0fe6223561..c31c6979c3 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5304,16 +5304,7 @@ hns3_check_fc_autoneg_valid(struct hns3_hw *hw, uint8_t autoneg)
 
 	if (!pf->support_fc_autoneg) {
 		if (autoneg != 0) {
-			hns3_err(hw, "unsupported fc auto-negotiation setting.");
-			return -EOPNOTSUPP;
-		}
-
-		/*
-		 * Flow control auto-negotiation of the NIC is not supported,
-		 * but other auto-negotiation features may be supported.
-		 */
-		if (autoneg != hw->mac.link_autoneg) {
-			hns3_err(hw, "please use 'link_speeds' in struct rte_eth_conf to disable autoneg!");
+			hns3_err(hw, "unsupported fc auto-negotiation.");
 			return -EOPNOTSUPP;
 		}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.602601600 +0800
+++ 0040-net-hns3-fix-never-set-MAC-flow-control.patch	2023-06-25 14:31:58.345773900 +0800
@@ -1 +1 @@
-From 2350eb39f337f9e8d798f8dd1d658834e3981e9e Mon Sep 17 00:00:00 2001
+From 2a7aef1dd0c51b04b7f36fea94ece654ba6893a0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2350eb39f337f9e8d798f8dd1d658834e3981e9e ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index d97280e647..8f819d5f23 100644
+index 0fe6223561..c31c6979c3 100644

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

* patch 'net/hns3: fix variable type mismatch' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (39 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix never set MAC flow control' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix Rx multiple firmware reset interrupts' " Xueming Li
                   ` (88 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f2dd43a6e92ab5fb9a99e2a2816141525ca9d5c2 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Mon, 22 May 2023 21:17:38 +0800
Subject: [PATCH] net/hns3: fix variable type mismatch
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1bbac8785cdf51bc6c5005c6754eab4d517cc4b0 ]

Loop conditions are compared with different variable types,
which may cause overflow risks.

Fixes: 67d010346933 ("net/hns3: adjust data type of some variables")
Fixes: 6ee07e3cb589 ("net/hns3: fix insecure way to query MAC statistics")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 .mailmap                      | 1 +
 drivers/net/hns3/hns3_regs.c  | 3 ++-
 drivers/net/hns3/hns3_stats.c | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index 73f729c4c6..44d9bd97c6 100644
--- a/.mailmap
+++ b/.mailmap
@@ -298,6 +298,7 @@ Deepak Khandelwal <deepak.khandelwal@intel.com>
 Deepak Kumar Jain <deepak.k.jain@intel.com>
 Deirdre O'Connor <deirdre.o.connor@intel.com>
 Dekel Peled <dekelp@nvidia.com> <dekelp@mellanox.com>
+Dengdui Huang <huangdengdui@huawei.com>
 Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
 Dennis Marinus <dmarinus@amazon.com>
 Derek Chickles <derek.chickles@caviumnetworks.com>
diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 33392fd1f0..5d6f92e4bb 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -294,8 +294,9 @@ hns3_direct_access_regs(struct hns3_hw *hw, uint32_t *data)
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	uint32_t *origin_data_ptr = data;
 	uint32_t reg_offset;
-	uint16_t i, j;
 	size_t reg_num;
+	uint16_t j;
+	size_t i;
 
 	/* fetching per-PF registers values from PF PCIe register space */
 	reg_num = sizeof(cmdq_reg_addrs) / sizeof(uint32_t);
diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index bad65fcbed..c2e692a2c5 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -317,7 +317,7 @@ hns3_update_mac_stats(struct hns3_hw *hw)
 	uint32_t stats_iterms;
 	uint64_t *desc_data;
 	uint32_t desc_num;
-	uint16_t i;
+	uint32_t i;
 	int ret;
 
 	/* The first desc has a 64-bit header, so need to consider it. */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.627130100 +0800
+++ 0041-net-hns3-fix-variable-type-mismatch.patch	2023-06-25 14:31:58.345773900 +0800
@@ -1 +1 @@
-From 1bbac8785cdf51bc6c5005c6754eab4d517cc4b0 Mon Sep 17 00:00:00 2001
+From f2dd43a6e92ab5fb9a99e2a2816141525ca9d5c2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1bbac8785cdf51bc6c5005c6754eab4d517cc4b0 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 863dbecdb0..f00c1e5457 100644
+index 73f729c4c6..44d9bd97c6 100644
@@ -25 +27 @@
-@@ -301,6 +301,7 @@ Deepak Khandelwal <deepak.khandelwal@intel.com>
+@@ -298,6 +298,7 @@ Deepak Khandelwal <deepak.khandelwal@intel.com>

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

* patch 'net/hns3: fix Rx multiple firmware reset interrupts' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (40 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix variable type mismatch' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'ethdev: fix indirect action conversion' " Xueming Li
                   ` (87 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d859368e8fe219552fd2ed72ae14d492f5d283f1 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 22 May 2023 21:17:39 +0800
Subject: [PATCH] net/hns3: fix Rx multiple firmware reset interrupts
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e3c71325cec3353c4b9623310ece363a7c79604f ]

In the firmware (also known as IMP) reset scenario, driver interrupt
processing and firmware watchdog initialization are asynchronous.

If the driver interrupt processing is faster than firmware watchdog
initialization (that is, the driver clears the firmware reset
interrupt source before the firmware watchdog is initialized), the
driver will receive multiple firmware reset interrupts.

In the Kunpeng 920 platform, the above situation does not exist. But
it does on the newer platforms. So we add 5ms delay before drivers
clears the IMP reset interrupt source.

As for the impact of 5ms, the number of PFs managed by a firmware is
limited. Therefore, even if a DPDK process takes over all the PFs
which managed by the firmware, the delay is controllable.

Fixes: ee930d38ffca ("net/hns3: fix timing of clearing interrupt source")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index c31c6979c3..b791ec4a17 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -286,6 +286,19 @@ hns3_handle_mac_tnl(struct hns3_hw *hw)
 	}
 }
 
+static void
+hns3_delay_before_clear_event_cause(struct hns3_hw *hw, uint32_t event_type, uint32_t regclr)
+{
+#define IMPRESET_WAIT_MS_TIME	5
+
+	if (event_type == HNS3_VECTOR0_EVENT_RST &&
+	    regclr & BIT(HNS3_VECTOR0_IMPRESET_INT_B) &&
+	    hw->revision >= PCI_REVISION_ID_HIP09_A) {
+		rte_delay_ms(IMPRESET_WAIT_MS_TIME);
+		hns3_dbg(hw, "wait firmware watchdog initialization completed.");
+	}
+}
+
 static void
 hns3_interrupt_handler(void *param)
 {
@@ -305,6 +318,7 @@ hns3_interrupt_handler(void *param)
 	vector0_int = hns3_read_dev(hw, HNS3_VECTOR0_OTHER_INT_STS_REG);
 	ras_int = hns3_read_dev(hw, HNS3_RAS_PF_OTHER_INT_STS_REG);
 	cmdq_int = hns3_read_dev(hw, HNS3_VECTOR0_CMDQ_SRC_REG);
+	hns3_delay_before_clear_event_cause(hw, event_cause, clearval);
 	hns3_clear_event_cause(hw, event_cause, clearval);
 	/* vector 0 interrupt is shared with reset and mailbox source events. */
 	if (event_cause == HNS3_VECTOR0_EVENT_ERR) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.651087100 +0800
+++ 0042-net-hns3-fix-Rx-multiple-firmware-reset-interrupts.patch	2023-06-25 14:31:58.355773900 +0800
@@ -1 +1 @@
-From e3c71325cec3353c4b9623310ece363a7c79604f Mon Sep 17 00:00:00 2001
+From d859368e8fe219552fd2ed72ae14d492f5d283f1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e3c71325cec3353c4b9623310ece363a7c79604f ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 5ef66f96c6..664226a6ef 100644
+index c31c6979c3..b791ec4a17 100644

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

* patch 'ethdev: fix indirect action conversion' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (41 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix Rx multiple firmware reset interrupts' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix FEC mode for 200G ports' " Xueming Li
                   ` (86 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a678d7da2bb89250de2ac578ad110522906bf7d0 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Fri, 26 May 2023 06:18:00 +0300
Subject: [PATCH] ethdev: fix indirect action conversion
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fb131e295ea838f062278fa63f21c89a4f080d21 ]

As indirect action conf fills the indirect action handler, while
converting indirect action, the action conf(action handler) should
be copied from original indirect action conf instead of duplicating
the action handler memory.

Fixes: 4b61b8774be9 ("ethdev: introduce indirect flow action")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 lib/ethdev/rte_flow.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 7d0c24366c..1a67a987f5 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -855,7 +855,15 @@ rte_flow_conv_actions(struct rte_flow_action *dst,
 	src -= num;
 	dst -= num;
 	do {
-		if (src->conf) {
+		if (src->type == RTE_FLOW_ACTION_TYPE_INDIRECT) {
+			/*
+			 * Indirect action conf fills the indirect action
+			 * handler. Copy the action handle directly instead
+			 * of duplicating the pointer memory.
+			 */
+			if (size)
+				dst->conf = src->conf;
+		} else if (src->conf) {
 			off = RTE_ALIGN_CEIL(off, sizeof(double));
 			ret = rte_flow_conv_action_conf
 				((void *)(data + off),
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.676166800 +0800
+++ 0043-ethdev-fix-indirect-action-conversion.patch	2023-06-25 14:31:58.355773900 +0800
@@ -1 +1 @@
-From fb131e295ea838f062278fa63f21c89a4f080d21 Mon Sep 17 00:00:00 2001
+From a678d7da2bb89250de2ac578ad110522906bf7d0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fb131e295ea838f062278fa63f21c89a4f080d21 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index bcc1982224..494c82932d 100644
+index 7d0c24366c..1a67a987f5 100644
@@ -24 +26 @@
-@@ -919,7 +919,15 @@ rte_flow_conv_actions(struct rte_flow_action *dst,
+@@ -855,7 +855,15 @@ rte_flow_conv_actions(struct rte_flow_action *dst,

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

* patch 'net/hns3: fix FEC mode for 200G ports' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (42 preceding siblings ...)
  2023-06-25  6:34 ` patch 'ethdev: fix indirect action conversion' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix FEC mode check' " Xueming Li
                   ` (85 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Jie Hai; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b048cdca8281ee679cd8c741b57101ac0d8488b0 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Sat, 8 Apr 2023 10:27:33 +0800
Subject: [PATCH] net/hns3: fix FEC mode for 200G ports
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0f015da9e207d43a8676714661209b76a8f062d1 ]

The hardware does not support NOFEC for 200G ports. So delete this
bit.

Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index b791ec4a17..f4728f4a41 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -83,8 +83,7 @@ static const struct rte_eth_fec_capa speed_fec_capa_tbl[] = {
 			      RTE_ETH_FEC_MODE_CAPA_MASK(AUTO) |
 			      RTE_ETH_FEC_MODE_CAPA_MASK(RS) },
 
-	{ RTE_ETH_SPEED_NUM_200G, RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC) |
-			      RTE_ETH_FEC_MODE_CAPA_MASK(AUTO) |
+	{ RTE_ETH_SPEED_NUM_200G, RTE_ETH_FEC_MODE_CAPA_MASK(AUTO) |
 			      RTE_ETH_FEC_MODE_CAPA_MASK(RS) }
 };
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.699900100 +0800
+++ 0044-net-hns3-fix-FEC-mode-for-200G-ports.patch	2023-06-25 14:31:58.355773900 +0800
@@ -1 +1 @@
-From 0f015da9e207d43a8676714661209b76a8f062d1 Mon Sep 17 00:00:00 2001
+From b048cdca8281ee679cd8c741b57101ac0d8488b0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0f015da9e207d43a8676714661209b76a8f062d1 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 07d907d6a1..94eadefb8e 100644
+index b791ec4a17..f4728f4a41 100644

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

* patch 'net/hns3: fix FEC mode check' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (43 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix FEC mode for 200G ports' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix missing FEC capability' " Xueming Li
                   ` (84 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Jie Hai; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 340cb03d7f29a6e71872e5754bb351f250cc97c3 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Sat, 8 Apr 2023 10:27:34 +0800
Subject: [PATCH] net/hns3: fix FEC mode check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0cf0f931267ae751c503dba929307bb2a6acbbfa ]

The function is_fec_mode_one_bit_set() is used to check whether
the binary of the mode from user only contains one '1'. But it
uses the bytes number this mode variable occupied to calculate
the count. So this patch uses __builtin_popcount() to replace it.

This patch also extracts the code for verifying mode parameter into
a function.

Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 50 ++++++++++++++++------------------
 1 file changed, 24 insertions(+), 26 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index f4728f4a41..dc518c5814 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6171,52 +6171,50 @@ get_current_speed_fec_cap(struct hns3_hw *hw, struct rte_eth_fec_capa *fec_capa)
 	return cur_capa;
 }
 
-static bool
-is_fec_mode_one_bit_set(uint32_t mode)
-{
-	int cnt = 0;
-	uint8_t i;
-
-	for (i = 0; i < sizeof(mode); i++)
-		if (mode >> i & 0x1)
-			cnt++;
-
-	return cnt == 1 ? true : false;
-}
-
 static int
-hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
+hns3_fec_mode_valid(struct rte_eth_dev *dev, uint32_t mode)
 {
 #define FEC_CAPA_NUM 2
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(hns);
-	struct hns3_pf *pf = &hns->pf;
 	struct rte_eth_fec_capa fec_capa[FEC_CAPA_NUM];
-	uint32_t cur_capa;
 	uint32_t num = FEC_CAPA_NUM;
+	uint32_t cur_capa;
 	int ret;
 
-	ret = hns3_fec_get_capability(dev, fec_capa, num);
-	if (ret < 0)
-		return ret;
-
-	/* HNS3 PMD only support one bit set mode, e.g. 0x1, 0x4 */
-	if (!is_fec_mode_one_bit_set(mode)) {
-		hns3_err(hw, "FEC mode(0x%x) not supported in HNS3 PMD, "
-			     "FEC mode should be only one bit set", mode);
+	if (__builtin_popcount(mode) != 1) {
+		hns3_err(hw, "FEC mode(0x%x) should be only one bit set", mode);
 		return -EINVAL;
 	}
 
+	ret = hns3_fec_get_capability(dev, fec_capa, num);
+	if (ret < 0)
+		return ret;
 	/*
 	 * Check whether the configured mode is within the FEC capability.
 	 * If not, the configured mode will not be supported.
 	 */
 	cur_capa = get_current_speed_fec_cap(hw, fec_capa);
-	if (!(cur_capa & mode)) {
-		hns3_err(hw, "unsupported FEC mode = 0x%x", mode);
+	if ((cur_capa & mode) == 0) {
+		hns3_err(hw, "unsupported FEC mode(0x%x)", mode);
 		return -EINVAL;
 	}
 
+	return 0;
+}
+
+static int
+hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
+{
+	struct hns3_adapter *hns = dev->data->dev_private;
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(hns);
+	struct hns3_pf *pf = &hns->pf;
+	int ret;
+
+	ret = hns3_fec_mode_valid(dev, mode);
+	if (ret != 0)
+		return ret;
+
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_set_fec_hw(hw, mode);
 	if (ret) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.723325400 +0800
+++ 0045-net-hns3-fix-FEC-mode-check.patch	2023-06-25 14:31:58.365773900 +0800
@@ -1 +1 @@
-From 0cf0f931267ae751c503dba929307bb2a6acbbfa Mon Sep 17 00:00:00 2001
+From 340cb03d7f29a6e71872e5754bb351f250cc97c3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0cf0f931267ae751c503dba929307bb2a6acbbfa ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 94eadefb8e..4e8efa468d 100644
+index f4728f4a41..dc518c5814 100644
@@ -27 +29 @@
-@@ -6139,52 +6139,50 @@ get_current_speed_fec_cap(struct hns3_hw *hw, struct rte_eth_fec_capa *fec_capa)
+@@ -6171,52 +6171,50 @@ get_current_speed_fec_cap(struct hns3_hw *hw, struct rte_eth_fec_capa *fec_capa)

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

* patch 'net/hns3: fix missing FEC capability' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (44 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix FEC mode check' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'doc: fix format in flow API guide' " Xueming Li
                   ` (83 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Jie Hai; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9ca1814402ab902d7d81b9512df56c5c2ce1e0af Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Sat, 8 Apr 2023 10:27:35 +0800
Subject: [PATCH] net/hns3: fix missing FEC capability
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 062242821503aae6e02fed47f10652b852c8f01e ]

Currently, FEC capabilities are reported based on the device ID.
And a device ID is bound to only one or two rates. So some cases
hns3 driver only reports the FEC capabilities corresponding to
the rate. But hns3 supports speed switching function, which causes
the FEC capabilities of other rates are not reported. So this patch
reports the FEC capabilities by the speed capabilities of the
network port.

Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 129 ++++++++++++---------------------
 1 file changed, 45 insertions(+), 84 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index dc518c5814..69446933b9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -60,6 +60,13 @@ enum hns3_evt_cause {
 	HNS3_VECTOR0_EVENT_OTHER,
 };
 
+#define HNS3_SPEEDS_SUPP_FEC (RTE_ETH_LINK_SPEED_10G | \
+			      RTE_ETH_LINK_SPEED_25G | \
+			      RTE_ETH_LINK_SPEED_40G | \
+			      RTE_ETH_LINK_SPEED_50G | \
+			      RTE_ETH_LINK_SPEED_100G | \
+			      RTE_ETH_LINK_SPEED_200G)
+
 static const struct rte_eth_fec_capa speed_fec_capa_tbl[] = {
 	{ RTE_ETH_SPEED_NUM_10G, RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC) |
 			     RTE_ETH_FEC_MODE_CAPA_MASK(AUTO) |
@@ -5932,56 +5939,27 @@ hns3_reset_service(void *param)
 		hns3_msix_process(hns, reset_level);
 }
 
-static unsigned int
-hns3_get_speed_capa_num(uint16_t device_id)
+static uint32_t
+hns3_get_speed_fec_capa(struct rte_eth_fec_capa *speed_fec_capa,
+			uint32_t speed_capa)
 {
-	unsigned int num;
-
-	switch (device_id) {
-	case HNS3_DEV_ID_25GE:
-	case HNS3_DEV_ID_25GE_RDMA:
-		num = 2;
-		break;
-	case HNS3_DEV_ID_100G_RDMA_MACSEC:
-	case HNS3_DEV_ID_200G_RDMA:
-		num = 1;
-		break;
-	default:
-		num = 0;
-		break;
-	}
+	uint32_t speed_bit;
+	uint32_t num = 0;
+	uint32_t i;
 
-	return num;
-}
+	for (i = 0; i < RTE_DIM(speed_fec_capa_tbl); i++) {
+		speed_bit =
+			rte_eth_speed_bitflag(speed_fec_capa_tbl[i].speed,
+					      RTE_ETH_LINK_FULL_DUPLEX);
+		if ((speed_capa & speed_bit) == 0)
+			continue;
 
-static int
-hns3_get_speed_fec_capa(struct rte_eth_fec_capa *speed_fec_capa,
-			uint16_t device_id)
-{
-	switch (device_id) {
-	case HNS3_DEV_ID_25GE:
-	/* fallthrough */
-	case HNS3_DEV_ID_25GE_RDMA:
-		speed_fec_capa[0].speed = speed_fec_capa_tbl[1].speed;
-		speed_fec_capa[0].capa = speed_fec_capa_tbl[1].capa;
-
-		/* In HNS3 device, the 25G NIC is compatible with 10G rate */
-		speed_fec_capa[1].speed = speed_fec_capa_tbl[0].speed;
-		speed_fec_capa[1].capa = speed_fec_capa_tbl[0].capa;
-		break;
-	case HNS3_DEV_ID_100G_RDMA_MACSEC:
-		speed_fec_capa[0].speed = speed_fec_capa_tbl[4].speed;
-		speed_fec_capa[0].capa = speed_fec_capa_tbl[4].capa;
-		break;
-	case HNS3_DEV_ID_200G_RDMA:
-		speed_fec_capa[0].speed = speed_fec_capa_tbl[5].speed;
-		speed_fec_capa[0].capa = speed_fec_capa_tbl[5].capa;
-		break;
-	default:
-		return -ENOTSUP;
+		speed_fec_capa[num].speed = speed_fec_capa_tbl[i].speed;
+		speed_fec_capa[num].capa = speed_fec_capa_tbl[i].capa;
+		num++;
 	}
 
-	return 0;
+	return num;
 }
 
 static int
@@ -5990,28 +5968,28 @@ hns3_fec_get_capability(struct rte_eth_dev *dev,
 			unsigned int num)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-	uint16_t device_id = pci_dev->id.device_id;
-	unsigned int capa_num;
-	int ret;
+	unsigned int speed_num;
+	uint32_t speed_capa;
 
-	capa_num = hns3_get_speed_capa_num(device_id);
-	if (capa_num == 0) {
-		hns3_err(hw, "device(0x%x) is not supported by hns3 PMD",
-			 device_id);
+	speed_capa = hns3_get_speed_capa(hw);
+	/* speed_num counts number of speed capabilities */
+	speed_num = __builtin_popcount(speed_capa & HNS3_SPEEDS_SUPP_FEC);
+	if (speed_num == 0)
 		return -ENOTSUP;
-	}
 
-	if (speed_fec_capa == NULL || num < capa_num)
-		return capa_num;
+	if (speed_fec_capa == NULL)
+		return speed_num;
 
-	ret = hns3_get_speed_fec_capa(speed_fec_capa, device_id);
-	if (ret)
-		return -ENOTSUP;
+	if (num < speed_num) {
+		hns3_err(hw, "not enough array size(%u) to store FEC capabilities, should not be less than %u",
+			 num, speed_num);
+		return -EINVAL;
+	}
 
-	return capa_num;
+	return hns3_get_speed_fec_capa(speed_fec_capa, speed_capa);
 }
 
+
 static int
 get_current_fec_auto_state(struct hns3_hw *hw, uint8_t *state)
 {
@@ -6149,52 +6127,35 @@ hns3_set_fec_hw(struct hns3_hw *hw, uint32_t mode)
 }
 
 static uint32_t
-get_current_speed_fec_cap(struct hns3_hw *hw, struct rte_eth_fec_capa *fec_capa)
+hns3_get_current_speed_fec_cap(struct hns3_mac *mac)
 {
-	struct hns3_mac *mac = &hw->mac;
-	uint32_t cur_capa;
+	uint32_t i;
 
-	switch (mac->link_speed) {
-	case RTE_ETH_SPEED_NUM_10G:
-		cur_capa = fec_capa[1].capa;
-		break;
-	case RTE_ETH_SPEED_NUM_25G:
-	case RTE_ETH_SPEED_NUM_100G:
-	case RTE_ETH_SPEED_NUM_200G:
-		cur_capa = fec_capa[0].capa;
-		break;
-	default:
-		cur_capa = 0;
-		break;
+	for (i = 0; i < RTE_DIM(speed_fec_capa_tbl); i++) {
+		if (mac->link_speed == speed_fec_capa_tbl[i].speed)
+			return speed_fec_capa_tbl[i].capa;
 	}
 
-	return cur_capa;
+	return 0;
 }
 
 static int
 hns3_fec_mode_valid(struct rte_eth_dev *dev, uint32_t mode)
 {
-#define FEC_CAPA_NUM 2
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(hns);
-	struct rte_eth_fec_capa fec_capa[FEC_CAPA_NUM];
-	uint32_t num = FEC_CAPA_NUM;
 	uint32_t cur_capa;
-	int ret;
 
 	if (__builtin_popcount(mode) != 1) {
 		hns3_err(hw, "FEC mode(0x%x) should be only one bit set", mode);
 		return -EINVAL;
 	}
 
-	ret = hns3_fec_get_capability(dev, fec_capa, num);
-	if (ret < 0)
-		return ret;
 	/*
 	 * Check whether the configured mode is within the FEC capability.
 	 * If not, the configured mode will not be supported.
 	 */
-	cur_capa = get_current_speed_fec_cap(hw, fec_capa);
+	cur_capa = hns3_get_current_speed_fec_cap(&hw->mac);
 	if ((cur_capa & mode) == 0) {
 		hns3_err(hw, "unsupported FEC mode(0x%x)", mode);
 		return -EINVAL;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.749377300 +0800
+++ 0046-net-hns3-fix-missing-FEC-capability.patch	2023-06-25 14:31:58.365773900 +0800
@@ -1 +1 @@
-From 062242821503aae6e02fed47f10652b852c8f01e Mon Sep 17 00:00:00 2001
+From 9ca1814402ab902d7d81b9512df56c5c2ce1e0af Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 062242821503aae6e02fed47f10652b852c8f01e ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 4e8efa468d..15cdf94228 100644
+index dc518c5814..69446933b9 100644
@@ -41 +43 @@
-@@ -5900,56 +5907,27 @@ hns3_reset_service(void *param)
+@@ -5932,56 +5939,27 @@ hns3_reset_service(void *param)
@@ -114 +116 @@
-@@ -5958,28 +5936,28 @@ hns3_fec_get_capability(struct rte_eth_dev *dev,
+@@ -5990,28 +5968,28 @@ hns3_fec_get_capability(struct rte_eth_dev *dev,
@@ -158 +160 @@
-@@ -6117,52 +6095,35 @@ hns3_set_fec_hw(struct hns3_hw *hw, uint32_t mode)
+@@ -6149,52 +6127,35 @@ hns3_set_fec_hw(struct hns3_hw *hw, uint32_t mode)

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

* patch 'doc: fix format in flow API guide' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (45 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix missing FEC capability' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix RTC time on initialization' " Xueming Li
                   ` (82 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Michael Baum; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bdf2131156d22ccf14856b62fac283ad86cf3af6 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 24 May 2023 00:31:53 +0300
Subject: [PATCH] doc: fix format in flow API guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5d254667810fffe59190ca208a078bcb666a2a71 ]

The modify field action description inside "Generic flow API (rte_flow)"
documentation, lists all operations supported for a destination field.
In addition, it lists the values supported for a encapsulation level
field.
Before the lists, in both cases, miss a blank line causing them to look
regular text lines.
This patch adds the blank lines.

The asynchronous operations description inside "Generic flow API
(rte_flow)" documentation, adds some bullets to describe asynchronous
operations behavior.
Before the first bullet, miss a blank line causing it to look a regular
text line.
This patch adds the blank line.

The RSS action description inside "Generic flow API (rte_flow)"
documentation, lists the values supported for a encapsulation level
field.
For "2" value, it uses 3 spaces as an indentation instead of 2 after
line breaking, causing the first line to be bold.
This patch updates the number of spaces in the indentation.

Fixes: 73b68f4c54a0 ("ethdev: introduce generic modify flow action")
Fixes: 197e820c6685 ("ethdev: bring in async queue-based flow rules operations")
Fixes: 18aee2861a1f ("ethdev: add encap level to RSS flow API action")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 doc/guides/prog_guide/rte_flow.rst | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 40d3f5bd44..e98f1fdd52 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -1918,8 +1918,8 @@ Also, regarding packet encapsulation ``level``:
   level.
 
 - ``2`` and subsequent values request RSS to be performed on the specified
-   inner packet encapsulation level, from outermost to innermost (lower to
-   higher values).
+  inner packet encapsulation level, from outermost to innermost (lower to
+  higher values).
 
 Values other than ``0`` are not necessarily supported.
 
@@ -2881,20 +2881,23 @@ The immediate value ``RTE_FLOW_FIELD_VALUE`` (or a pointer to it
 ``RTE_FLOW_FIELD_START`` is used to point to the beginning of a packet.
 See ``enum rte_flow_field_id`` for the list of supported fields.
 
-``op`` selects the operation to perform on a destination field.
+``op`` selects the operation to perform on a destination field:
+
 - ``set`` copies the data from ``src`` field to ``dst`` field.
 - ``add`` adds together ``dst`` and ``src`` and stores the result into ``dst``.
-- ``sub`` subtracts ``src`` from ``dst`` and stores the result into ``dst``
+- ``sub`` subtracts ``src`` from ``dst`` and stores the result into ``dst``.
 
 ``width`` defines a number of bits to use from ``src`` field.
 
 ``level`` is used to access any packet field on any encapsulation level
-as well as any tag element in the tag array.
-- ``0`` means the default behaviour. Depending on the packet type, it can
-mean outermost, innermost or anything in between.
+as well as any tag element in the tag array:
+
+- ``0`` means the default behaviour. Depending on the packet type,
+  it can mean outermost, innermost or anything in between.
 - ``1`` requests access to the outermost packet encapsulation level.
 - ``2`` and subsequent values requests access to the specified packet
-encapsulation level, from outermost to innermost (lower to higher values).
+  encapsulation level, from outermost to innermost (lower to higher values).
+
 For the tag array (in case of multiple tags are supported and present)
 ``level`` translates directly into the array index.
 
@@ -3602,6 +3605,7 @@ Asynchronous operations
 -----------------------
 
 Flow rules management can be done via special lockless flow management queues.
+
 - Queue operations are asynchronous and not thread-safe.
 
 - Operations can thus be invoked by the app's datapath,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.773420200 +0800
+++ 0047-doc-fix-format-in-flow-API-guide.patch	2023-06-25 14:31:58.365773900 +0800
@@ -1 +1 @@
-From 5d254667810fffe59190ca208a078bcb666a2a71 Mon Sep 17 00:00:00 2001
+From bdf2131156d22ccf14856b62fac283ad86cf3af6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5d254667810fffe59190ca208a078bcb666a2a71 ]
@@ -31 +33,0 @@
-Cc: stable@dpdk.org
@@ -40 +42 @@
-index 27fa3dd304..7116c9ce23 100644
+index 40d3f5bd44..e98f1fdd52 100644
@@ -43 +45 @@
-@@ -1968,8 +1968,8 @@ Also, regarding packet encapsulation ``level``:
+@@ -1918,8 +1918,8 @@ Also, regarding packet encapsulation ``level``:
@@ -54 +56 @@
-@@ -3049,20 +3049,23 @@ The immediate value ``RTE_FLOW_FIELD_VALUE`` (or a pointer to it
+@@ -2881,20 +2881,23 @@ The immediate value ``RTE_FLOW_FIELD_VALUE`` (or a pointer to it
@@ -84 +86 @@
-@@ -3856,6 +3859,7 @@ Asynchronous operations
+@@ -3602,6 +3605,7 @@ Asynchronous operations

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

* patch 'net/hns3: fix RTC time on initialization' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (46 preceding siblings ...)
  2023-06-25  6:34 ` patch 'doc: fix format in flow API guide' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix RTC time after reset' " Xueming Li
                   ` (81 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 69bff6ea1c35e00eb10145a41269ce7234ce8558 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 2 Jun 2023 19:41:55 +0800
Subject: [PATCH] net/hns3: fix RTC time on initialization
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f901c570e50d042f466de29b186db68e177f93ab ]

Driver doesn't initialize RTC time during probe phase, which
lead to an inaccurate time.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ptp.c | 26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c
index db3c007b12..1e27e4aeca 100644
--- a/drivers/net/hns3/hns3_ptp.c
+++ b/drivers/net/hns3/hns3_ptp.c
@@ -56,9 +56,23 @@ hns3_ptp_int_en(struct hns3_hw *hw, bool en)
 	return ret;
 }
 
+static void
+hns3_ptp_timesync_write_time(struct hns3_hw *hw, const struct timespec *ts)
+{
+	uint64_t sec = ts->tv_sec;
+	uint64_t ns = ts->tv_nsec;
+
+	/* Set the timecounters to a new value. */
+	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_H, upper_32_bits(sec));
+	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_M, lower_32_bits(sec));
+	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_L, lower_32_bits(ns));
+	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_RDY, 1);
+}
+
 int
 hns3_ptp_init(struct hns3_hw *hw)
 {
+	struct timespec sys_time;
 	int ret;
 
 	if (!hns3_dev_get_support(hw, PTP))
@@ -71,6 +85,10 @@ hns3_ptp_init(struct hns3_hw *hw)
 	/* Start PTP timer */
 	hns3_write_dev(hw, HNS3_CFG_TIME_CYC_EN, 1);
 
+	/* Initializing the RTC. */
+	clock_gettime(CLOCK_REALTIME, &sys_time);
+	hns3_ptp_timesync_write_time(hw, &sys_time);
+
 	return 0;
 }
 
@@ -241,17 +259,11 @@ int
 hns3_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	uint64_t sec = ts->tv_sec;
-	uint64_t ns = ts->tv_nsec;
 
 	if (!hns3_dev_get_support(hw, PTP))
 		return -ENOTSUP;
 
-	/* Set the timecounters to a new value. */
-	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_H, upper_32_bits(sec));
-	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_M, lower_32_bits(sec));
-	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_L, lower_32_bits(ns));
-	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_RDY, 1);
+	hns3_ptp_timesync_write_time(hw, ts);
 
 	return 0;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.797256300 +0800
+++ 0048-net-hns3-fix-RTC-time-on-initialization.patch	2023-06-25 14:31:58.365773900 +0800
@@ -1 +1 @@
-From f901c570e50d042f466de29b186db68e177f93ab Mon Sep 17 00:00:00 2001
+From 69bff6ea1c35e00eb10145a41269ce7234ce8558 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f901c570e50d042f466de29b186db68e177f93ab ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/hns3: fix RTC time after reset' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (47 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix RTC time on initialization' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: uninitialize PTP' " Xueming Li
                   ` (80 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3999b58cd323505d28365c4cfaed2c2db35ea5c2 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 2 Jun 2023 19:41:56 +0800
Subject: [PATCH] net/hns3: fix RTC time after reset
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 14d9281d9c65afd743354737b8c70555161d4a69 ]

The enabled status of RTC time will be cleared after global
or IMP reset, which cause the local RTC time doesn't work.
So this patch fix it.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 69446933b9..5d5ccefcc9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4408,6 +4408,12 @@ hns3_init_hardware(struct hns3_adapter *hns)
 		goto err_mac_init;
 	}
 
+	ret = hns3_ptp_init(hw);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Failed to init PTP, ret = %d", ret);
+		goto err_mac_init;
+	}
+
 	return 0;
 
 err_mac_init:
@@ -4587,10 +4593,6 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
 		goto err_intr_callback_register;
 	}
 
-	ret = hns3_ptp_init(hw);
-	if (ret)
-		goto err_get_config;
-
 	/* Enable interrupt */
 	rte_intr_enable(pci_dev->intr_handle);
 	hns3_pf_enable_irq0(hw);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.821364200 +0800
+++ 0049-net-hns3-fix-RTC-time-after-reset.patch	2023-06-25 14:31:58.375773900 +0800
@@ -1 +1 @@
-From 14d9281d9c65afd743354737b8c70555161d4a69 Mon Sep 17 00:00:00 2001
+From 3999b58cd323505d28365c4cfaed2c2db35ea5c2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 14d9281d9c65afd743354737b8c70555161d4a69 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 600accea93..9ed54ae384 100644
+index 69446933b9..5d5ccefcc9 100644
@@ -23 +25 @@
-@@ -4416,6 +4416,12 @@ hns3_init_hardware(struct hns3_adapter *hns)
+@@ -4408,6 +4408,12 @@ hns3_init_hardware(struct hns3_adapter *hns)
@@ -36 +38 @@
-@@ -4577,10 +4583,6 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
+@@ -4587,10 +4593,6 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)

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

* patch 'net/hns3: uninitialize PTP' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (48 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix RTC time after reset' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: extract PTP to its own header file' " Xueming Li
                   ` (79 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a8ad01066179a347a3949abc48e0cf61c9bd1010 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 2 Jun 2023 19:41:57 +0800
Subject: [PATCH] net/hns3: uninitialize PTP
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bfd20b33e752a2597e85283e9fbb134170cce3a0 ]

This patch adds the uninitialization process of PTP in case
of having an impact on PF driver in kernel.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c |  2 ++
 drivers/net/hns3/hns3_ethdev.h |  1 +
 drivers/net/hns3/hns3_ptp.c    | 18 ++++++++++++++++++
 3 files changed, 21 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 5d5ccefcc9..2fb02ab00d 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4649,6 +4649,7 @@ err_enable_intr:
 	hns3_fdir_filter_uninit(hns);
 err_fdir:
 	hns3_uninit_umv_space(hw);
+	hns3_ptp_uninit(hw);
 err_init_hw:
 	hns3_stats_uninit(hw);
 err_get_config:
@@ -4684,6 +4685,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
 	hns3_flow_uninit(eth_dev);
 	hns3_fdir_filter_uninit(hns);
 	hns3_uninit_umv_space(hw);
+	hns3_ptp_uninit(hw);
 	hns3_stats_uninit(hw);
 	hns3_config_mac_tnl_int(hw, false);
 	hns3_pf_disable_irq0(hw);
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 9acc5a3d7e..fb4c5ba2ef 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -1041,6 +1041,7 @@ int hns3_restore_ptp(struct hns3_adapter *hns);
 int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev,
 				    struct rte_eth_conf *conf);
 int hns3_ptp_init(struct hns3_hw *hw);
+void hns3_ptp_uninit(struct hns3_hw *hw);
 int hns3_timesync_enable(struct rte_eth_dev *dev);
 int hns3_timesync_disable(struct rte_eth_dev *dev);
 int hns3_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c
index 1e27e4aeca..0e17a17034 100644
--- a/drivers/net/hns3/hns3_ptp.c
+++ b/drivers/net/hns3/hns3_ptp.c
@@ -306,3 +306,21 @@ hns3_restore_ptp(struct hns3_adapter *hns)
 
 	return ret;
 }
+
+void
+hns3_ptp_uninit(struct hns3_hw *hw)
+{
+	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
+	int ret;
+
+	if (!hns3_dev_get_support(hw, PTP))
+		return;
+
+	ret = hns3_ptp_int_en(hw, false);
+	if (ret != 0)
+		hns3_err(hw, "disable PTP interrupt failed, ret = %d.", ret);
+
+	ret = hns3_timesync_configure(hns, false);
+	if (ret != 0)
+		hns3_err(hw, "disable timesync failed, ret = %d.", ret);
+}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.859615000 +0800
+++ 0050-net-hns3-uninitialize-PTP.patch	2023-06-25 14:31:58.375773900 +0800
@@ -1 +1 @@
-From bfd20b33e752a2597e85283e9fbb134170cce3a0 Mon Sep 17 00:00:00 2001
+From a8ad01066179a347a3949abc48e0cf61c9bd1010 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bfd20b33e752a2597e85283e9fbb134170cce3a0 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 9ed54ae384..70463fe177 100644
+index 5d5ccefcc9..2fb02ab00d 100644
@@ -24 +26 @@
-@@ -4637,6 +4637,7 @@ err_enable_intr:
+@@ -4649,6 +4649,7 @@ err_enable_intr:
@@ -32 +34 @@
-@@ -4672,6 +4673,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
+@@ -4684,6 +4685,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
@@ -41 +43 @@
-index c04edf622f..9456204422 100644
+index 9acc5a3d7e..fb4c5ba2ef 100644
@@ -44 +46 @@
-@@ -1045,6 +1045,7 @@ int hns3_restore_ptp(struct hns3_adapter *hns);
+@@ -1041,6 +1041,7 @@ int hns3_restore_ptp(struct hns3_adapter *hns);

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

* patch 'net/hns3: extract PTP to its own header file' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (49 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: uninitialize PTP' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix mbuf leakage when RxQ started during reset' " Xueming Li
                   ` (78 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 422a5e09d26885f25ed3b0fb733ce1aa98d19637 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 2 Jun 2023 19:41:58 +0800
Subject: [PATCH] net/hns3: extract PTP to its own header file
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 78399874af509e129c13c6771aafa8f27c456c95 ]

This patch extracts a PTP header file to contain PTP registers
and external API in order to make PTP code structure more clear.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c |  1 +
 drivers/net/hns3/hns3_ethdev.h | 16 ------------
 drivers/net/hns3/hns3_ptp.c    |  2 +-
 drivers/net/hns3/hns3_ptp.h    | 48 ++++++++++++++++++++++++++++++++++
 drivers/net/hns3/hns3_regs.h   | 23 ----------------
 5 files changed, 50 insertions(+), 40 deletions(-)
 create mode 100644 drivers/net/hns3/hns3_ptp.h

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 2fb02ab00d..6cf1dbc27c 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -15,6 +15,7 @@
 #include "hns3_dcb.h"
 #include "hns3_mp.h"
 #include "hns3_flow.h"
+#include "hns3_ptp.h"
 #include "hns3_ethdev.h"
 
 #define HNS3_SERVICE_INTERVAL		1000000 /* us */
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index fb4c5ba2ef..046a37b7d3 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -1037,22 +1037,6 @@ void hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
 			  uint32_t link_speed, uint8_t link_duplex);
 void hns3vf_update_push_lsc_cap(struct hns3_hw *hw, bool supported);
 
-int hns3_restore_ptp(struct hns3_adapter *hns);
-int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev,
-				    struct rte_eth_conf *conf);
-int hns3_ptp_init(struct hns3_hw *hw);
-void hns3_ptp_uninit(struct hns3_hw *hw);
-int hns3_timesync_enable(struct rte_eth_dev *dev);
-int hns3_timesync_disable(struct rte_eth_dev *dev);
-int hns3_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
-				struct timespec *timestamp,
-				uint32_t flags __rte_unused);
-int hns3_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
-				struct timespec *timestamp);
-int hns3_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts);
-int hns3_timesync_write_time(struct rte_eth_dev *dev,
-			const struct timespec *ts);
-int hns3_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta);
 
 static inline bool
 is_reset_pending(struct hns3_adapter *hns)
diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c
index 0e17a17034..894ac6dd71 100644
--- a/drivers/net/hns3/hns3_ptp.c
+++ b/drivers/net/hns3/hns3_ptp.c
@@ -7,7 +7,7 @@
 #include <rte_time.h>
 
 #include "hns3_ethdev.h"
-#include "hns3_regs.h"
+#include "hns3_ptp.h"
 #include "hns3_logs.h"
 
 uint64_t hns3_timestamp_rx_dynflag;
diff --git a/drivers/net/hns3/hns3_ptp.h b/drivers/net/hns3/hns3_ptp.h
new file mode 100644
index 0000000000..2b8717fa3c
--- /dev/null
+++ b/drivers/net/hns3/hns3_ptp.h
@@ -0,0 +1,48 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 HiSilicon Limited.
+ */
+
+#ifndef HNS3_PTP_H
+#define HNS3_PTP_H
+
+/* Register bit for 1588 event */
+#define HNS3_VECTOR0_1588_INT_B			0
+
+#define HNS3_PTP_BASE_ADDRESS			0x29000
+
+#define HNS3_TX_1588_SEQID_BACK			(HNS3_PTP_BASE_ADDRESS + 0x0)
+#define HNS3_TX_1588_TSP_BACK_0			(HNS3_PTP_BASE_ADDRESS + 0x4)
+#define HNS3_TX_1588_TSP_BACK_1			(HNS3_PTP_BASE_ADDRESS + 0x8)
+#define HNS3_TX_1588_TSP_BACK_2			(HNS3_PTP_BASE_ADDRESS + 0xc)
+
+#define HNS3_TX_1588_BACK_TSP_CNT		(HNS3_PTP_BASE_ADDRESS + 0x30)
+
+#define HNS3_CFG_TIME_SYNC_H			(HNS3_PTP_BASE_ADDRESS + 0x50)
+#define HNS3_CFG_TIME_SYNC_M			(HNS3_PTP_BASE_ADDRESS + 0x54)
+#define HNS3_CFG_TIME_SYNC_L			(HNS3_PTP_BASE_ADDRESS + 0x58)
+#define HNS3_CFG_TIME_SYNC_RDY			(HNS3_PTP_BASE_ADDRESS + 0x5c)
+
+#define HNS3_CFG_TIME_CYC_EN			(HNS3_PTP_BASE_ADDRESS + 0x70)
+
+#define HNS3_CURR_TIME_OUT_H			(HNS3_PTP_BASE_ADDRESS + 0x74)
+#define HNS3_CURR_TIME_OUT_L			(HNS3_PTP_BASE_ADDRESS + 0x78)
+#define HNS3_CURR_TIME_OUT_NS			(HNS3_PTP_BASE_ADDRESS + 0x7c)
+
+int hns3_restore_ptp(struct hns3_adapter *hns);
+int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev,
+				    struct rte_eth_conf *conf);
+int hns3_ptp_init(struct hns3_hw *hw);
+void hns3_ptp_uninit(struct hns3_hw *hw);
+int hns3_timesync_enable(struct rte_eth_dev *dev);
+int hns3_timesync_disable(struct rte_eth_dev *dev);
+int hns3_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
+				struct timespec *timestamp,
+				uint32_t flags __rte_unused);
+int hns3_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
+				struct timespec *timestamp);
+int hns3_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts);
+int hns3_timesync_write_time(struct rte_eth_dev *dev,
+			const struct timespec *ts);
+int hns3_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta);
+
+#endif /* HNS3_PTP_H */
diff --git a/drivers/net/hns3/hns3_regs.h b/drivers/net/hns3/hns3_regs.h
index 459bbaf773..6b037f81c1 100644
--- a/drivers/net/hns3/hns3_regs.h
+++ b/drivers/net/hns3/hns3_regs.h
@@ -124,29 +124,6 @@
 #define HNS3_TQP_INTR_RL_DEFAULT		0
 #define HNS3_TQP_INTR_QL_DEFAULT		0
 
-/* Register bit for 1588 event */
-#define HNS3_VECTOR0_1588_INT_B	                0
-
-#define HNS3_PTP_BASE_ADDRESS			0x29000
-
-#define HNS3_TX_1588_SEQID_BACK			(HNS3_PTP_BASE_ADDRESS + 0x0)
-#define HNS3_TX_1588_TSP_BACK_0			(HNS3_PTP_BASE_ADDRESS + 0x4)
-#define HNS3_TX_1588_TSP_BACK_1			(HNS3_PTP_BASE_ADDRESS + 0x8)
-#define HNS3_TX_1588_TSP_BACK_2			(HNS3_PTP_BASE_ADDRESS + 0xc)
-
-#define HNS3_TX_1588_BACK_TSP_CNT		(HNS3_PTP_BASE_ADDRESS + 0x30)
-
-#define HNS3_CFG_TIME_SYNC_H			(HNS3_PTP_BASE_ADDRESS + 0x50)
-#define HNS3_CFG_TIME_SYNC_M			(HNS3_PTP_BASE_ADDRESS + 0x54)
-#define HNS3_CFG_TIME_SYNC_L			(HNS3_PTP_BASE_ADDRESS + 0x58)
-#define HNS3_CFG_TIME_SYNC_RDY			(HNS3_PTP_BASE_ADDRESS + 0x5c)
-
-#define HNS3_CFG_TIME_CYC_EN			(HNS3_PTP_BASE_ADDRESS + 0x70)
-
-#define HNS3_CURR_TIME_OUT_H			(HNS3_PTP_BASE_ADDRESS + 0x74)
-#define HNS3_CURR_TIME_OUT_L			(HNS3_PTP_BASE_ADDRESS + 0x78)
-#define HNS3_CURR_TIME_OUT_NS			(HNS3_PTP_BASE_ADDRESS + 0x7c)
-
 /* gl_usec convert to hardware count, as writing each 1 represents 2us */
 #define HNS3_GL_USEC_TO_REG(gl_usec)		((gl_usec) >> 1)
 /* rl_usec convert to hardware count, as writing each 1 represents 4us */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.887274200 +0800
+++ 0051-net-hns3-extract-PTP-to-its-own-header-file.patch	2023-06-25 14:31:58.385773900 +0800
@@ -1 +1 @@
-From 78399874af509e129c13c6771aafa8f27c456c95 Mon Sep 17 00:00:00 2001
+From 422a5e09d26885f25ed3b0fb733ce1aa98d19637 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 78399874af509e129c13c6771aafa8f27c456c95 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- drivers/net/hns3/hns3_ethdev.h | 17 ------------
+ drivers/net/hns3/hns3_ethdev.h | 16 ------------
@@ -20 +22 @@
- 5 files changed, 50 insertions(+), 41 deletions(-)
+ 5 files changed, 50 insertions(+), 40 deletions(-)
@@ -24 +26 @@
-index 70463fe177..64028778d0 100644
+index 2fb02ab00d..6cf1dbc27c 100644
@@ -36 +38 @@
-index 9456204422..c58094d87b 100644
+index fb4c5ba2ef..046a37b7d3 100644
@@ -39 +41 @@
-@@ -1041,23 +1041,6 @@ void hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
+@@ -1037,22 +1037,6 @@ void hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
@@ -59,2 +60,0 @@
--
- const char *hns3_get_media_type_name(uint8_t media_type);
@@ -62,0 +63 @@
+ is_reset_pending(struct hns3_adapter *hns)

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

* patch 'net/hns3: fix mbuf leakage when RxQ started during reset' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (50 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: extract PTP to its own header file' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix mbuf leakage when RxQ started after " Xueming Li
                   ` (77 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e9ade95ac4ad0a74c74f32eef7b68e1a70edde10 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 2 Jun 2023 19:41:59 +0800
Subject: [PATCH] net/hns3: fix mbuf leakage when RxQ started during reset
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bbc5a31b8ead8a353da5b1c46e0209d2fa9dae24 ]

In the reset restore-conf phase, the reset process will allocate for
the Rx ring mbufs unconditionlly.

And the rte_eth_dev_rx_queue_start() will also allocate for the Rx ring
mbufs unconditionlly.

So if the rte_eth_dev_rx_queue_start() is invoked before restore-conf
phase, then the mbufs allocated by rte_eth_dev_rx_queue_start() will
leak.

Because the hw->reset.resetting was always true during the phases from
stop-service to restore-conf, so fix it by returning an error if the
hw->reset.resetting is set.

This patch adds the above logic in both rx_queue_start/rx_queue_stop/
tx_queue_start/tx_queue_stop ops.

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 | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 4065c519c3..10ac4926a8 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -4469,6 +4469,13 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 		return -ENOTSUP;
 
 	rte_spinlock_lock(&hw->lock);
+
+	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) {
+		hns3_err(hw, "fail to start Rx queue during resetting.");
+		rte_spinlock_unlock(&hw->lock);
+		return -EIO;
+	}
+
 	ret = hns3_reset_queue(hw, rx_queue_id, HNS3_RING_TYPE_RX);
 	if (ret) {
 		hns3_err(hw, "fail to reset Rx queue %u, ret = %d.",
@@ -4515,6 +4522,13 @@ hns3_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 		return -ENOTSUP;
 
 	rte_spinlock_lock(&hw->lock);
+
+	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) {
+		hns3_err(hw, "fail to stop Rx queue during resetting.");
+		rte_spinlock_unlock(&hw->lock);
+		return -EIO;
+	}
+
 	hns3_enable_rxq(rxq, false);
 
 	hns3_rx_queue_release_mbufs(rxq);
@@ -4537,6 +4551,13 @@ hns3_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 		return -ENOTSUP;
 
 	rte_spinlock_lock(&hw->lock);
+
+	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) {
+		hns3_err(hw, "fail to start Tx queue during resetting.");
+		rte_spinlock_unlock(&hw->lock);
+		return -EIO;
+	}
+
 	ret = hns3_reset_queue(hw, tx_queue_id, HNS3_RING_TYPE_TX);
 	if (ret) {
 		hns3_err(hw, "fail to reset Tx queue %u, ret = %d.",
@@ -4563,6 +4584,13 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 		return -ENOTSUP;
 
 	rte_spinlock_lock(&hw->lock);
+
+	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) {
+		hns3_err(hw, "fail to stop Tx queue during resetting.");
+		rte_spinlock_unlock(&hw->lock);
+		return -EIO;
+	}
+
 	hns3_enable_txq(txq, false);
 	hns3_tx_queue_release_mbufs(txq);
 	/*
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.915436200 +0800
+++ 0052-net-hns3-fix-mbuf-leakage-when-RxQ-started-during-re.patch	2023-06-25 14:31:58.385773900 +0800
@@ -1 +1 @@
-From bbc5a31b8ead8a353da5b1c46e0209d2fa9dae24 Mon Sep 17 00:00:00 2001
+From e9ade95ac4ad0a74c74f32eef7b68e1a70edde10 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bbc5a31b8ead8a353da5b1c46e0209d2fa9dae24 ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -33 +35 @@
-index 6468da903e..2bfc5507e3 100644
+index 4065c519c3..10ac4926a8 100644
@@ -36 +38 @@
-@@ -4523,6 +4523,13 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -4469,6 +4469,13 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -50 +52 @@
-@@ -4569,6 +4576,13 @@ hns3_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -4515,6 +4522,13 @@ hns3_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -64 +66 @@
-@@ -4591,6 +4605,13 @@ hns3_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -4537,6 +4551,13 @@ hns3_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
@@ -78 +80 @@
-@@ -4617,6 +4638,13 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -4563,6 +4584,13 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)

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

* patch 'net/hns3: fix mbuf leakage when RxQ started after reset' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (51 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix mbuf leakage when RxQ started during reset' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix device start return value' " Xueming Li
                   ` (76 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 19c20cef2781390fb32873c08606ab942c0dc766 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 2 Jun 2023 19:42:00 +0800
Subject: [PATCH] net/hns3: fix mbuf leakage when RxQ started after reset
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f81a18f491522c56ca7ee6ea78be10c784f2ae32 ]

In the reset restore-conf phase, the reset process will allocate for
the Rx ring mbufs unconditionlly.

And the rte_eth_dev_rx_queue_start() will also allocate for the Rx ring
mbufs unconditionlly.

So if the rte_eth_dev_rx_queue_start() is invoked after restore-conf
phase, then the mbufs allocated in restore-conf phase will leak.

So fix it by conditional release Rx ring mbufs in
rte_eth_dev_rx_queue_start(): if the Rx ring mbufs were allocated then
release them first.

This patch also set all sw-ring[]'s mbuf is NULL when release Rx ring
mbufs so that we can determine whether the Rx ring mbufs were allocated
based only on the first sw-ring[0]'s mbuf.

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 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 10ac4926a8..20babdc54c 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -50,6 +50,8 @@ hns3_rx_queue_release_mbufs(struct hns3_rx_queue *rxq)
 				rxq->sw_ring[i].mbuf = NULL;
 			}
 		}
+		for (i = 0; i < rxq->rx_rearm_nb; i++)
+			rxq->sw_ring[rxq->rx_rearm_start + i].mbuf = NULL;
 	}
 
 	for (i = 0; i < rxq->bulk_mbuf_num; i++)
@@ -4484,6 +4486,9 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 		return ret;
 	}
 
+	if (rxq->sw_ring[0].mbuf != NULL)
+		hns3_rx_queue_release_mbufs(rxq);
+
 	ret = hns3_init_rxq(hns, rx_queue_id);
 	if (ret) {
 		hns3_err(hw, "fail to init Rx queue %u, ret = %d.",
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.939813900 +0800
+++ 0053-net-hns3-fix-mbuf-leakage-when-RxQ-started-after-res.patch	2023-06-25 14:31:58.385773900 +0800
@@ -1 +1 @@
-From f81a18f491522c56ca7ee6ea78be10c784f2ae32 Mon Sep 17 00:00:00 2001
+From 19c20cef2781390fb32873c08606ab942c0dc766 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f81a18f491522c56ca7ee6ea78be10c784f2ae32 ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -33 +35 @@
-index 2bfc5507e3..2493748683 100644
+index 10ac4926a8..20babdc54c 100644
@@ -45 +47 @@
-@@ -4538,6 +4540,9 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -4484,6 +4486,9 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)

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

* patch 'net/hns3: fix device start return value' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (52 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix mbuf leakage when RxQ started after " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix uninitialized variable' " Xueming Li
                   ` (75 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f99fa19b6088f768c06b9df8372ce988547ef529 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 2 Jun 2023 19:42:01 +0800
Subject: [PATCH] net/hns3: fix device start return value
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a9e2ac08156cbbe5cd3c72300618b871dedffd15 ]

If hns3_init_queues() return failed, the hns3vf_do_start() should
return errcode. This patch fixes it.

Fixes: 43d8adf3891c ("net/hns3: fix RSS flow rule restore")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index d051a1357b..5aac62a41f 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1674,8 +1674,10 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue)
 	hns3_enable_rxd_adv_layout(hw);
 
 	ret = hns3_init_queues(hns, reset_queue);
-	if (ret)
+	if (ret) {
 		hns3_err(hw, "failed to init queues, ret = %d.", ret);
+		return ret;
+	}
 
 	return hns3_restore_filter(hns);
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.965132700 +0800
+++ 0054-net-hns3-fix-device-start-return-value.patch	2023-06-25 14:31:58.385773900 +0800
@@ -1 +1 @@
-From a9e2ac08156cbbe5cd3c72300618b871dedffd15 Mon Sep 17 00:00:00 2001
+From f99fa19b6088f768c06b9df8372ce988547ef529 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a9e2ac08156cbbe5cd3c72300618b871dedffd15 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/hns3: fix uninitialized variable' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (53 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix device start return value' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix inaccurate log' " Xueming Li
                   ` (74 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Jie Hai; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1c81e1a0a87230373f0a3f2bd420288da57ea0cb Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Fri, 2 Jun 2023 19:42:02 +0800
Subject: [PATCH] net/hns3: fix uninitialized variable
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 156496da7a527e36066596a7be7758037b2541b4 ]

This patch fixes possible use of uninitialized variable
"old_tuple_fields".

Fixes: e3069658da9f ("net/hns3: reimplement hash flow function")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index c1f4f5cb0b..d5c9c22633 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1944,8 +1944,9 @@ hns3_flow_set_rss_ptype_tuple(struct hns3_hw *hw,
 	if (ret != 0)
 		return ret;
 
-	hns3_info(hw, "RSS tuple fields changed from 0x%" PRIx64 " to 0x%" PRIx64,
-		  old_tuple_fields, new_tuple_fields);
+	if (!cfg_global_tuple)
+		hns3_info(hw, "RSS tuple fields changed from 0x%" PRIx64 " to 0x%" PRIx64,
+			  old_tuple_fields, new_tuple_fields);
 
 	return 0;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:31:59.988451700 +0800
+++ 0055-net-hns3-fix-uninitialized-variable.patch	2023-06-25 14:31:58.395773900 +0800
@@ -1 +1 @@
-From 156496da7a527e36066596a7be7758037b2541b4 Mon Sep 17 00:00:00 2001
+From 1c81e1a0a87230373f0a3f2bd420288da57ea0cb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 156496da7a527e36066596a7be7758037b2541b4 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index e132d88fa1..a5a7e452d8 100644
+index c1f4f5cb0b..d5c9c22633 100644

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

* patch 'net/hns3: fix inaccurate log' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (54 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix uninitialized variable' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix redundant line break in " Xueming Li
                   ` (73 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4292ebcef4d2d75b59a1a1b9086d8d23e136d4cf Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 2 Jun 2023 19:42:04 +0800
Subject: [PATCH] net/hns3: fix inaccurate log
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 94e9574f0bc5c1b5c2ac15b86ffb28bdbdc238c4 ]

This patch fix inaccurate log

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Fixes: a951c1ed3ab5 ("net/hns3: support different numbers of Rx and Tx queues")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 20babdc54c..296aba8b35 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -586,7 +586,7 @@ hns3_tqp_enable(struct hns3_hw *hw, uint16_t queue_id, bool enable)
 
 	ret = hns3_cmd_send(hw, &desc, 1);
 	if (ret)
-		hns3_err(hw, "TQP enable fail, ret = %d", ret);
+		hns3_err(hw, "TQP %s fail, ret = %d", enable ? "enable" : "disable", ret);
 
 	return ret;
 }
@@ -1639,7 +1639,7 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q,
 
 	ret = hns3_fake_tx_queue_config(hw, tx_need_add_nb_q);
 	if (ret) {
-		hns3_err(hw, "Fail to configure fake rx queues: %d", ret);
+		hns3_err(hw, "Fail to configure fake tx queues: %d", ret);
 		goto cfg_fake_tx_q_fail;
 	}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.012296200 +0800
+++ 0056-net-hns3-fix-inaccurate-log.patch	2023-06-25 14:31:58.395773900 +0800
@@ -1 +1 @@
-From 94e9574f0bc5c1b5c2ac15b86ffb28bdbdc238c4 Mon Sep 17 00:00:00 2001
+From 4292ebcef4d2d75b59a1a1b9086d8d23e136d4cf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 94e9574f0bc5c1b5c2ac15b86ffb28bdbdc238c4 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index cf04dc857e..f3c3b38c55 100644
+index 20babdc54c..296aba8b35 100644
@@ -31 +33 @@
-@@ -1635,7 +1635,7 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q,
+@@ -1639,7 +1639,7 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q,

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

* patch 'net/hns3: fix redundant line break in log' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (55 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix inaccurate log' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/hns3: fix IMP reset trigger' " Xueming Li
                   ` (72 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 219305d22720dfc04bd8c363d9c6503e752eade8 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 2 Jun 2023 19:42:05 +0800
Subject: [PATCH] net/hns3: fix redundant line break in log
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0b5e15ea5f8841e43c63350e47cbfddbb92dc25c ]

This patch remove log redundant line break

Fixes: d51867db65c1 ("net/hns3: add initialization")
Fixes: c6332c3cf9f0 ("net/hns3: support module EEPROM dump")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 6cf1dbc27c..d4ea9daddc 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -3635,7 +3635,7 @@ hns3_get_mac_ethertype_cmd_status(uint16_t cmdq_resp, uint8_t resp_code)
 
 	if (cmdq_resp) {
 		PMD_INIT_LOG(ERR,
-			     "cmdq execute failed for get_mac_ethertype_cmd_status, status=%u.\n",
+			     "cmdq execute failed for get_mac_ethertype_cmd_status, status=%u.",
 			     cmdq_resp);
 		return -EIO;
 	}
@@ -6235,7 +6235,7 @@ hns3_optical_module_existed(struct hns3_hw *hw)
 	ret = hns3_cmd_send(hw, &desc, 1);
 	if (ret) {
 		hns3_err(hw,
-			 "fail to get optical module exist state, ret = %d.\n",
+			 "fail to get optical module exist state, ret = %d.",
 			 ret);
 		return false;
 	}
@@ -6273,7 +6273,7 @@ hns3_get_module_eeprom_data(struct hns3_hw *hw, uint32_t offset,
 
 	ret = hns3_cmd_send(hw, desc, HNS3_SFP_INFO_CMD_NUM);
 	if (ret) {
-		hns3_err(hw, "fail to get module EEPROM info, ret = %d.\n",
+		hns3_err(hw, "fail to get module EEPROM info, ret = %d.",
 				ret);
 		return ret;
 	}
@@ -6310,7 +6310,7 @@ hns3_get_module_eeprom(struct rte_eth_dev *dev,
 		return -ENOTSUP;
 
 	if (!hns3_optical_module_existed(hw)) {
-		hns3_err(hw, "fail to read module EEPROM: no module is connected.\n");
+		hns3_err(hw, "fail to read module EEPROM: no module is connected.");
 		return -EIO;
 	}
 
@@ -6373,7 +6373,7 @@ hns3_get_module_info(struct rte_eth_dev *dev,
 		modinfo->eeprom_len = RTE_ETH_MODULE_SFF_8636_MAX_LEN;
 		break;
 	default:
-		hns3_err(hw, "unknown module, type = %u, extra_type = %u.\n",
+		hns3_err(hw, "unknown module, type = %u, extra_type = %u.",
 			 sfp_type.type, sfp_type.ext_type);
 		return -EINVAL;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.041831200 +0800
+++ 0057-net-hns3-fix-redundant-line-break-in-log.patch	2023-06-25 14:31:58.395773900 +0800
@@ -1 +1 @@
-From 0b5e15ea5f8841e43c63350e47cbfddbb92dc25c Mon Sep 17 00:00:00 2001
+From 219305d22720dfc04bd8c363d9c6503e752eade8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0b5e15ea5f8841e43c63350e47cbfddbb92dc25c ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 64028778d0..dccd1d416f 100644
+index 6cf1dbc27c..d4ea9daddc 100644
@@ -22 +24 @@
-@@ -3631,7 +3631,7 @@ hns3_get_mac_ethertype_cmd_status(uint16_t cmdq_resp, uint8_t resp_code)
+@@ -3635,7 +3635,7 @@ hns3_get_mac_ethertype_cmd_status(uint16_t cmdq_resp, uint8_t resp_code)

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

* patch 'net/hns3: fix IMP reset trigger' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (56 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix redundant line break in " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'ethdev: fix calloc arguments' " Xueming Li
                   ` (71 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 175e7a7bacdaaa3b6f3e1f874ebe57bbc294824d Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 6 Jun 2023 20:10:28 +0800
Subject: [PATCH] net/hns3: fix IMP reset trigger
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 56a6c88ba27bfba838b56796de364db04c59b84b ]

Currently, driver sends the command with an unknown opcode to the
firmware to trigger IMP reset when some hardware error happened.
This unknown opcode cannot be parsed by the firmware.

So this patch fixes the way by writing register to do it.

Fixes: 2790c6464725 ("net/hns3: support device reset")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index d4ea9daddc..b9a848540b 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -44,6 +44,7 @@
 #define HNS3_VECTOR0_IMP_CMDQ_ERR_B	4U
 #define HNS3_VECTOR0_IMP_RD_POISON_B	5U
 #define HNS3_VECTOR0_ALL_MSIX_ERR_B	6U
+#define HNS3_VECTOR0_TRIGGER_IMP_RESET_B	7U
 
 #define HNS3_RESET_WAIT_MS	100
 #define HNS3_RESET_WAIT_CNT	200
@@ -5609,17 +5610,6 @@ hns3_func_reset_cmd(struct hns3_hw *hw, int func_id)
 	return hns3_cmd_send(hw, &desc, 1);
 }
 
-static int
-hns3_imp_reset_cmd(struct hns3_hw *hw)
-{
-	struct hns3_cmd_desc desc;
-
-	hns3_cmd_setup_basic_desc(&desc, 0xFFFE, false);
-	desc.data[0] = 0xeedd;
-
-	return hns3_cmd_send(hw, &desc, 1);
-}
-
 static void
 hns3_msix_process(struct hns3_adapter *hns, enum hns3_reset_level reset_level)
 {
@@ -5637,7 +5627,9 @@ hns3_msix_process(struct hns3_adapter *hns, enum hns3_reset_level reset_level)
 
 	switch (reset_level) {
 	case HNS3_IMP_RESET:
-		hns3_imp_reset_cmd(hw);
+		val = hns3_read_dev(hw, HNS3_VECTOR0_OTER_EN_REG);
+		hns3_set_bit(val, HNS3_VECTOR0_TRIGGER_IMP_RESET_B, 1);
+		hns3_write_dev(hw, HNS3_VECTOR0_OTER_EN_REG, val);
 		hns3_warn(hw, "IMP Reset requested time=%ld.%.6ld",
 			  tv.tv_sec, tv.tv_usec);
 		break;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.070083100 +0800
+++ 0058-net-hns3-fix-IMP-reset-trigger.patch	2023-06-25 14:31:58.405773900 +0800
@@ -1 +1 @@
-From 56a6c88ba27bfba838b56796de364db04c59b84b Mon Sep 17 00:00:00 2001
+From 175e7a7bacdaaa3b6f3e1f874ebe57bbc294824d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 56a6c88ba27bfba838b56796de364db04c59b84b ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index dccd1d416f..95c72e86aa 100644
+index d4ea9daddc..b9a848540b 100644
@@ -33 +35 @@
-@@ -5575,17 +5576,6 @@ hns3_func_reset_cmd(struct hns3_hw *hw, int func_id)
+@@ -5609,17 +5610,6 @@ hns3_func_reset_cmd(struct hns3_hw *hw, int func_id)
@@ -51 +53 @@
-@@ -5603,7 +5593,9 @@ hns3_msix_process(struct hns3_adapter *hns, enum hns3_reset_level reset_level)
+@@ -5637,7 +5627,9 @@ hns3_msix_process(struct hns3_adapter *hns, enum hns3_reset_level reset_level)

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

* patch 'ethdev: fix calloc arguments' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (57 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/hns3: fix IMP reset trigger' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/nfp: fix disabling promiscuous mode' " Xueming Li
                   ` (70 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Jie Hai; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e659a163e34a9da36b218d7d91826411e2133e1a Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Wed, 7 Jun 2023 15:41:56 +0800
Subject: [PATCH] ethdev: fix calloc arguments
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bc7126d964e9226a115c982c4b4dfaa1314634a0 ]

The 'calloc' uses number as first argument, sizeof is generally wrong.
This patch fixes it.

Fixes: 8af559f94cef ("ethdev: support telemetry private dump")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index f21dea7150..08a08cf431 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -5945,7 +5945,7 @@ eth_dev_handle_port_dump_priv(const char *cmd __rte_unused,
 	if (!rte_eth_dev_is_valid_port(port_id))
 		return -EINVAL;
 
-	buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
+	buf = calloc(RTE_TEL_MAX_SINGLE_STRING_LEN, sizeof(char));
 	if (buf == NULL)
 		return -ENOMEM;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.097498100 +0800
+++ 0059-ethdev-fix-calloc-arguments.patch	2023-06-25 14:31:58.405773900 +0800
@@ -1 +1 @@
-From bc7126d964e9226a115c982c4b4dfaa1314634a0 Mon Sep 17 00:00:00 2001
+From e659a163e34a9da36b218d7d91826411e2133e1a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bc7126d964e9226a115c982c4b4dfaa1314634a0 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index a134928c8a..04daa280d0 100644
+index f21dea7150..08a08cf431 100644
@@ -22 +24 @@
-@@ -6570,7 +6570,7 @@ eth_dev_handle_port_dump_priv(const char *cmd __rte_unused,
+@@ -5945,7 +5945,7 @@ eth_dev_handle_port_dump_priv(const char *cmd __rte_unused,

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

* patch 'net/nfp: fix disabling promiscuous mode' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (58 preceding siblings ...)
  2023-06-25  6:34 ` patch 'ethdev: fix calloc arguments' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/nfp: fix IPv6 flow item' " Xueming Li
                   ` (69 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Qin Ke; +Cc: Chaoyong He, Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From aae5fcb267154d7ba01eabcdf22f3f02aad2fa06 Mon Sep 17 00:00:00 2001
From: Qin Ke <qin.ke@corigine.com>
Date: Thu, 8 Jun 2023 11:07:56 +0800
Subject: [PATCH] net/nfp: fix disabling promiscuous mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d318e11099bb992c47d22c0c3d13f55dc868c3a2 ]

The callback function of promiscuous_disable in
nfp_flower_pf_repr_dev_ops and nfp_flower_repr_dev_ops should be
nfp_net_promisc_disable, not nfp_net_promisc_enable, fix it.

Fixes: 39d82d209805 ("net/nfp: fix promiscuous mode for representor port")

Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_representor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index 5809c838b3..c77495f348 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -528,7 +528,7 @@ static const struct eth_dev_ops nfp_flower_pf_repr_dev_ops = {
 	.stats_reset          = nfp_flower_repr_stats_reset,
 
 	.promiscuous_enable   = nfp_net_promisc_enable,
-	.promiscuous_disable  = nfp_net_promisc_enable,
+	.promiscuous_disable  = nfp_net_promisc_disable,
 
 	.mac_addr_set         = nfp_flower_repr_mac_addr_set,
 };
@@ -549,7 +549,7 @@ static const struct eth_dev_ops nfp_flower_repr_dev_ops = {
 	.stats_reset          = nfp_flower_repr_stats_reset,
 
 	.promiscuous_enable   = nfp_net_promisc_enable,
-	.promiscuous_disable  = nfp_net_promisc_enable,
+	.promiscuous_disable  = nfp_net_promisc_disable,
 
 	.mac_addr_set         = nfp_flower_repr_mac_addr_set,
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.132564500 +0800
+++ 0060-net-nfp-fix-disabling-promiscuous-mode.patch	2023-06-25 14:31:58.405773900 +0800
@@ -1 +1 @@
-From d318e11099bb992c47d22c0c3d13f55dc868c3a2 Mon Sep 17 00:00:00 2001
+From aae5fcb267154d7ba01eabcdf22f3f02aad2fa06 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d318e11099bb992c47d22c0c3d13f55dc868c3a2 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 6b4ba5b9a2..3225a4b84a 100644
+index 5809c838b3..c77495f348 100644
@@ -27 +29 @@
-@@ -518,7 +518,7 @@ static const struct eth_dev_ops nfp_flower_pf_repr_dev_ops = {
+@@ -528,7 +528,7 @@ static const struct eth_dev_ops nfp_flower_pf_repr_dev_ops = {
@@ -35,2 +37,2 @@
- 	.fw_version_get       = nfp_repr_firmware_version_get,
-@@ -540,7 +540,7 @@ static const struct eth_dev_ops nfp_flower_repr_dev_ops = {
+ };
+@@ -549,7 +549,7 @@ static const struct eth_dev_ops nfp_flower_repr_dev_ops = {
@@ -44 +46 @@
- 	.fw_version_get       = nfp_repr_firmware_version_get,
+ 

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

* patch 'net/nfp: fix IPv6 flow item' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (59 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/nfp: fix disabling promiscuous mode' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/nfp: fix TOS of IPv6 VXLAN encap flow action' " Xueming Li
                   ` (68 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a1d864c39bde7bbe699b258d50d22cde109778b6 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Thu, 8 Jun 2023 11:19:53 +0800
Subject: [PATCH] net/nfp: fix IPv6 flow item
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 78ee6649ee8a862e0c4f5816b8b9145a07489bb8 ]

When process the IPv6 flow item, the former logic perform the
mask operation between one big endian value and one CPU endian
value, which cause the match of DSCP filed not work as expect.

Fix it by convert the big endian data into CPU endian and remove
the unneeded mask operation.

Fixes: d96507404463 ("net/nfp: support IPv6 flow item")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 432e19c357..3aefccc069 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -1221,6 +1221,7 @@ nfp_flow_merge_ipv6(__rte_unused struct nfp_app_fw_flower *app_fw_flower,
 		bool is_mask,
 		bool is_outer_layer)
 {
+	uint32_t vtc_flow;
 	struct nfp_flower_ipv6 *ipv6;
 	const struct rte_ipv6_hdr *hdr;
 	struct nfp_flower_meta_tci *meta_tci;
@@ -1244,12 +1245,12 @@ nfp_flow_merge_ipv6(__rte_unused struct nfp_app_fw_flower *app_fw_flower,
 
 		hdr = is_mask ? &mask->hdr : &spec->hdr;
 
+		vtc_flow = rte_be_to_cpu_32(hdr->vtc_flow);
 		if (ext_meta && (rte_be_to_cpu_32(ext_meta->nfp_flow_key_layer2) &
 				NFP_FLOWER_LAYER2_GRE)) {
 			ipv6_gre_tun = (struct nfp_flower_ipv6_gre_tun *)*mbuf_off;
 
-			ipv6_gre_tun->ip_ext.tos = (hdr->vtc_flow &
-					RTE_IPV6_HDR_TC_MASK) >> RTE_IPV6_HDR_TC_SHIFT;
+			ipv6_gre_tun->ip_ext.tos = vtc_flow >> RTE_IPV6_HDR_TC_SHIFT;
 			ipv6_gre_tun->ip_ext.ttl = hdr->hop_limits;
 			memcpy(ipv6_gre_tun->ipv6.ipv6_src, hdr->src_addr,
 					sizeof(ipv6_gre_tun->ipv6.ipv6_src));
@@ -1258,8 +1259,7 @@ nfp_flow_merge_ipv6(__rte_unused struct nfp_app_fw_flower *app_fw_flower,
 		} else {
 			ipv6_udp_tun = (struct nfp_flower_ipv6_udp_tun *)*mbuf_off;
 
-			ipv6_udp_tun->ip_ext.tos = (hdr->vtc_flow &
-					RTE_IPV6_HDR_TC_MASK) >> RTE_IPV6_HDR_TC_SHIFT;
+			ipv6_udp_tun->ip_ext.tos = vtc_flow >> RTE_IPV6_HDR_TC_SHIFT;
 			ipv6_udp_tun->ip_ext.ttl = hdr->hop_limits;
 			memcpy(ipv6_udp_tun->ipv6.ipv6_src, hdr->src_addr,
 					sizeof(ipv6_udp_tun->ipv6.ipv6_src));
@@ -1280,10 +1280,10 @@ nfp_flow_merge_ipv6(__rte_unused struct nfp_app_fw_flower *app_fw_flower,
 			*mbuf_off += sizeof(struct nfp_flower_tp_ports);
 
 		hdr = is_mask ? &mask->hdr : &spec->hdr;
+		vtc_flow = rte_be_to_cpu_32(hdr->vtc_flow);
 		ipv6 = (struct nfp_flower_ipv6 *)*mbuf_off;
 
-		ipv6->ip_ext.tos   = (hdr->vtc_flow & RTE_IPV6_HDR_TC_MASK) >>
-				RTE_IPV6_HDR_TC_SHIFT;
+		ipv6->ip_ext.tos   = vtc_flow >> RTE_IPV6_HDR_TC_SHIFT;
 		ipv6->ip_ext.proto = hdr->proto;
 		ipv6->ip_ext.ttl   = hdr->hop_limits;
 		memcpy(ipv6->ipv6_src, hdr->src_addr, sizeof(ipv6->ipv6_src));
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.154021100 +0800
+++ 0061-net-nfp-fix-IPv6-flow-item.patch	2023-06-25 14:31:58.415773900 +0800
@@ -1 +1 @@
-From 78ee6649ee8a862e0c4f5816b8b9145a07489bb8 Mon Sep 17 00:00:00 2001
+From a1d864c39bde7bbe699b258d50d22cde109778b6 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 78ee6649ee8a862e0c4f5816b8b9145a07489bb8 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index cb7073f361..68e8654bf9 100644
+index 432e19c357..3aefccc069 100644
@@ -29 +31 @@
-@@ -1231,6 +1231,7 @@ nfp_flow_merge_ipv6(__rte_unused struct nfp_app_fw_flower *app_fw_flower,
+@@ -1221,6 +1221,7 @@ nfp_flow_merge_ipv6(__rte_unused struct nfp_app_fw_flower *app_fw_flower,
@@ -37 +39 @@
-@@ -1254,12 +1255,12 @@ nfp_flow_merge_ipv6(__rte_unused struct nfp_app_fw_flower *app_fw_flower,
+@@ -1244,12 +1245,12 @@ nfp_flow_merge_ipv6(__rte_unused struct nfp_app_fw_flower *app_fw_flower,
@@ -52 +54 @@
-@@ -1268,8 +1269,7 @@ nfp_flow_merge_ipv6(__rte_unused struct nfp_app_fw_flower *app_fw_flower,
+@@ -1258,8 +1259,7 @@ nfp_flow_merge_ipv6(__rte_unused struct nfp_app_fw_flower *app_fw_flower,
@@ -62 +64 @@
-@@ -1290,10 +1290,10 @@ nfp_flow_merge_ipv6(__rte_unused struct nfp_app_fw_flower *app_fw_flower,
+@@ -1280,10 +1280,10 @@ nfp_flow_merge_ipv6(__rte_unused struct nfp_app_fw_flower *app_fw_flower,

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

* patch 'net/nfp: fix TOS of IPv6 VXLAN encap flow action' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (60 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/nfp: fix IPv6 flow item' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/nfp: fix TOS of IPv6 GENEVE " Xueming Li
                   ` (67 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c81816d07fae7a2d1eb041633ed48e7e062a5398 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Thu, 8 Jun 2023 11:19:54 +0800
Subject: [PATCH] net/nfp: fix TOS of IPv6 VXLAN encap flow action
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 99a4b8589276402b8da491c86590fc8ca26498ce ]

The former logic directly do shift operation on big endian data, fix
it by convert the big endian data into CPU endian firstly.

Fixes: c3b7254093c2 ("net/nfp: support IPv6 VXLAN encap flow action")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 3aefccc069..4dcd304bd2 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -2736,6 +2736,7 @@ nfp_flow_action_vxlan_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
 		struct nfp_fl_rule_metadata *nfp_flow_meta,
 		struct nfp_fl_tun *tun)
 {
+	uint8_t tos;
 	uint64_t tun_id;
 	struct nfp_fl_act_pre_tun *pre_tun;
 	struct nfp_fl_act_set_tun *set_tun;
@@ -2756,9 +2757,9 @@ nfp_flow_action_vxlan_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
 	set_tun = (struct nfp_fl_act_set_tun *)(act_data + act_pre_size);
 	memset(set_tun, 0, act_set_size);
 	tun_id = rte_be_to_cpu_32(vxlan->hdr.vx_vni);
+	tos = rte_be_to_cpu_32(ipv6->hdr.vtc_flow) >> RTE_IPV6_HDR_TC_SHIFT;
 	nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_VXLAN, tun_id,
-			ipv6->hdr.hop_limits,
-			(ipv6->hdr.vtc_flow >> RTE_IPV6_HDR_TC_SHIFT) & 0xff);
+			ipv6->hdr.hop_limits, tos);
 	set_tun->tun_flags = vxlan->hdr.vx_flags;
 
 	/* Send the tunnel neighbor cmsg to fw */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.179177900 +0800
+++ 0062-net-nfp-fix-TOS-of-IPv6-VXLAN-encap-flow-action.patch	2023-06-25 14:31:58.415773900 +0800
@@ -1 +1 @@
-From 99a4b8589276402b8da491c86590fc8ca26498ce Mon Sep 17 00:00:00 2001
+From c81816d07fae7a2d1eb041633ed48e7e062a5398 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 99a4b8589276402b8da491c86590fc8ca26498ce ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 68e8654bf9..445e9a117c 100644
+index 3aefccc069..4dcd304bd2 100644
@@ -25 +27 @@
-@@ -2743,6 +2743,7 @@ nfp_flow_action_vxlan_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
+@@ -2736,6 +2736,7 @@ nfp_flow_action_vxlan_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
@@ -33 +35 @@
-@@ -2763,9 +2764,9 @@ nfp_flow_action_vxlan_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
+@@ -2756,9 +2757,9 @@ nfp_flow_action_vxlan_encap_v6(struct nfp_app_fw_flower *app_fw_flower,

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

* patch 'net/nfp: fix TOS of IPv6 GENEVE encap flow action' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (61 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/nfp: fix TOS of IPv6 VXLAN encap flow action' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/nfp: fix TOS of IPv6 NVGRE " Xueming Li
                   ` (66 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 67544106ac17e040c29b392f00adc7b8cee5187f Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Thu, 8 Jun 2023 11:19:55 +0800
Subject: [PATCH] net/nfp: fix TOS of IPv6 GENEVE encap flow action
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f43b1272e62fb4a4929f0d2153d213d02bdb11a3 ]

The former logic directly do shift operation on big endian data, fix
it by convert the big endian data into CPU endian firstly.

Fixes: 98fa36eccc4c ("net/nfp: support IPv6 GENEVE encap flow action")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 4dcd304bd2..d4a5735c88 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3123,7 +3123,7 @@ nfp_flow_action_geneve_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
 
 	set_tun = (struct nfp_fl_act_set_tun *)(act_data + act_pre_size);
 	memset(set_tun, 0, act_set_size);
-	tos = (ipv6->hdr.vtc_flow >> RTE_IPV6_HDR_TC_SHIFT) & 0xff;
+	tos = rte_be_to_cpu_32(ipv6->hdr.vtc_flow) >> RTE_IPV6_HDR_TC_SHIFT;
 	tun_id = (geneve->vni[0] << 16) | (geneve->vni[1] << 8) | geneve->vni[2];
 	nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_GENEVE, tun_id,
 			ipv6->hdr.hop_limits, tos);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.208060000 +0800
+++ 0063-net-nfp-fix-TOS-of-IPv6-GENEVE-encap-flow-action.patch	2023-06-25 14:31:58.415773900 +0800
@@ -1 +1 @@
-From f43b1272e62fb4a4929f0d2153d213d02bdb11a3 Mon Sep 17 00:00:00 2001
+From 67544106ac17e040c29b392f00adc7b8cee5187f Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f43b1272e62fb4a4929f0d2153d213d02bdb11a3 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 445e9a117c..520b4dcc2e 100644
+index 4dcd304bd2..d4a5735c88 100644
@@ -25 +27 @@
-@@ -3130,7 +3130,7 @@ nfp_flow_action_geneve_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
+@@ -3123,7 +3123,7 @@ nfp_flow_action_geneve_encap_v6(struct nfp_app_fw_flower *app_fw_flower,

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

* patch 'net/nfp: fix TOS of IPv6 NVGRE encap flow action' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (62 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/nfp: fix TOS of IPv6 GENEVE " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/nfp: fix control mempool creation' " Xueming Li
                   ` (65 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From caa96e94b0fe196c4807a033312b05941f253d39 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Thu, 8 Jun 2023 11:19:56 +0800
Subject: [PATCH] net/nfp: fix TOS of IPv6 NVGRE encap flow action
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6f22d3576116f2f2e9f8e9aa1782b75c64565211 ]

The former logic directly do shift operation on big endian data, fix
it by convert the big endian data into CPU endian firstly.

Fixes: fff680eef7f9 ("net/nfp: support IPv6 NVGRE encap flow action")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index d4a5735c88..23dc9f06ce 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3196,7 +3196,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
 
 	set_tun = (struct nfp_fl_act_set_tun *)(act_data + act_pre_size);
 	memset(set_tun, 0, act_set_size);
-	tos = (ipv6->hdr.vtc_flow >> RTE_IPV6_HDR_TC_SHIFT) & 0xff;
+	tos = rte_be_to_cpu_32(ipv6->hdr.vtc_flow) >> RTE_IPV6_HDR_TC_SHIFT;
 	nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_GRE, 0,
 			ipv6->hdr.hop_limits, tos);
 	set_tun->tun_proto = gre->protocol;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.235475900 +0800
+++ 0064-net-nfp-fix-TOS-of-IPv6-NVGRE-encap-flow-action.patch	2023-06-25 14:31:58.415773900 +0800
@@ -1 +1 @@
-From 6f22d3576116f2f2e9f8e9aa1782b75c64565211 Mon Sep 17 00:00:00 2001
+From caa96e94b0fe196c4807a033312b05941f253d39 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6f22d3576116f2f2e9f8e9aa1782b75c64565211 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 520b4dcc2e..a224d01670 100644
+index d4a5735c88..23dc9f06ce 100644
@@ -25 +27 @@
-@@ -3203,7 +3203,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
+@@ -3196,7 +3196,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,

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

* patch 'net/nfp: fix control mempool creation' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (63 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/nfp: fix TOS of IPv6 NVGRE " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/nfp: fix representor " Xueming Li
                   ` (64 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Long Wu; +Cc: Niklas Söderlund, Chaoyong He, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From de78bd45d68934e05d448138902adaeeab525046 Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Fri, 9 Jun 2023 14:00:58 +0800
Subject: [PATCH] net/nfp: fix control mempool creation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d694d4e1f20353a020a5fd04ea6a1dd8a84d29eb ]

The former logic does not consider the simultaneous initialization of
several NICs using flower firmware. The reason the initialization
failed was because several NICs use the same name parameter when we
call rte_pktmbuf_pool_create().

We use the PCI address to give each NIC a unique name parameter and let
the initialization succeed.

Fixes: 945441ebdb9c ("net/nfp: add flower ctrl VNIC")

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index 9c237bdb72..0661c38f08 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -698,6 +698,7 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw)
 	struct rte_eth_dev *eth_dev;
 	const struct rte_memzone *tz;
 	struct nfp_app_fw_flower *app_fw_flower;
+	char ctrl_pktmbuf_pool_name[RTE_MEMZONE_NAMESIZE];
 
 	/* Set up some pointers here for ease of use */
 	pf_dev = hw->pf_dev;
@@ -731,7 +732,10 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw)
 
 	/* Create a mbuf pool for the ctrl vNIC */
 	numa_node = rte_socket_id();
-	app_fw_flower->ctrl_pktmbuf_pool = rte_pktmbuf_pool_create("ctrl_mbuf_pool",
+	snprintf(ctrl_pktmbuf_pool_name, sizeof(ctrl_pktmbuf_pool_name),
+			"%s_ctrlmp", pf_dev->pci_dev->device.name);
+	app_fw_flower->ctrl_pktmbuf_pool =
+			rte_pktmbuf_pool_create(ctrl_pktmbuf_pool_name,
 			4 * CTRL_VNIC_NB_DESC, 64, 0, 9216, numa_node);
 	if (app_fw_flower->ctrl_pktmbuf_pool == NULL) {
 		PMD_INIT_LOG(ERR, "Create mbuf pool for ctrl vnic failed");
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.259970000 +0800
+++ 0065-net-nfp-fix-control-mempool-creation.patch	2023-06-25 14:31:58.425773900 +0800
@@ -1 +1 @@
-From d694d4e1f20353a020a5fd04ea6a1dd8a84d29eb Mon Sep 17 00:00:00 2001
+From de78bd45d68934e05d448138902adaeeab525046 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d694d4e1f20353a020a5fd04ea6a1dd8a84d29eb ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 8e1bc22747..53ee936f4c 100644
+index 9c237bdb72..0661c38f08 100644
@@ -31 +33 @@
-@@ -421,6 +421,7 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw)
+@@ -698,6 +698,7 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw)
@@ -39 +41 @@
-@@ -454,7 +455,10 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw)
+@@ -731,7 +732,10 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw)

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

* patch 'net/nfp: fix representor creation' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (64 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/nfp: fix control mempool creation' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/nfp: fix flow hash table " Xueming Li
                   ` (63 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Long Wu; +Cc: Niklas Söderlund, Chaoyong He, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 18493825d11593dcb0550f96074920b353954c38 Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Fri, 9 Jun 2023 14:00:59 +0800
Subject: [PATCH] net/nfp: fix representor creation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2003cb447aa5f3aa29eea853c1c1ac93949be659 ]

The former logic does not consider the simultaneous initialization of
several NICs using flower firmware. The reason the initialization
failed was because several NICs use the same name parameter when we
call rte_eth_dev_create().

We use the PCI address to give each NIC a unique name parameter and let
the initialization succeed.

Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_representor.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index c77495f348..95e6043a8d 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -730,6 +730,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
 {
 	int i;
 	int ret;
+	struct rte_device *device;
 	struct rte_eth_dev *eth_dev;
 	struct nfp_eth_table *nfp_eth_table;
 	struct nfp_eth_table_port *eth_port;
@@ -753,7 +754,11 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
 
 	/* PF vNIC reprs get a random MAC address */
 	rte_eth_random_addr(flower_repr.mac_addr.addr_bytes);
-	sprintf(flower_repr.name, "flower_repr_pf");
+
+	device = &app_fw_flower->pf_hw->pf_dev->pci_dev->device;
+
+	snprintf(flower_repr.name, sizeof(flower_repr.name),
+			"%s_flower_repr_pf", device->name);
 
 	/* Create a eth_dev for this representor */
 	ret = rte_eth_dev_create(eth_dev->device, flower_repr.name,
@@ -775,7 +780,8 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
 		/* Copy the real mac of the interface to the representor struct */
 		rte_ether_addr_copy((struct rte_ether_addr *)eth_port->mac_addr,
 				&flower_repr.mac_addr);
-		sprintf(flower_repr.name, "flower_repr_p%d", i);
+		snprintf(flower_repr.name, sizeof(flower_repr.name),
+				"%s_fl_repr_p%d", device->name, i);
 
 		/*
 		 * Create a eth_dev for this representor
@@ -806,7 +812,8 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
 
 		/* VF reprs get a random MAC address */
 		rte_eth_random_addr(flower_repr.mac_addr.addr_bytes);
-		sprintf(flower_repr.name, "flower_repr_vf%d", i);
+		snprintf(flower_repr.name, sizeof(flower_repr.name),
+				"%s_fl_repr_vf%d", device->name, i);
 
 		 /* This will also allocate private memory for the device*/
 		ret = rte_eth_dev_create(eth_dev->device, flower_repr.name,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.283685200 +0800
+++ 0066-net-nfp-fix-representor-creation.patch	2023-06-25 14:31:58.425773900 +0800
@@ -1 +1 @@
-From 2003cb447aa5f3aa29eea853c1c1ac93949be659 Mon Sep 17 00:00:00 2001
+From 18493825d11593dcb0550f96074920b353954c38 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2003cb447aa5f3aa29eea853c1c1ac93949be659 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 3225a4b84a..5118c9c57c 100644
+index c77495f348..95e6043a8d 100644
@@ -31 +33 @@
-@@ -723,6 +723,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
+@@ -730,6 +730,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
@@ -39 +41 @@
-@@ -746,7 +747,11 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
+@@ -753,7 +754,11 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
@@ -52,2 +54 @@
-@@ -767,7 +772,8 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
- 
+@@ -775,7 +780,8 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
@@ -55 +56,2 @@
- 		rte_ether_addr_copy(&eth_port->mac_addr, &flower_repr.mac_addr);
+ 		rte_ether_addr_copy((struct rte_ether_addr *)eth_port->mac_addr,
+ 				&flower_repr.mac_addr);
@@ -62 +64 @@
-@@ -798,7 +804,8 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
+@@ -806,7 +812,8 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)

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

* patch 'net/nfp: fix flow hash table creation' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (65 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/nfp: fix representor " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/nfp: fix TP flow action for UDP' " Xueming Li
                   ` (62 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Long Wu; +Cc: Niklas Söderlund, Chaoyong He, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 74870817fb82f87461842b236393c88400c89be9 Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Fri, 9 Jun 2023 14:01:00 +0800
Subject: [PATCH] net/nfp: fix flow hash table creation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6f37cbf6323770ab5be1a9635c46845d7454e984 ]

The former logic does not consider the simultaneous initialization of
several NICs using flower firmware. The reason the initialization
failed was because several NICs use the same name parameter when we
call rte_hash_create().

We use the PCI address to give each NIC a unique name parameter and let
the initialization succeed.

Fixes: ac09376096d8 ("net/nfp: add structures and functions for flow offload")

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 23dc9f06ce..5b562a1086 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -4038,11 +4038,21 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
 	size_t stats_size;
 	uint64_t ctx_count;
 	uint64_t ctx_split;
+	char mask_name[RTE_HASH_NAMESIZE];
+	char flow_name[RTE_HASH_NAMESIZE];
+	char pretun_name[RTE_HASH_NAMESIZE];
 	struct nfp_flow_priv *priv;
 	struct nfp_app_fw_flower *app_fw_flower;
 
+	snprintf(mask_name, sizeof(mask_name), "%s_mask",
+			pf_dev->pci_dev->device.name);
+	snprintf(flow_name, sizeof(flow_name), "%s_flow",
+			pf_dev->pci_dev->device.name);
+	snprintf(pretun_name, sizeof(pretun_name), "%s_pretun",
+			pf_dev->pci_dev->device.name);
+
 	struct rte_hash_parameters mask_hash_params = {
-		.name       = "mask_hash_table",
+		.name       = mask_name,
 		.entries    = NFP_MASK_TABLE_ENTRIES,
 		.hash_func  = rte_jhash,
 		.socket_id  = rte_socket_id(),
@@ -4051,7 +4061,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
 	};
 
 	struct rte_hash_parameters flow_hash_params = {
-		.name       = "flow_hash_table",
+		.name       = flow_name,
 		.hash_func  = rte_jhash,
 		.socket_id  = rte_socket_id(),
 		.key_len    = sizeof(uint32_t),
@@ -4059,7 +4069,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
 	};
 
 	struct rte_hash_parameters pre_tun_hash_params = {
-		.name       = "pre_tunnel_table",
+		.name       = pretun_name,
 		.entries    = 32,
 		.hash_func  = rte_jhash,
 		.socket_id  = rte_socket_id(),
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.305191200 +0800
+++ 0067-net-nfp-fix-flow-hash-table-creation.patch	2023-06-25 14:31:58.425773900 +0800
@@ -1 +1 @@
-From 6f37cbf6323770ab5be1a9635c46845d7454e984 Mon Sep 17 00:00:00 2001
+From 74870817fb82f87461842b236393c88400c89be9 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6f37cbf6323770ab5be1a9635c46845d7454e984 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index a224d01670..359423dc28 100644
+index 23dc9f06ce..5b562a1086 100644
@@ -31 +33 @@
-@@ -4106,11 +4106,21 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
+@@ -4038,11 +4038,21 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
@@ -54 +56 @@
-@@ -4119,7 +4129,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
+@@ -4051,7 +4061,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
@@ -63 +65 @@
-@@ -4127,7 +4137,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
+@@ -4059,7 +4069,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)

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

* patch 'net/nfp: fix TP flow action for UDP' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (66 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/nfp: fix flow hash table " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'net/vmxnet3: fix return code in initializing' " Xueming Li
                   ` (61 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c40b9a9873ae43010e4732f94d86b4f15e79ffd5 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Fri, 9 Jun 2023 14:22:19 +0800
Subject: [PATCH] net/nfp: fix TP flow action for UDP
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0896b1a22a5b23895af6fabbfdc5df528b24cecd ]

The former logic can't distinguish the TCP and UDP set action, and
only send a TCP type ctrl message to firmware, which cause the set
action of UDP can't offload.

Fixes: fc185097bbe6 ("net/nfp: support TP source flow action")
Fixes: 87986df09d75 ("net/nfp: support TP destination flow action")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 30 ++++++++++++++++++++++++++----
 drivers/net/nfp/nfp_flow.h |  1 +
 2 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 5b562a1086..1700aeec9d 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -1898,6 +1898,19 @@ nfp_flow_inner_item_get(const struct rte_flow_item items[],
 	return false;
 }
 
+static bool
+nfp_flow_tcp_flag_check(const struct rte_flow_item items[])
+{
+	const struct rte_flow_item *item;
+
+	for (item = items; item->type != RTE_FLOW_ITEM_TYPE_END; ++item) {
+		if (item->type == RTE_FLOW_ITEM_TYPE_TCP)
+			return true;
+	}
+
+	return false;
+}
+
 static int
 nfp_flow_compile_item_proc(struct nfp_flower_representor *repr,
 		const struct rte_flow_item items[],
@@ -1993,6 +2006,9 @@ nfp_flow_compile_items(struct nfp_flower_representor *representor,
 		mbuf_off_mask += sizeof(struct nfp_flower_ext_meta);
 	}
 
+	if (nfp_flow_tcp_flag_check(items))
+		nfp_flow->tcp_flag = true;
+
 	/* Check if this is a tunnel flow and get the inner item*/
 	is_tun_flow = nfp_flow_inner_item_get(items, &loop_item);
 	if (is_tun_flow)
@@ -2164,7 +2180,8 @@ static void
 nfp_flow_action_set_tp(char *act_data,
 		const struct rte_flow_action *action,
 		bool tp_src_flag,
-		bool tp_set_flag)
+		bool tp_set_flag,
+		bool tcp_flag)
 {
 	size_t act_size;
 	struct nfp_fl_act_set_tport *set_tp;
@@ -2176,7 +2193,10 @@ nfp_flow_action_set_tp(char *act_data,
 		set_tp = (struct nfp_fl_act_set_tport *)act_data;
 
 	act_size = sizeof(struct nfp_fl_act_set_tport);
-	set_tp->head.jump_id = NFP_FL_ACTION_OPCODE_SET_TCP;
+	if (tcp_flag)
+		set_tp->head.jump_id = NFP_FL_ACTION_OPCODE_SET_TCP;
+	else
+		set_tp->head.jump_id = NFP_FL_ACTION_OPCODE_SET_UDP;
 	set_tp->head.len_lw  = act_size >> NFP_FL_LW_SIZ;
 	set_tp->reserved     = 0;
 
@@ -3394,7 +3414,8 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
 			break;
 		case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
 			PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_SET_TP_SRC");
-			nfp_flow_action_set_tp(position, action, true, tp_set_flag);
+			nfp_flow_action_set_tp(position, action, true,
+					tp_set_flag, nfp_flow->tcp_flag);
 			if (!tp_set_flag) {
 				position += sizeof(struct nfp_fl_act_set_tport);
 				tp_set_flag = true;
@@ -3402,7 +3423,8 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
 			break;
 		case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
 			PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_SET_TP_DST");
-			nfp_flow_action_set_tp(position, action, false, tp_set_flag);
+			nfp_flow_action_set_tp(position, action, false,
+					tp_set_flag, nfp_flow->tcp_flag);
 			if (!tp_set_flag) {
 				position += sizeof(struct nfp_fl_act_set_tport);
 				tp_set_flag = true;
diff --git a/drivers/net/nfp/nfp_flow.h b/drivers/net/nfp/nfp_flow.h
index 8071243b86..314ff2083a 100644
--- a/drivers/net/nfp/nfp_flow.h
+++ b/drivers/net/nfp/nfp_flow.h
@@ -224,6 +224,7 @@ struct rte_flow {
 	uint32_t hash_key;
 	uint32_t port_id;
 	bool install_flag;
+	bool tcp_flag;    /**< Used in the SET_TP_* action */
 	enum nfp_flow_type type;
 };
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.337762800 +0800
+++ 0068-net-nfp-fix-TP-flow-action-for-UDP.patch	2023-06-25 14:31:58.425773900 +0800
@@ -1 +1 @@
-From 0896b1a22a5b23895af6fabbfdc5df528b24cecd Mon Sep 17 00:00:00 2001
+From c40b9a9873ae43010e4732f94d86b4f15e79ffd5 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0896b1a22a5b23895af6fabbfdc5df528b24cecd ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 359423dc28..14749f03a2 100644
+index 5b562a1086..1700aeec9d 100644
@@ -28 +30 @@
-@@ -1908,6 +1908,19 @@ nfp_flow_inner_item_get(const struct rte_flow_item items[],
+@@ -1898,6 +1898,19 @@ nfp_flow_inner_item_get(const struct rte_flow_item items[],
@@ -48 +50 @@
-@@ -2003,6 +2016,9 @@ nfp_flow_compile_items(struct nfp_flower_representor *representor,
+@@ -1993,6 +2006,9 @@ nfp_flow_compile_items(struct nfp_flower_representor *representor,
@@ -58 +60 @@
-@@ -2174,7 +2190,8 @@ static void
+@@ -2164,7 +2180,8 @@ static void
@@ -68 +70 @@
-@@ -2186,7 +2203,10 @@ nfp_flow_action_set_tp(char *act_data,
+@@ -2176,7 +2193,10 @@ nfp_flow_action_set_tp(char *act_data,
@@ -80 +82 @@
-@@ -3443,7 +3463,8 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
+@@ -3394,7 +3414,8 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
@@ -90 +92 @@
-@@ -3451,7 +3472,8 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
+@@ -3402,7 +3423,8 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
@@ -101 +103 @@
-index d352671c2c..414bd4573b 100644
+index 8071243b86..314ff2083a 100644
@@ -104,2 +106,2 @@
-@@ -225,6 +225,7 @@ struct rte_flow {
- 	uint32_t mtr_id;
+@@ -224,6 +224,7 @@ struct rte_flow {
+ 	uint32_t hash_key;

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

* patch 'net/vmxnet3: fix return code in initializing' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (67 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/nfp: fix TP flow action for UDP' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'doc: fix auth algos in cryptoperf app' " Xueming Li
                   ` (60 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Kaijun Zeng; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3a8502c73d11e7c2325a4e3db11244cc299fe5b7 Mon Sep 17 00:00:00 2001
From: Kaijun Zeng <corezeng@gmail.com>
Date: Wed, 7 Jun 2023 13:57:25 -0400
Subject: [PATCH] net/vmxnet3: fix return code in initializing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8a2de735318b38ba93a041cb2f209889bde02689 ]

Improve error handling

Bugzilla ID: 1239
Fixes: dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driver implementation")

Signed-off-by: Kaijun Zeng <corezeng@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                           |  1 +
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 15 +++++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/.mailmap b/.mailmap
index 44d9bd97c6..79553991de 100644
--- a/.mailmap
+++ b/.mailmap
@@ -675,6 +675,7 @@ Jun Yang <jun.yang@nxp.com>
 Junyu Jiang <junyux.jiang@intel.com>
 Juraj Linkeš <juraj.linkes@pantheon.tech>
 Kai Ji <kai.ji@intel.com>
+Kaijun Zeng <corezeng@gmail.com>
 Kaiwen Deng <kaiwenx.deng@intel.com>
 Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Kamalakannan R <kamalakannan.r@intel.com>
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index f4cade0954..14c6504505 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -1316,11 +1316,18 @@ vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev)
 		for (j = 0; j < VMXNET3_RX_CMDRING_SIZE; j++) {
 			/* Passing 0 as alloc_num will allocate full ring */
 			ret = vmxnet3_post_rx_bufs(rxq, j);
-			if (ret <= 0) {
+
+			/* Zero number of descriptors in the configuration of the RX queue */
+			if (ret == 0) {
 				PMD_INIT_LOG(ERR,
-					     "ERROR: Posting Rxq: %d buffers ring: %d",
-					     i, j);
-				return -ret;
+					"Invalid configuration in Rx queue: %d, buffers ring: %d\n",
+					i, j);
+				return -EINVAL;
+			}
+			/* Return the error number */
+			if (ret < 0) {
+				PMD_INIT_LOG(ERR, "Posting Rxq: %d buffers ring: %d", i, j);
+				return ret;
 			}
 			/*
 			 * Updating device with the index:next2fill to fill the
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.372827300 +0800
+++ 0069-net-vmxnet3-fix-return-code-in-initializing.patch	2023-06-25 14:31:58.425773900 +0800
@@ -1 +1 @@
-From 8a2de735318b38ba93a041cb2f209889bde02689 Mon Sep 17 00:00:00 2001
+From 3a8502c73d11e7c2325a4e3db11244cc299fe5b7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8a2de735318b38ba93a041cb2f209889bde02689 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 42f198f284..986ba9c988 100644
+index 44d9bd97c6..79553991de 100644
@@ -23 +25 @@
-@@ -687,6 +687,7 @@ Jun Yang <jun.yang@nxp.com>
+@@ -675,6 +675,7 @@ Jun Yang <jun.yang@nxp.com>
@@ -28 +29,0 @@
- Kaisen You <kaisenx.you@intel.com>
@@ -30,0 +32 @@
+ Kamalakannan R <kamalakannan.r@intel.com>
@@ -32 +34 @@
-index 148f65383e..380f41f98b 100644
+index f4cade0954..14c6504505 100644
@@ -35 +37 @@
-@@ -1337,11 +1337,18 @@ vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev)
+@@ -1316,11 +1316,18 @@ vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev)

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

* patch 'doc: fix auth algos in cryptoperf app' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (68 preceding siblings ...)
  2023-06-25  6:34 ` patch 'net/vmxnet3: fix return code in initializing' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'crypto/qat: fix stack buffer overflow in SGL loop' " Xueming Li
                   ` (59 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0af5332dff11eab1759f0dc849144c9e7c0ce300 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <gakhil@marvell.com>
Date: Tue, 11 Apr 2023 18:34:58 +0530
Subject: [PATCH] doc: fix auth algos in cryptoperf app
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit eaea52c3cc997318c5587366caf22d7ab1b7578c ]

3des-cbc is not an authentication algorithm,
hence need to be removed.

Fixes: c6baca7adc94 ("doc: describe new performance test application")

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 doc/guides/tools/cryptoperf.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/guides/tools/cryptoperf.rst b/doc/guides/tools/cryptoperf.rst
index c77e253417..f30784674d 100644
--- a/doc/guides/tools/cryptoperf.rst
+++ b/doc/guides/tools/cryptoperf.rst
@@ -232,7 +232,6 @@ The following are the application command-line options:
         Set authentication algorithm name, where ``name`` is one
         of the following::
 
-           3des-cbc
            aes-cbc-mac
            aes-cmac
            aes-gmac
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.398706300 +0800
+++ 0070-doc-fix-auth-algos-in-cryptoperf-app.patch	2023-06-25 14:31:58.425773900 +0800
@@ -1 +1 @@
-From eaea52c3cc997318c5587366caf22d7ab1b7578c Mon Sep 17 00:00:00 2001
+From 0af5332dff11eab1759f0dc849144c9e7c0ce300 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit eaea52c3cc997318c5587366caf22d7ab1b7578c ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'crypto/qat: fix stack buffer overflow in SGL loop' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (69 preceding siblings ...)
  2023-06-25  6:34 ` patch 'doc: fix auth algos in cryptoperf app' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'crypto/scheduler: fix last element for valid args' " Xueming Li
                   ` (58 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Ciara Power; +Cc: Kai Ji, Brian Dooley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 44137441387c0d04698e0b1083c0b90cff131d42 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 14 Apr 2023 12:31:31 +0000
Subject: [PATCH] crypto/qat: fix stack buffer overflow in SGL loop
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ff6e69e935ddc460bffdcfe7431dcf914fdfdb3f ]

The cvec pointer was incremented incorrectly in the case where the
length of remaining_off equals cvec len, and there is no next cvec.
This led to cvec->iova being invalid memory to access.

Instead, only increment the cvec pointer when we know there is a next
cvec to point to, by checking the i value, which represents the number
of cvecs available.
If i is 0, then no need to increment as the current cvec is the last one.

Fixes: a815a04cea05 ("crypto/qat: support symmetric build op request")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
 drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 524c291340..092265631b 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -682,7 +682,8 @@ enqueue_one_chain_job_gen1(struct qat_sym_session *ctx,
 		while (remaining_off >= cvec->len && i >= 1) {
 			i--;
 			remaining_off -= cvec->len;
-			cvec++;
+			if (i)
+				cvec++;
 		}
 
 		auth_iova_end = cvec->iova + remaining_off;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.420530400 +0800
+++ 0071-crypto-qat-fix-stack-buffer-overflow-in-SGL-loop.patch	2023-06-25 14:31:58.435773900 +0800
@@ -1 +1 @@
-From ff6e69e935ddc460bffdcfe7431dcf914fdfdb3f Mon Sep 17 00:00:00 2001
+From 44137441387c0d04698e0b1083c0b90cff131d42 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ff6e69e935ddc460bffdcfe7431dcf914fdfdb3f ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* patch 'crypto/scheduler: fix last element for valid args' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (70 preceding siblings ...)
  2023-06-25  6:34 ` patch 'crypto/qat: fix stack buffer overflow in SGL loop' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'test/crypto: fix return value for SNOW3G' " Xueming Li
                   ` (57 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Ciara Power; +Cc: Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 228857a34c053c9fe9f3bef81a40a4ec683214b7 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 14 Apr 2023 12:33:06 +0000
Subject: [PATCH] crypto/scheduler: fix last element for valid args
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 34019b7b65d4d936649fab29fdee45ec3ada1a8d ]

The list of valid arguments for Scheduler PMD should be terminated with
a NULL entry, as expected by rte_kvargs_parse.

Without this, if an invalid key name was used, a global buffer overflow
occurred resulting in a segmentation fault.

Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 drivers/crypto/scheduler/scheduler_pmd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 9d1ce46622..4e8bbf0e09 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -50,7 +50,8 @@ static const char * const scheduler_valid_params[] = {
 	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
 	RTE_CRYPTODEV_VDEV_SOCKET_ID,
 	RTE_CRYPTODEV_VDEV_COREMASK,
-	RTE_CRYPTODEV_VDEV_CORELIST
+	RTE_CRYPTODEV_VDEV_CORELIST,
+	NULL
 };
 
 struct scheduler_parse_map {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.442936500 +0800
+++ 0072-crypto-scheduler-fix-last-element-for-valid-args.patch	2023-06-25 14:31:58.435773900 +0800
@@ -1 +1 @@
-From 34019b7b65d4d936649fab29fdee45ec3ada1a8d Mon Sep 17 00:00:00 2001
+From 228857a34c053c9fe9f3bef81a40a4ec683214b7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 34019b7b65d4d936649fab29fdee45ec3ada1a8d ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'test/crypto: fix return value for SNOW3G' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (71 preceding siblings ...)
  2023-06-25  6:34 ` patch 'crypto/scheduler: fix last element for valid args' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'examples/ipsec-secgw: fix zero address in ethernet header' " Xueming Li
                   ` (56 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Saoirse O'Donovan; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6217afd84cb6bbe22d27bf55dbdf6a0b354acca4 Mon Sep 17 00:00:00 2001
From: Saoirse O'Donovan <saoirse.odonovan@intel.com>
Date: Fri, 14 Apr 2023 13:55:26 +0000
Subject: [PATCH] test/crypto: fix return value for SNOW3G
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7ae50175c7e785ff258c3dc0e44dc80e89af79ac ]

Unit tests were failing due to the return value of the decryption and
authentication functions not being handled correctly. This has now been
modified to return the expected test status.

Fixes: e23eccfd281e ("test/crypto: fix bitwise operator in a SNOW3G case")

Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 0df4e9fca1..778a7400b1 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6860,6 +6860,7 @@ snow3g_hash_test_vector_setup(const struct snow3g_test_data *pattern,
 static int
 test_snow3g_decryption_with_digest_test_case_1(void)
 {
+	int ret;
 	struct snow3g_hash_test_data snow3g_hash_data;
 	struct rte_cryptodev_info dev_info;
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
@@ -6878,8 +6879,9 @@ test_snow3g_decryption_with_digest_test_case_1(void)
 	 */
 	snow3g_hash_test_vector_setup(&snow3g_test_case_7, &snow3g_hash_data);
 
-	if (test_snow3g_decryption(&snow3g_test_case_7))
-		return TEST_FAILED;
+	ret = test_snow3g_decryption(&snow3g_test_case_7);
+	if (ret != 0)
+		return ret;
 
 	return test_snow3g_authentication_verify(&snow3g_hash_data);
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.464381500 +0800
+++ 0073-test-crypto-fix-return-value-for-SNOW3G.patch	2023-06-25 14:31:58.435773900 +0800
@@ -1 +1 @@
-From 7ae50175c7e785ff258c3dc0e44dc80e89af79ac Mon Sep 17 00:00:00 2001
+From 6217afd84cb6bbe22d27bf55dbdf6a0b354acca4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7ae50175c7e785ff258c3dc0e44dc80e89af79ac ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 3376ed91a3..0b2ce5ea65 100644
+index 0df4e9fca1..778a7400b1 100644
@@ -23 +25 @@
-@@ -6944,6 +6944,7 @@ snow3g_hash_test_vector_setup(const struct snow3g_test_data *pattern,
+@@ -6860,6 +6860,7 @@ snow3g_hash_test_vector_setup(const struct snow3g_test_data *pattern,
@@ -31 +33 @@
-@@ -6962,8 +6963,9 @@ test_snow3g_decryption_with_digest_test_case_1(void)
+@@ -6878,8 +6879,9 @@ test_snow3g_decryption_with_digest_test_case_1(void)

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

* patch 'examples/ipsec-secgw: fix zero address in ethernet header' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (72 preceding siblings ...)
  2023-06-25  6:34 ` patch 'test/crypto: fix return value for SNOW3G' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'cryptodev: clarify error codes for symmetric session' " Xueming Li
                   ` (55 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Rahul Bhansali; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 400a3302ded367ba87527110e5fdee422c9f7af5 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Thu, 30 Mar 2023 15:39:06 +0530
Subject: [PATCH] examples/ipsec-secgw: fix zero address in ethernet header
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fbe585801b90519cd16247dd14ed945d3223dbe3 ]

During port init, src address stored in ethaddr_tbl is typecast
which violates the strict-aliasing rule and not reflecting
the updated source address in processed packets too.

Fixes: 6eb3ba0399 ("examples/ipsec-secgw: support poll mode NEON LPM lookup")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 20 ++++++++++----------
 examples/ipsec-secgw/ipsec-secgw.h |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index a64a26c992..ea662797a8 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -99,10 +99,10 @@ uint32_t qp_desc_nb = 2048;
 #define MTU_TO_FRAMELEN(x)	((x) + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
 
 struct ethaddr_info ethaddr_tbl[RTE_MAX_ETHPORTS] = {
-	{ 0, ETHADDR(0x00, 0x16, 0x3e, 0x7e, 0x94, 0x9a) },
-	{ 0, ETHADDR(0x00, 0x16, 0x3e, 0x22, 0xa1, 0xd9) },
-	{ 0, ETHADDR(0x00, 0x16, 0x3e, 0x08, 0x69, 0x26) },
-	{ 0, ETHADDR(0x00, 0x16, 0x3e, 0x49, 0x9e, 0xdd) }
+	{ {{0}}, {{0x00, 0x16, 0x3e, 0x7e, 0x94, 0x9a}} },
+	{ {{0}}, {{0x00, 0x16, 0x3e, 0x22, 0xa1, 0xd9}} },
+	{ {{0}}, {{0x00, 0x16, 0x3e, 0x08, 0x69, 0x26}} },
+	{ {{0}}, {{0x00, 0x16, 0x3e, 0x49, 0x9e, 0xdd}} }
 };
 
 struct offloads tx_offloads;
@@ -1427,9 +1427,8 @@ add_dst_ethaddr(uint16_t port, const struct rte_ether_addr *addr)
 	if (port >= RTE_DIM(ethaddr_tbl))
 		return -EINVAL;
 
-	ethaddr_tbl[port].dst = ETHADDR_TO_UINT64(addr);
-	rte_ether_addr_copy((struct rte_ether_addr *)&ethaddr_tbl[port].dst,
-			    (struct rte_ether_addr *)(val_eth + port));
+	rte_ether_addr_copy(addr, &ethaddr_tbl[port].dst);
+	rte_ether_addr_copy(addr, (struct rte_ether_addr *)(val_eth + port));
 	return 0;
 }
 
@@ -1907,11 +1906,12 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads,
 			"Error getting MAC address (port %u): %s\n",
 			portid, rte_strerror(-ret));
 
-	ethaddr_tbl[portid].src = ETHADDR_TO_UINT64(&ethaddr);
+	rte_ether_addr_copy(&ethaddr, &ethaddr_tbl[portid].src);
 
-	rte_ether_addr_copy((struct rte_ether_addr *)&ethaddr_tbl[portid].dst,
+	rte_ether_addr_copy(&ethaddr_tbl[portid].dst,
 			    (struct rte_ether_addr *)(val_eth + portid));
-	rte_ether_addr_copy((struct rte_ether_addr *)&ethaddr_tbl[portid].src,
+
+	rte_ether_addr_copy(&ethaddr_tbl[portid].src,
 			    (struct rte_ether_addr *)(val_eth + portid) + 1);
 
 	print_ethaddr("Address: ", &ethaddr);
diff --git a/examples/ipsec-secgw/ipsec-secgw.h b/examples/ipsec-secgw/ipsec-secgw.h
index 0e0012d058..53665adf03 100644
--- a/examples/ipsec-secgw/ipsec-secgw.h
+++ b/examples/ipsec-secgw/ipsec-secgw.h
@@ -84,7 +84,7 @@ struct ipsec_traffic_nb {
 
 /* port/source ethernet addr and destination ethernet addr */
 struct ethaddr_info {
-	uint64_t src, dst;
+	struct rte_ether_addr src, dst;
 };
 
 struct ipsec_spd_stats {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.494455400 +0800
+++ 0074-examples-ipsec-secgw-fix-zero-address-in-ethernet-he.patch	2023-06-25 14:31:58.445773900 +0800
@@ -1 +1 @@
-From fbe585801b90519cd16247dd14ed945d3223dbe3 Mon Sep 17 00:00:00 2001
+From 400a3302ded367ba87527110e5fdee422c9f7af5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fbe585801b90519cd16247dd14ed945d3223dbe3 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index d2d9d85b4a..029749e522 100644
+index a64a26c992..ea662797a8 100644

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

* patch 'cryptodev: clarify error codes for symmetric session' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (73 preceding siblings ...)
  2023-06-25  6:34 ` patch 'examples/ipsec-secgw: fix zero address in ethernet header' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'crypto/openssl: fix memory free' " Xueming Li
                   ` (54 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Ciara Power, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 48b48d2ba834378533ec9cc10a30447d9150117d Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Mon, 24 Apr 2023 14:49:20 +0530
Subject: [PATCH] cryptodev: clarify error codes for symmetric session
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3a3bd78566184a04a28853da1cd8f4e94c2f9bc0 ]

When symmetric sessions are created, it may fail due to non-critical
errors. When PMD doesn't support the specific combination that
application requested, it can return -ENOTSUP which can be handled so in
application. The API is already setting rte_errno according to the
reason of the failure. Clarifying this in the spec to list down possible
error codes.

Fixes: bdce2564dbf7 ("cryptodev: rework session framework")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 lib/cryptodev/rte_cryptodev.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index c678a88d7c..4c210b876c 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -977,11 +977,14 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
  * @param   dev_id   ID of device that we want the session to be used on
  * @param   xforms   Symmetric crypto transform operations to apply on flow
  *                   processed with this session
- * @param   mp       Mempool where the private data is allocated.
+ * @param   mp       Mempool to allocate symmetric session objects from
  *
  * @return
  *  - On success return pointer to sym-session.
- *  - On failure returns NULL.
+ *  - On failure returns NULL and rte_errno is set to the error code:
+ *    - EINVAL on invalid arguments.
+ *    - ENOMEM on memory error for session allocation.
+ *    - ENOTSUP if device doesn't support session configuration.
  */
 void *
 rte_cryptodev_sym_session_create(uint8_t dev_id,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.518922600 +0800
+++ 0075-cryptodev-clarify-error-codes-for-symmetric-session.patch	2023-06-25 14:31:58.445773900 +0800
@@ -1 +1 @@
-From 3a3bd78566184a04a28853da1cd8f4e94c2f9bc0 Mon Sep 17 00:00:00 2001
+From 48b48d2ba834378533ec9cc10a30447d9150117d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3a3bd78566184a04a28853da1cd8f4e94c2f9bc0 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 3a9ad13660..f262ad88bf 100644
+index c678a88d7c..4c210b876c 100644
@@ -27 +29 @@
-@@ -1048,11 +1048,14 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
+@@ -977,11 +977,14 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,

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

* patch 'crypto/openssl: fix memory free' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (74 preceding siblings ...)
  2023-06-25  6:34 ` patch 'cryptodev: clarify error codes for symmetric session' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'test/crypto: fix session creation check' " Xueming Li
                   ` (53 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Saoirse O'Donovan; +Cc: Ciara Power, Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e3456f2478537de03017d34f18eb1fa54b694074 Mon Sep 17 00:00:00 2001
From: Saoirse O'Donovan <saoirse.odonovan@intel.com>
Date: Thu, 11 May 2023 13:59:44 +0000
Subject: [PATCH] crypto/openssl: fix memory free
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 26c7b4fe2e2c26dca0a6c8ee3f8b66c1898c6a59 ]

Allocated memory was being freed using 'free' when it should have been
freed using 'OPENSSL_free'. This has now been modified so that the
correct method is used to free allocated memory.

Coverity issue: 384415
Fixes: 4c7ae22f1f83 ("crypto/openssl: update DSA routine with 3.0 EVP API")

Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 384d262621..f65fbca300 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1927,7 +1927,7 @@ process_openssl_dsa_sign_op_evp(struct rte_crypto_op *cop,
 
 	if (EVP_PKEY_sign(dsa_ctx, dsa_sign_data, &outlen, op->message.data,
 						op->message.length) <= 0) {
-		free(dsa_sign_data);
+		OPENSSL_free(dsa_sign_data);
 		goto err_dsa_sign;
 	}
 
@@ -1935,7 +1935,7 @@ process_openssl_dsa_sign_op_evp(struct rte_crypto_op *cop,
 	DSA_SIG *sign = d2i_DSA_SIG(NULL, &dsa_sign_data_p, outlen);
 	if (!sign) {
 		OPENSSL_LOG(ERR, "%s:%d\n", __func__, __LINE__);
-		free(dsa_sign_data);
+		OPENSSL_free(dsa_sign_data);
 		goto err_dsa_sign;
 	} else {
 		const BIGNUM *r = NULL, *s = NULL;
@@ -1947,7 +1947,7 @@ process_openssl_dsa_sign_op_evp(struct rte_crypto_op *cop,
 	}
 
 	DSA_SIG_free(sign);
-	free(dsa_sign_data);
+	OPENSSL_free(dsa_sign_data);
 	return 0;
 
 err_dsa_sign:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.544251600 +0800
+++ 0076-crypto-openssl-fix-memory-free.patch	2023-06-25 14:31:58.445773900 +0800
@@ -1 +1 @@
-From 26c7b4fe2e2c26dca0a6c8ee3f8b66c1898c6a59 Mon Sep 17 00:00:00 2001
+From e3456f2478537de03017d34f18eb1fa54b694074 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 26c7b4fe2e2c26dca0a6c8ee3f8b66c1898c6a59 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'test/crypto: fix session creation check' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (75 preceding siblings ...)
  2023-06-25  6:34 ` patch 'crypto/openssl: fix memory free' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'crypto/ipsec_mb: fix enqueue counter for SNOW3G' " Xueming Li
                   ` (52 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Tejasree Kondoj; +Cc: Anoob Joseph, Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d2e09fc0fc7943149c177458799346ba6103455d Mon Sep 17 00:00:00 2001
From: Tejasree Kondoj <ktejasree@marvell.com>
Date: Fri, 5 May 2023 22:23:48 +0530
Subject: [PATCH] test/crypto: fix session creation check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 142a8f4c578e420b916f84649873f99bad985412 ]

Fixing return value if session failure occurs
due to unsupported feature.

Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations")

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Ciara Power <ciara.power@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 778a7400b1..bdd3da7a7c 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -8446,7 +8446,7 @@ test_authenticated_encryption(const struct aead_test_data *tdata)
 			tdata->key.data, tdata->key.len,
 			tdata->aad.len, tdata->auth_tag.len,
 			tdata->iv.len);
-	if (retval < 0)
+	if (retval != TEST_SUCCESS)
 		return retval;
 
 	if (tdata->aad.len > MBUF_SIZE) {
@@ -11580,7 +11580,7 @@ test_authenticated_decryption_oop(const struct aead_test_data *tdata)
 			tdata->key.data, tdata->key.len,
 			tdata->aad.len, tdata->auth_tag.len,
 			tdata->iv.len);
-	if (retval < 0)
+	if (retval != TEST_SUCCESS)
 		return retval;
 
 	/* alloc mbuf and set payload */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.572075400 +0800
+++ 0077-test-crypto-fix-session-creation-check.patch	2023-06-25 14:31:58.455773900 +0800
@@ -1 +1 @@
-From 142a8f4c578e420b916f84649873f99bad985412 Mon Sep 17 00:00:00 2001
+From d2e09fc0fc7943149c177458799346ba6103455d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 142a8f4c578e420b916f84649873f99bad985412 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 0b2ce5ea65..bbc7e8dd18 100644
+index 778a7400b1..bdd3da7a7c 100644
@@ -23 +25 @@
-@@ -8778,7 +8778,7 @@ test_authenticated_encryption(const struct aead_test_data *tdata)
+@@ -8446,7 +8446,7 @@ test_authenticated_encryption(const struct aead_test_data *tdata)
@@ -32 +34 @@
-@@ -11482,7 +11482,7 @@ test_authenticated_decryption(const struct aead_test_data *tdata)
+@@ -11580,7 +11580,7 @@ test_authenticated_decryption_oop(const struct aead_test_data *tdata)

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

* patch 'crypto/ipsec_mb: fix enqueue counter for SNOW3G' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (76 preceding siblings ...)
  2023-06-25  6:34 ` patch 'test/crypto: fix session creation check' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'crypto/cnxk: fix IPsec CCM capabilities' " Xueming Li
                   ` (51 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Saoirse O'Donovan; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c53467f356209f50297da0b63d3c80005ae61fed Mon Sep 17 00:00:00 2001
From: Saoirse O'Donovan <saoirse.odonovan@intel.com>
Date: Thu, 20 Apr 2023 10:31:41 +0000
Subject: [PATCH] crypto/ipsec_mb: fix enqueue counter for SNOW3G
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit dd6b0a910ff32b2b367c18ad97b045c8dc5aa882 ]

This patch removes enqueue op counter update from the process_op_bit
function where the process is now done in dequeue stage. The original
stats increment was incorrect as they shouldn't have been updated at all
in this function.

Fixes: 4f1cfda59ad3 ("crypto/ipsec_mb: move snow3g PMD")

Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 drivers/crypto/ipsec_mb/pmd_snow3g.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/crypto/ipsec_mb/pmd_snow3g.c b/drivers/crypto/ipsec_mb/pmd_snow3g.c
index 8ed069f428..e64df1a462 100644
--- a/drivers/crypto/ipsec_mb/pmd_snow3g.c
+++ b/drivers/crypto/ipsec_mb/pmd_snow3g.c
@@ -372,9 +372,10 @@ process_ops(struct rte_crypto_op **ops, struct snow3g_session *session,
 /** Process a crypto op with length/offset in bits. */
 static int
 process_op_bit(struct rte_crypto_op *op, struct snow3g_session *session,
-		struct ipsec_mb_qp *qp, uint16_t *accumulated_enqueued_ops)
+		struct ipsec_mb_qp *qp)
 {
-	uint32_t enqueued_op, processed_op;
+	unsigned int processed_op;
+	int ret;
 
 	switch (session->op) {
 	case IPSEC_MB_OP_ENCRYPT_ONLY:
@@ -421,9 +422,10 @@ process_op_bit(struct rte_crypto_op *op, struct snow3g_session *session,
 
 	if (unlikely(processed_op != 1))
 		return 0;
-	enqueued_op = rte_ring_enqueue(qp->ingress_queue, op);
-	qp->stats.enqueued_count += enqueued_op;
-	*accumulated_enqueued_ops += enqueued_op;
+
+	ret = rte_ring_enqueue(qp->ingress_queue, op);
+	if (ret != 0)
+		return ret;
 
 	return 1;
 }
@@ -439,7 +441,6 @@ snow3g_pmd_dequeue_burst(void *queue_pair,
 	struct snow3g_session *prev_sess = NULL, *curr_sess = NULL;
 	uint32_t i;
 	uint8_t burst_size = 0;
-	uint16_t enqueued_ops = 0;
 	uint8_t processed_ops;
 	uint32_t nb_dequeued;
 
@@ -479,8 +480,7 @@ snow3g_pmd_dequeue_burst(void *queue_pair,
 				prev_sess = NULL;
 			}
 
-			processed_ops = process_op_bit(curr_c_op, curr_sess,
-							qp, &enqueued_ops);
+			processed_ops = process_op_bit(curr_c_op, curr_sess, qp);
 			if (processed_ops != 1)
 				break;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.604680900 +0800
+++ 0078-crypto-ipsec_mb-fix-enqueue-counter-for-SNOW3G.patch	2023-06-25 14:31:58.455773900 +0800
@@ -1 +1 @@
-From dd6b0a910ff32b2b367c18ad97b045c8dc5aa882 Mon Sep 17 00:00:00 2001
+From c53467f356209f50297da0b63d3c80005ae61fed Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dd6b0a910ff32b2b367c18ad97b045c8dc5aa882 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'crypto/cnxk: fix IPsec CCM capabilities' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (77 preceding siblings ...)
  2023-06-25  6:34 ` patch 'crypto/ipsec_mb: fix enqueue counter for SNOW3G' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'test/crypto: fix IPsec AES CCM vector' " Xueming Li
                   ` (50 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Tejasree Kondoj; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7e0080ff4f190b9dcf0ed65a22d16df36a29dddb Mon Sep 17 00:00:00 2001
From: Tejasree Kondoj <ktejasree@marvell.com>
Date: Fri, 12 May 2023 18:26:21 +0530
Subject: [PATCH] crypto/cnxk: fix IPsec CCM capabilities
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit eb581897e580a111bacf0adb3dcc1a9890f5e17b ]

Fixed lookaside IPsec AES-CCM capabilities.

Fixes: 246dea7e6efb ("crypto/cnxk: support AES-CCM")

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c b/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c
index 6c28f8942e..eb4e6ff966 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c
@@ -936,8 +936,8 @@ static const struct rte_cryptodev_capabilities sec_caps_aes[] = {
 					.increment = 4
 				},
 				.iv_size = {
-					.min = 12,
-					.max = 12,
+					.min = 11,
+					.max = 11,
 					.increment = 0
 				}
 			}, }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.627043000 +0800
+++ 0079-crypto-cnxk-fix-IPsec-CCM-capabilities.patch	2023-06-25 14:31:58.455773900 +0800
@@ -1 +1 @@
-From eb581897e580a111bacf0adb3dcc1a9890f5e17b Mon Sep 17 00:00:00 2001
+From 7e0080ff4f190b9dcf0ed65a22d16df36a29dddb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit eb581897e580a111bacf0adb3dcc1a9890f5e17b ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 2f07b0ae09..8a3b0c48d0 100644
+index 6c28f8942e..eb4e6ff966 100644
@@ -20 +22 @@
-@@ -1077,8 +1077,8 @@ static const struct rte_cryptodev_capabilities sec_caps_aes[] = {
+@@ -936,8 +936,8 @@ static const struct rte_cryptodev_capabilities sec_caps_aes[] = {

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

* patch 'test/crypto: fix IPsec AES CCM vector' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (78 preceding siblings ...)
  2023-06-25  6:34 ` patch 'crypto/cnxk: fix IPsec CCM capabilities' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:34 ` patch 'crypto/ipsec_mb: optimize allocation in session' " Xueming Li
                   ` (49 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Tejasree Kondoj; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a659f5f18c3633863e844c00b6ee65323c6eea7d Mon Sep 17 00:00:00 2001
From: Tejasree Kondoj <ktejasree@marvell.com>
Date: Wed, 24 May 2023 18:21:56 +0530
Subject: [PATCH] test/crypto: fix IPsec AES CCM vector
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7de104c59392a7ee8382f81e23b123281422f5c8 ]

Set IPsec AES-CCM test vector IV length to 11
instead of 12 as it includes only 3B salt and
8B per packet IV.

Fixes: d314299950de ("test/crypto: add AES-CCM vectors")

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_cryptodev_security_ipsec_test_vectors.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev_security_ipsec_test_vectors.h b/app/test/test_cryptodev_security_ipsec_test_vectors.h
index 2686bbeb62..6e60e32b9d 100644
--- a/app/test/test_cryptodev_security_ipsec_test_vectors.h
+++ b/app/test/test_cryptodev_security_ipsec_test_vectors.h
@@ -417,7 +417,8 @@ struct ipsec_test_data pkt_aes_256_ccm = {
 				.op = RTE_CRYPTO_AEAD_OP_ENCRYPT,
 				.algo = RTE_CRYPTO_AEAD_AES_CCM,
 				.key.length = 32,
-				.iv.length = 12,
+				/* IV includes 3B salt and 8B per packet IV */
+				.iv.length = 11,
 				.iv.offset = IV_OFFSET,
 				.digest_length = 16,
 				.aad_length = 12,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.651681900 +0800
+++ 0080-test-crypto-fix-IPsec-AES-CCM-vector.patch	2023-06-25 14:31:58.455773900 +0800
@@ -1 +1 @@
-From 7de104c59392a7ee8382f81e23b123281422f5c8 Mon Sep 17 00:00:00 2001
+From a659f5f18c3633863e844c00b6ee65323c6eea7d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7de104c59392a7ee8382f81e23b123281422f5c8 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'crypto/ipsec_mb: optimize allocation in session' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (79 preceding siblings ...)
  2023-06-25  6:34 ` patch 'test/crypto: fix IPsec AES CCM vector' " Xueming Li
@ 2023-06-25  6:34 ` Xueming Li
  2023-06-25  6:35 ` patch 'vhost: fix notification stats for packed ring' " Xueming Li
                   ` (48 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:34 UTC (permalink / raw)
  To: Ciara Power; +Cc: Pablo de Lara, Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3a5561e8b5f85703b1faf51a064b01495ad4a314 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 17 May 2023 15:19:16 +0000
Subject: [PATCH] crypto/ipsec_mb: optimize allocation in session
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit db7dc9070bf42593e3fca5f2f47ac0344e1b5cb6 ]

When configuring the session, use the queue pair mb_mgr that was already
allocated if possible. If this doesn't exist, then allocate a new mb_mgr.

This reduces unnecessary cycles creating an mb_mgr for every session
configured.

Fixes: c75542ae4200 ("crypto/ipsec_mb: introduce IPsec_mb framework")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
index 3e52f95674..30f919cd40 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
@@ -434,15 +434,22 @@ ipsec_mb_sym_session_configure(
 	struct ipsec_mb_dev_private *internals = dev->data->dev_private;
 	struct ipsec_mb_internals *pmd_data =
 		&ipsec_mb_pmds[internals->pmd_type];
-	IMB_MGR *mb_mgr = alloc_init_mb_mgr();
+	struct ipsec_mb_qp *qp = dev->data->queue_pairs[0];
+	IMB_MGR *mb_mgr;
 	int ret = 0;
 
+	if (qp != NULL)
+		mb_mgr = qp->mb_mgr;
+	else
+		mb_mgr = alloc_init_mb_mgr();
+
 	if (!mb_mgr)
 		return -ENOMEM;
 
 	if (unlikely(sess == NULL)) {
 		IPSEC_MB_LOG(ERR, "invalid session struct");
-		free_mb_mgr(mb_mgr);
+		if (qp == NULL)
+			free_mb_mgr(mb_mgr);
 		return -EINVAL;
 	}
 
@@ -452,11 +459,13 @@ ipsec_mb_sym_session_configure(
 		IPSEC_MB_LOG(ERR, "failed configure session parameters");
 
 		/* Return session to mempool */
-		free_mb_mgr(mb_mgr);
+		if (qp == NULL)
+			free_mb_mgr(mb_mgr);
 		return ret;
 	}
 
-	free_mb_mgr(mb_mgr);
+	if (qp == NULL)
+		free_mb_mgr(mb_mgr);
 	return 0;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.675417900 +0800
+++ 0081-crypto-ipsec_mb-optimize-allocation-in-session.patch	2023-06-25 14:31:58.455773900 +0800
@@ -1 +1 @@
-From db7dc9070bf42593e3fca5f2f47ac0344e1b5cb6 Mon Sep 17 00:00:00 2001
+From 3a5561e8b5f85703b1faf51a064b01495ad4a314 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit db7dc9070bf42593e3fca5f2f47ac0344e1b5cb6 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'vhost: fix notification stats for packed ring' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (80 preceding siblings ...)
  2023-06-25  6:34 ` patch 'crypto/ipsec_mb: optimize allocation in session' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'vhost: fix invalid call FD handling' " Xueming Li
                   ` (47 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fe3e1fc9d84fc9bbdab45e64fe8150cc3b0dfb17 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 25 May 2023 18:25:24 +0200
Subject: [PATCH] vhost: fix notification stats for packed ring
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5e8e1166dfc5613566a73299f7cc1bf6510e81c2 ]

Guest notification counter was only incremented for split
ring, this patch adds it also for packed ring.

Fixes: 1ea74efd7fa4 ("vhost: add statistics for guest notification")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/vhost/vhost.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h
index 0fd6f4bbf4..e125c3d615 100644
--- a/lib/vhost/vhost.h
+++ b/lib/vhost/vhost.h
@@ -952,6 +952,8 @@ vhost_vring_call_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
 kick:
 	if (kick) {
 		eventfd_write(vq->callfd, (eventfd_t)1);
+		if (dev->flags & VIRTIO_DEV_STATS_ENABLED)
+			vq->stats.guest_notifications++;
 		if (dev->notify_ops->guest_notified)
 			dev->notify_ops->guest_notified(dev->vid);
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.697406000 +0800
+++ 0082-vhost-fix-notification-stats-for-packed-ring.patch	2023-06-25 14:31:58.455773900 +0800
@@ -1 +1 @@
-From 5e8e1166dfc5613566a73299f7cc1bf6510e81c2 Mon Sep 17 00:00:00 2001
+From fe3e1fc9d84fc9bbdab45e64fe8150cc3b0dfb17 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5e8e1166dfc5613566a73299f7cc1bf6510e81c2 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 8fdab13c70..8554ab4002 100644
+index 0fd6f4bbf4..e125c3d615 100644
@@ -22 +24 @@
-@@ -973,6 +973,8 @@ vhost_vring_call_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -952,6 +952,8 @@ vhost_vring_call_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)

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

* patch 'vhost: fix invalid call FD handling' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (81 preceding siblings ...)
  2023-06-25  6:35 ` patch 'vhost: fix notification stats for packed ring' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/virtio: propagate interrupt configuration error values' " Xueming Li
                   ` (46 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Eelco Chaudron, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 94bed3c2fa9924a92f34ae65f7ca323cd4128105 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 1 Jun 2023 09:40:08 +0200
Subject: [PATCH] vhost: fix invalid call FD handling
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0445f81883a3aa727ac7f8531beee2c225d3001a ]

This patch fixes cases where IRQ injection is tried while
the call FD is not valid, which should not happen.

Fixes: b1cce26af1dc ("vhost: add notification for packed ring")
Fixes: e37ff954405a ("vhost: support virtqueue interrupt/notification suppression")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/vhost/vhost.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h
index e125c3d615..63e2f3f577 100644
--- a/lib/vhost/vhost.h
+++ b/lib/vhost/vhost.h
@@ -881,9 +881,9 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
 			"%s: used_event_idx=%d, old=%d, new=%d\n",
 			__func__, vhost_used_event(vq), old, new);
 
-		if ((vhost_need_event(vhost_used_event(vq), new, old) &&
-					(vq->callfd >= 0)) ||
-				unlikely(!signalled_used_valid)) {
+		if ((vhost_need_event(vhost_used_event(vq), new, old) ||
+					unlikely(!signalled_used_valid)) &&
+				vq->callfd >= 0) {
 			eventfd_write(vq->callfd, (eventfd_t) 1);
 			if (dev->flags & VIRTIO_DEV_STATS_ENABLED)
 				vq->stats.guest_notifications++;
@@ -950,7 +950,7 @@ vhost_vring_call_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
 	if (vhost_need_event(off, new, old))
 		kick = true;
 kick:
-	if (kick) {
+	if (kick && vq->callfd >= 0) {
 		eventfd_write(vq->callfd, (eventfd_t)1);
 		if (dev->flags & VIRTIO_DEV_STATS_ENABLED)
 			vq->stats.guest_notifications++;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.720958100 +0800
+++ 0083-vhost-fix-invalid-call-FD-handling.patch	2023-06-25 14:31:58.455773900 +0800
@@ -1 +1 @@
-From 0445f81883a3aa727ac7f8531beee2c225d3001a Mon Sep 17 00:00:00 2001
+From 94bed3c2fa9924a92f34ae65f7ca323cd4128105 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0445f81883a3aa727ac7f8531beee2c225d3001a ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 8554ab4002..40863f7bfd 100644
+index e125c3d615..63e2f3f577 100644
@@ -24 +26 @@
-@@ -902,9 +902,9 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -881,9 +881,9 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
@@ -37 +39 @@
-@@ -971,7 +971,7 @@ vhost_vring_call_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -950,7 +950,7 @@ vhost_vring_call_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)

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

* patch 'net/virtio: propagate interrupt configuration error values' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (82 preceding siblings ...)
  2023-06-25  6:35 ` patch 'vhost: fix invalid call FD handling' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/virtio: fix initialization to return negative errno' " Xueming Li
                   ` (45 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Boleslav Stankevich; +Cc: Andrew Rybchenko, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a43f6d459a62bd5463e75a2bdc45580de690746b Mon Sep 17 00:00:00 2001
From: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>
Date: Wed, 22 Mar 2023 13:23:24 +0300
Subject: [PATCH] net/virtio: propagate interrupt configuration error values
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5a475f73b084029444c7b83229aa9a4b6b3dac0c ]

rte_intr_vec_list_alloc() may fail because of different reasons which
are indicated by different negative errno values.

Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")

Signed-off-by: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index b72334455e..0c0c7c78f9 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1797,6 +1797,7 @@ static int
 virtio_configure_intr(struct rte_eth_dev *dev)
 {
 	struct virtio_hw *hw = dev->data->dev_private;
+	int ret;
 
 	if (!rte_intr_cap_multiple(dev->intr_handle)) {
 		PMD_INIT_LOG(ERR, "Multiple intr vector not supported");
@@ -1808,11 +1809,12 @@ virtio_configure_intr(struct rte_eth_dev *dev)
 		return -1;
 	}
 
-	if (rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec",
-				    hw->max_queue_pairs)) {
+	ret = rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec",
+				      hw->max_queue_pairs);
+	if (ret < 0) {
 		PMD_INIT_LOG(ERR, "Failed to allocate %u rxq vectors",
 			     hw->max_queue_pairs);
-		return -ENOMEM;
+		return ret;
 	}
 
 	if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.744836400 +0800
+++ 0084-net-virtio-propagate-interrupt-configuration-error-v.patch	2023-06-25 14:31:58.455773900 +0800
@@ -1 +1 @@
-From 5a475f73b084029444c7b83229aa9a4b6b3dac0c Mon Sep 17 00:00:00 2001
+From a43f6d459a62bd5463e75a2bdc45580de690746b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5a475f73b084029444c7b83229aa9a4b6b3dac0c ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 07e53d2b97..a81110e70a 100644
+index b72334455e..0c0c7c78f9 100644
@@ -23 +25 @@
-@@ -1353,6 +1353,7 @@ static int
+@@ -1797,6 +1797,7 @@ static int
@@ -31 +33 @@
-@@ -1364,11 +1365,12 @@ virtio_configure_intr(struct rte_eth_dev *dev)
+@@ -1808,11 +1809,12 @@ virtio_configure_intr(struct rte_eth_dev *dev)

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

* patch 'net/virtio: fix initialization to return negative errno' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (83 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/virtio: propagate interrupt configuration error values' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/virtio-user: fix leak when initialisation fails' " Xueming Li
                   ` (44 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Boleslav Stankevich; +Cc: Andrew Rybchenko, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d228fa562b1d875d492be083abf4258ced0ee409 Mon Sep 17 00:00:00 2001
From: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>
Date: Wed, 22 Mar 2023 13:23:25 +0300
Subject: [PATCH] net/virtio: fix initialization to return negative errno
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 55e19d06f8a8a865297532071453c10544a07a24 ]

virtio_init_device() and called helper functions sometimes return -1
when return code should be negative errno. Fix all such cases to return
correct negative errno instead.

Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts")
Fixes: 0c9d66207054 ("net/virtio: support RSS")
Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")
Fixes: 49d26d9e3f47 ("net/virtio: support MTU feature")

Signed-off-by: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 33 +++++++++++++++++-------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 0c0c7c78f9..c4f6fa55b3 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1804,9 +1804,10 @@ virtio_configure_intr(struct rte_eth_dev *dev)
 		return -ENOTSUP;
 	}
 
-	if (rte_intr_efd_enable(dev->intr_handle, dev->data->nb_rx_queues)) {
+	ret = rte_intr_efd_enable(dev->intr_handle, dev->data->nb_rx_queues);
+	if (ret < 0) {
 		PMD_INIT_LOG(ERR, "Fail to create eventfd");
-		return -1;
+		return ret;
 	}
 
 	ret = rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec",
@@ -1835,12 +1836,13 @@ virtio_configure_intr(struct rte_eth_dev *dev)
 	 */
 	if (virtio_intr_enable(dev) < 0) {
 		PMD_DRV_LOG(ERR, "interrupt enable failed");
-		return -1;
+		return -EINVAL;
 	}
 
-	if (virtio_queues_bind_intr(dev) < 0) {
+	ret = virtio_queues_bind_intr(dev);
+	if (ret < 0) {
 		PMD_INIT_LOG(ERR, "Failed to bind queue/interrupt");
-		return -1;
+		return ret;
 	}
 
 	return 0;
@@ -2163,7 +2165,7 @@ virtio_dev_rss_init(struct rte_eth_dev *eth_dev)
 				eth_dev->device->numa_node);
 		if (!hw->rss_key) {
 			PMD_INIT_LOG(ERR, "Failed to allocate RSS key");
-			return -1;
+			return -ENOMEM;
 		}
 	}
 
@@ -2185,7 +2187,7 @@ virtio_dev_rss_init(struct rte_eth_dev *eth_dev)
 				eth_dev->device->numa_node);
 		if (!hw->rss_reta) {
 			PMD_INIT_LOG(ERR, "Failed to allocate RSS reta");
-			return -1;
+			return -ENOMEM;
 		}
 
 		hw->rss_rx_queues = 0;
@@ -2225,7 +2227,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 	/* Tell the host we've known how to drive the device. */
 	virtio_set_status(hw, VIRTIO_CONFIG_STATUS_DRIVER);
 	if (virtio_ethdev_negotiate_features(hw, req_features) < 0)
-		return -1;
+		return -EINVAL;
 
 	hw->weak_barriers = !virtio_with_feature(hw, VIRTIO_F_ORDER_PLATFORM);
 
@@ -2307,7 +2309,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 			if (config->mtu < RTE_ETHER_MIN_MTU) {
 				PMD_INIT_LOG(ERR, "invalid max MTU value (%u)",
 						config->mtu);
-				return -1;
+				return -EINVAL;
 			}
 
 			hw->max_mtu = config->mtu;
@@ -2320,9 +2322,11 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 		}
 
 		hw->rss_hash_types = 0;
-		if (virtio_with_feature(hw, VIRTIO_NET_F_RSS))
-			if (virtio_dev_rss_init(eth_dev))
-				return -1;
+		if (virtio_with_feature(hw, VIRTIO_NET_F_RSS)) {
+			ret = virtio_dev_rss_init(eth_dev);
+			if (ret < 0)
+				return ret;
+		}
 
 		PMD_INIT_LOG(DEBUG, "config->max_virtqueue_pairs=%d",
 				config->max_virtqueue_pairs);
@@ -2344,10 +2348,11 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 		return ret;
 
 	if (eth_dev->data->dev_conf.intr_conf.rxq) {
-		if (virtio_configure_intr(eth_dev) < 0) {
+		ret = virtio_configure_intr(eth_dev);
+		if (ret < 0) {
 			PMD_INIT_LOG(ERR, "failed to configure interrupt");
 			virtio_free_queues(hw);
-			return -1;
+			return ret;
 		}
 	}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.769978100 +0800
+++ 0085-net-virtio-fix-initialization-to-return-negative-err.patch	2023-06-25 14:31:58.455773900 +0800
@@ -1 +1 @@
-From 55e19d06f8a8a865297532071453c10544a07a24 Mon Sep 17 00:00:00 2001
+From d228fa562b1d875d492be083abf4258ced0ee409 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 55e19d06f8a8a865297532071453c10544a07a24 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index a81110e70a..2c23f1c00e 100644
+index 0c0c7c78f9..c4f6fa55b3 100644
@@ -27 +29 @@
-@@ -1360,9 +1360,10 @@ virtio_configure_intr(struct rte_eth_dev *dev)
+@@ -1804,9 +1804,10 @@ virtio_configure_intr(struct rte_eth_dev *dev)
@@ -40 +42 @@
-@@ -1391,12 +1392,13 @@ virtio_configure_intr(struct rte_eth_dev *dev)
+@@ -1835,12 +1836,13 @@ virtio_configure_intr(struct rte_eth_dev *dev)
@@ -57 +59 @@
-@@ -1719,7 +1721,7 @@ virtio_dev_rss_init(struct rte_eth_dev *eth_dev)
+@@ -2163,7 +2165,7 @@ virtio_dev_rss_init(struct rte_eth_dev *eth_dev)
@@ -66 +68 @@
-@@ -1741,7 +1743,7 @@ virtio_dev_rss_init(struct rte_eth_dev *eth_dev)
+@@ -2185,7 +2187,7 @@ virtio_dev_rss_init(struct rte_eth_dev *eth_dev)
@@ -75 +77 @@
-@@ -1781,7 +1783,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
+@@ -2225,7 +2227,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
@@ -84 +86 @@
-@@ -1863,7 +1865,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
+@@ -2307,7 +2309,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
@@ -93 +95 @@
-@@ -1876,9 +1878,11 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
+@@ -2320,9 +2322,11 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
@@ -108 +110 @@
-@@ -1900,10 +1904,11 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
+@@ -2344,10 +2348,11 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)

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

* patch 'net/virtio-user: fix leak when initialisation fails' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (84 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/virtio: fix initialization to return negative errno' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/mlx5: enhance error log for tunnel offloading' " Xueming Li
                   ` (43 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: David Marchand; +Cc: Maxime Coquelin, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2a45186cf44c51ad11e6a8f3d08a0a78a10da952 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 13 Apr 2023 12:10:41 +0200
Subject: [PATCH] net/virtio-user: fix leak when initialisation fails
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c8254ef1a96c4897293b1d1db8c8a786dfb19e9d ]

Caught with ASan.
If initialising a virtio_user port fails, we may leak the ifname passed
via a devargs.

Fixes: 4214a1b493f2 ("net/virtio-user: support changing tap interface name")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 19599aa3f6..697a8dcd6b 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -586,11 +586,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 	dev->frontend_features = 0;
 	dev->unsupported_features = 0;
 	dev->backend_type = backend_type;
-
-	if (*ifname) {
-		dev->ifname = *ifname;
-		*ifname = NULL;
-	}
+	dev->ifname = *ifname;
 
 	if (virtio_user_dev_setup(dev) < 0) {
 		PMD_INIT_LOG(ERR, "(%s) backend set up fails", dev->path);
@@ -663,6 +659,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 		}
 	}
 
+	*ifname = NULL;
 	return 0;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.793771600 +0800
+++ 0086-net-virtio-user-fix-leak-when-initialisation-fails.patch	2023-06-25 14:31:58.465773900 +0800
@@ -1 +1 @@
-From c8254ef1a96c4897293b1d1db8c8a786dfb19e9d Mon Sep 17 00:00:00 2001
+From 2a45186cf44c51ad11e6a8f3d08a0a78a10da952 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c8254ef1a96c4897293b1d1db8c8a786dfb19e9d ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 2b4607a291..af1f8c8237 100644
+index 19599aa3f6..697a8dcd6b 100644
@@ -24 +26 @@
-@@ -696,11 +696,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, uint16_t queues,
+@@ -586,11 +586,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
@@ -37 +39 @@
-@@ -794,6 +790,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, uint16_t queues,
+@@ -663,6 +659,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
@@ -42,0 +45 @@
+ }
@@ -44 +46,0 @@
- notify_uninit:

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

* patch 'net/mlx5: enhance error log for tunnel offloading' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (85 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/virtio-user: fix leak when initialisation fails' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/mlx5: fix matcher layout size calculation' " Xueming Li
                   ` (42 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: David Marchand; +Cc: Gregory Etelson, Raslan Darawsheh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9015baea292556c9e29c568470030297f7e67b94 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 27 Apr 2023 13:55:34 +0200
Subject: [PATCH] net/mlx5: enhance error log for tunnel offloading
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c9fecc1cc2886bcd626a656a5493841363dec6dd ]

Tunnel offloading is linked to running a port with the non-obvious
dv_xmeta_en=3 devargs. Hint at it for "normal" users.

Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Raslan Darawsheh <rasland@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index fd57eafe3a..787dd02881 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -10846,7 +10846,7 @@ mlx5_flow_tunnel_validate(struct rte_eth_dev *dev,
 	if (!is_tunnel_offload_active(dev))
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
-					  "tunnel offload was not activated");
+					  "tunnel offload was not activated, consider setting dv_xmeta_en=3");
 	if (!tunnel)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.819040300 +0800
+++ 0087-net-mlx5-enhance-error-log-for-tunnel-offloading.patch	2023-06-25 14:31:58.465773900 +0800
@@ -1 +1 @@
-From c9fecc1cc2886bcd626a656a5493841363dec6dd Mon Sep 17 00:00:00 2001
+From 9015baea292556c9e29c568470030297f7e67b94 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c9fecc1cc2886bcd626a656a5493841363dec6dd ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 156f826b8a..c32783efb2 100644
+index fd57eafe3a..787dd02881 100644
@@ -23 +25 @@
-@@ -11329,7 +11329,7 @@ mlx5_flow_tunnel_validate(struct rte_eth_dev *dev,
+@@ -10846,7 +10846,7 @@ mlx5_flow_tunnel_validate(struct rte_eth_dev *dev,

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

* patch 'net/mlx5: fix matcher layout size calculation' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (86 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/mlx5: enhance error log for tunnel offloading' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/mlx5: fix VXLAN matching with zero value' " Xueming Li
                   ` (41 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Rongwei Liu; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2e6f71cb519bae6da63cbb0d48070b4ab14e26a2 Mon Sep 17 00:00:00 2001
From: Rongwei Liu <rongweil@nvidia.com>
Date: Tue, 16 May 2023 08:40:52 +0300
Subject: [PATCH] net/mlx5: fix matcher layout size calculation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ebc352c77fd1bc6c2fbfa668bb92fa4b06e63146 ]

Initially, the rdma-core library only supported misc0 to misc3 fields in
matching resources, misc4 and misc5 fields were added to handle new
features. The matcher layout, passing from DPDK to rdma-core, shouldn't
exceed the size of the engaged library version capabilities.

For now, there is no way to know what is the maximum capability of
rdma-core, and DPDK should limit the matcher layout to misc3 if
possible (no matching on fields misc4 and misc5 are requested by the
application).

The check if misc4 and misc5 features were requested was based on checking
the values against zeroes. The matching mask should be checked instead.

Fixes: 630a587bfb37 ("net/mlx5: support matching on VXLAN reserved field")

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 7ca909999b..12db56f173 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -14825,7 +14825,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
 			}
 			dv->actions[n++] = priv->sh->default_miss_action;
 		}
-		misc_mask = flow_dv_matcher_enable(dv->value.buf);
+		misc_mask = flow_dv_matcher_enable(dv_h->matcher->mask.buf);
 		__flow_dv_adjust_buf_size(&dv->value.size, misc_mask);
 		err = mlx5_flow_os_create_flow(dv_h->matcher->matcher_object,
 					       (void *)&dv->value, n,
@@ -17025,7 +17025,7 @@ flow_dv_destroy_def_policy(struct rte_eth_dev *dev)
 static int
 __flow_dv_create_policy_flow(struct rte_eth_dev *dev,
 			uint32_t color_reg_c_idx,
-			enum rte_color color, void *matcher_object,
+			enum rte_color color, struct mlx5_flow_dv_matcher *matcher,
 			int actions_n, void *actions,
 			bool match_src_port, const struct rte_flow_item *item,
 			void **rule, const struct rte_flow_attr *attr)
@@ -17055,9 +17055,9 @@ __flow_dv_create_policy_flow(struct rte_eth_dev *dev,
 	}
 	flow_dv_match_meta_reg(value.buf, (enum modify_reg)color_reg_c_idx,
 			       rte_col_2_mlx5_col(color), UINT32_MAX);
-	misc_mask = flow_dv_matcher_enable(value.buf);
+	misc_mask = flow_dv_matcher_enable(matcher->mask.buf);
 	__flow_dv_adjust_buf_size(&value.size, misc_mask);
-	ret = mlx5_flow_os_create_flow(matcher_object, (void *)&value,
+	ret = mlx5_flow_os_create_flow(matcher->matcher_object, (void *)&value,
 				       actions_n, actions, rule);
 	if (ret) {
 		DRV_LOG(ERR, "Failed to create meter policy%d flow.", color);
@@ -17211,7 +17211,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
 		/* Create flow, matching color. */
 		if (__flow_dv_create_policy_flow(dev,
 				color_reg_c_idx, (enum rte_color)i,
-				color_rule->matcher->matcher_object,
+				color_rule->matcher,
 				acts[i].actions_n, acts[i].dv_actions,
 				svport_match, NULL, &color_rule->rule,
 				&attr)) {
@@ -17679,7 +17679,7 @@ flow_dv_create_mtr_tbls(struct rte_eth_dev *dev,
 			actions[i++] = priv->sh->dr_drop_action;
 			flow_dv_match_meta_reg_all(matcher_para.buf, value.buf,
 				(enum modify_reg)mtr_id_reg_c, 0, 0);
-			misc_mask = flow_dv_matcher_enable(value.buf);
+			misc_mask = flow_dv_matcher_enable(mtrmng->def_matcher[domain]->mask.buf);
 			__flow_dv_adjust_buf_size(&value.size, misc_mask);
 			ret = mlx5_flow_os_create_flow
 				(mtrmng->def_matcher[domain]->matcher_object,
@@ -17724,7 +17724,7 @@ flow_dv_create_mtr_tbls(struct rte_eth_dev *dev,
 					fm->drop_cnt, NULL);
 		actions[i++] = cnt->action;
 		actions[i++] = priv->sh->dr_drop_action;
-		misc_mask = flow_dv_matcher_enable(value.buf);
+		misc_mask = flow_dv_matcher_enable(drop_matcher->mask.buf);
 		__flow_dv_adjust_buf_size(&value.size, misc_mask);
 		ret = mlx5_flow_os_create_flow(drop_matcher->matcher_object,
 					       (void *)&value, i, actions,
@@ -18204,7 +18204,7 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
 				goto err_exit;
 			}
 			if (__flow_dv_create_policy_flow(dev, color_reg_c_idx, (enum rte_color)j,
-						color_rule->matcher->matcher_object,
+						color_rule->matcher,
 						acts.actions_n, acts.dv_actions,
 						true, item, &color_rule->rule, &attr)) {
 				rte_spinlock_unlock(&mtr_policy->sl);
@@ -19248,7 +19248,7 @@ flow_dv_discover_priorities(struct rte_eth_dev *dev,
 			break;
 		}
 		/* Try to apply the flow to HW. */
-		misc_mask = flow_dv_matcher_enable(flow.dv.value.buf);
+		misc_mask = flow_dv_matcher_enable(flow.handle->dvh.matcher->mask.buf);
 		__flow_dv_adjust_buf_size(&flow.dv.value.size, misc_mask);
 		err = mlx5_flow_os_create_flow
 				(flow.handle->dvh.matcher->matcher_object,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.852383700 +0800
+++ 0088-net-mlx5-fix-matcher-layout-size-calculation.patch	2023-06-25 14:31:58.475773900 +0800
@@ -1 +1 @@
-From ebc352c77fd1bc6c2fbfa668bb92fa4b06e63146 Mon Sep 17 00:00:00 2001
+From 2e6f71cb519bae6da63cbb0d48070b4ab14e26a2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ebc352c77fd1bc6c2fbfa668bb92fa4b06e63146 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index 70a5f4858c..e7a2ae933c 100644
+index 7ca909999b..12db56f173 100644
@@ -32 +34 @@
-@@ -15157,7 +15157,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -14825,7 +14825,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
@@ -41 +43 @@
-@@ -17357,7 +17357,7 @@ flow_dv_destroy_def_policy(struct rte_eth_dev *dev)
+@@ -17025,7 +17025,7 @@ flow_dv_destroy_def_policy(struct rte_eth_dev *dev)
@@ -50 +52 @@
-@@ -17387,9 +17387,9 @@ __flow_dv_create_policy_flow(struct rte_eth_dev *dev,
+@@ -17055,9 +17055,9 @@ __flow_dv_create_policy_flow(struct rte_eth_dev *dev,
@@ -62 +64 @@
-@@ -17543,7 +17543,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
+@@ -17211,7 +17211,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
@@ -71 +73 @@
-@@ -18011,7 +18011,7 @@ flow_dv_create_mtr_tbls(struct rte_eth_dev *dev,
+@@ -17679,7 +17679,7 @@ flow_dv_create_mtr_tbls(struct rte_eth_dev *dev,
@@ -80 +82 @@
-@@ -18056,7 +18056,7 @@ flow_dv_create_mtr_tbls(struct rte_eth_dev *dev,
+@@ -17724,7 +17724,7 @@ flow_dv_create_mtr_tbls(struct rte_eth_dev *dev,
@@ -89 +91 @@
-@@ -18536,7 +18536,7 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
+@@ -18204,7 +18204,7 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
@@ -98 +100 @@
-@@ -19580,7 +19580,7 @@ flow_dv_discover_priorities(struct rte_eth_dev *dev,
+@@ -19248,7 +19248,7 @@ flow_dv_discover_priorities(struct rte_eth_dev *dev,

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

* patch 'net/mlx5: fix VXLAN matching with zero value' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (87 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/mlx5: fix matcher layout size calculation' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/mlx5: forbid duplicated tag index in pattern template' " Xueming Li
                   ` (40 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Rongwei Liu; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eb02902423e140d7a9627bb377026ded42628fe1 Mon Sep 17 00:00:00 2001
From: Rongwei Liu <rongweil@nvidia.com>
Date: Tue, 16 May 2023 08:40:53 +0300
Subject: [PATCH] net/mlx5: fix VXLAN matching with zero value
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 40c78a1f76cdbf9d0e1002d603b5d381d2e0a6b4 ]

When an application wants to match VxLAN last_rsvd value zero,
PMD sets the matching mask field to zero by mistake and it causes
traffic with any last_rsvd value hits. The matching mask should be
taken from application input directly, no need to perform the bit reset
operation.

Fixes: cd4ab742064a ("net/mlx5: split flow item matcher and value translation")

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 12db56f173..485afdf5ca 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9223,12 +9223,10 @@ flow_dv_translate_item_vxlan(struct rte_eth_dev *dev,
 {
 	const struct rte_flow_item_vxlan *vxlan_m;
 	const struct rte_flow_item_vxlan *vxlan_v;
-	const struct rte_flow_item_vxlan *vxlan_vv = item->spec;
 	void *headers_v;
 	void *misc_v;
 	void *misc5_v;
 	uint32_t tunnel_v;
-	uint32_t *tunnel_header_v;
 	char *vni_v;
 	uint16_t dport;
 	int size;
@@ -9280,24 +9278,11 @@ flow_dv_translate_item_vxlan(struct rte_eth_dev *dev,
 			vni_v[i] = vxlan_m->vni[i] & vxlan_v->vni[i];
 		return;
 	}
-	tunnel_header_v = (uint32_t *)MLX5_ADDR_OF(fte_match_set_misc5,
-						   misc5_v,
-						   tunnel_header_1);
 	tunnel_v = (vxlan_v->vni[0] & vxlan_m->vni[0]) |
 		   (vxlan_v->vni[1] & vxlan_m->vni[1]) << 8 |
 		   (vxlan_v->vni[2] & vxlan_m->vni[2]) << 16;
-	*tunnel_header_v = tunnel_v;
-	if (key_type == MLX5_SET_MATCHER_SW_M) {
-		tunnel_v = (vxlan_vv->vni[0] & vxlan_m->vni[0]) |
-			   (vxlan_vv->vni[1] & vxlan_m->vni[1]) << 8 |
-			   (vxlan_vv->vni[2] & vxlan_m->vni[2]) << 16;
-		if (!tunnel_v)
-			*tunnel_header_v = 0x0;
-		if (vxlan_vv->rsvd1 & vxlan_m->rsvd1)
-			*tunnel_header_v |= vxlan_v->rsvd1 << 24;
-	} else {
-		*tunnel_header_v |= (vxlan_v->rsvd1 & vxlan_m->rsvd1) << 24;
-	}
+	tunnel_v |= (vxlan_v->rsvd1 & vxlan_m->rsvd1) << 24;
+	MLX5_SET(fte_match_set_misc5, misc5_v, tunnel_header_1, RTE_BE32(tunnel_v));
 }
 
 /**
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.890993700 +0800
+++ 0089-net-mlx5-fix-VXLAN-matching-with-zero-value.patch	2023-06-25 14:31:58.495773900 +0800
@@ -1 +1 @@
-From 40c78a1f76cdbf9d0e1002d603b5d381d2e0a6b4 Mon Sep 17 00:00:00 2001
+From eb02902423e140d7a9627bb377026ded42628fe1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 40c78a1f76cdbf9d0e1002d603b5d381d2e0a6b4 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index e7a2ae933c..9ef9f13cbb 100644
+index 12db56f173..485afdf5ca 100644
@@ -25 +27 @@
-@@ -9470,12 +9470,10 @@ flow_dv_translate_item_vxlan(struct rte_eth_dev *dev,
+@@ -9223,12 +9223,10 @@ flow_dv_translate_item_vxlan(struct rte_eth_dev *dev,
@@ -38,2 +40,2 @@
-@@ -9527,24 +9525,11 @@ flow_dv_translate_item_vxlan(struct rte_eth_dev *dev,
- 			vni_v[i] = vxlan_m->hdr.vni[i] & vxlan_v->hdr.vni[i];
+@@ -9280,24 +9278,11 @@ flow_dv_translate_item_vxlan(struct rte_eth_dev *dev,
+ 			vni_v[i] = vxlan_m->vni[i] & vxlan_v->vni[i];
@@ -45,3 +47,3 @@
- 	tunnel_v = (vxlan_v->hdr.vni[0] & vxlan_m->hdr.vni[0]) |
- 		   (vxlan_v->hdr.vni[1] & vxlan_m->hdr.vni[1]) << 8 |
- 		   (vxlan_v->hdr.vni[2] & vxlan_m->hdr.vni[2]) << 16;
+ 	tunnel_v = (vxlan_v->vni[0] & vxlan_m->vni[0]) |
+ 		   (vxlan_v->vni[1] & vxlan_m->vni[1]) << 8 |
+ 		   (vxlan_v->vni[2] & vxlan_m->vni[2]) << 16;
@@ -50,3 +52,3 @@
--		tunnel_v = (vxlan_vv->hdr.vni[0] & vxlan_m->hdr.vni[0]) |
--			   (vxlan_vv->hdr.vni[1] & vxlan_m->hdr.vni[1]) << 8 |
--			   (vxlan_vv->hdr.vni[2] & vxlan_m->hdr.vni[2]) << 16;
+-		tunnel_v = (vxlan_vv->vni[0] & vxlan_m->vni[0]) |
+-			   (vxlan_vv->vni[1] & vxlan_m->vni[1]) << 8 |
+-			   (vxlan_vv->vni[2] & vxlan_m->vni[2]) << 16;
@@ -55,2 +57,2 @@
--		if (vxlan_vv->hdr.rsvd1 & vxlan_m->hdr.rsvd1)
--			*tunnel_header_v |= vxlan_v->hdr.rsvd1 << 24;
+-		if (vxlan_vv->rsvd1 & vxlan_m->rsvd1)
+-			*tunnel_header_v |= vxlan_v->rsvd1 << 24;
@@ -58 +60 @@
--		*tunnel_header_v |= (vxlan_v->hdr.rsvd1 & vxlan_m->hdr.rsvd1) << 24;
+-		*tunnel_header_v |= (vxlan_v->rsvd1 & vxlan_m->rsvd1) << 24;
@@ -60 +62 @@
-+	tunnel_v |= (vxlan_v->hdr.rsvd1 & vxlan_m->hdr.rsvd1) << 24;
++	tunnel_v |= (vxlan_v->rsvd1 & vxlan_m->rsvd1) << 24;

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

* patch 'net/mlx5: forbid duplicated tag index in pattern template' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (88 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/mlx5: fix VXLAN matching with zero value' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/mlx5: fix duplicated tag index matching in SWS' " Xueming Li
                   ` (39 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Rongwei Liu; +Cc: Viacheslav Ovsiienko, Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 124a919b4e64a96ef61c072db5c287b4f878534d Mon Sep 17 00:00:00 2001
From: Rongwei Liu <rongweil@nvidia.com>
Date: Tue, 16 May 2023 08:43:28 +0300
Subject: [PATCH] net/mlx5: forbid duplicated tag index in pattern template
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ad4d51d277fa23a2266c6a098ce51cfa07b3fbbd ]

Duplicated tag index in pattern template will most likely cause
matching failures such as "template tag index is 0 data mask 0xff /
tag index is 0 data mask 0xffff / end"

If the upper layer application needs to match the same tag twice
with different masks, it should be consolidated into one rte_item
with the desired mask.

"template tag index is 0 data mask 0xff / tag index is 0 data mask
0xff00 / end" should be present as "template tag index is 0 data mask
0xffff / end"

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index ead14a0530..ea0159406f 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -4621,8 +4621,9 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
 			 struct rte_flow_error *error)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
-	int i;
+	int i, tag_idx;
 	bool items_end = false;
+	uint32_t tag_bitmap = 0;
 
 	if (!attr->ingress && !attr->egress && !attr->transfer)
 		return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ATTR, NULL,
@@ -4664,16 +4665,26 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
 		switch (type) {
 		case RTE_FLOW_ITEM_TYPE_TAG:
 		{
-			int reg;
 			const struct rte_flow_item_tag *tag =
 				(const struct rte_flow_item_tag *)items[i].spec;
 
-			reg = flow_hw_get_reg_id(RTE_FLOW_ITEM_TYPE_TAG, tag->index);
-			if (reg == REG_NON)
+			if (tag == NULL)
+				return rte_flow_error_set(error, EINVAL,
+							  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+							  NULL,
+							  "Tag spec is NULL");
+			tag_idx = flow_hw_get_reg_id(RTE_FLOW_ITEM_TYPE_TAG, tag->index);
+			if (tag_idx == REG_NON)
 				return rte_flow_error_set(error, EINVAL,
 							  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 							  NULL,
 							  "Unsupported tag index");
+			if (tag_bitmap & (1 << tag_idx))
+				return rte_flow_error_set(error, EINVAL,
+							  RTE_FLOW_ERROR_TYPE_ITEM,
+							  NULL,
+							  "Duplicated tag index");
+			tag_bitmap |= 1 << tag_idx;
 			break;
 		}
 		case MLX5_RTE_FLOW_ITEM_TYPE_TAG:
@@ -4687,6 +4698,12 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
 							  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 							  NULL,
 							  "Unsupported internal tag index");
+			if (tag_bitmap & (1 << tag->index))
+				return rte_flow_error_set(error, EINVAL,
+							  RTE_FLOW_ERROR_TYPE_ITEM,
+							  NULL,
+							  "Duplicated tag index");
+			tag_bitmap |= 1 << tag->index;
 			break;
 		}
 		case RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.923549100 +0800
+++ 0090-net-mlx5-forbid-duplicated-tag-index-in-pattern-temp.patch	2023-06-25 14:31:58.495773900 +0800
@@ -1 +1 @@
-From ad4d51d277fa23a2266c6a098ce51cfa07b3fbbd Mon Sep 17 00:00:00 2001
+From 124a919b4e64a96ef61c072db5c287b4f878534d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ad4d51d277fa23a2266c6a098ce51cfa07b3fbbd ]
@@ -18,2 +20,0 @@
-Cc: stable@dpdk.org
-
@@ -28 +29 @@
-index afc42ac7e7..5df439105a 100644
+index ead14a0530..ea0159406f 100644
@@ -31 +32 @@
-@@ -4840,8 +4840,9 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
+@@ -4621,8 +4621,9 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
@@ -42 +43 @@
-@@ -4883,16 +4884,26 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
+@@ -4664,16 +4665,26 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
@@ -72 +73 @@
-@@ -4906,6 +4917,12 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
+@@ -4687,6 +4698,12 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,

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

* patch 'net/mlx5: fix duplicated tag index matching in SWS' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (89 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/mlx5: forbid duplicated tag index in pattern template' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/mlx5: fix drop action attribute validation' " Xueming Li
                   ` (38 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Rongwei Liu; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b53417d63b259a1e8b43303f7077231f81a69c21 Mon Sep 17 00:00:00 2001
From: Rongwei Liu <rongweil@nvidia.com>
Date: Tue, 16 May 2023 08:43:29 +0300
Subject: [PATCH] net/mlx5: fix duplicated tag index matching in SWS
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d5a7699c10651cb1cea2b18f94099e984c466b75 ]

Duplicated matching tag index is not allowed in SWS
because they are using the same matching field in the
underlayer layout.
For example: "tag index is 0 data spec 0x12 mask 0xff /
tag index is 0 data spec 0x1234 mask 0xffff" is paradoxical
matching condition and "tag index is 0 data spec 0x12 mask 0xff /
tag index is 0 data spec 0x3400 mask 0xff00" should be "tag index
is 0 data spec 0x3412 mask 0xffff"

Add checking logic against it.

Fixes: e554b672aa05 ("net/mlx5: support flow tag")

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 485afdf5ca..3d252f736b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2129,6 +2129,8 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
  *   Pointer to the rte_eth_dev structure.
  * @param[in] item
  *   Item specification.
+ * @param[in] tag_bitmap
+ *   Tag index bitmap.
  * @param[in] attr
  *   Attributes of flow that includes this item.
  * @param[out] error
@@ -2140,6 +2142,7 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
 static int
 flow_dv_validate_item_tag(struct rte_eth_dev *dev,
 			  const struct rte_flow_item *item,
+			  uint32_t *tag_bitmap,
 			  const struct rte_flow_attr *attr __rte_unused,
 			  struct rte_flow_error *error)
 {
@@ -2183,6 +2186,12 @@ flow_dv_validate_item_tag(struct rte_eth_dev *dev,
 	if (ret < 0)
 		return ret;
 	MLX5_ASSERT(ret != REG_NON);
+	if (*tag_bitmap & (1 << ret))
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ITEM_SPEC,
+					  item->spec,
+					  "Duplicated tag index");
+	*tag_bitmap |= 1 << ret;
 	return 0;
 }
 
@@ -7051,9 +7060,10 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	bool def_policy = false;
 	bool shared_count = false;
 	uint16_t udp_dport = 0;
-	uint32_t tag_id = 0;
+	uint32_t tag_id = 0, tag_bitmap = 0;
 	const struct rte_flow_action_age *non_shared_age = NULL;
 	const struct rte_flow_action_count *count = NULL;
+	const struct mlx5_rte_flow_item_tag *mlx5_tag;
 	struct mlx5_priv *act_priv = NULL;
 	int aso_after_sample = 0;
 
@@ -7371,7 +7381,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			last_item = MLX5_FLOW_LAYER_ICMP6;
 			break;
 		case RTE_FLOW_ITEM_TYPE_TAG:
-			ret = flow_dv_validate_item_tag(dev, items,
+			ret = flow_dv_validate_item_tag(dev, items, &tag_bitmap,
 							attr, error);
 			if (ret < 0)
 				return ret;
@@ -7381,6 +7391,13 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			last_item = MLX5_FLOW_ITEM_SQ;
 			break;
 		case MLX5_RTE_FLOW_ITEM_TYPE_TAG:
+			mlx5_tag = (const struct mlx5_rte_flow_item_tag *)items->spec;
+			if (tag_bitmap & (1 << mlx5_tag->id))
+				return rte_flow_error_set(error, EINVAL,
+							  RTE_FLOW_ERROR_TYPE_ITEM_SPEC,
+							  items->spec,
+							  "Duplicated tag index");
+			tag_bitmap |= 1 << mlx5_tag->id;
 			break;
 		case RTE_FLOW_ITEM_TYPE_GTP:
 			ret = flow_dv_validate_item_gtp(dev, items, item_flags,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.950336700 +0800
+++ 0091-net-mlx5-fix-duplicated-tag-index-matching-in-SWS.patch	2023-06-25 14:31:58.515773900 +0800
@@ -1 +1 @@
-From d5a7699c10651cb1cea2b18f94099e984c466b75 Mon Sep 17 00:00:00 2001
+From b53417d63b259a1e8b43303f7077231f81a69c21 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d5a7699c10651cb1cea2b18f94099e984c466b75 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 9ef9f13cbb..27e8b3a5a9 100644
+index 485afdf5ca..3d252f736b 100644
@@ -30 +32 @@
-@@ -2295,6 +2295,8 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
+@@ -2129,6 +2129,8 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
@@ -39 +41 @@
-@@ -2306,6 +2308,7 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
+@@ -2140,6 +2142,7 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
@@ -47 +49 @@
-@@ -2349,6 +2352,12 @@ flow_dv_validate_item_tag(struct rte_eth_dev *dev,
+@@ -2183,6 +2186,12 @@ flow_dv_validate_item_tag(struct rte_eth_dev *dev,
@@ -60 +62 @@
-@@ -7280,9 +7289,10 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7051,9 +7060,10 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -72 +74 @@
-@@ -7611,7 +7621,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7371,7 +7381,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -81 +83 @@
-@@ -7621,6 +7631,13 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7381,6 +7391,13 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,

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

* patch 'net/mlx5: fix drop action attribute validation' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (90 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/mlx5: fix duplicated tag index matching in SWS' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'mempool/cnxk: avoid hang when counting batch allocs' " Xueming Li
                   ` (37 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 255fcff79e8b8cefdbce7b12f0ff27fb7f9767bb Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Wed, 17 May 2023 20:36:14 +0000
Subject: [PATCH] net/mlx5: fix drop action attribute validation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c1f0cdae14c5399cd6201e6cf39d5e51f60c6efb ]

Before this patch, DROP flow action was rejected for all egress
flow rules, which was not correct for all cases.

When Verbs flow engine is used (dv_flow_en=0) DROP flow action
is implemented using IBV_FLOW_SPEC_ACTION_DROP IBV action.
This action is supported on ingress only.
This patch amends the DROP flow action validation to allow it only on
ingress.

When DV flow engine is used (dv_flow_en=1) there are 2 implementation
options for DROP flow action:

- DR drop action (allocated through mlx5dv_dr_action_create_drop() API),
- dedicated drop queue.

When flow rules are created on non-root flow tables DR drop action can
be used on all steering domains. On root flow table however, this action
ca be used if and only if it is supported by rdma-core and kernel
drivers. mlx5 PMD dynamically checks if DR drop action is supported
on root tables during device probing
(it is checked in mlx5_flow_discover_dr_action_support()).
If DR drop action is not supported on root table, then dedicated
drop queue must be used and as a result, DROP flow action on root
is supported only for ingress flow rules.
This patch amends the DROP flow action validation with this logic
for DV flow engine.

This patch also renames the dr_drop_action_en field in device's private
data to dr_root_drop_action_en to align the name with field's meaning.

Fixes: 3c4338a42134 ("net/mlx5: optimize device spawn time with representors")
Fixes: 45633c460c22 ("net/mlx5: workaround drop action with old kernel")
Fixes: da845ae9d7c1 ("net/mlx5: fix drop action for Direct Rules/Verbs")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c   |  4 ++--
 drivers/net/mlx5/mlx5.h            |  2 +-
 drivers/net/mlx5/mlx5_flow.c       | 20 ++++++++++++++++----
 drivers/net/mlx5/mlx5_flow.h       |  3 ++-
 drivers/net/mlx5/mlx5_flow_dv.c    |  4 ++--
 drivers/net/mlx5/mlx5_flow_verbs.c |  7 ++++---
 6 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 2cce0a7f0f..6fdade7dab 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -873,10 +873,10 @@ mlx5_flow_drop_action_config(struct rte_eth_dev *dev __rte_unused)
 	 */
 	if (!priv->sh->drop_action_check_flag) {
 		if (!mlx5_flow_discover_dr_action_support(dev))
-			priv->sh->dr_drop_action_en = 1;
+			priv->sh->dr_root_drop_action_en = 1;
 		priv->sh->drop_action_check_flag = 1;
 	}
-	if (priv->sh->dr_drop_action_en)
+	if (priv->sh->dr_root_drop_action_en)
 		priv->root_drop_action = priv->sh->dr_drop_action;
 	else
 		priv->root_drop_action = priv->drop_queue.hrxq->action;
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 16b33e1548..9f27e1dba4 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1367,7 +1367,7 @@ struct mlx5_dev_ctx_shared {
 	uint32_t tunnel_header_0_1:1; /* tunnel_header_0_1 is supported. */
 	uint32_t tunnel_header_2_3:1; /* tunnel_header_2_3 is supported. */
 	uint32_t misc5_cap:1; /* misc5 matcher parameter is supported. */
-	uint32_t dr_drop_action_en:1; /* Use DR drop action. */
+	uint32_t dr_root_drop_action_en:1; /* DR drop action is usable on root tables. */
 	uint32_t drop_action_check_flag:1; /* Check Flag for drop action. */
 	uint32_t flow_priority_check_flag:1; /* Check Flag for flow priority. */
 	uint32_t metadata_regc_check_flag:1; /* Check Flag for metadata REGC. */
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 787dd02881..f4487bc136 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1903,8 +1903,10 @@ mlx5_flow_validate_action_mark(const struct rte_flow_action *action,
 /*
  * Validate the drop action.
  *
- * @param[in] action_flags
- *   Bit-fields that holds the actions detected until now.
+ * @param[in] dev
+ *   Pointer to the Ethernet device structure.
+ * @param[in] is_root
+ *   True if flow is validated for root table. False otherwise.
  * @param[in] attr
  *   Attributes of flow that includes this action.
  * @param[out] error
@@ -1914,15 +1916,25 @@ mlx5_flow_validate_action_mark(const struct rte_flow_action *action,
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 int
-mlx5_flow_validate_action_drop(uint64_t action_flags __rte_unused,
+mlx5_flow_validate_action_drop(struct rte_eth_dev *dev,
+			       bool is_root,
 			       const struct rte_flow_attr *attr,
 			       struct rte_flow_error *error)
 {
-	if (attr->egress)
+	struct mlx5_priv *priv = dev->data->dev_private;
+
+	if (priv->sh->config.dv_flow_en == 0 && attr->egress)
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, NULL,
 					  "drop action not supported for "
 					  "egress");
+	if (priv->sh->config.dv_flow_en == 1 && is_root && (attr->egress || attr->transfer) &&
+	    !priv->sh->dr_root_drop_action_en) {
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ATTR, NULL,
+					  "drop action not supported for "
+					  "egress and transfer on group 0");
+	}
 	return 0;
 }
 
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 1f57ecd6e1..f4eecbcb0a 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -2226,7 +2226,8 @@ int mlx5_validate_action_rss(struct rte_eth_dev *dev,
 int mlx5_flow_validate_action_count(struct rte_eth_dev *dev,
 				    const struct rte_flow_attr *attr,
 				    struct rte_flow_error *error);
-int mlx5_flow_validate_action_drop(uint64_t action_flags,
+int mlx5_flow_validate_action_drop(struct rte_eth_dev *dev,
+				   bool is_root,
 				   const struct rte_flow_attr *attr,
 				   struct rte_flow_error *error);
 int mlx5_flow_validate_action_flag(uint64_t action_flags,
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 3d252f736b..22058ed980 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7579,7 +7579,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			rw_act_num += MLX5_ACT_NUM_SET_TAG;
 			break;
 		case RTE_FLOW_ACTION_TYPE_DROP:
-			ret = mlx5_flow_validate_action_drop(action_flags,
+			ret = mlx5_flow_validate_action_drop(dev, is_root,
 							     attr, error);
 			if (ret < 0)
 				return ret;
@@ -18916,7 +18916,7 @@ flow_dv_validate_mtr_policy_acts(struct rte_eth_dev *dev,
 				break;
 			case RTE_FLOW_ACTION_TYPE_DROP:
 				ret = mlx5_flow_validate_action_drop
-					(action_flags[i], attr, &flow_err);
+					(dev, false, attr, &flow_err);
 				if (ret < 0)
 					return -rte_mtr_error_set(error,
 					ENOTSUP,
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 28ea28bfbe..1e9c7cf7c5 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1280,14 +1280,14 @@ flow_verbs_validate(struct rte_eth_dev *dev,
 	uint16_t ether_type = 0;
 	bool is_empty_vlan = false;
 	uint16_t udp_dport = 0;
-	bool is_root;
+	/* Verbs interface does not support groups higher than 0. */
+	bool is_root = true;
 
 	if (items == NULL)
 		return -1;
 	ret = flow_verbs_validate_attributes(dev, attr, error);
 	if (ret < 0)
 		return ret;
-	is_root = ret;
 	for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
 		int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
 		int ret = 0;
@@ -1484,7 +1484,8 @@ flow_verbs_validate(struct rte_eth_dev *dev,
 			action_flags |= MLX5_FLOW_ACTION_MARK;
 			break;
 		case RTE_FLOW_ACTION_TYPE_DROP:
-			ret = mlx5_flow_validate_action_drop(action_flags,
+			ret = mlx5_flow_validate_action_drop(dev,
+							     is_root,
 							     attr,
 							     error);
 			if (ret < 0)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.984356100 +0800
+++ 0092-net-mlx5-fix-drop-action-attribute-validation.patch	2023-06-25 14:31:58.535773900 +0800
@@ -1 +1 @@
-From c1f0cdae14c5399cd6201e6cf39d5e51f60c6efb Mon Sep 17 00:00:00 2001
+From 255fcff79e8b8cefdbce7b12f0ff27fb7f9767bb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c1f0cdae14c5399cd6201e6cf39d5e51f60c6efb ]
@@ -39 +41,0 @@
-Cc: stable@dpdk.org
@@ -53 +55 @@
-index 980234e2ac..d8f1adfe3d 100644
+index 2cce0a7f0f..6fdade7dab 100644
@@ -56 +58 @@
-@@ -876,10 +876,10 @@ mlx5_flow_drop_action_config(struct rte_eth_dev *dev __rte_unused)
+@@ -873,10 +873,10 @@ mlx5_flow_drop_action_config(struct rte_eth_dev *dev __rte_unused)
@@ -70 +72 @@
-index 04febd3282..021049ad2b 100644
+index 16b33e1548..9f27e1dba4 100644
@@ -73 +75 @@
-@@ -1387,7 +1387,7 @@ struct mlx5_dev_ctx_shared {
+@@ -1367,7 +1367,7 @@ struct mlx5_dev_ctx_shared {
@@ -83 +85 @@
-index 8c76f1fa10..eb1d7a6be2 100644
+index 787dd02881..f4487bc136 100644
@@ -86 +88 @@
-@@ -1941,8 +1941,10 @@ mlx5_flow_validate_action_mark(const struct rte_flow_action *action,
+@@ -1903,8 +1903,10 @@ mlx5_flow_validate_action_mark(const struct rte_flow_action *action,
@@ -99 +101 @@
-@@ -1952,15 +1954,25 @@ mlx5_flow_validate_action_mark(const struct rte_flow_action *action,
+@@ -1914,15 +1916,25 @@ mlx5_flow_validate_action_mark(const struct rte_flow_action *action,
@@ -128 +130 @@
-index ff397a2a3b..02e33c7fb3 100644
+index 1f57ecd6e1..f4eecbcb0a 100644
@@ -131 +133 @@
-@@ -2290,7 +2290,8 @@ int mlx5_validate_action_rss(struct rte_eth_dev *dev,
+@@ -2226,7 +2226,8 @@ int mlx5_validate_action_rss(struct rte_eth_dev *dev,
@@ -142 +144 @@
-index 27e8b3a5a9..7535500870 100644
+index 3d252f736b..22058ed980 100644
@@ -145 +147 @@
-@@ -7826,7 +7826,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7579,7 +7579,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -154 +156 @@
-@@ -19248,7 +19248,7 @@ flow_dv_validate_mtr_policy_acts(struct rte_eth_dev *dev,
+@@ -18916,7 +18916,7 @@ flow_dv_validate_mtr_policy_acts(struct rte_eth_dev *dev,
@@ -164 +166 @@
-index b363fb4ad3..fe9c818abc 100644
+index 28ea28bfbe..1e9c7cf7c5 100644
@@ -167 +169 @@
-@@ -1317,14 +1317,14 @@ flow_verbs_validate(struct rte_eth_dev *dev,
+@@ -1280,14 +1280,14 @@ flow_verbs_validate(struct rte_eth_dev *dev,
@@ -184 +186 @@
-@@ -1531,7 +1531,8 @@ flow_verbs_validate(struct rte_eth_dev *dev,
+@@ -1484,7 +1484,8 @@ flow_verbs_validate(struct rte_eth_dev *dev,

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

* patch 'mempool/cnxk: avoid hang when counting batch allocs' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (91 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/mlx5: fix drop action attribute validation' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'common/cnxk: fix IPsec IPv6 tunnel address byte swap' " Xueming Li
                   ` (36 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Ashwin Sekhar T K; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9d1dbc6a017eb7cb18f83c0e6b1f24cbc8a1afbf Mon Sep 17 00:00:00 2001
From: Ashwin Sekhar T K <asekhar@marvell.com>
Date: Tue, 11 Apr 2023 12:51:46 +0530
Subject: [PATCH] mempool/cnxk: avoid hang when counting batch allocs
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6df1bc6b3b7e1b5d81dc26720a0f0593ed94995a ]

Avoid waiting indefinitely when counting batch alloc pointers by adding a
wait timeout.

Fixes: 8f2cd7946083 ("mempool/cnxk: add cn10k get count")

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
---
 drivers/common/cnxk/roc_npa.h            | 15 +++++++++------
 drivers/mempool/cnxk/cn10k_mempool_ops.c |  3 ++-
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/common/cnxk/roc_npa.h b/drivers/common/cnxk/roc_npa.h
index fed1942404..46b668a310 100644
--- a/drivers/common/cnxk/roc_npa.h
+++ b/drivers/common/cnxk/roc_npa.h
@@ -253,19 +253,23 @@ roc_npa_aura_batch_alloc_issue(uint64_t aura_handle, uint64_t *buf,
 }
 
 static inline void
-roc_npa_batch_alloc_wait(uint64_t *cache_line)
+roc_npa_batch_alloc_wait(uint64_t *cache_line, unsigned int wait_us)
 {
+	const uint64_t ticks = (uint64_t)wait_us * plt_tsc_hz() / (uint64_t)1E6;
+	const uint64_t start = plt_tsc_cycles();
+
 	/* Batch alloc status code is updated in bits [5:6] of the first word
 	 * of the 128 byte cache line.
 	 */
 	while (((__atomic_load_n(cache_line, __ATOMIC_RELAXED) >> 5) & 0x3) ==
 	       ALLOC_CCODE_INVAL)
-		;
+		if (wait_us && (plt_tsc_cycles() - start) >= ticks)
+			break;
 }
 
 static inline unsigned int
 roc_npa_aura_batch_alloc_count(uint64_t *aligned_buf, unsigned int num,
-			       unsigned int do_wait)
+			       unsigned int wait_us)
 {
 	unsigned int count, i;
 
@@ -279,8 +283,7 @@ roc_npa_aura_batch_alloc_count(uint64_t *aligned_buf, unsigned int num,
 
 		status = (struct npa_batch_alloc_status_s *)&aligned_buf[i];
 
-		if (do_wait)
-			roc_npa_batch_alloc_wait(&aligned_buf[i]);
+		roc_npa_batch_alloc_wait(&aligned_buf[i], wait_us);
 
 		count += status->count;
 	}
@@ -305,7 +308,7 @@ roc_npa_aura_batch_alloc_extract(uint64_t *buf, uint64_t *aligned_buf,
 
 		status = (struct npa_batch_alloc_status_s *)&aligned_buf[i];
 
-		roc_npa_batch_alloc_wait(&aligned_buf[i]);
+		roc_npa_batch_alloc_wait(&aligned_buf[i], 0);
 
 		line_count = status->count;
 
diff --git a/drivers/mempool/cnxk/cn10k_mempool_ops.c b/drivers/mempool/cnxk/cn10k_mempool_ops.c
index ba826f0f01..ff0015d8de 100644
--- a/drivers/mempool/cnxk/cn10k_mempool_ops.c
+++ b/drivers/mempool/cnxk/cn10k_mempool_ops.c
@@ -9,6 +9,7 @@
 
 #define BATCH_ALLOC_SZ              ROC_CN10K_NPA_BATCH_ALLOC_MAX_PTRS
 #define BATCH_OP_DATA_TABLE_MZ_NAME "batch_op_data_table_mz"
+#define BATCH_ALLOC_WAIT_US         5
 
 enum batch_op_status {
 	BATCH_ALLOC_OP_NOT_ISSUED = 0,
@@ -178,7 +179,7 @@ cn10k_mempool_get_count(const struct rte_mempool *mp)
 
 		if (mem->status == BATCH_ALLOC_OP_ISSUED)
 			count += roc_npa_aura_batch_alloc_count(
-				mem->objs, BATCH_ALLOC_SZ, 1);
+				mem->objs, BATCH_ALLOC_SZ, BATCH_ALLOC_WAIT_US);
 
 		if (mem->status == BATCH_ALLOC_OP_DONE)
 			count += mem->sz;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.025262900 +0800
+++ 0093-mempool-cnxk-avoid-hang-when-counting-batch-allocs.patch	2023-06-25 14:31:58.535773900 +0800
@@ -1 +1 @@
-From 6df1bc6b3b7e1b5d81dc26720a0f0593ed94995a Mon Sep 17 00:00:00 2001
+From 9d1dbc6a017eb7cb18f83c0e6b1f24cbc8a1afbf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6df1bc6b3b7e1b5d81dc26720a0f0593ed94995a ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index dd588b0322..1ef3ecc08a 100644
+index fed1942404..46b668a310 100644
@@ -22 +24 @@
-@@ -241,19 +241,23 @@ roc_npa_aura_batch_alloc_issue(uint64_t aura_handle, uint64_t *buf,
+@@ -253,19 +253,23 @@ roc_npa_aura_batch_alloc_issue(uint64_t aura_handle, uint64_t *buf,
@@ -49 +51 @@
-@@ -267,8 +271,7 @@ roc_npa_aura_batch_alloc_count(uint64_t *aligned_buf, unsigned int num,
+@@ -279,8 +283,7 @@ roc_npa_aura_batch_alloc_count(uint64_t *aligned_buf, unsigned int num,
@@ -59 +61 @@
-@@ -293,7 +296,7 @@ roc_npa_aura_batch_alloc_extract(uint64_t *buf, uint64_t *aligned_buf,
+@@ -305,7 +308,7 @@ roc_npa_aura_batch_alloc_extract(uint64_t *buf, uint64_t *aligned_buf,

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

* patch 'common/cnxk: fix IPsec IPv6 tunnel address byte swap' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (92 preceding siblings ...)
  2023-06-25  6:35 ` patch 'mempool/cnxk: avoid hang when counting batch allocs' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'event/cnxk: fix Tx adapter data pointer' " Xueming Li
                   ` (35 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Rahul Bhansali; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 46d6c05770dddd99b95f367f406b1d0874ee0299 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Thu, 18 May 2023 21:18:58 +0530
Subject: [PATCH] common/cnxk: fix IPsec IPv6 tunnel address byte swap
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 733e9db805c3317e2d158906afa4385744855844 ]

Fix the IPsec IPv6 tunnel address bytes swap during SA
configurations in session create/update.

Fixes: 78d03027f2cc ("common/cnxk: add IPsec common code")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/common/cnxk/cnxk_security.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c
index 85105472a1..bdb5433d13 100644
--- a/drivers/common/cnxk/cnxk_security.c
+++ b/drivers/common/cnxk/cnxk_security.c
@@ -274,6 +274,14 @@ ot_ipsec_inb_ctx_size(struct roc_ot_ipsec_inb_sa *sa)
 	return size;
 }
 
+static void
+ot_ipsec_update_ipv6_addr_endianness(uint64_t *addr)
+{
+	*addr = rte_be_to_cpu_64(*addr);
+	addr++;
+	*addr = rte_be_to_cpu_64(*addr);
+}
+
 static int
 ot_ipsec_inb_tunnel_hdr_fill(struct roc_ot_ipsec_inb_sa *sa,
 			     struct rte_security_ipsec_xform *ipsec_xfrm)
@@ -310,6 +318,10 @@ ot_ipsec_inb_tunnel_hdr_fill(struct roc_ot_ipsec_inb_sa *sa,
 		memcpy(&sa->outer_hdr.ipv6.dst_addr, &tunnel->ipv6.dst_addr,
 		       sizeof(struct in6_addr));
 
+		/* IP Source and Dest are in LE/CPU endian */
+		ot_ipsec_update_ipv6_addr_endianness((uint64_t *)&sa->outer_hdr.ipv6.src_addr);
+		ot_ipsec_update_ipv6_addr_endianness((uint64_t *)&sa->outer_hdr.ipv6.dst_addr);
+
 		break;
 	default:
 		return -EINVAL;
@@ -499,6 +511,10 @@ cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,
 		memcpy(&sa->outer_hdr.ipv6.dst_addr, &tunnel->ipv6.dst_addr,
 		       sizeof(struct in6_addr));
 
+		/* IP Source and Dest are in LE/CPU endian */
+		ot_ipsec_update_ipv6_addr_endianness((uint64_t *)&sa->outer_hdr.ipv6.src_addr);
+		ot_ipsec_update_ipv6_addr_endianness((uint64_t *)&sa->outer_hdr.ipv6.dst_addr);
+
 		/* Outer header flow label source */
 		if (!ipsec_xfrm->options.copy_flabel) {
 			sa->w2.s.ipv4_df_src_or_ipv6_flw_lbl_src =
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.047310500 +0800
+++ 0094-common-cnxk-fix-IPsec-IPv6-tunnel-address-byte-swap.patch	2023-06-25 14:31:58.545773900 +0800
@@ -1 +1 @@
-From 733e9db805c3317e2d158906afa4385744855844 Mon Sep 17 00:00:00 2001
+From 46d6c05770dddd99b95f367f406b1d0874ee0299 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 733e9db805c3317e2d158906afa4385744855844 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 79427d48fe..13ca2c7791 100644
+index 85105472a1..bdb5433d13 100644

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

* patch 'event/cnxk: fix Tx adapter data pointer' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (93 preceding siblings ...)
  2023-06-25  6:35 ` patch 'common/cnxk: fix IPsec IPv6 tunnel address byte swap' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'event/cnxk: fix mempool cookies check' " Xueming Li
                   ` (34 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Rahul Bhansali; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 338514e55879fbe9148070cc9938e86fa3b4324f Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Thu, 18 May 2023 21:19:00 +0530
Subject: [PATCH] event/cnxk: fix Tx adapter data pointer
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f862532a6035818e196b132f437ebcad484ed270 ]

event_inline_ipsec_autotest test application crashes when event inline IPsec
test ran for second time onwards. In case of event device cleanup,
Tx adapter data pointer is free but not set back to NULL, which causes
incomplete initialization on next run.

Fixes: 6a24c7c4bcd1 ("event/cnxk: add Tx adapter freeing")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/event/cnxk/cnxk_eventdev_adptr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/event/cnxk/cnxk_eventdev_adptr.c b/drivers/event/cnxk/cnxk_eventdev_adptr.c
index 5ec436382c..e78d215630 100644
--- a/drivers/event/cnxk/cnxk_eventdev_adptr.c
+++ b/drivers/event/cnxk/cnxk_eventdev_adptr.c
@@ -635,6 +635,7 @@ cnxk_sso_tx_adapter_free(uint8_t id __rte_unused,
 	if (dev->tx_adptr_data_sz && dev->tx_adptr_active_mask == 0) {
 		dev->tx_adptr_data_sz = 0;
 		free(dev->tx_adptr_data);
+		dev->tx_adptr_data = NULL;
 	}
 
 	return 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.071050700 +0800
+++ 0095-event-cnxk-fix-Tx-adapter-data-pointer.patch	2023-06-25 14:31:58.545773900 +0800
@@ -1 +1 @@
-From f862532a6035818e196b132f437ebcad484ed270 Mon Sep 17 00:00:00 2001
+From 338514e55879fbe9148070cc9938e86fa3b4324f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f862532a6035818e196b132f437ebcad484ed270 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 6d975362e8..9a02026ea6 100644
+index 5ec436382c..e78d215630 100644

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

* patch 'event/cnxk: fix mempool cookies check' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (94 preceding siblings ...)
  2023-06-25  6:35 ` patch 'event/cnxk: fix Tx adapter data pointer' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'common/cnxk: fix setting channel mask for SDP interfaces' " Xueming Li
                   ` (33 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Rahul Bhansali; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c1e167a07823cf4bbbb8cdd9df8113e0039eb18e Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Thu, 18 May 2023 21:19:01 +0530
Subject: [PATCH] event/cnxk: fix mempool cookies check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f575eda2c0dd72e6c6c76ed003e9bb652c571907 ]

Fix for mempool cookies get mark to be done before meta to mbuf processing.

Fixes: 7a709964d9bb ("net/cnxk: use NPA batch burst free for meta buffers")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/event/cnxk/cn10k_worker.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h
index df37ab6380..a93d40ed40 100644
--- a/drivers/event/cnxk/cn10k_worker.h
+++ b/drivers/event/cnxk/cn10k_worker.h
@@ -100,9 +100,6 @@ cn10k_wqe_to_mbuf(uint64_t wqe, const uint64_t __mbuf, uint8_t port_id,
 				   (flags & NIX_RX_OFFLOAD_TSTAMP_F ? 8 : 0);
 	struct rte_mbuf *mbuf = (struct rte_mbuf *)__mbuf;
 
-	/* Mark mempool obj as "get" as it is alloc'ed by NIX */
-	RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 1);
-
 	cn10k_nix_cqe_to_mbuf((struct nix_cqe_hdr_s *)wqe, tag,
 			      (struct rte_mbuf *)mbuf, lookup_mem,
 			      mbuf_init | ((uint64_t)port_id) << 48, flags);
@@ -239,6 +236,10 @@ cn10k_sso_hws_post_process(struct cn10k_sso_hws *ws, uint64_t *u64,
 
 		mbuf = u64[1] - sizeof(struct rte_mbuf);
 		rte_prefetch0((void *)mbuf);
+
+		/* Mark mempool obj as "get" as it is alloc'ed by NIX */
+		RTE_MEMPOOL_CHECK_COOKIES(((struct rte_mbuf *)mbuf)->pool, (void **)&mbuf, 1, 1);
+
 		if (flags & NIX_RX_OFFLOAD_SECURITY_F) {
 			const uint64_t mbuf_init =
 				0x100010000ULL | RTE_PKTMBUF_HEADROOM |
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.092656400 +0800
+++ 0096-event-cnxk-fix-mempool-cookies-check.patch	2023-06-25 14:31:58.545773900 +0800
@@ -1 +1 @@
-From f575eda2c0dd72e6c6c76ed003e9bb652c571907 Mon Sep 17 00:00:00 2001
+From c1e167a07823cf4bbbb8cdd9df8113e0039eb18e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f575eda2c0dd72e6c6c76ed003e9bb652c571907 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 071b216d33..24bdba6ffa 100644
+index df37ab6380..a93d40ed40 100644
@@ -20 +22 @@
-@@ -22,9 +22,6 @@ cn10k_wqe_to_mbuf(uint64_t wqe, const uint64_t __mbuf, uint8_t port_id,
+@@ -100,9 +100,6 @@ cn10k_wqe_to_mbuf(uint64_t wqe, const uint64_t __mbuf, uint8_t port_id,
@@ -30 +32 @@
-@@ -164,6 +161,10 @@ cn10k_sso_hws_post_process(struct cn10k_sso_hws *ws, uint64_t *u64,
+@@ -239,6 +236,10 @@ cn10k_sso_hws_post_process(struct cn10k_sso_hws *ws, uint64_t *u64,

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

* patch 'common/cnxk: fix setting channel mask for SDP interfaces' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (95 preceding siblings ...)
  2023-06-25  6:35 ` patch 'event/cnxk: fix mempool cookies check' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'common/cnxk: fix uninitialized pointer read' " Xueming Li
                   ` (32 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 103a33d02dfc71fe09d0feca85d8005b3b457466 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Thu, 18 May 2023 15:34:51 +0530
Subject: [PATCH] common/cnxk: fix setting channel mask for SDP interfaces
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2703f1fa3200d9855686e2cb451bf95e10838ec0 ]

Channel mask for SDP interfaces are by default set to
a constant value. Fix this by setting mask calculated
from the channel base and channel count configured in
NIX LF.

Fixes: f13756633330 ("common/cnxk: support setting channel mask for SDP interfaces")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/common/cnxk/roc_npc.c | 40 ++++++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 10 deletions(-)

diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index bf7fb90f17..5e1ca6bc03 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -1242,12 +1242,39 @@ npc_vtag_action_program(struct roc_npc *roc_npc,
 	return 0;
 }
 
+static void
+roc_npc_sdp_channel_get(struct roc_npc *roc_npc, uint16_t *chan_base, uint16_t *chan_mask)
+{
+	struct roc_nix *roc_nix = roc_npc->roc_nix;
+	struct nix *nix = roc_nix_to_nix_priv(roc_nix);
+	uint16_t num_chan, range, num_bits = 0;
+	uint16_t mask = 0;
+
+	*chan_base = nix->rx_chan_base;
+	num_chan = nix->rx_chan_cnt - 1;
+	if (num_chan) {
+		range = *chan_base ^ (*chan_base + num_chan);
+		num_bits = (sizeof(uint32_t) * 8) - __builtin_clz(range) - 1;
+		/* Set mask for (15 - numbits) MSB bits */
+		*chan_mask = (uint16_t)~GENMASK(num_bits, 0);
+	} else {
+		*chan_mask = (uint16_t)GENMASK(15, 0);
+	}
+
+	mask = (uint16_t)GENMASK(num_bits, 0);
+	if (mask > num_chan + 1)
+		plt_warn(
+			"npc: SDP channel base:%x, channel count:%x. channel mask:%x covers more than channel count",
+			*chan_base, nix->rx_chan_cnt, *chan_mask);
+}
+
 struct roc_npc_flow *
 roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
 		    const struct roc_npc_item_info pattern[],
 		    const struct roc_npc_action actions[], int *errcode)
 {
 	struct npc *npc = roc_npc_to_npc_priv(roc_npc);
+	uint16_t sdp_chan_base = 0, sdp_chan_mask = 0;
 	struct roc_npc_flow *flow, *flow_iter;
 	struct npc_parse_state parse_state;
 	struct npc_flow_list *list;
@@ -1260,16 +1287,9 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
 			npc->sdp_channel = roc_npc->sdp_channel;
 			npc->sdp_channel_mask = roc_npc->sdp_channel_mask;
 		} else {
-			/* By default set the channel and mask to cover
-			 * the whole SDP channel range.
-			 */
-			if (roc_model_is_cn10k()) {
-				npc->sdp_channel = (uint16_t)CN10K_SDP_CH_START;
-				npc->sdp_channel_mask = (uint16_t)CN10K_SDP_CH_MASK;
-			} else {
-				npc->sdp_channel = (uint16_t)NIX_CHAN_SDP_CH_START;
-				npc->sdp_channel_mask = (uint16_t)NIX_CHAN_SDP_CH_START;
-			}
+			roc_npc_sdp_channel_get(roc_npc, &sdp_chan_base, &sdp_chan_mask);
+			npc->sdp_channel = sdp_chan_base;
+			npc->sdp_channel_mask = sdp_chan_mask;
 		}
 	}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.114329300 +0800
+++ 0097-common-cnxk-fix-setting-channel-mask-for-SDP-interfa.patch	2023-06-25 14:31:58.545773900 +0800
@@ -1 +1 @@
-From 2703f1fa3200d9855686e2cb451bf95e10838ec0 Mon Sep 17 00:00:00 2001
+From 103a33d02dfc71fe09d0feca85d8005b3b457466 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2703f1fa3200d9855686e2cb451bf95e10838ec0 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index ba75207955..d556b4c3a5 100644
+index bf7fb90f17..5e1ca6bc03 100644
@@ -24,2 +26,2 @@
-@@ -1388,12 +1388,39 @@ npc_inline_dev_ipsec_action_free(struct npc *npc, struct roc_npc_flow *flow)
- 	return 1;
+@@ -1242,12 +1242,39 @@ npc_vtag_action_program(struct roc_npc *roc_npc,
+ 	return 0;
@@ -64 +66 @@
-@@ -1406,16 +1433,9 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
+@@ -1260,16 +1287,9 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,

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

* patch 'common/cnxk: fix uninitialized pointer read' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (96 preceding siblings ...)
  2023-06-25  6:35 ` patch 'common/cnxk: fix setting channel mask for SDP interfaces' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'common/cnxk: fix inline device VF identification' " Xueming Li
                   ` (31 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d0f357fb6eacdfb0c2d474ba455d861212d90f88 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Thu, 18 May 2023 15:34:52 +0530
Subject: [PATCH] common/cnxk: fix uninitialized pointer read
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0e5d72c422d2e84a158633a4fc7f8c2ce902b199 ]

Fix uninitialized pointer read reported in coverity scan.

Coverity issue: 375811
Fixes: 84d2ea9d4fb3 ("common/cnxk: support custom pre L2 header parsing as raw")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/common/cnxk/roc_npc_parse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index 50e663105f..e695b755d7 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -97,6 +97,7 @@ npc_parse_pre_l2(struct npc_parse_state *pst)
 		(const struct roc_npc_flow_item_raw *)pst->pattern->mask, &info,
 		raw_spec_buf, raw_mask_buf);
 
+	info.def_mask = NULL;
 	info.hw_mask = &hw_mask;
 	npc_get_hw_supp_mask(pst, &info, lid, lt);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.136826300 +0800
+++ 0098-common-cnxk-fix-uninitialized-pointer-read.patch	2023-06-25 14:31:58.545773900 +0800
@@ -1 +1 @@
-From 0e5d72c422d2e84a158633a4fc7f8c2ce902b199 Mon Sep 17 00:00:00 2001
+From d0f357fb6eacdfb0c2d474ba455d861212d90f88 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0e5d72c422d2e84a158633a4fc7f8c2ce902b199 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index f746b9cb6d..571fdb36fc 100644
+index 50e663105f..e695b755d7 100644

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

* patch 'common/cnxk: fix inline device VF identification' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (97 preceding siblings ...)
  2023-06-25  6:35 ` patch 'common/cnxk: fix uninitialized pointer read' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'common/cnxk: fix receive queue with multiple mask' " Xueming Li
                   ` (30 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6cbb5fc9114a6d38226f947245f64b14f628cbdc Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Thu, 25 May 2023 15:28:56 +0530
Subject: [PATCH] common/cnxk: fix inline device VF identification
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d71d40c1051ba22b8f0c1536225810d7d65dfefc ]

Fix inline device VF identification so that the right
mailbox region is used.

Fixes: ee48f711f3b0 ("common/cnxk: support NIX inline inbound and outbound setup")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/common/cnxk/roc_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c
index 59128a3552..33865f43fa 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -969,6 +969,7 @@ dev_vf_hwcap_update(struct plt_pci_device *pci_dev, struct dev *dev)
 	case PCI_DEVID_CNXK_RVU_AF_VF:
 	case PCI_DEVID_CNXK_RVU_VF:
 	case PCI_DEVID_CNXK_RVU_SDP_VF:
+	case PCI_DEVID_CNXK_RVU_NIX_INL_VF:
 		dev->hwcap |= DEV_HWCAP_F_VF;
 		break;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.159217000 +0800
+++ 0099-common-cnxk-fix-inline-device-VF-identification.patch	2023-06-25 14:31:58.545773900 +0800
@@ -1 +1 @@
-From d71d40c1051ba22b8f0c1536225810d7d65dfefc Mon Sep 17 00:00:00 2001
+From 6cbb5fc9114a6d38226f947245f64b14f628cbdc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d71d40c1051ba22b8f0c1536225810d7d65dfefc ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 3125f9dda2..d87b00e7e8 100644
+index 59128a3552..33865f43fa 100644
@@ -21 +23 @@
-@@ -1001,6 +1001,7 @@ dev_vf_hwcap_update(struct plt_pci_device *pci_dev, struct dev *dev)
+@@ -969,6 +969,7 @@ dev_vf_hwcap_update(struct plt_pci_device *pci_dev, struct dev *dev)

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

* patch 'common/cnxk: fix receive queue with multiple mask' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (98 preceding siblings ...)
  2023-06-25  6:35 ` patch 'common/cnxk: fix inline device VF identification' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/qede: fix RSS indirection table initialization' " Xueming Li
                   ` (29 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Rakesh Kudurumalla; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From df11a52e33ef9809d7101de983a77ca4ecc9579c Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Thu, 25 May 2023 15:29:01 +0530
Subject: [PATCH] common/cnxk: fix receive queue with multiple mask
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 67a6aa03b97214e1198a3b9e85995560342456d0 ]

Enable or disable RQ mask based on function parameter.
This fix allocates different profile for different rq masks

Fixes: ddf955d3917e ("common/cnxk: support CPT second pass")

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/common/cnxk/roc_nix_inl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index 782536db4c..92ff44888d 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -1039,7 +1039,7 @@ roc_nix_inl_rq_ena_dis(struct roc_nix *roc_nix, bool enable)
 		return -EFAULT;
 
 	if (roc_model_is_cn10kb_a0()) {
-		rc = nix_inl_rq_mask_cfg(roc_nix, true);
+		rc = nix_inl_rq_mask_cfg(roc_nix, enable);
 		if (rc) {
 			plt_err("Failed to get rq mask rc=%d", rc);
 			return rc;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.182480100 +0800
+++ 0100-common-cnxk-fix-receive-queue-with-multiple-mask.patch	2023-06-25 14:31:58.545773900 +0800
@@ -1 +1 @@
-From 67a6aa03b97214e1198a3b9e85995560342456d0 Mon Sep 17 00:00:00 2001
+From df11a52e33ef9809d7101de983a77ca4ecc9579c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 67a6aa03b97214e1198a3b9e85995560342456d0 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 69f658ba87..16f858f561 100644
+index 782536db4c..92ff44888d 100644
@@ -21 +23 @@
-@@ -1382,7 +1382,7 @@ roc_nix_inl_rq_ena_dis(struct roc_nix *roc_nix, bool enable)
+@@ -1039,7 +1039,7 @@ roc_nix_inl_rq_ena_dis(struct roc_nix *roc_nix, bool enable)
@@ -24 +26 @@
- 	if (roc_feature_nix_has_inl_rq_mask()) {
+ 	if (roc_model_is_cn10kb_a0()) {

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

* patch 'net/qede: fix RSS indirection table initialization' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (99 preceding siblings ...)
  2023-06-25  6:35 ` patch 'common/cnxk: fix receive queue with multiple mask' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'doc: fix typo in cnxk platform guide' " Xueming Li
                   ` (28 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Devendra Singh Rawat; +Cc: Alok Prasad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d9ba8a425140603c073f2383e9c5c8d07839e63c Mon Sep 17 00:00:00 2001
From: Devendra Singh Rawat <dsinghrawat@marvell.com>
Date: Thu, 25 May 2023 19:24:21 +0530
Subject: [PATCH] net/qede: fix RSS indirection table initialization
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 189183f4d7f2a22b9335ff8eede1c763bb356e5c ]

RSS indirection table was not updated for VF ports during RSS hash
update, this resulted in device start failure.
This fix sets update RSS indirection table in VFPF channel request,
sent for updating RSS hash for VF.

Fixes: 7ab35bf6b97b ("net/qede: fix RSS")

Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Alok Prasad <palok@marvell.com>
---
 drivers/net/qede/qede_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index a4923670d6..22cd470646 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2142,6 +2142,7 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
 		rss_params.rss_enable = 1;
 	}
 
+	rss_params.update_rss_ind_table = 1;
 	rss_params.update_rss_config = 1;
 	/* tbl_size has to be set with capabilities */
 	rss_params.rss_table_size_log = 7;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.205879700 +0800
+++ 0101-net-qede-fix-RSS-indirection-table-initialization.patch	2023-06-25 14:31:58.545773900 +0800
@@ -1 +1 @@
-From 189183f4d7f2a22b9335ff8eede1c763bb356e5c Mon Sep 17 00:00:00 2001
+From d9ba8a425140603c073f2383e9c5c8d07839e63c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 189183f4d7f2a22b9335ff8eede1c763bb356e5c ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'doc: fix typo in cnxk platform guide' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (100 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/qede: fix RSS indirection table initialization' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/i40e: fix Rx data buffer size' " Xueming Li
                   ` (27 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Thierry Herbelot; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 65303f7c26ae750090134eb5b23d0b5cf1bbc570 Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot@6wind.com>
Date: Fri, 2 Jun 2023 18:21:45 +0200
Subject: [PATCH] doc: fix typo in cnxk platform guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 443000992bc937d4686a37e4eef9c66b6b3ce642 ]

The Linux kernel option has an added underscore.

Fixes: 14ad4f018453 ("doc: add Marvell OCTEON TX2 platform guide")

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
 doc/guides/platform/cnxk.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/platform/cnxk.rst b/doc/guides/platform/cnxk.rst
index aadd60b5d4..0eafde71d6 100644
--- a/doc/guides/platform/cnxk.rst
+++ b/doc/guides/platform/cnxk.rst
@@ -253,7 +253,7 @@ context or stats using debugfs.
 
 Enable ``debugfs`` by:
 
-1. Compile kernel with debugfs enabled, i.e ``CONFIG_DEBUGFS=y``.
+1. Compile kernel with debugfs enabled, i.e ``CONFIG_DEBUG_FS=y``.
 2. Boot OCTEON CN9K/CN10K with debugfs supported kernel.
 3. Verify ``debugfs`` mounted by default "mount | grep -i debugfs" or mount it manually by using.
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.229065700 +0800
+++ 0102-doc-fix-typo-in-cnxk-platform-guide.patch	2023-06-25 14:31:58.545773900 +0800
@@ -1 +1 @@
-From 443000992bc937d4686a37e4eef9c66b6b3ce642 Mon Sep 17 00:00:00 2001
+From 65303f7c26ae750090134eb5b23d0b5cf1bbc570 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 443000992bc937d4686a37e4eef9c66b6b3ce642 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 4a1966c66b..b3aa4de09d 100644
+index aadd60b5d4..0eafde71d6 100644
@@ -20 +22 @@
-@@ -258,7 +258,7 @@ context or stats using debugfs.
+@@ -253,7 +253,7 @@ context or stats using debugfs.

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

* patch 'net/i40e: fix Rx data buffer size' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (101 preceding siblings ...)
  2023-06-25  6:35 ` patch 'doc: fix typo in cnxk platform guide' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/ice: " Xueming Li
                   ` (26 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7a72db6add7409b907b499d8b05266175dbdf589 Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Fri, 14 Apr 2023 13:47:40 +0800
Subject: [PATCH] net/i40e: fix Rx data buffer size
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ff2ec0ce04739240205628207881a91e1e330cb7 ]

According to hardware spec, the data buffer size should not
be greater than 16K - 128.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx.c | 2 ++
 drivers/net/i40e/i40e_rxtx.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 788ffb51c2..fbbefb5015 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2904,6 +2904,8 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq)
 		rxq->rx_hdr_len = 0;
 		rxq->rx_buf_len = RTE_ALIGN_FLOOR(buf_size,
 			(1 << I40E_RXQ_CTX_DBUFF_SHIFT));
+		rxq->rx_buf_len = RTE_MIN(rxq->rx_buf_len,
+					  I40E_RX_MAX_DATA_BUF_SIZE);
 		rxq->hs_mode = i40e_header_split_none;
 		break;
 	}
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 5e6eecc501..0376c219be 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -21,6 +21,9 @@
 /* In none-PXE mode QLEN must be whole number of 32 descriptors. */
 #define	I40E_ALIGN_RING_DESC	32
 
+/* Max data buffer size must be 16K - 128 bytes */
+#define I40E_RX_MAX_DATA_BUF_SIZE	(16 * 1024 - 128)
+
 #define	I40E_MIN_RING_DESC	64
 #define	I40E_MAX_RING_DESC	4096
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.250955900 +0800
+++ 0103-net-i40e-fix-Rx-data-buffer-size.patch	2023-06-25 14:31:58.545773900 +0800
@@ -1 +1 @@
-From ff2ec0ce04739240205628207881a91e1e330cb7 Mon Sep 17 00:00:00 2001
+From 7a72db6add7409b907b499d8b05266175dbdf589 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ff2ec0ce04739240205628207881a91e1e330cb7 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice: fix Rx data buffer size' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (102 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/i40e: fix Rx data buffer size' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/iavf: " Xueming Li
                   ` (25 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1f9af08714704c809c38e81aea2ad9826d062efa Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Fri, 14 Apr 2023 13:47:41 +0800
Subject: [PATCH] net/ice: fix Rx data buffer size
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9a5c9dc475428c7d2c74383c0903541ab80144ea ]

This patch does two fixes.

1. According to hardware spec, the data buffer size should not
be greater than 16K - 128.

2. Replace RTE_ALIGN with RTE_ALIGN_FLOOR according to [1].

[1] Commit c9c45beb1b97 ("net/iavf: fix Rx queue buffer size alignment")

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Fixes: 1b009275e2c8 ("net/ice: add Rx queue init in DCF")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_dcf_ethdev.c | 3 ++-
 drivers/net/ice/ice_rxtx.c       | 3 ++-
 drivers/net/ice/ice_rxtx.h       | 3 +++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index dcbf2af5b0..7304ea721c 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -115,7 +115,8 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq)
 
 	buf_size = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM;
 	rxq->rx_hdr_len = 0;
-	rxq->rx_buf_len = RTE_ALIGN(buf_size, (1 << ICE_RLAN_CTX_DBUF_S));
+	rxq->rx_buf_len = RTE_ALIGN_FLOOR(buf_size, (1 << ICE_RLAN_CTX_DBUF_S));
+	rxq->rx_buf_len = RTE_MIN(rxq->rx_buf_len, ICE_RX_MAX_DATA_BUF_SIZE);
 	max_pkt_len = RTE_MIN(ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len,
 			      dev->data->mtu + ICE_ETH_OVERHEAD);
 
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 0ea0045836..560c1a4af7 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -259,7 +259,8 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
 	/* Set buffer size as the head split is disabled. */
 	buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rxq->mp) -
 			      RTE_PKTMBUF_HEADROOM);
-	rxq->rx_buf_len = RTE_ALIGN(buf_size, (1 << ICE_RLAN_CTX_DBUF_S));
+	rxq->rx_buf_len = RTE_ALIGN_FLOOR(buf_size, (1 << ICE_RLAN_CTX_DBUF_S));
+	rxq->rx_buf_len = RTE_MIN(rxq->rx_buf_len, ICE_RX_MAX_DATA_BUF_SIZE);
 	rxq->max_pkt_len =
 		RTE_MIN((uint32_t)ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len,
 			frame_size);
diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
index 94f6bcf3d1..89569029e1 100644
--- a/drivers/net/ice/ice_rxtx.h
+++ b/drivers/net/ice/ice_rxtx.h
@@ -51,6 +51,9 @@ extern int ice_timestamp_dynfield_offset;
 /* Max header size can be 2K - 64 bytes */
 #define ICE_RX_HDR_BUF_SIZE    (2048 - 64)
 
+/* Max data buffer size must be 16K - 128 bytes */
+#define ICE_RX_MAX_DATA_BUF_SIZE	(16 * 1024 - 128)
+
 #define ICE_HEADER_SPLIT_ENA   BIT(0)
 
 typedef void (*ice_rx_release_mbufs_t)(struct ice_rx_queue *rxq);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.280045500 +0800
+++ 0104-net-ice-fix-Rx-data-buffer-size.patch	2023-06-25 14:31:58.555773900 +0800
@@ -1 +1 @@
-From 9a5c9dc475428c7d2c74383c0903541ab80144ea Mon Sep 17 00:00:00 2001
+From 1f9af08714704c809c38e81aea2ad9826d062efa Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9a5c9dc475428c7d2c74383c0903541ab80144ea ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 13ff24552d..76b28bface 100644
+index dcbf2af5b0..7304ea721c 100644
@@ -31 +33 @@
-@@ -114,7 +114,8 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq)
+@@ -115,7 +115,8 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq)

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

* patch 'net/iavf: fix Rx data buffer size' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (103 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/ice: " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/idpf: " Xueming Li
                   ` (24 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 78c374bf4155002170bc118f59027b3d30a4a1e2 Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Fri, 14 Apr 2023 13:47:42 +0800
Subject: [PATCH] net/iavf: fix Rx data buffer size
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c5549f1d9b1bf2bf2b09517daf89c84fbf5b18e0 ]

According to hardware spec, the data buffer size should not
be greater than 16K - 128.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 1 +
 drivers/net/iavf/iavf_rxtx.h | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 3d9224b38d..4a38a7b985 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -654,6 +654,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 
 	len = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM;
 	rxq->rx_buf_len = RTE_ALIGN_FLOOR(len, (1 << IAVF_RXQ_CTX_DBUFF_SHIFT));
+	rxq->rx_buf_len = RTE_MIN(rxq->rx_buf_len, IAVF_RX_MAX_DATA_BUF_SIZE);
 
 	/* Allocate the software ring. */
 	len = nb_desc + IAVF_RX_MAX_BURST;
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index a6ad88885b..2c4d8e2700 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -16,6 +16,9 @@
 /* used for Rx Bulk Allocate */
 #define IAVF_RX_MAX_BURST         32
 
+/* Max data buffer size must be 16K - 128 bytes */
+#define IAVF_RX_MAX_DATA_BUF_SIZE (16 * 1024 - 128)
+
 /* used for Vector PMD */
 #define IAVF_VPMD_RX_MAX_BURST    32
 #define IAVF_VPMD_TX_MAX_BURST    32
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.306344800 +0800
+++ 0105-net-iavf-fix-Rx-data-buffer-size.patch	2023-06-25 14:31:58.555773900 +0800
@@ -1 +1 @@
-From c5549f1d9b1bf2bf2b09517daf89c84fbf5b18e0 Mon Sep 17 00:00:00 2001
+From 78c374bf4155002170bc118f59027b3d30a4a1e2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c5549f1d9b1bf2bf2b09517daf89c84fbf5b18e0 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index b1d0fbceb6..0db3aabd92 100644
+index 3d9224b38d..4a38a7b985 100644
@@ -23 +25 @@
-@@ -697,6 +697,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+@@ -654,6 +654,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
@@ -32 +34 @@
-index 09e2127db0..f205a2aaf1 100644
+index a6ad88885b..2c4d8e2700 100644

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

* patch 'net/idpf: fix Rx data buffer size' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (104 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/iavf: " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'common/idpf: remove device stop flag' " Xueming Li
                   ` (23 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c86c1efd2f380e03010cf3f47306b2d8939bf119 Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Fri, 14 Apr 2023 13:47:43 +0800
Subject: [PATCH] net/idpf: fix Rx data buffer size
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4fc6c4d96dacc0af9733a0474061328be14f9a52 ]

This patch does two fixes.

1. According to hardware spec, the data buffer size should not
   be greater than 16K - 128.
2. Align data buffer size to 128.

Fixes: 9c47c29739a1 ("net/idpf: add Rx queue setup")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/idpf/idpf_rxtx.c | 6 ++++--
 drivers/net/idpf/idpf_rxtx.h | 3 +++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c
index 1cbd5be8cc..ceb34d4d32 100644
--- a/drivers/net/idpf/idpf_rxtx.c
+++ b/drivers/net/idpf/idpf_rxtx.c
@@ -374,7 +374,8 @@ idpf_rx_split_bufq_setup(struct rte_eth_dev *dev, struct idpf_rx_queue *bufq,
 	bufq->adapter = adapter;
 
 	len = rte_pktmbuf_data_room_size(bufq->mp) - RTE_PKTMBUF_HEADROOM;
-	bufq->rx_buf_len = len;
+	bufq->rx_buf_len = RTE_ALIGN_FLOOR(len, (1 << IDPF_RLAN_CTX_DBUF_S));
+	bufq->rx_buf_len = RTE_MIN(bufq->rx_buf_len, IDPF_RX_MAX_DATA_BUF_SIZE);
 
 	/* Allocate the software ring. */
 	len = nb_desc + IDPF_RX_MAX_BURST;
@@ -473,7 +474,8 @@ idpf_rx_split_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	rxq->offloads = offloads;
 
 	len = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM;
-	rxq->rx_buf_len = len;
+	rxq->rx_buf_len = RTE_ALIGN_FLOOR(len, (1 << IDPF_RLAN_CTX_DBUF_S));
+	rxq->rx_buf_len = RTE_MIN(rxq->rx_buf_len, IDPF_RX_MAX_DATA_BUF_SIZE);
 
 	len = rxq->nb_rx_desc + IDPF_RX_MAX_BURST;
 	ring_size = RTE_ALIGN(len *
diff --git a/drivers/net/idpf/idpf_rxtx.h b/drivers/net/idpf/idpf_rxtx.h
index 730dc64ebc..1c5b5b7c38 100644
--- a/drivers/net/idpf/idpf_rxtx.h
+++ b/drivers/net/idpf/idpf_rxtx.h
@@ -6,6 +6,9 @@
 #define _IDPF_RXTX_H_
 
 #include "idpf_ethdev.h"
+#define IDPF_RLAN_CTX_DBUF_S	7
+#define IDPF_RX_MAX_DATA_BUF_SIZE	(16 * 1024 - 128)
+
 
 /* MTS */
 #define GLTSYN_CMD_SYNC_0_0	(PF_TIMESYNC_BASE + 0x0)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.331250200 +0800
+++ 0106-net-idpf-fix-Rx-data-buffer-size.patch	2023-06-25 14:31:58.555773900 +0800
@@ -1 +1 @@
-From 4fc6c4d96dacc0af9733a0474061328be14f9a52 Mon Sep 17 00:00:00 2001
+From c86c1efd2f380e03010cf3f47306b2d8939bf119 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4fc6c4d96dacc0af9733a0474061328be14f9a52 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +20,2 @@
- drivers/common/idpf/idpf_common_rxtx.h | 3 +++
- drivers/net/idpf/idpf_rxtx.c           | 6 ++++--
+ drivers/net/idpf/idpf_rxtx.c | 6 ++++--
+ drivers/net/idpf/idpf_rxtx.h | 3 +++
@@ -22,14 +23,0 @@
-diff --git a/drivers/common/idpf/idpf_common_rxtx.h b/drivers/common/idpf/idpf_common_rxtx.h
-index 11260d07f9..6cb83fc0a6 100644
---- a/drivers/common/idpf/idpf_common_rxtx.h
-+++ b/drivers/common/idpf/idpf_common_rxtx.h
-@@ -34,6 +34,9 @@
- #define IDPF_MAX_TSO_FRAME_SIZE	262143
- #define IDPF_TX_MAX_MTU_SEG     10
- 
-+#define IDPF_RLAN_CTX_DBUF_S	7
-+#define IDPF_RX_MAX_DATA_BUF_SIZE	(16 * 1024 - 128)
-+
- #define IDPF_TX_CKSUM_OFFLOAD_MASK (		\
- 		RTE_MBUF_F_TX_IP_CKSUM |	\
- 		RTE_MBUF_F_TX_L4_MASK |		\
@@ -37 +25 @@
-index 414f9a37f6..3e3d81ca6d 100644
+index 1cbd5be8cc..ceb34d4d32 100644
@@ -40 +28 @@
-@@ -155,7 +155,8 @@ idpf_rx_split_bufq_setup(struct rte_eth_dev *dev, struct idpf_rx_queue *rxq,
+@@ -374,7 +374,8 @@ idpf_rx_split_bufq_setup(struct rte_eth_dev *dev, struct idpf_rx_queue *bufq,
@@ -48 +36 @@
- 	/* Allocate a little more to support bulk allocate. */
+ 	/* Allocate the software ring. */
@@ -50,2 +38,2 @@
-@@ -275,7 +276,8 @@ idpf_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
- 	rxq->offloads = idpf_rx_offload_convert(offloads);
+@@ -473,7 +474,8 @@ idpf_rx_split_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+ 	rxq->offloads = offloads;
@@ -58,2 +46,16 @@
- 	/* Allocate a little more to support bulk allocate. */
- 	len = nb_desc + IDPF_RX_MAX_BURST;
+ 	len = rxq->nb_rx_desc + IDPF_RX_MAX_BURST;
+ 	ring_size = RTE_ALIGN(len *
+diff --git a/drivers/net/idpf/idpf_rxtx.h b/drivers/net/idpf/idpf_rxtx.h
+index 730dc64ebc..1c5b5b7c38 100644
+--- a/drivers/net/idpf/idpf_rxtx.h
++++ b/drivers/net/idpf/idpf_rxtx.h
+@@ -6,6 +6,9 @@
+ #define _IDPF_RXTX_H_
+ 
+ #include "idpf_ethdev.h"
++#define IDPF_RLAN_CTX_DBUF_S	7
++#define IDPF_RX_MAX_DATA_BUF_SIZE	(16 * 1024 - 128)
++
+ 
+ /* MTS */
+ #define GLTSYN_CMD_SYNC_0_0	(PF_TIMESYNC_BASE + 0x0)

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

* patch 'common/idpf: remove device stop flag' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (105 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/idpf: " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'common/idpf/base: fix control queue send and receive' " Xueming Li
                   ` (22 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1bfcca5b651551437b869401b7c9a5a53588ab0b Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 20 Apr 2023 11:57:24 -0400
Subject: [PATCH] common/idpf: remove device stop flag
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cf0a881e0b8513ed4c1ee83d9e32680d3403a455 ]

Remove device stop flag, as we already have dev->data-dev_started.
This also fixed the issue when close port directly without start it
first, some error message will be reported in dev_stop.

Fixes: 14aa6ed8f2ec ("net/idpf: support device start and stop")
Fixes: 1082a773a86b ("common/idpf: add vport structure")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/idpf/idpf_ethdev.c | 6 +-----
 drivers/net/idpf/idpf_ethdev.h | 2 --
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
index 67d2d49490..b31cb47e90 100644
--- a/drivers/net/idpf/idpf_ethdev.c
+++ b/drivers/net/idpf/idpf_ethdev.c
@@ -563,8 +563,6 @@ idpf_dev_start(struct rte_eth_dev *dev)
 	uint16_t req_vecs_num;
 	int ret;
 
-	vport->stopped = 0;
-
 	if (dev->data->mtu > vport->max_mtu) {
 		PMD_DRV_LOG(ERR, "MTU should be less than %d", vport->max_mtu);
 		ret = -EINVAL;
@@ -622,7 +620,7 @@ idpf_dev_stop(struct rte_eth_dev *dev)
 {
 	struct idpf_vport *vport = dev->data->dev_private;
 
-	if (vport->stopped == 1)
+	if (dev->data->dev_started == 0)
 		return 0;
 
 	idpf_vc_ena_dis_vport(vport, false);
@@ -634,8 +632,6 @@ idpf_dev_stop(struct rte_eth_dev *dev)
 	if (vport->recv_vectors != NULL)
 		idpf_vc_dealloc_vectors(vport);
 
-	vport->stopped = 1;
-
 	return 0;
 }
 
diff --git a/drivers/net/idpf/idpf_ethdev.h b/drivers/net/idpf/idpf_ethdev.h
index 991677c3bc..5633057a81 100644
--- a/drivers/net/idpf/idpf_ethdev.h
+++ b/drivers/net/idpf/idpf_ethdev.h
@@ -128,7 +128,6 @@ struct idpf_vport {
 
 	uint16_t devarg_id;
 
-	bool stopped;
 };
 
 struct idpf_adapter {
@@ -164,7 +163,6 @@ struct idpf_adapter {
 	uint32_t max_txq_per_msg;
 
 	uint32_t ptype_tbl[IDPF_MAX_PKT_TYPE] __rte_cache_min_aligned;
-
 	bool rx_vec_allowed;
 	bool tx_vec_allowed;
 	bool rx_use_avx512;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.364044700 +0800
+++ 0107-common-idpf-remove-device-stop-flag.patch	2023-06-25 14:31:58.555773900 +0800
@@ -1 +1 @@
-From cf0a881e0b8513ed4c1ee83d9e32680d3403a455 Mon Sep 17 00:00:00 2001
+From 1bfcca5b651551437b869401b7c9a5a53588ab0b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cf0a881e0b8513ed4c1ee83d9e32680d3403a455 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,4 +19,3 @@
- drivers/common/idpf/idpf_common_device.h | 2 --
- drivers/net/cpfl/cpfl_ethdev.c           | 6 +-----
- drivers/net/idpf/idpf_ethdev.c           | 6 +-----
- 3 files changed, 2 insertions(+), 12 deletions(-)
+ drivers/net/idpf/idpf_ethdev.c | 6 +-----
+ drivers/net/idpf/idpf_ethdev.h | 2 --
+ 2 files changed, 1 insertion(+), 7 deletions(-)
@@ -22,20 +23,7 @@
-diff --git a/drivers/common/idpf/idpf_common_device.h b/drivers/common/idpf/idpf_common_device.h
-index 22bbc16b0c..3116a8e44e 100644
---- a/drivers/common/idpf/idpf_common_device.h
-+++ b/drivers/common/idpf/idpf_common_device.h
-@@ -112,8 +112,6 @@ struct idpf_vport {
- 
- 	uint16_t devarg_id;
- 
--	bool stopped;
--
- 	bool rx_vec_allowed;
- 	bool tx_vec_allowed;
- 	bool rx_use_avx512;
-diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c
-index ede730fd50..f1d4425ce2 100644
---- a/drivers/net/cpfl/cpfl_ethdev.c
-+++ b/drivers/net/cpfl/cpfl_ethdev.c
-@@ -798,8 +798,6 @@ cpfl_dev_start(struct rte_eth_dev *dev)
- 	if (cpfl_dev_stats_reset(dev))
- 		PMD_DRV_LOG(ERR, "Failed to reset stats");
+diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
+index 67d2d49490..b31cb47e90 100644
+--- a/drivers/net/idpf/idpf_ethdev.c
++++ b/drivers/net/idpf/idpf_ethdev.c
+@@ -563,8 +563,6 @@ idpf_dev_start(struct rte_eth_dev *dev)
+ 	uint16_t req_vecs_num;
+ 	int ret;
@@ -45,4 +33,4 @@
- 	return 0;
- 
- err_vport:
-@@ -817,7 +815,7 @@ cpfl_dev_stop(struct rte_eth_dev *dev)
+ 	if (dev->data->mtu > vport->max_mtu) {
+ 		PMD_DRV_LOG(ERR, "MTU should be less than %d", vport->max_mtu);
+ 		ret = -EINVAL;
+@@ -622,7 +620,7 @@ idpf_dev_stop(struct rte_eth_dev *dev)
@@ -56,4 +44,4 @@
- 	idpf_vc_vport_ena_dis(vport, false);
-@@ -828,8 +826,6 @@ cpfl_dev_stop(struct rte_eth_dev *dev)
- 
- 	idpf_vc_vectors_dealloc(vport);
+ 	idpf_vc_ena_dis_vport(vport, false);
+@@ -634,8 +632,6 @@ idpf_dev_stop(struct rte_eth_dev *dev)
+ 	if (vport->recv_vectors != NULL)
+ 		idpf_vc_dealloc_vectors(vport);
@@ -66,7 +54,5 @@
-diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
-index c1782c5fd3..a9d3b6905a 100644
---- a/drivers/net/idpf/idpf_ethdev.c
-+++ b/drivers/net/idpf/idpf_ethdev.c
-@@ -792,8 +792,6 @@ idpf_dev_start(struct rte_eth_dev *dev)
- 	if (idpf_dev_stats_reset(dev))
- 		PMD_DRV_LOG(ERR, "Failed to reset stats");
+diff --git a/drivers/net/idpf/idpf_ethdev.h b/drivers/net/idpf/idpf_ethdev.h
+index 991677c3bc..5633057a81 100644
+--- a/drivers/net/idpf/idpf_ethdev.h
++++ b/drivers/net/idpf/idpf_ethdev.h
+@@ -128,7 +128,6 @@ struct idpf_vport {
@@ -74,12 +60 @@
--	vport->stopped = 0;
--
- 	return 0;
- 
- err_vport:
-@@ -811,7 +809,7 @@ idpf_dev_stop(struct rte_eth_dev *dev)
- {
- 	struct idpf_vport *vport = dev->data->dev_private;
- 
--	if (vport->stopped == 1)
-+	if (dev->data->dev_started == 0)
- 		return 0;
+ 	uint16_t devarg_id;
@@ -87,2 +62,2 @@
- 	idpf_vc_vport_ena_dis(vport, false);
-@@ -822,8 +820,6 @@ idpf_dev_stop(struct rte_eth_dev *dev)
+-	bool stopped;
+ };
@@ -90 +65,3 @@
- 	idpf_vc_vectors_dealloc(vport);
+ struct idpf_adapter {
+@@ -164,7 +163,6 @@ struct idpf_adapter {
+ 	uint32_t max_txq_per_msg;
@@ -92 +69 @@
--	vport->stopped = 1;
+ 	uint32_t ptype_tbl[IDPF_MAX_PKT_TYPE] __rte_cache_min_aligned;
@@ -94,3 +71,3 @@
- 	return 0;
- }
- 
+ 	bool rx_vec_allowed;
+ 	bool tx_vec_allowed;
+ 	bool rx_use_avx512;

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

* patch 'common/idpf/base: fix control queue send and receive' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (106 preceding siblings ...)
  2023-06-25  6:35 ` patch 'common/idpf: remove device stop flag' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'common/idpf/base: fix ITR register definitions for AVF' " Xueming Li
                   ` (21 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Wenjing Qiao; +Cc: Charles Stoll, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4cc85337b399df2a47f997980ea2ac80030464d7 Mon Sep 17 00:00:00 2001
From: Wenjing Qiao <wenjing.qiao@intel.com>
Date: Wed, 26 Apr 2023 06:22:46 -0400
Subject: [PATCH] common/idpf/base: fix control queue send and receive
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit abb00ba2ad68eedbb7d04dd05ef1b112fd9211f9 ]

Fixes the ctlq send and receive functions to not cast the cookie field
to a u64 before programming. By doing a cast, it can cause endianness
issues as LE will swap the lower 32 and higher 32 bits whereas BE will
not. By treating this field as two 32 bit values, both BE and LE will
place the retval and opcode in the correct location.

Since this field is now being treated as two 32 bit values, the cfg.data
section must also be split into a data high and data low. Macros to
easily pack and read these fields have also been added.

Fixes: fb4ac04e9bfa ("common/idpf: introduce common library")

Signed-off-by: Charles Stoll <charles.stoll@intel.com>
Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 .mailmap                                 |  1 +
 drivers/common/idpf/base/idpf_controlq.c | 16 ++++------------
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/.mailmap b/.mailmap
index 79553991de..642bb987d0 100644
--- a/.mailmap
+++ b/.mailmap
@@ -198,6 +198,7 @@ Chaoyong He <chaoyong.he@corigine.com>
 Chao Zhu <chaozhu@linux.vnet.ibm.com> <bjzhuc@cn.ibm.com>
 Charles Brett <cfb@hpe.com>
 Charles Myers <charles.myers@spirent.com>
+Charles Stoll <charles.stoll@intel.com>
 Chas Williams <3chas3@gmail.com> <chas3@att.com> <ciwillia@brocade.com>
 Chenbo Xia <chenbo.xia@intel.com>
 Chengchang Tang <tangchengchang@huawei.com> <tangchengchang@hisilicon.com>
diff --git a/drivers/common/idpf/base/idpf_controlq.c b/drivers/common/idpf/base/idpf_controlq.c
index 3af81e5a64..8e4d3ee54f 100644
--- a/drivers/common/idpf/base/idpf_controlq.c
+++ b/drivers/common/idpf/base/idpf_controlq.c
@@ -311,18 +311,14 @@ int idpf_ctlq_send(struct idpf_hw *hw, struct idpf_ctlq_info *cq,
 
 	for (i = 0; i < num_q_msg; i++) {
 		struct idpf_ctlq_msg *msg = &q_msg[i];
-		u64 msg_cookie;
 
 		desc = IDPF_CTLQ_DESC(cq, cq->next_to_use);
 
 		desc->opcode = CPU_TO_LE16(msg->opcode);
 		desc->pfid_vfid = CPU_TO_LE16(msg->func_id);
 
-		msg_cookie = *(u64 *)&msg->cookie;
-		desc->cookie_high =
-			CPU_TO_LE32(IDPF_HI_DWORD(msg_cookie));
-		desc->cookie_low =
-			CPU_TO_LE32(IDPF_LO_DWORD(msg_cookie));
+		desc->cookie_high = CPU_TO_LE32(msg->cookie.mbx.chnl_opcode);
+		desc->cookie_low = CPU_TO_LE32(msg->cookie.mbx.chnl_retval);
 
 		desc->flags = CPU_TO_LE16((msg->host_id & IDPF_HOST_ID_MASK) <<
 					  IDPF_CTLQ_FLAG_HOST_ID_S);
@@ -620,8 +616,6 @@ int idpf_ctlq_recv(struct idpf_ctlq_info *cq, u16 *num_q_msg,
 	num_to_clean = *num_q_msg;
 
 	for (i = 0; i < num_to_clean; i++) {
-		u64 msg_cookie;
-
 		/* Fetch next descriptor and check if marked as done */
 		desc = IDPF_CTLQ_DESC(cq, ntc);
 		flags = LE16_TO_CPU(desc->flags);
@@ -639,10 +633,8 @@ int idpf_ctlq_recv(struct idpf_ctlq_info *cq, u16 *num_q_msg,
 		if (flags & IDPF_CTLQ_FLAG_ERR)
 			ret_code = -EBADMSG;
 
-		msg_cookie = (u64)LE32_TO_CPU(desc->cookie_high) << 32;
-		msg_cookie |= (u64)LE32_TO_CPU(desc->cookie_low);
-		idpf_memcpy(&q_msg[i].cookie, &msg_cookie, sizeof(u64),
-			    IDPF_NONDMA_TO_NONDMA);
+		q_msg[i].cookie.mbx.chnl_opcode = LE32_TO_CPU(desc->cookie_high);
+		q_msg[i].cookie.mbx.chnl_retval = LE32_TO_CPU(desc->cookie_low);
 
 		q_msg[i].opcode = LE16_TO_CPU(desc->opcode);
 		q_msg[i].data_len = LE16_TO_CPU(desc->datalen);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.389933100 +0800
+++ 0108-common-idpf-base-fix-control-queue-send-and-receive.patch	2023-06-25 14:31:58.555773900 +0800
@@ -1 +1 @@
-From abb00ba2ad68eedbb7d04dd05ef1b112fd9211f9 Mon Sep 17 00:00:00 2001
+From 4cc85337b399df2a47f997980ea2ac80030464d7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit abb00ba2ad68eedbb7d04dd05ef1b112fd9211f9 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 0431e410a7..c5fb28ad86 100644
+index 79553991de..642bb987d0 100644
@@ -31 +33 @@
-@@ -201,6 +201,7 @@ Chaoyong He <chaoyong.he@corigine.com>
+@@ -198,6 +198,7 @@ Chaoyong He <chaoyong.he@corigine.com>

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

* patch 'common/idpf/base: fix ITR register definitions for AVF' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (107 preceding siblings ...)
  2023-06-25  6:35 ` patch 'common/idpf/base: fix control queue send and receive' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'common/idpf/base: fix parameters when send msg to cp' " Xueming Li
                   ` (20 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Wenjing Qiao; +Cc: Priyalee Kushwaha, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e5868f66487b1e7f1009e245c613b24584a1d7b5 Mon Sep 17 00:00:00 2001
From: Wenjing Qiao <wenjing.qiao@intel.com>
Date: Wed, 26 Apr 2023 06:22:47 -0400
Subject: [PATCH] common/idpf/base: fix ITR register definitions for AVF
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1ce244efe0765554531f450380d6c887cd92dfab ]

Fix ITR register definitions for AVF1.0 and AVF2.0

Fixes: fb4ac04e9bfa ("common/idpf: introduce common library")

Signed-off-by: Priyalee Kushwaha <priyalee.kushwaha@intel.com>
Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 .mailmap                                    |  1 +
 drivers/common/idpf/base/idpf_lan_pf_regs.h |  9 +++++++--
 drivers/common/idpf/base/idpf_lan_vf_regs.h | 17 ++++++++++++-----
 3 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/.mailmap b/.mailmap
index 642bb987d0..6b38c488c2 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1066,6 +1066,7 @@ Prashant Upadhyaya <prashant.upadhyaya@aricent.com> <praupadhyaya@gmail.com>
 Prateek Agarwal <prateekag@cse.iitb.ac.in>
 Praveen Shetty <praveen.shetty@intel.com>
 Pravin Pathak <pravin.pathak@intel.com>
+Priyalee Kushwaha <priyalee.kushwaha@intel.com>
 Priyanka Jain <priyanka.jain@nxp.com>
 Przemyslaw Ciesielski <przemyslaw.ciesielski@intel.com>
 Przemyslaw Czesnowicz <przemyslaw.czesnowicz@intel.com>
diff --git a/drivers/common/idpf/base/idpf_lan_pf_regs.h b/drivers/common/idpf/base/idpf_lan_pf_regs.h
index 3df2347bd7..7f731ec3d6 100644
--- a/drivers/common/idpf/base/idpf_lan_pf_regs.h
+++ b/drivers/common/idpf/base/idpf_lan_pf_regs.h
@@ -77,8 +77,13 @@
 #define PF_GLINT_DYN_CTL_WB_ON_ITR_M	BIT(PF_GLINT_DYN_CTL_WB_ON_ITR_S)
 #define PF_GLINT_DYN_CTL_INTENA_MSK_S	31
 #define PF_GLINT_DYN_CTL_INTENA_MSK_M	BIT(PF_GLINT_DYN_CTL_INTENA_MSK_S)
-#define PF_GLINT_ITR_V2(_i, _reg_start) (((_i) * 4) + (_reg_start))
-#define PF_GLINT_ITR(_i, _INT) (PF_GLINT_BASE + (((_i) + 1) * 4) + ((_INT) * 0x1000))
+/* _ITR is ITR index, _INT is interrupt index, _itrn_indx_spacing is
+ * spacing b/w itrn registers of the same vector.
+ */
+#define PF_GLINT_ITR_ADDR(_ITR, _reg_start, _itrn_indx_spacing) \
+		((_reg_start) + (((_ITR)) * (_itrn_indx_spacing)))
+/* For PF, itrn_indx_spacing is 4 and itrn_reg_spacing is 0x1000 */
+#define PF_GLINT_ITR(_ITR, _INT) (PF_GLINT_BASE + (((_ITR) + 1) * 4) + ((_INT) * 0x1000))
 #define PF_GLINT_ITR_MAX_INDEX		2
 #define PF_GLINT_ITR_INTERVAL_S		0
 #define PF_GLINT_ITR_INTERVAL_M		MAKEMASK(0xFFF, PF_GLINT_ITR_INTERVAL_S)
diff --git a/drivers/common/idpf/base/idpf_lan_vf_regs.h b/drivers/common/idpf/base/idpf_lan_vf_regs.h
index 9cd4f757d9..13c5c5a7da 100644
--- a/drivers/common/idpf/base/idpf_lan_vf_regs.h
+++ b/drivers/common/idpf/base/idpf_lan_vf_regs.h
@@ -90,11 +90,18 @@
 #define VF_INT_DYN_CTLN_WB_ON_ITR_M	BIT(VF_INT_DYN_CTLN_WB_ON_ITR_S)
 #define VF_INT_DYN_CTLN_INTENA_MSK_S	31
 #define VF_INT_DYN_CTLN_INTENA_MSK_M	BIT(VF_INT_DYN_CTLN_INTENA_MSK_S)
-#define VF_INT_ITR0(_i)			(0x00004C00 + ((_i) * 4))
-#define VF_INT_ITRN_V2(_i, _reg_start)	((_reg_start) + (((_i)) * 4))
-#define VF_INT_ITRN(_i, _INT)		(0x00002800 + ((_i) * 4) + ((_INT) * 0x40))
-#define VF_INT_ITRN_64(_i, _INT)	(0x00002C00 + ((_i) * 4) + ((_INT) * 0x100))
-#define VF_INT_ITRN_2K(_i, _INT)	(0x00072000 + ((_i) * 4) + ((_INT) * 0x100))
+/* _ITR is ITR index, _INT is interrupt index, _itrn_indx_spacing is spacing
+ * b/w itrn registers of the same vector
+ */
+#define VF_INT_ITR0(_ITR)		(0x00004C00 + ((_ITR) * 4))
+#define VF_INT_ITRN_ADDR(_ITR, _reg_start, _itrn_indx_spacing) \
+		 ((_reg_start) + (((_ITR)) * (_itrn_indx_spacing)))
+/* For VF with 16 vector support, itrn_reg_spacing is 0x4 and itrn_indx_spacing is 0x40 */
+#define VF_INT_ITRN(_INT, _ITR)	(0x00002800 + ((_INT) * 4) + ((_ITR) * 0x40))
+/* For VF with 64 vector support, itrn_reg_spacing is 0x4 and itrn_indx_spacing is 0x100 */
+#define VF_INT_ITRN_64(_INT, _ITR) (0x00002C00 + ((_INT) * 4) + ((_ITR) * 0x100))
+/* For VF with 2k vector support, itrn_reg_spacing is 0x4 and itrn_indx_spacing is 0x2000 */
+#define VF_INT_ITRN_2K(_INT, _ITR) (0x00072000 + ((_INT) * 4) + ((_ITR) * 0x2000))
 #define VF_INT_ITRN_MAX_INDEX		2
 #define VF_INT_ITRN_INTERVAL_S		0
 #define VF_INT_ITRN_INTERVAL_M		MAKEMASK(0xFFF, VF_INT_ITRN_INTERVAL_S)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.414887400 +0800
+++ 0109-common-idpf-base-fix-ITR-register-definitions-for-AV.patch	2023-06-25 14:31:58.565773900 +0800
@@ -1 +1 @@
-From 1ce244efe0765554531f450380d6c887cd92dfab Mon Sep 17 00:00:00 2001
+From e5868f66487b1e7f1009e245c613b24584a1d7b5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1ce244efe0765554531f450380d6c887cd92dfab ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index c5fb28ad86..da4aad001d 100644
+index 642bb987d0..6b38c488c2 100644
@@ -24 +26,2 @@
-@@ -1085,6 +1085,7 @@ Prateek Agarwal <prateekag@cse.iitb.ac.in>
+@@ -1066,6 +1066,7 @@ Prashant Upadhyaya <prashant.upadhyaya@aricent.com> <praupadhyaya@gmail.com>
+ Prateek Agarwal <prateekag@cse.iitb.ac.in>
@@ -27 +29,0 @@
- Prince Takkar <ptakkar@marvell.com>

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

* patch 'common/idpf/base: fix parameters when send msg to cp' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (108 preceding siblings ...)
  2023-06-25  6:35 ` patch 'common/idpf/base: fix ITR register definitions for AVF' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'common/idpf/base: fix memory leaks on control queue' " Xueming Li
                   ` (19 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Wenjing Qiao; +Cc: Christopher Pau, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1b04a2f618eb8a941ba5e4a373ddfc82d5df9a3b Mon Sep 17 00:00:00 2001
From: Wenjing Qiao <wenjing.qiao@intel.com>
Date: Wed, 26 Apr 2023 06:22:53 -0400
Subject: [PATCH] common/idpf/base: fix parameters when send msg to cp
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ff16a5df2a138cfe23be4bf84f58b2c8eddb2d4e ]

Virtchnl2 opcodes are no longer in the enum virtchnl_ops. So change
these parameters to allow int rather that compiler enum type checking.

Fixes: fb4ac04e9bfa ("common/idpf: introduce common library")

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/common/idpf/base/idpf_common.c    | 2 +-
 drivers/common/idpf/base/idpf_prototype.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/idpf/base/idpf_common.c b/drivers/common/idpf/base/idpf_common.c
index 3a9fdb1878..69e3b32f85 100644
--- a/drivers/common/idpf/base/idpf_common.c
+++ b/drivers/common/idpf/base/idpf_common.c
@@ -146,7 +146,7 @@ int idpf_init_hw(struct idpf_hw *hw, struct idpf_ctlq_size ctlq_size)
  * is sent asynchronously, i.e. idpf_asq_send_command() does not wait for
  * completion before returning.
  */
-int idpf_send_msg_to_cp(struct idpf_hw *hw, enum virtchnl_ops v_opcode,
+int idpf_send_msg_to_cp(struct idpf_hw *hw, int v_opcode,
 			int v_retval, u8 *msg, u16 msglen)
 {
 	struct idpf_ctlq_msg ctlq_msg = { 0 };
diff --git a/drivers/common/idpf/base/idpf_prototype.h b/drivers/common/idpf/base/idpf_prototype.h
index 529b62212d..3ce25e644d 100644
--- a/drivers/common/idpf/base/idpf_prototype.h
+++ b/drivers/common/idpf/base/idpf_prototype.h
@@ -40,6 +40,6 @@ int idpf_set_rss_key(struct idpf_hw *hw, u16 seid,
 int idpf_set_mac_type(struct idpf_hw *hw);
 
 int idpf_reset(struct idpf_hw *hw);
-int idpf_send_msg_to_cp(struct idpf_hw *hw, enum virtchnl_ops v_opcode,
+int idpf_send_msg_to_cp(struct idpf_hw *hw, int v_opcode,
 			int v_retval, u8 *msg, u16 msglen);
 #endif /* _IDPF_PROTOTYPE_H_ */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.438551500 +0800
+++ 0110-common-idpf-base-fix-parameters-when-send-msg-to-cp.patch	2023-06-25 14:31:58.565773900 +0800
@@ -1 +1 @@
-From ff16a5df2a138cfe23be4bf84f58b2c8eddb2d4e Mon Sep 17 00:00:00 2001
+From 1b04a2f618eb8a941ba5e4a373ddfc82d5df9a3b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ff16a5df2a138cfe23be4bf84f58b2c8eddb2d4e ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 41e0d05623..2394f85580 100644
+index 3a9fdb1878..69e3b32f85 100644
@@ -34 +36 @@
-index 3090f4cc2a..c9812a7f94 100644
+index 529b62212d..3ce25e644d 100644

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

* patch 'common/idpf/base: fix memory leaks on control queue' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (109 preceding siblings ...)
  2023-06-25  6:35 ` patch 'common/idpf/base: fix parameters when send msg to cp' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/ice: fix statistics' " Xueming Li
                   ` (18 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Wenjing Qiao; +Cc: Christopher Pau, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b9f3b81e9eae675b51be236741cfa6ae3d511ade Mon Sep 17 00:00:00 2001
From: Wenjing Qiao <wenjing.qiao@intel.com>
Date: Wed, 26 Apr 2023 06:22:54 -0400
Subject: [PATCH] common/idpf/base: fix memory leaks on control queue
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e83aa09770603943f7abd1b736f8c01ea4273e16 ]

idpf_init_hw needs to free it's q_info.
idpf_clean_arq_element needs to return buffers via post_rx_buffs

Fixes: fb4ac04e9bfa ("common/idpf: introduce common library")

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/common/idpf/base/idpf_common.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/common/idpf/base/idpf_common.c b/drivers/common/idpf/base/idpf_common.c
index 69e3b32f85..de82c3458f 100644
--- a/drivers/common/idpf/base/idpf_common.c
+++ b/drivers/common/idpf/base/idpf_common.c
@@ -130,6 +130,8 @@ int idpf_init_hw(struct idpf_hw *hw, struct idpf_ctlq_size ctlq_size)
 	hw->mac.addr[4] = 0x03;
 	hw->mac.addr[5] = 0x14;
 
+	idpf_free(hw, q_info);
+
 	return 0;
 }
 
@@ -219,6 +221,7 @@ bool idpf_check_asq_alive(struct idpf_hw *hw)
 int idpf_clean_arq_element(struct idpf_hw *hw,
 			   struct idpf_arq_event_info *e, u16 *pending)
 {
+	struct idpf_dma_mem *dma_mem = NULL;
 	struct idpf_ctlq_msg msg = { 0 };
 	int status;
 	u16 msg_data_len;
@@ -226,6 +229,8 @@ int idpf_clean_arq_element(struct idpf_hw *hw,
 	*pending = 1;
 
 	status = idpf_ctlq_recv(hw->arq, pending, &msg);
+	if (status == -ENOMSG)
+		goto exit;
 
 	/* ctlq_msg does not align to ctlq_desc, so copy relevant data here */
 	e->desc.opcode = msg.opcode;
@@ -240,7 +245,14 @@ int idpf_clean_arq_element(struct idpf_hw *hw,
 		msg_data_len = msg.data_len;
 		idpf_memcpy(e->msg_buf, msg.ctx.indirect.payload->va, msg_data_len,
 			    IDPF_DMA_TO_NONDMA);
+		dma_mem = msg.ctx.indirect.payload;
+	} else {
+		*pending = 0;
 	}
+
+	status = idpf_ctlq_post_rx_buffs(hw, hw->arq, pending, &dma_mem);
+
+exit:
 	return status;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.459682900 +0800
+++ 0111-common-idpf-base-fix-memory-leaks-on-control-queue.patch	2023-06-25 14:31:58.565773900 +0800
@@ -1 +1 @@
-From e83aa09770603943f7abd1b736f8c01ea4273e16 Mon Sep 17 00:00:00 2001
+From b9f3b81e9eae675b51be236741cfa6ae3d511ade Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e83aa09770603943f7abd1b736f8c01ea4273e16 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 2394f85580..da352ea88f 100644
+index 69e3b32f85..de82c3458f 100644

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

* patch 'net/ice: fix statistics' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (110 preceding siblings ...)
  2023-06-25  6:35 ` patch 'common/idpf/base: fix memory leaks on control queue' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/ice: fix DCF RSS initialization' " Xueming Li
                   ` (17 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Mingjin Ye; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 83ad87933a05f5eb8a51cd83cc90d7dbd40412d5 Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Thu, 11 May 2023 02:10:55 +0000
Subject: [PATCH] net/ice: fix statistics
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a47ef8640a677a3973de48b8075f1fcd6a0ee68e ]

When the stats_get api is called for the first time in pmd, the offset
of the stats register is not recorded. That results in all the obtained
count values being 0.

This patch adds reset statistics before dev_init returning. That avoids
some noise being counted.

Fixes: 12443386a0b0 ("net/ice: support flex Rx descriptor RxDID22")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 263c80a6eb..4eb7de4ad5 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2426,6 +2426,9 @@ ice_dev_init(struct rte_eth_dev *dev)
 
 	pf->supported_rxdid = ice_get_supported_rxdid(hw);
 
+	/* reset all stats of the device, including pf and main vsi */
+	ice_stats_reset(dev);
+
 	return 0;
 
 err_flow_init:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.481598700 +0800
+++ 0112-net-ice-fix-statistics.patch	2023-06-25 14:31:58.565773900 +0800
@@ -1 +1 @@
-From a47ef8640a677a3973de48b8075f1fcd6a0ee68e Mon Sep 17 00:00:00 2001
+From 83ad87933a05f5eb8a51cd83cc90d7dbd40412d5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a47ef8640a677a3973de48b8075f1fcd6a0ee68e ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index e03bbd81a1..2345f9f29c 100644
+index 263c80a6eb..4eb7de4ad5 100644
@@ -26 +28 @@
-@@ -2440,6 +2440,9 @@ ice_dev_init(struct rte_eth_dev *dev)
+@@ -2426,6 +2426,9 @@ ice_dev_init(struct rte_eth_dev *dev)

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

* patch 'net/ice: fix DCF RSS initialization' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (111 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/ice: fix statistics' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/iavf: release large VF when closing device' " Xueming Li
                   ` (16 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Tyler Retzlaff, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 21ec365e75879c31ce1c77edcb000c6b9e74c6f1 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Tue, 9 May 2023 09:22:09 +0800
Subject: [PATCH] net/ice: fix DCF RSS initialization
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f0be05f4c49129c8b7a34fa6505586b8a646ead1 ]

The i variable type is uint8_t which causes a dead loop,
changing it to size_t will solve this issue.

Fixes: 3220d865382c ("net/ice: init RSS during DCF start")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_dcf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 1c3d22ae0f..3e3004f51b 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -854,7 +854,8 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
 {
 	struct rte_eth_dev *dev = hw->eth_dev;
 	struct rte_eth_rss_conf *rss_conf;
-	uint8_t i, j, nb_q;
+	uint8_t j, nb_q;
+	size_t i;
 	int ret;
 
 	rss_conf = &dev->data->dev_conf.rx_adv_conf.rss_conf;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.509355700 +0800
+++ 0113-net-ice-fix-DCF-RSS-initialization.patch	2023-06-25 14:31:58.565773900 +0800
@@ -1 +1 @@
-From f0be05f4c49129c8b7a34fa6505586b8a646ead1 Mon Sep 17 00:00:00 2001
+From 21ec365e75879c31ce1c77edcb000c6b9e74c6f1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f0be05f4c49129c8b7a34fa6505586b8a646ead1 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 80d2cbd597..b11d66f45f 100644
+index 1c3d22ae0f..3e3004f51b 100644
@@ -23 +25 @@
-@@ -853,7 +853,8 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
+@@ -854,7 +854,8 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)

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

* patch 'net/iavf: release large VF when closing device' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (112 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/ice: fix DCF RSS initialization' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/ice: fix DCF control thread crash' " Xueming Li
                   ` (15 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Shiyang He; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c4d749115de8aedc5df82de5497b9761d0472720 Mon Sep 17 00:00:00 2001
From: Shiyang He <shiyangx.he@intel.com>
Date: Mon, 8 May 2023 16:58:23 +0000
Subject: [PATCH] net/iavf: release large VF when closing device
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cdd8d6dfd156709b05ce363d7c5f491cc927330a ]

Multiple vfs created based on one PF. If one of the vf requests a large
number of queues, the queue resources are not released when exiting the
program, resulting in these queues cannot be available to other vfs.

This commit fixes the issue by resetting the number of queues to default
when closing the dev (refer to the kernel driver) .

Fixes: e436cd43835b ("net/iavf: negotiate large VF and request more queues")

Signed-off-by: Shiyang He <shiyangx.he@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index f6d68403ce..9c55eaa66e 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2735,6 +2735,18 @@ iavf_dev_close(struct rte_eth_dev *dev)
 	if (vf->promisc_unicast_enabled || vf->promisc_multicast_enabled)
 		iavf_config_promisc(adapter, false, false);
 
+	/*
+	 * Release redundant queue resource when close the dev
+	 * so that other vfs can re-use the queues.
+	 */
+	if (vf->lv_enabled) {
+		ret = iavf_request_queues(dev, IAVF_MAX_NUM_QUEUES_DFLT);
+		if (ret)
+			PMD_DRV_LOG(ERR, "Reset the num of queues failed");
+
+		vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
+	}
+
 	iavf_shutdown_adminq(hw);
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
 		/* disable uio intr before callback unregister */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.533509600 +0800
+++ 0114-net-iavf-release-large-VF-when-closing-device.patch	2023-06-25 14:31:58.565773900 +0800
@@ -1 +1 @@
-From cdd8d6dfd156709b05ce363d7c5f491cc927330a Mon Sep 17 00:00:00 2001
+From c4d749115de8aedc5df82de5497b9761d0472720 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cdd8d6dfd156709b05ce363d7c5f491cc927330a ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice: fix DCF control thread crash' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (113 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/iavf: release large VF when closing device' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/ice/base: fix incorrect defines for DCBx' " Xueming Li
                   ` (14 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Mingjin Ye; +Cc: Ke Zhang, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4ec6da600e9573cf5f24ebc6c36cb36f4e30325a Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Tue, 11 Apr 2023 02:08:55 +0000
Subject: [PATCH] net/ice: fix DCF control thread crash
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6b7621cea2d9470df076c3559a2fa6ee9752f419 ]

The control thread accesses the hardware resources after the
resources were released, which results in a segment error.

The 'ice-reset' threads are detached, so thread resources cannot be
reclaimed by `pthread_join` calls.

This commit synchronizes the number of "ice-reset" threads by adding a
variable ("vsi_update_thread_num") to the "struct ice_dcf_hw" and
performing an atomic operation on this variable. When releasing HW
resources, we wait for the number of "ice-reset" threads to be reduced
to 0 before releasing the resources.

Fixes: c7e1a1a3bfeb ("net/ice: refactor DCF VLAN handling")
Fixes: 3b3757bda3c3 ("net/ice: get VF hardware index in DCF")
Fixes: 7564d5509611 ("net/ice: add DCF hardware initialization")
Fixes: 0b02c9519432 ("net/ice: handle PF initialization by DCF")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_dcf.c        | 9 +++++++++
 drivers/net/ice/ice_dcf.h        | 2 ++
 drivers/net/ice/ice_dcf_parent.c | 6 ++++++
 3 files changed, 17 insertions(+)

diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 3e3004f51b..6f7e103c3b 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -32,6 +32,8 @@
 #define ICE_DCF_ARQ_MAX_RETRIES 200
 #define ICE_DCF_ARQ_CHECK_TIME  2   /* msecs */
 
+#define ICE_DCF_CHECK_INTERVAL  100   /* 100ms */
+
 #define ICE_DCF_VF_RES_BUF_SZ	\
 	(sizeof(struct virtchnl_vf_resource) +	\
 		IAVF_MAX_VF_VSI * sizeof(struct virtchnl_vsi_resource))
@@ -639,6 +641,8 @@ ice_dcf_init_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
 	rte_spinlock_init(&hw->vc_cmd_queue_lock);
 	TAILQ_INIT(&hw->vc_cmd_queue);
 
+	__atomic_store_n(&hw->vsi_update_thread_num, 0, __ATOMIC_RELAXED);
+
 	hw->arq_buf = rte_zmalloc("arq_buf", ICE_DCF_AQ_BUF_SZ, 0);
 	if (hw->arq_buf == NULL) {
 		PMD_INIT_LOG(ERR, "unable to allocate AdminQ buffer memory");
@@ -760,6 +764,11 @@ ice_dcf_uninit_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
 	rte_intr_callback_unregister(intr_handle,
 				     ice_dcf_dev_interrupt_handler, hw);
 
+	/* Wait for all `ice-thread` threads to exit. */
+	while (__atomic_load_n(&hw->vsi_update_thread_num,
+		__ATOMIC_ACQUIRE) != 0)
+		rte_delay_ms(ICE_DCF_CHECK_INTERVAL);
+
 	ice_dcf_mode_disable(hw);
 	iavf_shutdown_adminq(&hw->avf);
 
diff --git a/drivers/net/ice/ice_dcf.h b/drivers/net/ice/ice_dcf.h
index 7f42ebabe9..7becf6d187 100644
--- a/drivers/net/ice/ice_dcf.h
+++ b/drivers/net/ice/ice_dcf.h
@@ -105,6 +105,8 @@ struct ice_dcf_hw {
 	void (*vc_event_msg_cb)(struct ice_dcf_hw *dcf_hw,
 				uint8_t *msg, uint16_t msglen);
 
+	int vsi_update_thread_num;
+
 	uint8_t *arq_buf;
 
 	uint16_t num_vfs;
diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
index 01e390ddda..0563edb0b2 100644
--- a/drivers/net/ice/ice_dcf_parent.c
+++ b/drivers/net/ice/ice_dcf_parent.c
@@ -124,6 +124,9 @@ ice_dcf_vsi_update_service_handler(void *param)
 		container_of(hw, struct ice_dcf_adapter, real_hw);
 	struct ice_adapter *parent_adapter = &adapter->parent;
 
+	__atomic_fetch_add(&hw->vsi_update_thread_num, 1,
+		__ATOMIC_RELAXED);
+
 	pthread_detach(pthread_self());
 
 	rte_delay_us(ICE_DCF_VSI_UPDATE_SERVICE_INTERVAL);
@@ -154,6 +157,9 @@ ice_dcf_vsi_update_service_handler(void *param)
 
 	free(param);
 
+	__atomic_fetch_sub(&hw->vsi_update_thread_num, 1,
+		__ATOMIC_RELEASE);
+
 	return NULL;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.558800700 +0800
+++ 0115-net-ice-fix-DCF-control-thread-crash.patch	2023-06-25 14:31:58.565773900 +0800
@@ -1 +1 @@
-From 6b7621cea2d9470df076c3559a2fa6ee9752f419 Mon Sep 17 00:00:00 2001
+From 4ec6da600e9573cf5f24ebc6c36cb36f4e30325a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6b7621cea2d9470df076c3559a2fa6ee9752f419 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -34 +36 @@
-index b11d66f45f..c37b56b0d3 100644
+index 3e3004f51b..6f7e103c3b 100644
@@ -37 +39 @@
-@@ -31,6 +31,8 @@
+@@ -32,6 +32,8 @@
@@ -46 +48 @@
-@@ -638,6 +640,8 @@ ice_dcf_init_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
+@@ -639,6 +641,8 @@ ice_dcf_init_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
@@ -55 +57 @@
-@@ -759,6 +763,11 @@ ice_dcf_uninit_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
+@@ -760,6 +764,11 @@ ice_dcf_uninit_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
@@ -81 +83 @@
-index 3175d18b5b..d62837840d 100644
+index 01e390ddda..0563edb0b2 100644
@@ -84 +86 @@
-@@ -123,6 +123,9 @@ ice_dcf_vsi_update_service_handler(void *param)
+@@ -124,6 +124,9 @@ ice_dcf_vsi_update_service_handler(void *param)
@@ -91 +93 @@
- 	rte_thread_detach(rte_thread_self());
+ 	pthread_detach(pthread_self());
@@ -94 +96 @@
-@@ -153,6 +156,9 @@ ice_dcf_vsi_update_service_handler(void *param)
+@@ -154,6 +157,9 @@ ice_dcf_vsi_update_service_handler(void *param)
@@ -101 +103 @@
- 	return 0;
+ 	return NULL;

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

* patch 'net/ice/base: fix incorrect defines for DCBx' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (114 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/ice: fix DCF control thread crash' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/ice/base: remove unreachable code' " Xueming Li
                   ` (13 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Dave Ertman, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7691c220b621029944dd3ae1b556e24d7cbc8648 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Thu, 18 May 2023 15:16:22 +0000
Subject: [PATCH] net/ice/base: fix incorrect defines for DCBx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 80beb5949b7cc8538d9918b4b184ff00dfd5a227 ]

In all cases but one, CEE mode is defined as 0x01 and IEEE
mode is defined as 0x02.  in past these values were swapped.
This is causing the DCB information sent from the FW agent to
be parsed with incorrect structures and resulting in incorrect values.

Change the defines to match what they are in the rest of the kernel.

Fixes: 97e32e8d4870 ("net/ice/base: complete pending LLDP MIB")

Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index 5a817982b4..93a3a6007f 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -2002,8 +2002,8 @@ struct ice_aqc_lldp_get_mib {
 #define ICE_AQ_LLDP_DCBX_S			6
 #define ICE_AQ_LLDP_DCBX_M			(0x3 << ICE_AQ_LLDP_DCBX_S)
 #define ICE_AQ_LLDP_DCBX_NA			0
-#define ICE_AQ_LLDP_DCBX_IEEE			1
-#define ICE_AQ_LLDP_DCBX_CEE			2
+#define ICE_AQ_LLDP_DCBX_CEE			1
+#define ICE_AQ_LLDP_DCBX_IEEE			2
 /* The following bytes are reserved for the Get LLDP MIB command (0x0A00)
  * and in the LLDP MIB Change Event (0x0A01). They are valid for the
  * Get LLDP MIB (0x0A00) response only.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.583627400 +0800
+++ 0116-net-ice-base-fix-incorrect-defines-for-DCBx.patch	2023-06-25 14:31:58.565773900 +0800
@@ -1 +1 @@
-From 80beb5949b7cc8538d9918b4b184ff00dfd5a227 Mon Sep 17 00:00:00 2001
+From 7691c220b621029944dd3ae1b556e24d7cbc8648 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 80beb5949b7cc8538d9918b4b184ff00dfd5a227 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice/base: remove unreachable code' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (115 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/ice/base: fix incorrect defines for DCBx' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/ice: adjust timestamp mbuf register' " Xueming Li
                   ` (12 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Vignesh Sridhar, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1d71b68237d3f4e67c96cc50386cb2b5e3ce1455 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Thu, 18 May 2023 15:16:36 +0000
Subject: [PATCH] net/ice/base: remove unreachable code
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ca2011635fa38c71f47933d77ee618ca4d4f640f ]

The default condition in the switch statement in
ice_sched_get_psm_clk_freq() is an unreachable code. The variable
clk_src is restricted to values 0 to 3 with the bit mask and shift
values set.

Fixes: 76ac9d771c97 ("net/ice/base: read PSM clock frequency from register")

Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com>
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 16 ++++++----------
 drivers/net/ice/base/ice_sched.h |  5 +++++
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index a526c8f32c..b16b27dcbf 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -1417,11 +1417,6 @@ void ice_sched_get_psm_clk_freq(struct ice_hw *hw)
 	clk_src = (val & GLGEN_CLKSTAT_SRC_PSM_CLK_SRC_M) >>
 		GLGEN_CLKSTAT_SRC_PSM_CLK_SRC_S;
 
-#define PSM_CLK_SRC_367_MHZ 0x0
-#define PSM_CLK_SRC_416_MHZ 0x1
-#define PSM_CLK_SRC_446_MHZ 0x2
-#define PSM_CLK_SRC_390_MHZ 0x3
-
 	switch (clk_src) {
 	case PSM_CLK_SRC_367_MHZ:
 		hw->psm_clk_freq = ICE_PSM_CLK_367MHZ_IN_HZ;
@@ -1435,11 +1430,12 @@ void ice_sched_get_psm_clk_freq(struct ice_hw *hw)
 	case PSM_CLK_SRC_390_MHZ:
 		hw->psm_clk_freq = ICE_PSM_CLK_390MHZ_IN_HZ;
 		break;
-	default:
-		ice_debug(hw, ICE_DBG_SCHED, "PSM clk_src unexpected %u\n",
-			  clk_src);
-		/* fall back to a safe default */
-		hw->psm_clk_freq = ICE_PSM_CLK_446MHZ_IN_HZ;
+
+	/* default condition is not required as clk_src is restricted
+	 * to a 2-bit value from GLGEN_CLKSTAT_SRC_PSM_CLK_SRC_M mask.
+	 * The above switch statements cover the possible values of
+	 * this variable.
+	 */
 	}
 }
 
diff --git a/drivers/net/ice/base/ice_sched.h b/drivers/net/ice/base/ice_sched.h
index 3724ef33a8..64ed5e0f9b 100644
--- a/drivers/net/ice/base/ice_sched.h
+++ b/drivers/net/ice/base/ice_sched.h
@@ -38,6 +38,11 @@
 #define ICE_PSM_CLK_446MHZ_IN_HZ 446428571
 #define ICE_PSM_CLK_390MHZ_IN_HZ 390625000
 
+#define PSM_CLK_SRC_367_MHZ 0x0
+#define PSM_CLK_SRC_416_MHZ 0x1
+#define PSM_CLK_SRC_446_MHZ 0x2
+#define PSM_CLK_SRC_390_MHZ 0x3
+
 struct rl_profile_params {
 	u32 bw;			/* in Kbps */
 	u16 rl_multiplier;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.608651700 +0800
+++ 0117-net-ice-base-remove-unreachable-code.patch	2023-06-25 14:31:58.575773900 +0800
@@ -1 +1 @@
-From ca2011635fa38c71f47933d77ee618ca4d4f640f Mon Sep 17 00:00:00 2001
+From 1d71b68237d3f4e67c96cc50386cb2b5e3ce1455 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ca2011635fa38c71f47933d77ee618ca4d4f640f ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice: adjust timestamp mbuf register' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (116 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/ice/base: remove unreachable code' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/ice: fix timestamp enabling' " Xueming Li
                   ` (11 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Wenjing Qiao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3b032bbf788f7836463bb6a4a261dc8586613660 Mon Sep 17 00:00:00 2001
From: Wenjing Qiao <wenjing.qiao@intel.com>
Date: Fri, 19 May 2023 03:12:16 -0400
Subject: [PATCH] net/ice: adjust timestamp mbuf register
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b16e1326048ea0c138cf794186985bb95eb7ff20 ]

Due to only support timestamp at port level, adjust
timestamp mbuf register to dev config.

Fixes: 953e74e6b73a ("net/ice: enable Rx timestamp on flex descriptor")

Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 10 ++++++++++
 drivers/net/ice/ice_rxtx.c   |  5 ++++-
 drivers/net/ice/ice_rxtx.h   |  1 +
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 4eb7de4ad5..c004aa42ee 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3674,6 +3674,16 @@ ice_dev_start(struct rte_eth_dev *dev)
 		}
 	}
 
+	if (dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
+		/* Register mbuf field and flag for Rx timestamp */
+		ret = rte_mbuf_dyn_rx_timestamp_register(&ice_timestamp_dynfield_offset,
+							 &ice_timestamp_dynflag);
+		if (ret) {
+			PMD_DRV_LOG(ERR, "Cannot register mbuf field/flag for timestamp");
+			goto tx_err;
+		}
+	}
+
 	/* program Rx queues' context in hardware*/
 	for (nb_rxq = 0; nb_rxq < data->nb_rx_queues; nb_rxq++) {
 		ret = ice_rx_queue_start(dev, nb_rxq);
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 560c1a4af7..c998b0080a 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -274,7 +274,7 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
 		return -EINVAL;
 	}
 
-	if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
+	if (!rxq->ts_enable && (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)) {
 		/* Register mbuf field and flag for Rx timestamp */
 		err = rte_mbuf_dyn_rx_timestamp_register(
 				&ice_timestamp_dynfield_offset,
@@ -284,6 +284,7 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
 				"Cannot register mbuf field/flag for timestamp");
 			return -EINVAL;
 		}
+		rxq->ts_enable = true;
 	}
 
 	memset(&rx_ctx, 0, sizeof(rx_ctx));
@@ -671,6 +672,8 @@ ice_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 		return -EINVAL;
 	}
 
+	if (dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)
+		rxq->ts_enable = true;
 	err = ice_program_hw_rx_queue(rxq);
 	if (err) {
 		PMD_DRV_LOG(ERR, "fail to program RX queue %u",
diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
index 89569029e1..268289716e 100644
--- a/drivers/net/ice/ice_rxtx.h
+++ b/drivers/net/ice/ice_rxtx.h
@@ -120,6 +120,7 @@ struct ice_rx_queue {
 	uint64_t hw_time_update; /* SW time of HW record updating */
 	struct rte_eth_rxseg_split rxseg[ICE_RX_MAX_NSEG];
 	uint32_t rxseg_nb;
+	bool ts_enable; /* if rxq timestamp is enabled */
 };
 
 struct ice_tx_entry {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.635554100 +0800
+++ 0118-net-ice-adjust-timestamp-mbuf-register.patch	2023-06-25 14:31:58.575773900 +0800
@@ -1 +1 @@
-From b16e1326048ea0c138cf794186985bb95eb7ff20 Mon Sep 17 00:00:00 2001
+From 3b032bbf788f7836463bb6a4a261dc8586613660 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b16e1326048ea0c138cf794186985bb95eb7ff20 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 5a581bd2ba..2b0a977ba9 100644
+index 4eb7de4ad5..c004aa42ee 100644
@@ -24 +26 @@
-@@ -3691,6 +3691,16 @@ ice_dev_start(struct rte_eth_dev *dev)
+@@ -3674,6 +3674,16 @@ ice_dev_start(struct rte_eth_dev *dev)

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

* patch 'net/ice: fix timestamp enabling' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (117 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/ice: adjust timestamp mbuf register' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/ice: initialize parser for double VLAN' " Xueming Li
                   ` (10 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Wenjing Qiao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1f35681b6eb48bb00fa9d72aa69ecd47813b3a5b Mon Sep 17 00:00:00 2001
From: Wenjing Qiao <wenjing.qiao@intel.com>
Date: Fri, 19 May 2023 02:47:38 -0400
Subject: [PATCH] net/ice: fix timestamp enabling
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 71021636964dcd074ff2ee1663dc67ec830e6a14 ]

Use the following command:
1. dpdk-testpmd -c 0x3 -n 4 --force-max-simd-bitwidth=64
   -- -i --enable-rx-timestamp
2. port stop 0
3. port config 0 rx_offload timestamp off
4. port start 0
Then start it, log will show timestamp info, which should
not appear. Because ice_timestamp_dynflag is still more
than 0, code will still calculate timestamp. So fix it.

Fixes: f9c561ffbccc ("net/ice: fix performance for Rx timestamp")

Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index c998b0080a..7b6784b177 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -1765,7 +1765,8 @@ ice_rx_scan_hw_ring(struct ice_rx_queue *rxq)
 			ice_rxd_to_vlan_tci(mb, &rxdp[j]);
 			rxd_to_pkt_fields_ops[rxq->rxdid](rxq, mb, &rxdp[j]);
 #ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
-			if (ice_timestamp_dynflag > 0) {
+			if (ice_timestamp_dynflag > 0 &&
+			    (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)) {
 				rxq->time_high =
 				rte_le_to_cpu_32(rxdp[j].wb.flex_ts.ts_high);
 				if (unlikely(is_tsinit)) {
@@ -2131,7 +2132,8 @@ ice_recv_scattered_pkts(void *rx_queue,
 		rxd_to_pkt_fields_ops[rxq->rxdid](rxq, first_seg, &rxd);
 		pkt_flags = ice_rxd_error_to_pkt_flags(rx_stat_err0);
 #ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
-		if (ice_timestamp_dynflag > 0) {
+		if (ice_timestamp_dynflag > 0 &&
+		    (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)) {
 			rxq->time_high =
 			   rte_le_to_cpu_32(rxd.wb.flex_ts.ts_high);
 			if (unlikely(is_tsinit)) {
@@ -2621,7 +2623,8 @@ ice_recv_pkts(void *rx_queue,
 		rxd_to_pkt_fields_ops[rxq->rxdid](rxq, rxm, &rxd);
 		pkt_flags = ice_rxd_error_to_pkt_flags(rx_stat_err0);
 #ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
-		if (ice_timestamp_dynflag > 0) {
+		if (ice_timestamp_dynflag > 0 &&
+		    (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)) {
 			rxq->time_high =
 			   rte_le_to_cpu_32(rxd.wb.flex_ts.ts_high);
 			if (unlikely(is_tsinit)) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.665449800 +0800
+++ 0119-net-ice-fix-timestamp-enabling.patch	2023-06-25 14:31:58.575773900 +0800
@@ -1 +1 @@
-From 71021636964dcd074ff2ee1663dc67ec830e6a14 Mon Sep 17 00:00:00 2001
+From 1f35681b6eb48bb00fa9d72aa69ecd47813b3a5b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 71021636964dcd074ff2ee1663dc67ec830e6a14 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice: initialize parser for double VLAN' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (118 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/ice: fix timestamp enabling' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/ice: fix outer UDP checksum offload' " Xueming Li
                   ` (9 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Zhichao Zeng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bae61d23052101121b803398e59d3b9df4347309 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Fri, 26 May 2023 15:21:25 -0400
Subject: [PATCH] net/ice: initialize parser for double VLAN
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6e753d777ffc540b81e53d4ef2315a805347460e ]

Double Vlan mode need to be configured for parser
Otherwise parser result will not be consistent with hardware.

Fixes: 531d2555c8a6 ("net/ice: refactor parser usage")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 86a32f8cb1..ed3075d555 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1836,6 +1836,11 @@ ice_flow_init(struct ice_adapter *ad)
 	if (ice_parser_create(&ad->hw, &ad->psr) != ICE_SUCCESS)
 		PMD_INIT_LOG(WARNING, "Failed to initialize DDP parser, raw packet filter will not be supported");
 
+	if (ice_is_dvm_ena(&ad->hw))
+		ice_parser_dvm_set(ad->psr, true);
+	else
+		ice_parser_dvm_set(ad->psr, false);
+
 	RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {
 		if (engine->init == NULL) {
 			PMD_INIT_LOG(ERR, "Invalid engine type (%d)",
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.689322600 +0800
+++ 0120-net-ice-initialize-parser-for-double-VLAN.patch	2023-06-25 14:31:58.575773900 +0800
@@ -1 +1 @@
-From 6e753d777ffc540b81e53d4ef2315a805347460e Mon Sep 17 00:00:00 2001
+From bae61d23052101121b803398e59d3b9df4347309 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6e753d777ffc540b81e53d4ef2315a805347460e ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice: fix outer UDP checksum offload' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (119 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/ice: initialize parser for double VLAN' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'net/iavf: fix virtchnl command called in interrupt' " Xueming Li
                   ` (8 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Zhichao Zeng; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bd5c63549a45cad412d779017ba1858d1eca44f6 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Fri, 2 Jun 2023 09:42:53 +0800
Subject: [PATCH] net/ice: fix outer UDP checksum offload
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 10fbf1af4c5548b85b4791d241cdef62755240b1 ]

Currently, when dealing with UDP tunnel pkts checksum offloading,
the outer-udp checksum will be offloaded by default. So the
'csum set outer-udp hw/sw' command does not work.

This patch fixes judgment of the EIPT flag and enables the
'csum set outer-udp hw/sw' command by adding judgment for the
outer-udp checksum offload flag.

Fixes: bd70c451532c ("net/ice: support Tx checksum offload for tunnel")

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 7b6784b177..665ae32c13 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2734,7 +2734,8 @@ ice_parse_tunneling_params(uint64_t ol_flags,
 	 * Shall be set only if L4TUNT = 01b and EIPT is not zero
 	 */
 	if (!(*cd_tunneling & ICE_TX_CTX_EIPT_NONE) &&
-	    (*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING))
+		(*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING) &&
+		(ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
 		*cd_tunneling |= ICE_TXD_CTX_QW0_L4T_CS_M;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.711248100 +0800
+++ 0121-net-ice-fix-outer-UDP-checksum-offload.patch	2023-06-25 14:31:58.575773900 +0800
@@ -1 +1 @@
-From 10fbf1af4c5548b85b4791d241cdef62755240b1 Mon Sep 17 00:00:00 2001
+From bd5c63549a45cad412d779017ba1858d1eca44f6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 10fbf1af4c5548b85b4791d241cdef62755240b1 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/iavf: fix virtchnl command called in interrupt' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (120 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/ice: fix outer UDP checksum offload' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'test/mbuf: fix crash in a forked process' " Xueming Li
                   ` (7 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4d116ff1ac5d9b5d03b0265bdee342d3af53de80 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Thu, 8 Jun 2023 15:27:56 +0800
Subject: [PATCH] net/iavf: fix virtchnl command called in interrupt
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 92a16af4504b67545e91286dfb0a332d58e68eec ]

When iavf send virtchnl command in eal-intr-thread, there will be
no response received from iavf_dev_virtchnl_handler for this
command during block and wait. Because iavf_dev_virtchnl_handler
is also registered in eal-intr-thread.

This commit add to poll the response for virtchnl command
when it is called by eal-intr-thread to fix this issue.

Fixes: 22b123a36d07 ("net/avf: initialize PMD")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c |  5 ++-
 drivers/net/iavf/iavf_vchnl.c  | 71 +++++++++++++++++++++++-----------
 2 files changed, 52 insertions(+), 24 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 9c55eaa66e..3cc4b40712 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2610,6 +2610,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 	adapter->dev_data = eth_dev->data;
 	adapter->stopped = 1;
 
+	if (iavf_dev_event_handler_init())
+		goto init_vf_err;
+
 	if (iavf_init_vf(eth_dev) != 0) {
 		PMD_INIT_LOG(ERR, "Init vf failed");
 		return -1;
@@ -2637,8 +2640,6 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
 			&eth_dev->data->mac_addrs[0]);
 
-	if (iavf_dev_event_handler_init())
-		goto init_vf_err;
 
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
 		/* register callback func to eal lib */
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 9adaadb173..aeffb07cca 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -256,6 +256,7 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,
 				vf->link_speed = iavf_convert_link_speed(speed);
 			}
 			iavf_dev_link_update(vf->eth_dev, 0);
+			iavf_dev_event_post(vf->eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL, 0);
 			PMD_DRV_LOG(INFO, "Link status update:%s",
 					vf->link_up ? "up" : "down");
 			break;
@@ -368,28 +369,48 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
 		_clear_cmd(vf);
 		break;
 	default:
-		/* For other virtchnl ops in running time,
-		 * wait for the cmd done flag.
-		 */
-		do {
-			if (vf->pend_cmd == VIRTCHNL_OP_UNKNOWN)
-				break;
-			iavf_msec_delay(ASQ_DELAY_MS);
-			/* If don't read msg or read sys event, continue */
-		} while (i++ < MAX_TRY_TIMES);
-
-		if (i >= MAX_TRY_TIMES) {
-			PMD_DRV_LOG(ERR, "No response for cmd %d", args->ops);
+		if (rte_thread_is_intr()) {
+			/* For virtchnl ops were executed in eal_intr_thread,
+			 * need to poll the response.
+			 */
+			do {
+				result = iavf_read_msg_from_pf(adapter, args->out_size,
+							args->out_buffer);
+				if (result == IAVF_MSG_CMD)
+					break;
+				iavf_msec_delay(ASQ_DELAY_MS);
+			} while (i++ < MAX_TRY_TIMES);
+			if (i >= MAX_TRY_TIMES ||
+				vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) {
+				err = -1;
+				PMD_DRV_LOG(ERR, "No response or return failure (%d)"
+						" for cmd %d", vf->cmd_retval, args->ops);
+			}
 			_clear_cmd(vf);
-			err = -EIO;
-		} else if (vf->cmd_retval ==
-			   VIRTCHNL_STATUS_ERR_NOT_SUPPORTED) {
-			PMD_DRV_LOG(ERR, "Cmd %d not supported", args->ops);
-			err = -ENOTSUP;
-		} else if (vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) {
-			PMD_DRV_LOG(ERR, "Return failure %d for cmd %d",
-				    vf->cmd_retval, args->ops);
-			err = -EINVAL;
+		} else {
+			/* For other virtchnl ops in running time,
+			 * wait for the cmd done flag.
+			 */
+			do {
+				if (vf->pend_cmd == VIRTCHNL_OP_UNKNOWN)
+					break;
+				iavf_msec_delay(ASQ_DELAY_MS);
+				/* If don't read msg or read sys event, continue */
+			} while (i++ < MAX_TRY_TIMES);
+
+			if (i >= MAX_TRY_TIMES) {
+				PMD_DRV_LOG(ERR, "No response for cmd %d", args->ops);
+				_clear_cmd(vf);
+				err = -EIO;
+			} else if (vf->cmd_retval ==
+				VIRTCHNL_STATUS_ERR_NOT_SUPPORTED) {
+				PMD_DRV_LOG(ERR, "Cmd %d not supported", args->ops);
+				err = -ENOTSUP;
+			} else if (vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) {
+				PMD_DRV_LOG(ERR, "Return failure %d for cmd %d",
+						vf->cmd_retval, args->ops);
+				err = -EINVAL;
+			}
 		}
 		break;
 	}
@@ -403,8 +424,14 @@ iavf_execute_vf_cmd_safe(struct iavf_adapter *adapter,
 {
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	int ret;
+	int is_intr_thread = rte_thread_is_intr();
 
-	rte_spinlock_lock(&vf->aq_lock);
+	if (is_intr_thread) {
+		if (!rte_spinlock_trylock(&vf->aq_lock))
+			return -EIO;
+	} else {
+		rte_spinlock_lock(&vf->aq_lock);
+	}
 	ret = iavf_execute_vf_cmd(adapter, args, async);
 	rte_spinlock_unlock(&vf->aq_lock);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.737483700 +0800
+++ 0122-net-iavf-fix-virtchnl-command-called-in-interrupt.patch	2023-06-25 14:31:58.585773900 +0800
@@ -1 +1 @@
-From 92a16af4504b67545e91286dfb0a332d58e68eec Mon Sep 17 00:00:00 2001
+From 4d116ff1ac5d9b5d03b0265bdee342d3af53de80 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 92a16af4504b67545e91286dfb0a332d58e68eec ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 96004220a1..b72dbc8ceb 100644
+index 9c55eaa66e..3cc4b40712 100644
@@ -28 +30 @@
-@@ -2647,6 +2647,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2610,6 +2610,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
@@ -38 +40 @@
-@@ -2674,8 +2677,6 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2637,8 +2640,6 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
@@ -48 +50 @@
-index 8874a08b24..07eb358824 100644
+index 9adaadb173..aeffb07cca 100644
@@ -56,4 +58,4 @@
- 			if (vf->link_up && !vf->vf_reset) {
- 				iavf_dev_watchdog_disable(adapter);
- 			} else {
-@@ -374,28 +375,48 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
+ 			PMD_DRV_LOG(INFO, "Link status update:%s",
+ 					vf->link_up ? "up" : "down");
+ 			break;
+@@ -368,28 +369,48 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
@@ -129 +131 @@
-@@ -409,8 +430,14 @@ iavf_execute_vf_cmd_safe(struct iavf_adapter *adapter,
+@@ -403,8 +424,14 @@ iavf_execute_vf_cmd_safe(struct iavf_adapter *adapter,

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

* patch 'test/mbuf: fix crash in a forked process' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (121 preceding siblings ...)
  2023-06-25  6:35 ` patch 'net/iavf: fix virtchnl command called in interrupt' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'doc: fix typo in graph guide' " Xueming Li
                   ` (6 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Jia He, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 55fbb9de8dd932518cccc95bdee011adfcdf2c32 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Mon, 22 May 2023 14:01:37 +0800
Subject: [PATCH] test/mbuf: fix crash in a forked process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b6c419dde10e9f5dec7a02098c48060a7493420c ]

Access of any memory in the hugepage shared file-backed area will trigger
an unexpected forked child process segment fault. The root cause is DPDK
doesn't support fork model [1] (calling rte_eal_init() before fork()).
Forked child process can't be treated as a secondary process.

Hence fix it by avoiding fork and doing verification in the main process.

[1] https://mails.dpdk.org/archives/dev/2018-July/108106.html

Fixes: af75078fece3 ("first public release")

Signed-off-by: Jia He <justin.he@arm.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_mbuf.c | 50 +++++++++++++-------------------------------
 1 file changed, 14 insertions(+), 36 deletions(-)

diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 1f4dd62466..7a2f8a9980 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -1167,38 +1167,16 @@ test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
 	return TEST_SKIPPED;
 }
 #else
-
-#include <unistd.h>
-#include <sys/resource.h>
-#include <sys/time.h>
-#include <sys/wait.h>
-
-/* use fork() to test mbuf errors panic */
-static int
-verify_mbuf_check_panics(struct rte_mbuf *buf)
+/* Verify if mbuf can pass the check */
+static bool
+mbuf_check_pass(struct rte_mbuf *buf)
 {
-	int pid;
-	int status;
+	const char *reason;
 
-	pid = fork();
+	if (rte_mbuf_check(buf, 1, &reason) == 0)
+		return true;
 
-	if (pid == 0) {
-		struct rlimit rl;
-
-		/* No need to generate a coredump when panicking. */
-		rl.rlim_cur = rl.rlim_max = 0;
-		setrlimit(RLIMIT_CORE, &rl);
-		rte_mbuf_sanity_check(buf, 1); /* should panic */
-		exit(0);  /* return normally if it doesn't panic */
-	} else if (pid < 0) {
-		printf("Fork Failed\n");
-		return -1;
-	}
-	wait(&status);
-	if(status == 0)
-		return -1;
-
-	return 0;
+	return false;
 }
 
 static int
@@ -1215,19 +1193,19 @@ test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
 		return -1;
 
 	printf("Checking good mbuf initially\n");
-	if (verify_mbuf_check_panics(buf) != -1)
+	if (!mbuf_check_pass(buf))
 		return -1;
 
 	printf("Now checking for error conditions\n");
 
-	if (verify_mbuf_check_panics(NULL)) {
+	if (mbuf_check_pass(NULL)) {
 		printf("Error with NULL mbuf test\n");
 		return -1;
 	}
 
 	badbuf = *buf;
 	badbuf.pool = NULL;
-	if (verify_mbuf_check_panics(&badbuf)) {
+	if (mbuf_check_pass(&badbuf)) {
 		printf("Error with bad-pool mbuf test\n");
 		return -1;
 	}
@@ -1235,7 +1213,7 @@ test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
 	if (RTE_IOVA_AS_PA) {
 		badbuf = *buf;
 		rte_mbuf_iova_set(&badbuf, 0);
-		if (verify_mbuf_check_panics(&badbuf)) {
+		if (mbuf_check_pass(&badbuf)) {
 			printf("Error with bad-physaddr mbuf test\n");
 			return -1;
 		}
@@ -1243,21 +1221,21 @@ test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
 
 	badbuf = *buf;
 	badbuf.buf_addr = NULL;
-	if (verify_mbuf_check_panics(&badbuf)) {
+	if (mbuf_check_pass(&badbuf)) {
 		printf("Error with bad-addr mbuf test\n");
 		return -1;
 	}
 
 	badbuf = *buf;
 	badbuf.refcnt = 0;
-	if (verify_mbuf_check_panics(&badbuf)) {
+	if (mbuf_check_pass(&badbuf)) {
 		printf("Error with bad-refcnt(0) mbuf test\n");
 		return -1;
 	}
 
 	badbuf = *buf;
 	badbuf.refcnt = UINT16_MAX;
-	if (verify_mbuf_check_panics(&badbuf)) {
+	if (mbuf_check_pass(&badbuf)) {
 		printf("Error with bad-refcnt(MAX) mbuf test\n");
 		return -1;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.762868000 +0800
+++ 0123-test-mbuf-fix-crash-in-a-forked-process.patch	2023-06-25 14:31:58.585773900 +0800
@@ -1 +1 @@
-From b6c419dde10e9f5dec7a02098c48060a7493420c Mon Sep 17 00:00:00 2001
+From 55fbb9de8dd932518cccc95bdee011adfcdf2c32 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b6c419dde10e9f5dec7a02098c48060a7493420c ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 8d8d3b9386..efac01806b 100644
+index 1f4dd62466..7a2f8a9980 100644
@@ -99 +101 @@
- 	if (RTE_IOVA_IN_MBUF) {
+ 	if (RTE_IOVA_AS_PA) {

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

* patch 'doc: fix typo in graph guide' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (122 preceding siblings ...)
  2023-06-25  6:35 ` patch 'test/mbuf: fix crash in a forked process' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'doc: remove warning with Doxygen 1.9.7' " Xueming Li
                   ` (5 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Ashwin Sekhar T K; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d8e35e7efe077884867a1e4a870f99f829747fbe Mon Sep 17 00:00:00 2001
From: Ashwin Sekhar T K <asekhar@marvell.com>
Date: Thu, 4 May 2023 10:01:35 +0530
Subject: [PATCH] doc: fix typo in graph guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b457a9b3a4027aa6b0e52940fbaf6736ad021296 ]

Fix typo in graph lib doc.

Fixes: 4dc6d8e63c16 ("doc: add graph library guide")

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 doc/guides/prog_guide/graph_lib.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/prog_guide/graph_lib.rst b/doc/guides/prog_guide/graph_lib.rst
index 1cfdc86433..4ab0623f44 100644
--- a/doc/guides/prog_guide/graph_lib.rst
+++ b/doc/guides/prog_guide/graph_lib.rst
@@ -173,7 +173,7 @@ Create the graph object
 ~~~~~~~~~~~~~~~~~~~~~~~
 Now that the nodes are linked, Its time to create a graph by including
 the required nodes. The application can provide a set of node patterns to
-form a graph object. The ``famish()`` API used underneath for the pattern
+form a graph object. The ``fnmatch()`` API used underneath for the pattern
 matching to include the required nodes. After the graph create any changes to
 nodes or graph is not allowed.
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.785490800 +0800
+++ 0124-doc-fix-typo-in-graph-guide.patch	2023-06-25 14:31:58.585773900 +0800
@@ -1 +1 @@
-From b457a9b3a4027aa6b0e52940fbaf6736ad021296 Mon Sep 17 00:00:00 2001
+From d8e35e7efe077884867a1e4a870f99f829747fbe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b457a9b3a4027aa6b0e52940fbaf6736ad021296 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'doc: remove warning with Doxygen 1.9.7' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (123 preceding siblings ...)
  2023-06-25  6:35 ` patch 'doc: fix typo in graph guide' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-06-25  6:35 ` patch 'dma/dpaa2: set VFA bit for route-by-port with VF' " Xueming Li
                   ` (4 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9047d5c9bf49cb86799619809991fb29f27887c7 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Fri, 2 Jun 2023 16:36:59 +0530
Subject: [PATCH] doc: remove warning with Doxygen 1.9.7
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6df586f544d90f1eb266d75e6c8215e1c081019c ]

Since doxygen 1.9.7 version, HTML_TIMESTAMP configuration option
changed to TIMESTAMP [2]. Fixed the following warning[1] by
removing TIMESTAMP options all together as all new versions(since 1.8.9)
of doxygen this option is disabled by default. Another option was
considered to have this configuration option based on version check, which
may not be worth having it, especially, external_program.version()
API introduced in 0.62.0 version of meson.

[1]
Warning: Tag 'HTML_TIMESTAMP' at line 115 of file 'doc/api/doxy-api.conf'
has become obsolete.

[2]
https://www.doxygen.nl/manual/config.html#cfg_timestamp

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/api/doxy-api.conf.in | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in
index f0886c3bd1..dd8ebab447 100644
--- a/doc/api/doxy-api.conf.in
+++ b/doc/api/doxy-api.conf.in
@@ -99,7 +99,6 @@ GENERATE_DEPRECATEDLIST = YES
 VERBATIM_HEADERS        = NO
 ALPHABETICAL_INDEX      = NO
 
-HTML_TIMESTAMP          = NO
 HTML_DYNAMIC_SECTIONS   = YES
 HTML_EXTRA_STYLESHEET   = @TOPDIR@/doc/api/custom.css
 SEARCHENGINE            = YES
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.806245800 +0800
+++ 0125-doc-remove-warning-with-Doxygen-1.9.7.patch	2023-06-25 14:31:58.585773900 +0800
@@ -1 +1 @@
-From 6df586f544d90f1eb266d75e6c8215e1c081019c Mon Sep 17 00:00:00 2001
+From 9047d5c9bf49cb86799619809991fb29f27887c7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6df586f544d90f1eb266d75e6c8215e1c081019c ]
@@ -21,2 +23,0 @@
-Cc: stable@dpdk.org
-
@@ -30 +31 @@
-index 8ea78f9005..1a4210b948 100644
+index f0886c3bd1..dd8ebab447 100644
@@ -33 +34 @@
-@@ -113,7 +113,6 @@ GENERATE_DEPRECATEDLIST = YES
+@@ -99,7 +99,6 @@ GENERATE_DEPRECATEDLIST = YES

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

* patch 'dma/dpaa2: set VFA bit for route-by-port with VF' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (124 preceding siblings ...)
  2023-06-25  6:35 ` patch 'doc: remove warning with Doxygen 1.9.7' " Xueming Li
@ 2023-06-25  6:35 ` Xueming Li
  2023-08-09 23:47 ` patch " Xueming Li
                   ` (3 subsequent siblings)
  129 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-06-25  6:35 UTC (permalink / raw)
  To: Alvaro Karsz; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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/27/23. So please
shout if anyone has objections.

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 11757d12eeed23bfe6da676f147c9ca9bf7ac51e Mon Sep 17 00:00:00 2001
From: Alvaro Karsz <alvaro.karsz@solid-run.com>
Date: Sun, 26 Mar 2023 12:06:47 +0300
Subject: [PATCH] dma/dpaa2: set VFA bit for route-by-port with VF
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 92f8be196ada1d4361d35039dbf36427e1358d03 ]

Set the VFA (Virtual Function Active) bit in
struct qdma_sdd -> rbpcmd_simple in order to use the route-by-port
functionality with PCIe virtual functions.

At the moment, a user wanting to enable route-by-port will call
rte_dpaa2_qdma_vchan_rbp_enable with a rte_dpaa2_qdma_rbp struct.

The struct includes the PCIe Physical and Virtual functions among other
things, which are then copied to qdma_sdd -> rbpcmd_simple, but the vfa
bit is never touched (the bit does exists in rbpcmd_simple),
so route-by-port with virtual functions won't work..

In order to fix this, a vfa bit is added to struct rte_dpaa2_qdma_rbp,
then is copied to qdma_sdd -> rbpcmd_simple.

Fixes: 8caf8427f85a ("dma/dpaa2: introduce driver skeleton")

Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/dma/dpaa2/dpaa2_qdma.c         | 2 ++
 drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c
index d5a5f08ecc..8968bb853b 100644
--- a/drivers/dma/dpaa2/dpaa2_qdma.c
+++ b/drivers/dma/dpaa2/dpaa2_qdma.c
@@ -117,6 +117,7 @@ dpaa2_qdma_populate_fle(struct qbman_fle *fle,
 		/* source */
 		sdd->read_cmd.portid = rbp->sportid;
 		sdd->rbpcmd_simple.pfid = rbp->spfid;
+		sdd->rbpcmd_simple.vfa = rbp->vfa;
 		sdd->rbpcmd_simple.vfid = rbp->svfid;
 
 		if (rbp->srbp) {
@@ -129,6 +130,7 @@ dpaa2_qdma_populate_fle(struct qbman_fle *fle,
 		/* destination */
 		sdd->write_cmd.portid = rbp->dportid;
 		sdd->rbpcmd_simple.pfid = rbp->dpfid;
+		sdd->rbpcmd_simple.vfa = rbp->vfa;
 		sdd->rbpcmd_simple.vfid = rbp->dvfid;
 
 		if (rbp->drbp) {
diff --git a/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h b/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h
index dc8acb4aec..5a8da46d12 100644
--- a/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h
+++ b/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h
@@ -44,7 +44,9 @@ struct rte_dpaa2_qdma_rbp {
 	uint32_t svfid:6;
 	/* using route by port for source */
 	uint32_t srbp:1;
-	uint32_t rsv:4;
+	/* Virtual Function Active */
+	uint32_t vfa:1;
+	uint32_t rsv:3;
 };
 
 /** Determines a QDMA job */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:01.828369500 +0800
+++ 0126-dma-dpaa2-set-VFA-bit-for-route-by-port-with-VF.patch	2023-06-25 14:31:58.585773900 +0800
@@ -1 +1 @@
-From 92f8be196ada1d4361d35039dbf36427e1358d03 Mon Sep 17 00:00:00 2001
+From 11757d12eeed23bfe6da676f147c9ca9bf7ac51e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 92f8be196ada1d4361d35039dbf36427e1358d03 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org

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

* patch has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (125 preceding siblings ...)
  2023-06-25  6:35 ` patch 'dma/dpaa2: set VFA bit for route-by-port with VF' " Xueming Li
@ 2023-08-09 23:47 ` Xueming Li
  2023-08-09 23:47   ` patch 'examples/l2fwd-cat: fix external build' " Xueming Li
                     ` (52 more replies)
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                   ` (2 subsequent siblings)
  129 siblings, 53 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Xueming Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From da3c4ce23806030441aca6b3557dd99d7b81cb2a Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Wed, 9 Aug 2023 21:51:18 +0800
Subject: [PATCH] *** SUBJECT HERE ***
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

*** BLURB HERE ***

Aakash Sasidharan (1):
  test/crypto: fix PDCP-SDAP test vectors

Alexander Kozyrev (4):
  net/mlx5: forbid MPRQ restart
  net/mlx5: fix MPRQ stride size for headroom
  net/mlx5: fix handle validation for meter mark
  app/testpmd: fix meter mark handle update

Ali Alnubani (2):
  doc: fix typos and wording in flow API guide
  doc: improve wording of cuda guide

Artemii Morozov (1):
  common/sfc_efx/base: fix Rx queue without RSS hash prefix

Bing Zhao (12):
  app/testpmd: fix flow rule number parsing
  net/mlx5: fix error set in Tx representor tagging
  net/mlx5: fix return value of vport action
  net/mlx5: fix error set in control tables create
  net/mlx5: fix error set for age pool initialization
  net/mlx5: fix error in VLAN actions creation
  common/mlx5: fix obtaining IB device in LAG mode
  net/mlx5: fix profile check of meter mark
  net/mlx5: reduce counter pool name length
  net/mlx5: fix drop action memory leak
  net/mlx5: fix validation for conntrack indirect action
  doc: add flow template API requirements for mlx5

Bruce Richardson (1):
  test/bonding: fix include of standard header

Chaoyong He (8):
  net/nfp: fix IPv6 address for set flow action
  net/nfp: fix unneeded endian conversion
  net/nfp: fix endian conversion for tunnel decap action
  net/nfp: fix VNI of VXLAN encap action
  net/nfp: fix VNI of IPv4 NVGRE encap action
  net/nfp: fix VNI of IPv6 NVGRE encap action
  net/nfp: fix Tx descriptor free logic of NFD3
  net/nfp: fix offloading flows

Ciara Power (3):
  crypto/qat: fix null algorithm digest placement
  cryptodev: fix device socket ID type
  app/crypto-perf: fix socket ID default value

David Marchand (6):
  examples/l2fwd-cat: fix external build
  examples/fips_validation: fix external build
  test: add graph tests
  mbuf: fix Doxygen comment of distributor metadata
  ci: fix libabigail cache in GHA
  doc: fix link to flow capabilities from bnxt guide

Denis Pryazhennikov (3):
  ethdev: update documentation for API to set FEC
  ethdev: check that at least one FEC mode is specified
  ethdev: update documentation for API to get FEC

Didier Pallard (2):
  crypto/openssl: fix memory leak in auth processing
  crypto/openssl: skip workaround at compilation time

Dmitry Kozlyuk (1):
  member: fix PRNG seed reset in NitroSketch mode

Dongdong Liu (3):
  doc: fix kernel patch link in hns3 guide
  doc: fix syntax in hns3 guide
  doc: fix number of leading spaces in hns3 guide

Erez Ferber (1):
  common/mlx5: adjust fork call with new kernel API

Fengnan Chang (1):
  mem: fix memsegs exhausted message

Ferruh Yigit (2):
  app/testpmd: revert primary process polling all queues fix
  kni: fix build with Linux 6.5

Gregory Etelson (1):
  net/mlx5: fix flow workspace destruction

Heng Jiang (1):
  net/mlx5: fix LRO TCP checksum

Hernan Vargas (2):
  baseband/fpga_5gnr_fec: fix possible division by zero
  baseband/fpga_5gnr_fec: fix starting unconfigured queue

Huisong Li (3):
  net/hns3: delete duplicate macro definition
  net/hns3: fix non-zero weight for disabled TC
  net/hns3: fix index to look up table in NEON Rx

Jiawen Wu (11):
  net/txgbe/base: fix Tx with fiber hotplug
  net/txgbe: fix interrupt enable mask
  net/txgbe: adapt to MNG veto bit setting
  net/txgbe: fix to set autoneg for 1G speed
  net/txgbe: fix extended statistics
  net/ngbe: fix extended statistics
  net/ngbe: adapt to MNG veto bit setting
  net/ngbe: fix link status in no LSC mode
  net/ngbe: remove redundant codes
  net/txgbe: fix blocking system events
  net/ngbe: fix RSS offload capability

Jie Hai (1):
  app/testpmd: fix primary process not polling all queues

Jieqiang Wang (1):
  net/i40e: fix comments

Junfeng Guo (4):
  net/ice: fix protocol agnostic offloading with big packets
  net/iavf: fix protocol agnostic offloading with big packets
  raw/ntb: avoid disabling interrupt twice
  doc: update BIOS settings and supported HW for NTB

Kai Ji (1):
  examples/ipsec-secgw: fix socket ID default value

Kaiwen Deng (1):
  net/ice: fix MAC type of E822 and E823

Kaiyu Zhang (1):
  ethdev: fix potential leak in PCI probing helper

Ke Xu (1):
  net/iavf: fix tunnel TSO path selection

Long Li (3):
  net/mana: fix counter overflow for posted WQE
  net/mana: fix WQE count for ringing RQ doorbell
  net/mana: fix Tx queue statistics

Long Wu (2):
  net/bonding: fix destroy dedicated queues flow
  net/nfp: fix representor name too long

Maayan Kashani (1):
  net/mlx5: fix RSS expansion inner buffer overflow

Maxime Coquelin (1):
  crypto/qat: fix sym device prototype

Michal Schmidt (1):
  net/iavf: fix VLAN offload with AVX512

Min Zhou (1):
  net/ixgbe: add proper memory barriers in Rx

Mingjin Ye (1):
  net/iavf: fix abnormal disable HW interrupt

Mohammad Iqbal Ahmad (1):
  examples/l3fwd: fix duplicate expression for default nexthop

Nithin Dabilpuram (1):
  net/cnxk: fix cookies check with security offload

Ori Kam (1):
  net/mlx5: fix query for NIC flow capability

Peng Zhang (1):
  net/nfp: fix address always related with PF ID 0

Qiming Yang (5):
  net/e1000: fix queue number initialization
  net/ice: fix VLAN mode parser
  net/ixgbe: fix Rx and Tx queue status
  net/igc: fix Rx and Tx queue status
  net/e1000: fix Rx and Tx queue status

Rahul Bhansali (2):
  test/security: fix event inline IPsec reassembly tests
  common/cnxk: fix CPT backpressure disable on LBK

Raslan Darawsheh (1):
  devtools: fix bashism in mailmap check

Ruifeng Wang (1):
  net/mlx5: fix risk in NEON Rx descriptor read

Samina Arshad (1):
  examples/fips_validation: fix digest length in AES-GCM

Satha Rao (1):
  net/cnxk: flush SQ before configuring MTU

Satheesh Paul (1):
  net/cnxk: fix flow queue index validation

Sean Zhang (1):
  net/mlx5: fix flow dump for modify field

Shiyang He (3):
  net/ice: fix tunnel packet Tx descriptor
  net/i40e: fix tunnel packet Tx descriptor
  app/testpmd: fix checksum engine with GTP on 32-bit

Stephen Hemminger (2):
  net/netvsc: fix sizeof calculation
  doc: fix description of runtime directories

Thomas Monjalon (2):
  cryptodev: fix comments of modular operation parameters
  devtools: fix mailmap check for parentheses

Viacheslav Ovsiienko (2):
  net/mlx5: fix device removal event handling
  ipc: fix file descriptor leakage with unhandled messages

Vikash Poddar (2):
  common/qat: fix command parameter corruption
  common/qat: detach crypto from compress build

Vladimir Medvedkin (3):
  fib: fix adding default route
  hash: fix reading unaligned bits in Toeplitz hash
  examples/ipsec-secgw: fix TAP default MAC address

Wenjing Qiao (1):
  common/iavf: fix MAC type for 710 NIC

Wenjun Wu (1):
  common/idpf: fix memory leak on AVX512 Tx queue close

Wenzhuo Lu (1):
  net/iavf: fix VLAN insertion in vector path

Xiao Liang (1):
  ipsec: fix NAT-T header length

Yiding Zhou (1):
  net/ice: fix 32-bit build

Yuying Zhang (1):
  net/ice: fix RSS hash key generation

Zerun Fu (1):
  net/bonding: fix startup when NUMA is not supported

Zhichao Zeng (1):
  net/iavf: fix stop ordering

 .github/workflows/build.yml                   |   2 +-
 .mailmap                                      |   4 +
 app/test-crypto-perf/main.c                   |  15 +-
 app/test-pmd/cmdline_flow.c                   |   6 +
 app/test-pmd/config.c                         |  18 +-
 app/test-pmd/csumonly.c                       |   2 +-
 app/test/meson.build                          |   3 +
 ...ryptodev_security_pdcp_sdap_test_vectors.h | 252 +++++++++---------
 app/test/test_link_bonding.c                  |   2 +-
 app/test/test_security_inline_proto.c         | 238 +++++++++++------
 devtools/check-git-log.sh                     |   4 +-
 doc/guides/conf.py                            |   1 +
 doc/guides/gpus/cuda.rst                      |  28 +-
 doc/guides/nics/bnxt.rst                      |   6 +-
 doc/guides/nics/features/iavf.ini             |   2 +-
 doc/guides/nics/hns3.rst                      |  40 +--
 doc/guides/nics/mlx5.rst                      |   8 +
 doc/guides/prog_guide/multi_proc_support.rst  |  14 +-
 doc/guides/prog_guide/rte_flow.rst            |  17 +-
 doc/guides/rawdevs/ntb.rst                    |  38 ++-
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         |  18 +-
 drivers/common/cnxk/roc_nix_fc.c              |  11 -
 drivers/common/iavf/iavf_common.c             |   2 +
 drivers/common/mlx5/linux/meson.build         |   2 +
 drivers/common/mlx5/linux/mlx5_common_os.c    |  16 +-
 drivers/common/mlx5/linux/mlx5_glue.c         |   4 +
 drivers/common/mlx5/mlx5_common.h             |   2 +-
 drivers/common/mlx5/mlx5_common_pci.c         |   2 +-
 drivers/common/mlx5/mlx5_devx_cmds.c          |   1 +
 drivers/common/qat/dev/qat_dev_gen1.c         |   2 +-
 drivers/common/qat/dev/qat_dev_gen2.c         |   2 +-
 drivers/common/qat/dev/qat_dev_gen3.c         |   2 +-
 drivers/common/qat/dev/qat_dev_gen4.c         |   2 +-
 drivers/common/qat/meson.build                |   8 -
 drivers/common/qat/qat_device.c               |   2 +-
 drivers/common/qat/qat_device.h               |   2 +-
 drivers/common/qat/qat_qp.c                   | 187 -------------
 drivers/common/qat/qat_qp.h                   |  20 +-
 drivers/common/sfc_efx/base/efx_rx.c          |   4 +-
 drivers/compress/qat/qat_comp.c               | 182 +++++++++++++
 drivers/compress/qat/qat_comp.h               |   3 +
 drivers/crypto/openssl/rte_openssl_pmd.c      |  21 +-
 drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c  |   2 +-
 drivers/crypto/qat/dev/qat_crypto_pmd_gens.h  |  18 +-
 drivers/crypto/qat/dev/qat_sym_pmd_gen1.c     |   4 +-
 drivers/crypto/qat/qat_sym.c                  |   7 +-
 drivers/crypto/qat/qat_sym.h                  |   2 +
 drivers/net/bonding/rte_eth_bond_api.c        |  10 +
 drivers/net/bonding/rte_eth_bond_args.c       |   6 +
 drivers/net/bonding/rte_eth_bond_pmd.c        |   6 +-
 drivers/net/cnxk/cn10k_rx.h                   |  12 +-
 drivers/net/cnxk/cn10k_tx.h                   |   2 +
 drivers/net/cnxk/cnxk_ethdev.h                |   1 +
 drivers/net/cnxk/cnxk_ethdev_ops.c            |  47 ++++
 drivers/net/cnxk/cnxk_flow.c                  |  20 +-
 drivers/net/e1000/em_ethdev.c                 |   4 +-
 drivers/net/e1000/igb_rxtx.c                  |   4 +
 drivers/net/hns3/hns3_dcb.c                   |   9 +-
 drivers/net/hns3/hns3_ethdev.h                |   7 -
 drivers/net/hns3/hns3_rxtx_vec_neon.h         |   4 +-
 drivers/net/i40e/i40e_rxtx.c                  |  10 +-
 drivers/net/i40e/i40e_rxtx.h                  |   2 +-
 drivers/net/i40e/i40e_rxtx_vec_altivec.c      |   2 -
 drivers/net/i40e/i40e_rxtx_vec_neon.c         |   2 -
 drivers/net/i40e/i40e_rxtx_vec_sse.c          |   2 -
 drivers/net/iavf/iavf_ethdev.c                |  29 +-
 drivers/net/iavf/iavf_hash.c                  |   2 +-
 drivers/net/iavf/iavf_rxtx.h                  |  10 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c       |   5 +-
 drivers/net/iavf/iavf_vchnl.c                 |  48 +---
 drivers/net/ice/base/ice_common.c             |   2 +
 drivers/net/ice/ice_ethdev.c                  |   8 +-
 drivers/net/ice/ice_fdir_filter.c             |   2 +-
 drivers/net/ice/ice_generic_flow.c            |  10 +-
 drivers/net/ice/ice_hash.c                    |   2 +-
 drivers/net/ice/ice_rxtx.c                    |  10 +-
 drivers/net/ice/ice_rxtx_vec_common.h         |   2 +-
 drivers/net/idpf/idpf_rxtx_vec_avx512.c       |   4 +
 drivers/net/igc/igc_txrx.c                    |   4 +
 drivers/net/ixgbe/ixgbe_rxtx.c                |  53 ++--
 drivers/net/mana/mana.h                       |   2 +-
 drivers/net/mana/rx.c                         |  13 +-
 drivers/net/mana/tx.c                         |   2 +-
 drivers/net/mlx5/linux/mlx5_ethdev_os.c       |  34 ++-
 drivers/net/mlx5/linux/mlx5_flow_os.c         |   2 +-
 drivers/net/mlx5/mlx5.c                       |   2 +
 drivers/net/mlx5/mlx5.h                       |   1 +
 drivers/net/mlx5/mlx5_devx.c                  |   4 +
 drivers/net/mlx5/mlx5_flow.c                  | 151 ++++++-----
 drivers/net/mlx5/mlx5_flow.h                  |   4 +-
 drivers/net/mlx5/mlx5_flow_hw.c               | 242 ++++++++++-------
 drivers/net/mlx5/mlx5_hws_cnt.c               |   5 +-
 drivers/net/mlx5/mlx5_rx.c                    |   1 +
 drivers/net/mlx5/mlx5_rxq.c                   |  51 ++--
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h         |   8 +
 drivers/net/netvsc/hn_rndis.c                 |   3 +-
 .../net/nfp/flower/nfp_flower_representor.c   |  13 +-
 drivers/net/nfp/nfp_ethdev.c                  |   4 +-
 drivers/net/nfp/nfp_flow.c                    |  30 ++-
 drivers/net/nfp/nfp_rxtx.h                    |   8 +-
 drivers/net/nfp/nfpcore/nfp_cpp.h             |   7 +-
 drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c    |  14 +-
 drivers/net/nfp/nfpcore/nfp_cppcore.c         |  54 +++-
 drivers/net/nfp/nfpcore/nfp_rtsym.c           | 135 +++++++++-
 drivers/net/ngbe/base/ngbe_hw.c               |  10 +-
 drivers/net/ngbe/base/ngbe_phy_rtl.c          |  22 ++
 drivers/net/ngbe/base/ngbe_phy_rtl.h          |   2 +
 drivers/net/ngbe/base/ngbe_phy_yt.c           |  16 +-
 drivers/net/ngbe/base/ngbe_type.h             |   1 +
 drivers/net/ngbe/ngbe_ethdev.c                |  32 +--
 drivers/net/ngbe/ngbe_ethdev.h                |   1 -
 drivers/net/ngbe/ngbe_rxtx.c                  |   1 +
 drivers/net/txgbe/base/txgbe_hw.c             |  37 ++-
 drivers/net/txgbe/base/txgbe_phy.c            |  22 +-
 drivers/net/txgbe/base/txgbe_regs.h           |  15 +-
 drivers/net/txgbe/base/txgbe_type.h           |   1 +
 drivers/net/txgbe/txgbe_ethdev.c              | 103 ++++++-
 drivers/net/txgbe/txgbe_ethdev.h              |   6 +
 drivers/net/txgbe/txgbe_ethdev_vf.c           |   6 +-
 drivers/raw/ntb/ntb.c                         |   5 +
 examples/fips_validation/Makefile             |   2 +
 examples/fips_validation/main.c               |   5 +-
 examples/ipsec-secgw/ipsec-secgw.c            |   3 +
 examples/ipsec-secgw/test/common_defs.sh      |   2 +-
 examples/l2fwd-cat/Makefile                   |   1 +
 examples/l3fwd/l3fwd_fib.c                    |   8 +-
 kernel/linux/kni/compat.h                     |   4 +
 kernel/linux/kni/kni_dev.h                    |   4 +
 lib/cryptodev/cryptodev_pmd.h                 |   2 +-
 lib/cryptodev/rte_crypto_asym.h               |   4 +-
 lib/eal/common/eal_common_dynmem.c            |   6 +-
 lib/eal/common/eal_common_proc.c              |  14 +-
 lib/eal/freebsd/eal_memory.c                  |   8 +-
 lib/eal/linux/eal_memory.c                    |  11 +-
 lib/ethdev/ethdev_pci.h                       |   5 +-
 lib/ethdev/rte_ethdev.c                       |   5 +
 lib/ethdev/rte_ethdev.h                       |  16 +-
 lib/fib/dir24_8.c                             |   2 +-
 lib/hash/rte_thash.c                          |  12 +-
 lib/ipsec/esp_outb.c                          |   2 +-
 lib/ipsec/sa.c                                |   2 +-
 lib/mbuf/rte_mbuf_core.h                      |   2 +-
 lib/member/rte_member.h                       |   1 +
 lib/member/rte_member_sketch.c                |   1 -
 144 files changed, 1705 insertions(+), 1056 deletions(-)

--
2.25.1

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

* patch 'examples/l2fwd-cat: fix external build' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'examples/fips_validation: " Xueming Li
                     ` (51 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: David Marchand; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 72c87f820dfef4acb366a4f3ae57bf8187f343f7 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 22 Jun 2023 15:40:29 +0200
Subject: [PATCH] examples/l2fwd-cat: fix external build
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 006e18a83a7f9d50dd24c7931cac1c82e7379c48 ]

cpu_set_t definition requires _GNU_SOURCE.

Fixes: e0473c6d5b18 ("eal: fix build with musl")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
---
 examples/l2fwd-cat/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index 23a09550a4..d06053451a 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -35,6 +35,7 @@ endif
 endif
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
+CFLAGS += -D_GNU_SOURCE
 
 LDFLAGS += -lpqos
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.351143500 +0800
+++ 0001-examples-l2fwd-cat-fix-external-build.patch	2023-08-09 21:51:18.114352000 +0800
@@ -1 +1 @@
-From 006e18a83a7f9d50dd24c7931cac1c82e7379c48 Mon Sep 17 00:00:00 2001
+From 72c87f820dfef4acb366a4f3ae57bf8187f343f7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 006e18a83a7f9d50dd24c7931cac1c82e7379c48 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'examples/fips_validation: fix external build' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
  2023-08-09 23:47   ` patch 'examples/l2fwd-cat: fix external build' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'test: add graph tests' " Xueming Li
                     ` (50 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: David Marchand; +Cc: Gowrishankar Muthukrishnan, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2bdfd0d7ba885fc6a878cc6e96d2046cfcb13180 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 20 Jun 2023 16:07:01 +0200
Subject: [PATCH] examples/fips_validation: fix external build
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 38fe7b8bd6440796b8488246a7cf36a3026acad8 ]

Added sources were not referenced in the makefile used when compiling
this example externally.

Fixes: 36128a67c27e ("examples/fips_validation: add asymmetric validation")
Fixes: b455d261eb89 ("examples/fips_validation: validate ECDSA")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/fips_validation/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile
index bca6647f55..fbb778d57a 100644
--- a/examples/fips_validation/Makefile
+++ b/examples/fips_validation/Makefile
@@ -15,6 +15,8 @@ SRCS-y += fips_validation_ccm.c
 SRCS-y += fips_validation_sha.c
 SRCS-y += fips_dev_self_test.c
 SRCS-y += fips_validation_xts.c
+SRCS-y += fips_validation_rsa.c
+SRCS-y += fips_validation_ecdsa.c
 SRCS-y += main.c
 
 PKGCONF ?= pkg-config
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.373183600 +0800
+++ 0002-examples-fips_validation-fix-external-build.patch	2023-08-09 21:51:18.114352000 +0800
@@ -1 +1 @@
-From 38fe7b8bd6440796b8488246a7cf36a3026acad8 Mon Sep 17 00:00:00 2001
+From 2bdfd0d7ba885fc6a878cc6e96d2046cfcb13180 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 38fe7b8bd6440796b8488246a7cf36a3026acad8 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'test: add graph tests' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
  2023-08-09 23:47   ` patch 'examples/l2fwd-cat: fix external build' " Xueming Li
  2023-08-09 23:47   ` patch 'examples/fips_validation: " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'mbuf: fix Doxygen comment of distributor metadata' " Xueming Li
                     ` (49 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: David Marchand; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5887a7d14dbac391ebef1296de59299f40cfc11b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 19 Jun 2023 22:46:49 +0200
Subject: [PATCH] test: add graph tests
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3d0c16f256a234ed04f6a11fd6635c8780f669f7 ]

We forgot to add graph unit tests to the CI testsuites.

Fixes: 6b89650418fe ("test/graph: add functional tests")
Fixes: 61d77071ab99 ("test/graph: add performance tests")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 app/test/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test/meson.build b/app/test/meson.build
index f34d19e3c3..96702c2078 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -190,6 +190,7 @@ fast_tests = [
         ['fib_autotest', true, true],
         ['fib6_autotest', true, true],
         ['func_reentrancy_autotest', false, true],
+        ['graph_autotest', true, true],
         ['hash_autotest', true, true],
         ['interrupt_autotest', true, true],
         ['ipfrag_autotest', false, true],
@@ -206,6 +207,7 @@ fast_tests = [
         ['memzone_autotest', false, true],
         ['meter_autotest', true, true],
         ['multiprocess_autotest', false, false],
+        ['node_list_dump', true, true],
         ['per_lcore_autotest', true, true],
         ['pflock_autotest', true, true],
         ['prefetch_autotest', true, true],
@@ -295,6 +297,7 @@ perf_test_names = [
         'trace_perf_autotest',
         'ipsec_perf_autotest',
         'thash_perf_autotest',
+        'graph_perf_autotest',
 ]
 
 driver_test_names = [
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.394112200 +0800
+++ 0003-test-add-graph-tests.patch	2023-08-09 21:51:18.114352000 +0800
@@ -1 +1 @@
-From 3d0c16f256a234ed04f6a11fd6635c8780f669f7 Mon Sep 17 00:00:00 2001
+From 5887a7d14dbac391ebef1296de59299f40cfc11b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3d0c16f256a234ed04f6a11fd6635c8780f669f7 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index f3217ae577..537dc9fe35 100644
+index f34d19e3c3..96702c2078 100644
@@ -22 +24 @@
-@@ -192,6 +192,7 @@ fast_tests = [
+@@ -190,6 +190,7 @@ fast_tests = [
@@ -30 +32 @@
-@@ -208,6 +209,7 @@ fast_tests = [
+@@ -206,6 +207,7 @@ fast_tests = [
@@ -38 +40 @@
-@@ -298,6 +300,7 @@ perf_test_names = [
+@@ -295,6 +297,7 @@ perf_test_names = [

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

* patch 'mbuf: fix Doxygen comment of distributor metadata' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (2 preceding siblings ...)
  2023-08-09 23:47   ` patch 'test: add graph tests' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'ci: fix libabigail cache in GHA' " Xueming Li
                     ` (48 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ef98a4da5991ab24905f4844ef87349f8f1de979 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 15 Jun 2023 15:49:42 +0200
Subject: [PATCH] mbuf: fix Doxygen comment of distributor metadata
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b3a160230bc0750cc522f456d11aced01d2e9b20 ]

/**< is for post annotations.

Fixes: 839b20be0e9b ("ethdev: support metadata as flow rule criteria")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/mbuf/rte_mbuf_core.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h
index a30e1e0eaf..3ab7be49fa 100644
--- a/lib/mbuf/rte_mbuf_core.h
+++ b/lib/mbuf/rte_mbuf_core.h
@@ -584,8 +584,8 @@ struct rte_mbuf {
 				 * @see rte_event_eth_tx_adapter_txq_set()
 				 */
 			} txadapter; /**< Eventdev ethdev Tx adapter */
-			/**< User defined tags. See rte_distributor_process() */
 			uint32_t usr;
+			/**< User defined tags. See rte_distributor_process() */
 		} hash;                   /**< hash information */
 	};
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.416227400 +0800
+++ 0004-mbuf-fix-Doxygen-comment-of-distributor-metadata.patch	2023-08-09 21:51:18.114352000 +0800
@@ -1 +1 @@
-From b3a160230bc0750cc522f456d11aced01d2e9b20 Mon Sep 17 00:00:00 2001
+From ef98a4da5991ab24905f4844ef87349f8f1de979 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b3a160230bc0750cc522f456d11aced01d2e9b20 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index c692c33ec4..2030b3bef9 100644
+index a30e1e0eaf..3ab7be49fa 100644

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

* patch 'ci: fix libabigail cache in GHA' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (3 preceding siblings ...)
  2023-08-09 23:47   ` patch 'mbuf: fix Doxygen comment of distributor metadata' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'common/qat: fix command parameter corruption' " Xueming Li
                     ` (47 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: David Marchand; +Cc: Aaron Conole, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0d5c3e03c58849ee879f6595e05d28cd8253a5f9 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 20 Jun 2023 15:29:55 +0200
Subject: [PATCH] ci: fix libabigail cache in GHA
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 870623ad9ed33f21102a5ddc18e15d726e65204d ]

In repositories where multiple branches run the ABI checks using
different versions of libabigail (for example, a 22.11 branch using
libabigail-1.8 and a main branch using libabigail-2.1), a collision
happens on the libabigail binary cache entry.
As a single cache entry is used, the content of the cache (let's say the
cache was built for libabigail 2.1) won't match what the branch wants to
use (in this example running the check for 22.11 branch requires
libabigail 1.8).
.ci/linux-build.sh then tries to recompile libabigail but it fails as
the packages used for building libabigail are missing.

Add the version to the cache entry name to avoid this collision.

Fixes: 443267090edc ("ci: enable v21 ABI checks")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 .github/workflows/build.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 735c58ef2b..9512219a05 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -69,7 +69,7 @@ jobs:
       id: get_ref_keys
       run: |
         echo 'ccache=ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W) >> $GITHUB_OUTPUT
-        echo 'libabigail=libabigail-${{ matrix.config.os }}' >> $GITHUB_OUTPUT
+        echo 'libabigail=libabigail-${{ env.LIBABIGAIL_VERSION }}-${{ matrix.config.os }}' >> $GITHUB_OUTPUT
         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
     - name: Retrieve ccache cache
       uses: actions/cache@v3
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.440273300 +0800
+++ 0005-ci-fix-libabigail-cache-in-GHA.patch	2023-08-09 21:51:18.114352000 +0800
@@ -1 +1 @@
-From 870623ad9ed33f21102a5ddc18e15d726e65204d Mon Sep 17 00:00:00 2001
+From 0d5c3e03c58849ee879f6595e05d28cd8253a5f9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 870623ad9ed33f21102a5ddc18e15d726e65204d ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index 414dd089e0..0e2adb5106 100644
+index 735c58ef2b..9512219a05 100644
@@ -32 +34 @@
-@@ -70,7 +70,7 @@ jobs:
+@@ -69,7 +69,7 @@ jobs:
@@ -38 +40 @@
-         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
+         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT

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

* patch 'common/qat: fix command parameter corruption' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (4 preceding siblings ...)
  2023-08-09 23:47   ` patch 'ci: fix libabigail cache in GHA' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'crypto/qat: fix sym device prototype' " Xueming Li
                     ` (46 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Vikash Poddar; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 791a0227d29a3d4c9a1d4a87a3533c9eed271a8f Mon Sep 17 00:00:00 2001
From: Vikash Poddar <vikash.chandrax.poddar@intel.com>
Date: Fri, 16 Jun 2023 14:00:51 +0000
Subject: [PATCH] common/qat: fix command parameter corruption
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d848fcb84e6cd2bf4c3e943c1188daf8b4631ab8 ]

Added fix to address the memory corruption issue for
qat_dev_cmd_param structure on QAT GEN3.

This fix aligns the storage where it stores the value
on 4 byte unsigned integer data type after
reading slice configuration of QAT capabilities.

Fixes: b3cbbcdffa4f ("common/qat: read HW slice configuration")

Signed-off-by: Vikash Poddar <vikash.chandrax.poddar@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 drivers/common/qat/dev/qat_dev_gen1.c | 2 +-
 drivers/common/qat/dev/qat_dev_gen2.c | 2 +-
 drivers/common/qat/dev/qat_dev_gen3.c | 2 +-
 drivers/common/qat/dev/qat_dev_gen4.c | 2 +-
 drivers/common/qat/qat_device.c       | 2 +-
 drivers/common/qat/qat_device.h       | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/common/qat/dev/qat_dev_gen1.c b/drivers/common/qat/dev/qat_dev_gen1.c
index cf480dcba8..dd2e878e90 100644
--- a/drivers/common/qat/dev/qat_dev_gen1.c
+++ b/drivers/common/qat/dev/qat_dev_gen1.c
@@ -242,7 +242,7 @@ qat_dev_get_extra_size_gen1(void)
 }
 
 static int
-qat_get_dev_slice_map_gen1(uint16_t *map __rte_unused,
+qat_get_dev_slice_map_gen1(uint32_t *map __rte_unused,
 	const struct rte_pci_device *pci_dev __rte_unused)
 {
 	return 0;
diff --git a/drivers/common/qat/dev/qat_dev_gen2.c b/drivers/common/qat/dev/qat_dev_gen2.c
index f51be46eb0..061dfdb698 100644
--- a/drivers/common/qat/dev/qat_dev_gen2.c
+++ b/drivers/common/qat/dev/qat_dev_gen2.c
@@ -22,7 +22,7 @@ static struct qat_qp_hw_spec_funcs qat_qp_hw_spec_gen2 = {
 };
 
 static int
-qat_dev_get_slice_map_gen2(uint16_t *map __rte_unused,
+qat_dev_get_slice_map_gen2(uint32_t *map __rte_unused,
 	const struct rte_pci_device *pci_dev __rte_unused)
 {
 	return 0;
diff --git a/drivers/common/qat/dev/qat_dev_gen3.c b/drivers/common/qat/dev/qat_dev_gen3.c
index e4197f3c0f..f01b98ff86 100644
--- a/drivers/common/qat/dev/qat_dev_gen3.c
+++ b/drivers/common/qat/dev/qat_dev_gen3.c
@@ -68,7 +68,7 @@ static struct qat_qp_hw_spec_funcs qat_qp_hw_spec_gen3 = {
 };
 
 static int
-qat_dev_get_slice_map_gen3(uint16_t *map,
+qat_dev_get_slice_map_gen3(uint32_t *map,
 	const struct rte_pci_device *pci_dev)
 {
 	if (rte_pci_read_config(pci_dev, map,
diff --git a/drivers/common/qat/dev/qat_dev_gen4.c b/drivers/common/qat/dev/qat_dev_gen4.c
index 1b3a5deabf..1ce262f715 100644
--- a/drivers/common/qat/dev/qat_dev_gen4.c
+++ b/drivers/common/qat/dev/qat_dev_gen4.c
@@ -283,7 +283,7 @@ qat_dev_get_misc_bar_gen4(struct rte_mem_resource **mem_resource,
 }
 
 static int
-qat_dev_get_slice_map_gen4(uint16_t *map __rte_unused,
+qat_dev_get_slice_map_gen4(uint32_t *map __rte_unused,
 	const struct rte_pci_device *pci_dev __rte_unused)
 {
 	return 0;
diff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_device.c
index 8bce2ac073..ed75b66041 100644
--- a/drivers/common/qat/qat_device.c
+++ b/drivers/common/qat/qat_device.c
@@ -361,7 +361,7 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 {
 	int sym_ret = 0, asym_ret = 0, comp_ret = 0;
 	int num_pmds_created = 0;
-	uint16_t capa = 0;
+	uint32_t capa = 0;
 	struct qat_pci_device *qat_pci_dev;
 	struct qat_dev_hw_spec_funcs *ops_hw;
 	struct qat_dev_cmd_param qat_dev_cmd_param[] = {
diff --git a/drivers/common/qat/qat_device.h b/drivers/common/qat/qat_device.h
index bc3da04238..4a79cdded3 100644
--- a/drivers/common/qat/qat_device.h
+++ b/drivers/common/qat/qat_device.h
@@ -37,7 +37,7 @@ typedef int (*qat_dev_get_misc_bar_t)
 typedef int (*qat_dev_read_config_t)
 		(struct qat_pci_device *);
 typedef int (*qat_dev_get_extra_size_t)(void);
-typedef int (*qat_dev_get_slice_map_t)(uint16_t *map,
+typedef int (*qat_dev_get_slice_map_t)(uint32_t *map,
 		const struct rte_pci_device *pci_dev);
 
 struct qat_dev_hw_spec_funcs {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.464857500 +0800
+++ 0006-common-qat-fix-command-parameter-corruption.patch	2023-08-09 21:51:18.114352000 +0800
@@ -1 +1 @@
-From d848fcb84e6cd2bf4c3e943c1188daf8b4631ab8 Mon Sep 17 00:00:00 2001
+From 791a0227d29a3d4c9a1d4a87a3533c9eed271a8f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d848fcb84e6cd2bf4c3e943c1188daf8b4631ab8 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -80 +82 @@
-index 0479175b65..ac705e385e 100644
+index 8bce2ac073..ed75b66041 100644
@@ -83 +85 @@
-@@ -367,7 +367,7 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -361,7 +361,7 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -93 +95 @@
-index 4188474dde..5691320040 100644
+index bc3da04238..4a79cdded3 100644
@@ -96 +98 @@
-@@ -38,7 +38,7 @@ typedef int (*qat_dev_get_misc_bar_t)
+@@ -37,7 +37,7 @@ typedef int (*qat_dev_get_misc_bar_t)

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

* patch 'crypto/qat: fix sym device prototype' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (5 preceding siblings ...)
  2023-08-09 23:47   ` patch 'common/qat: fix command parameter corruption' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'crypto/openssl: fix memory leak in auth processing' " Xueming Li
                     ` (45 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Tyler Retzlaff, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 981792ebc40a6a6fe415d07738e1cc91a3ccfaa8 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 20 Jun 2023 09:52:46 +0200
Subject: [PATCH] crypto/qat: fix sym device prototype
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d4e39d35393e50c5ee1eca99566060d93031509c ]

qat_dev_cmd_param parameter of qat_sym_dev_create() was
wrongly marked as unused, this patch fixes it.

Fixes: fb3b9f492205 ("crypto/qat: rework burst data path")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Fan Zhang <fanzhang.oss@gmail.com>
---
 drivers/crypto/qat/qat_sym.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 08e92191a3..2450f042c8 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -179,7 +179,7 @@ qat_sym_dequeue_burst(void *qp, struct rte_crypto_op **ops,
 
 int
 qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
-		struct qat_dev_cmd_param *qat_dev_cmd_param __rte_unused)
+		struct qat_dev_cmd_param *qat_dev_cmd_param)
 {
 	int i = 0, ret = 0;
 	uint16_t slice_map = 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.486928000 +0800
+++ 0007-crypto-qat-fix-sym-device-prototype.patch	2023-08-09 21:51:18.114352000 +0800
@@ -1 +1 @@
-From d4e39d35393e50c5ee1eca99566060d93031509c Mon Sep 17 00:00:00 2001
+From 981792ebc40a6a6fe415d07738e1cc91a3ccfaa8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d4e39d35393e50c5ee1eca99566060d93031509c ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index d07132aaa1..725c9e3934 100644
+index 08e92191a3..2450f042c8 100644
@@ -23 +25 @@
-@@ -180,7 +180,7 @@ qat_sym_dequeue_burst(void *qp, struct rte_crypto_op **ops,
+@@ -179,7 +179,7 @@ qat_sym_dequeue_burst(void *qp, struct rte_crypto_op **ops,

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

* patch 'crypto/openssl: fix memory leak in auth processing' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (6 preceding siblings ...)
  2023-08-09 23:47   ` patch 'crypto/qat: fix sym device prototype' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'crypto/openssl: skip workaround at compilation time' " Xueming Li
                     ` (44 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 91085d3b58db8f04ffcc00cc848b7333fd10295a Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Tue, 18 Apr 2023 16:26:19 +0200
Subject: [PATCH] crypto/openssl: fix memory leak in auth processing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b7b06b3fa4ef4dc8ba6ba822bfa7d9affaaa434a ]

Contexts allocated with EVP_MAC_CTX_new calls are leaking, they are created
then overwritten by the return value of EVP_MAC_CTX_dup call.

Fixes: 75adf1eae44f ("crypto/openssl: update HMAC routine with 3.0 EVP API")
Fixes: 2b9c693f6ef5 ("crypto/openssl: support AES-CMAC operations")

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index f65fbca300..175b651000 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1797,7 +1797,6 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
 # if OPENSSL_VERSION_NUMBER >= 0x30000000L
 	EVP_MAC_CTX *ctx_h;
 	EVP_MAC_CTX *ctx_c;
-	EVP_MAC *mac;
 # else
 	HMAC_CTX *ctx_h;
 	CMAC_CTX *ctx_c;
@@ -1818,10 +1817,7 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
 		break;
 	case OPENSSL_AUTH_AS_HMAC:
 # if OPENSSL_VERSION_NUMBER >= 0x30000000L
-		mac = EVP_MAC_fetch(NULL, "HMAC", NULL);
-		ctx_h = EVP_MAC_CTX_new(mac);
 		ctx_h = EVP_MAC_CTX_dup(sess->auth.hmac.ctx);
-		EVP_MAC_free(mac);
 		status = process_openssl_auth_mac(mbuf_src, dst,
 				op->sym->auth.data.offset, srclen,
 				ctx_h);
@@ -1836,10 +1832,7 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
 		break;
 	case OPENSSL_AUTH_AS_CMAC:
 # if OPENSSL_VERSION_NUMBER >= 0x30000000L
-		mac = EVP_MAC_fetch(NULL, OSSL_MAC_NAME_CMAC, NULL);
-		ctx_c = EVP_MAC_CTX_new(mac);
 		ctx_c = EVP_MAC_CTX_dup(sess->auth.cmac.ctx);
-		EVP_MAC_free(mac);
 		status = process_openssl_auth_mac(mbuf_src, dst,
 				op->sym->auth.data.offset, srclen,
 				ctx_c);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.511140400 +0800
+++ 0008-crypto-openssl-fix-memory-leak-in-auth-processing.patch	2023-08-09 21:51:18.114352000 +0800
@@ -1 +1 @@
-From b7b06b3fa4ef4dc8ba6ba822bfa7d9affaaa434a Mon Sep 17 00:00:00 2001
+From 91085d3b58db8f04ffcc00cc848b7333fd10295a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b7b06b3fa4ef4dc8ba6ba822bfa7d9affaaa434a ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index b20904f3bf..9b83811d67 100644
+index f65fbca300..175b651000 100644
@@ -23 +25 @@
-@@ -1798,7 +1798,6 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+@@ -1797,7 +1797,6 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
@@ -31 +33 @@
-@@ -1819,10 +1818,7 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+@@ -1818,10 +1817,7 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
@@ -42 +44 @@
-@@ -1837,10 +1833,7 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+@@ -1836,10 +1832,7 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,

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

* patch 'crypto/openssl: skip workaround at compilation time' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (7 preceding siblings ...)
  2023-08-09 23:47   ` patch 'crypto/openssl: fix memory leak in auth processing' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'test/security: fix event inline IPsec reassembly tests' " Xueming Li
                     ` (43 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 643423f0b7e4189c9814ade46234ec1d7b39227f Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Tue, 18 Apr 2023 16:56:19 +0200
Subject: [PATCH] crypto/openssl: skip workaround at compilation time
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5b94ac1965620e945a3b8fcff84fab4fcb2ef801 ]

This workaround was needed before version 1.0.1f.
Do not build it for versions >= 1.1.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 175b651000..6825b0469e 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1195,8 +1195,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset,
 		int srclen, uint8_t *aad, int aadlen, uint8_t *iv,
 		uint8_t *dst, uint8_t *tag, EVP_CIPHER_CTX *ctx)
 {
-	int len = 0, unused = 0;
+	int len = 0;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+	int unused = 0;
 	uint8_t empty[] = {};
+#endif
 
 	if (EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv) <= 0)
 		goto process_auth_encryption_gcm_err;
@@ -1210,9 +1213,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset,
 				srclen, ctx, 0))
 			goto process_auth_encryption_gcm_err;
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
 	/* Workaround open ssl bug in version less then 1.0.1f */
 	if (EVP_EncryptUpdate(ctx, empty, &unused, empty, 0) <= 0)
 		goto process_auth_encryption_gcm_err;
+#endif
 
 	if (EVP_EncryptFinal_ex(ctx, dst, &len) <= 0)
 		goto process_auth_encryption_gcm_err;
@@ -1274,8 +1279,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,
 		int srclen, uint8_t *aad, int aadlen, uint8_t *iv,
 		uint8_t *dst, uint8_t *tag, EVP_CIPHER_CTX *ctx)
 {
-	int len = 0, unused = 0;
+	int len = 0;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+	int unused = 0;
 	uint8_t empty[] = {};
+#endif
 
 	if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, 16, tag) <= 0)
 		goto process_auth_decryption_gcm_err;
@@ -1292,9 +1300,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,
 				srclen, ctx, 0))
 			goto process_auth_decryption_gcm_err;
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
 	/* Workaround open ssl bug in version less then 1.0.1f */
 	if (EVP_DecryptUpdate(ctx, empty, &unused, empty, 0) <= 0)
 		goto process_auth_decryption_gcm_err;
+#endif
 
 	if (EVP_DecryptFinal_ex(ctx, dst, &len) <= 0)
 		return -EFAULT;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.537043700 +0800
+++ 0009-crypto-openssl-skip-workaround-at-compilation-time.patch	2023-08-09 21:51:18.114352000 +0800
@@ -1 +1 @@
-From 5b94ac1965620e945a3b8fcff84fab4fcb2ef801 Mon Sep 17 00:00:00 2001
+From 643423f0b7e4189c9814ade46234ec1d7b39227f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5b94ac1965620e945a3b8fcff84fab4fcb2ef801 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 9b83811d67..4569c5e62f 100644
+index 175b651000..6825b0469e 100644
@@ -22 +24 @@
-@@ -1196,8 +1196,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset,
+@@ -1195,8 +1195,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset,
@@ -35 +37 @@
-@@ -1211,9 +1214,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset,
+@@ -1210,9 +1213,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset,
@@ -47 +49 @@
-@@ -1275,8 +1280,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,
+@@ -1274,8 +1279,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,
@@ -60 +62 @@
-@@ -1293,9 +1301,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,
+@@ -1292,9 +1300,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,

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

* patch 'test/security: fix event inline IPsec reassembly tests' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (8 preceding siblings ...)
  2023-08-09 23:47   ` patch 'crypto/openssl: skip workaround at compilation time' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/nfp: fix IPv6 address for set flow action' " Xueming Li
                     ` (42 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Rahul Bhansali; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 64839553ee6f610e96517cf6890a2a86bb06b568 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Tue, 6 Jun 2023 10:36:58 +0530
Subject: [PATCH] test/security: fix event inline IPsec reassembly tests
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2f97b9439dbbc415ee7f6f51c4474f0eef427e65 ]

Event Inline IPsec test suite stuck for reassembly tests
because corresponding Tx and Rx calls are not done and
reassembly flags were not set during event dev initialization.

Fixes: 108646569579 ("test/security: add event inline IPsec cases")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_security_inline_proto.c | 238 +++++++++++++++++---------
 1 file changed, 154 insertions(+), 84 deletions(-)

diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c
index 79858e559f..e411a3c21d 100644
--- a/app/test/test_security_inline_proto.c
+++ b/app/test/test_security_inline_proto.c
@@ -678,6 +678,8 @@ free_mbuf(struct rte_mbuf *mbuf)
 					ip_reassembly_dynfield_offset,
 					rte_eth_ip_reassembly_dynfield_t *);
 			rte_pktmbuf_free(mbuf);
+			if (dynfield.nb_frags == 0)
+				break;
 			mbuf = dynfield.next_frag;
 		}
 	}
@@ -735,6 +737,53 @@ get_and_verify_incomplete_frags(struct rte_mbuf *mbuf,
 	return ret;
 }
 
+static int
+event_tx_burst(struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+{
+	struct rte_event ev;
+	int i, nb_sent = 0;
+
+	/* Convert packets to events */
+	memset(&ev, 0, sizeof(ev));
+	ev.sched_type = RTE_SCHED_TYPE_PARALLEL;
+	for (i = 0; i < nb_pkts; i++) {
+		ev.mbuf = tx_pkts[i];
+		ev.mbuf->port = port_id;
+		nb_sent += rte_event_eth_tx_adapter_enqueue(
+				eventdev_id, port_id, &ev, 1, 0);
+	}
+
+	return nb_sent;
+}
+
+static int
+event_rx_burst(struct rte_mbuf **rx_pkts, uint16_t nb_pkts_to_rx)
+{
+	int nb_ev, nb_rx = 0, j = 0;
+	const int ms_per_pkt = 5;
+	struct rte_event ev;
+
+	do {
+		nb_ev = rte_event_dequeue_burst(eventdev_id, port_id,
+				&ev, 1, 0);
+
+		if (nb_ev == 0) {
+			rte_delay_ms(1);
+			continue;
+		}
+
+		/* Get packet from event */
+		if (ev.event_type != RTE_EVENT_TYPE_ETHDEV) {
+			printf("Unsupported event type: %i\n",
+				ev.event_type);
+			continue;
+		}
+		rx_pkts[nb_rx++] = ev.mbuf;
+	} while (j++ < (nb_pkts_to_rx * ms_per_pkt) && nb_rx < nb_pkts_to_rx);
+
+	return nb_rx;
+}
+
 static int
 test_ipsec_with_reassembly(struct reassembly_vector *vector,
 		const struct ipsec_test_flags *flags)
@@ -761,26 +810,9 @@ test_ipsec_with_reassembly(struct reassembly_vector *vector,
 	burst_sz = vector->burst ? ENCAP_DECAP_BURST_SZ : 1;
 	nb_tx = vector->nb_frags * burst_sz;
 
-	rte_eth_dev_stop(port_id);
-	if (ret != 0) {
-		printf("rte_eth_dev_stop: err=%s, port=%u\n",
-			       rte_strerror(-ret), port_id);
-		return ret;
-	}
 	rte_eth_ip_reassembly_capability_get(port_id, &reass_capa);
 	if (reass_capa.max_frags < vector->nb_frags)
 		return TEST_SKIPPED;
-	if (reass_capa.timeout_ms > APP_REASS_TIMEOUT) {
-		reass_capa.timeout_ms = APP_REASS_TIMEOUT;
-		rte_eth_ip_reassembly_conf_set(port_id, &reass_capa);
-	}
-
-	ret = rte_eth_dev_start(port_id);
-	if (ret < 0) {
-		printf("rte_eth_dev_start: err=%d, port=%d\n",
-			ret, port_id);
-		return ret;
-	}
 
 	memset(tx_pkts_burst, 0, sizeof(tx_pkts_burst[0]) * nb_tx);
 	memset(rx_pkts_burst, 0, sizeof(rx_pkts_burst[0]) * nb_tx);
@@ -871,7 +903,10 @@ test_ipsec_with_reassembly(struct reassembly_vector *vector,
 	if (ret)
 		goto out;
 
-	nb_sent = rte_eth_tx_burst(port_id, 0, tx_pkts_burst, nb_tx);
+	if (event_mode_enabled)
+		nb_sent = event_tx_burst(tx_pkts_burst, nb_tx);
+	else
+		nb_sent = rte_eth_tx_burst(port_id, 0, tx_pkts_burst, nb_tx);
 	if (nb_sent != nb_tx) {
 		ret = -1;
 		printf("\nFailed to tx %u pkts", nb_tx);
@@ -883,14 +918,17 @@ test_ipsec_with_reassembly(struct reassembly_vector *vector,
 	/* Retry few times before giving up */
 	nb_rx = 0;
 	j = 0;
-	do {
-		nb_rx += rte_eth_rx_burst(port_id, 0, &rx_pkts_burst[nb_rx],
-					  nb_tx - nb_rx);
-		j++;
-		if (nb_rx >= nb_tx)
-			break;
-		rte_delay_ms(1);
-	} while (j < 5 || !nb_rx);
+	if (event_mode_enabled)
+		nb_rx = event_rx_burst(rx_pkts_burst, nb_tx);
+	else
+		do {
+			nb_rx += rte_eth_rx_burst(port_id, 0, &rx_pkts_burst[nb_rx],
+						  nb_tx - nb_rx);
+			j++;
+			if (nb_rx >= nb_tx)
+				break;
+			rte_delay_ms(1);
+		} while (j < 5 || !nb_rx);
 
 	/* Check for minimum number of Rx packets expected */
 	if ((vector->nb_frags == 1 && nb_rx != nb_tx) ||
@@ -950,52 +988,6 @@ out:
 	return ret;
 }
 
-static int
-event_tx_burst(struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
-{
-	struct rte_event ev;
-	int i, nb_sent = 0;
-
-	/* Convert packets to events */
-	memset(&ev, 0, sizeof(ev));
-	ev.sched_type = RTE_SCHED_TYPE_PARALLEL;
-	for (i = 0; i < nb_pkts; i++) {
-		ev.mbuf = tx_pkts[i];
-		nb_sent += rte_event_eth_tx_adapter_enqueue(
-				eventdev_id, port_id, &ev, 1, 0);
-	}
-
-	return nb_sent;
-}
-
-static int
-event_rx_burst(struct rte_mbuf **rx_pkts, uint16_t nb_pkts_to_rx)
-{
-	int nb_ev, nb_rx = 0, j = 0;
-	const int ms_per_pkt = 3;
-	struct rte_event ev;
-
-	do {
-		nb_ev = rte_event_dequeue_burst(eventdev_id, port_id,
-				&ev, 1, 0);
-
-		if (nb_ev == 0) {
-			rte_delay_ms(1);
-			continue;
-		}
-
-		/* Get packet from event */
-		if (ev.event_type != RTE_EVENT_TYPE_ETHDEV) {
-			printf("Unsupported event type: %i\n",
-				ev.event_type);
-			continue;
-		}
-		rx_pkts[nb_rx++] = ev.mbuf;
-	} while (j++ < (nb_pkts_to_rx * ms_per_pkt) && nb_rx < nb_pkts_to_rx);
-
-	return nb_rx;
-}
-
 static int
 test_ipsec_inline_sa_exp_event_callback(uint16_t port_id,
 		enum rte_eth_event_type type, void *param, void *ret_param)
@@ -1475,10 +1467,32 @@ out:
 }
 
 static int
-ut_setup_inline_ipsec(void)
+ut_setup_inline_ipsec_reassembly(void)
 {
+	struct rte_eth_ip_reassembly_params reass_capa = {0};
 	int ret;
 
+	rte_eth_ip_reassembly_capability_get(port_id, &reass_capa);
+	if (reass_capa.timeout_ms > APP_REASS_TIMEOUT) {
+		reass_capa.timeout_ms = APP_REASS_TIMEOUT;
+		rte_eth_ip_reassembly_conf_set(port_id, &reass_capa);
+	}
+
+	/* Start event devices */
+	if (event_mode_enabled) {
+		ret = rte_event_eth_rx_adapter_start(rx_adapter_id);
+		if (ret < 0) {
+			printf("Failed to start rx adapter %d\n", ret);
+			return ret;
+		}
+
+		ret = rte_event_dev_start(eventdev_id);
+		if (ret < 0) {
+			printf("Failed to start event device %d\n", ret);
+			return ret;
+		}
+	}
+
 	/* Start device */
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0) {
@@ -1500,12 +1514,16 @@ ut_setup_inline_ipsec(void)
 }
 
 static void
-ut_teardown_inline_ipsec(void)
+ut_teardown_inline_ipsec_reassembly(void)
 {
 	struct rte_eth_ip_reassembly_params reass_conf = {0};
 	uint16_t portid;
 	int ret;
 
+	/* Stop event devices */
+	if (event_mode_enabled)
+		rte_event_dev_stop(eventdev_id);
+
 	/* port tear down */
 	RTE_ETH_FOREACH_DEV(portid) {
 		ret = rte_eth_dev_stop(portid);
@@ -1517,6 +1535,58 @@ ut_teardown_inline_ipsec(void)
 		rte_eth_ip_reassembly_conf_set(portid, &reass_conf);
 	}
 }
+static int
+ut_setup_inline_ipsec(void)
+{
+	int ret;
+
+	/* Start event devices */
+	if (event_mode_enabled) {
+		ret = rte_event_dev_start(eventdev_id);
+		if (ret < 0) {
+			printf("Failed to start event device %d\n", ret);
+			return ret;
+		}
+	}
+
+	/* Start device */
+	ret = rte_eth_dev_start(port_id);
+	if (ret < 0) {
+		printf("rte_eth_dev_start: err=%d, port=%d\n",
+			ret, port_id);
+		return ret;
+	}
+	/* always enable promiscuous */
+	ret = rte_eth_promiscuous_enable(port_id);
+	if (ret != 0) {
+		printf("rte_eth_promiscuous_enable: err=%s, port=%d\n",
+			rte_strerror(-ret), port_id);
+		return ret;
+	}
+
+	check_all_ports_link_status(1, RTE_PORT_ALL);
+
+	return 0;
+}
+
+static void
+ut_teardown_inline_ipsec(void)
+{
+	uint16_t portid;
+	int ret;
+
+	/* Stop event devices */
+	if (event_mode_enabled)
+		rte_event_dev_stop(eventdev_id);
+
+	/* port tear down */
+	RTE_ETH_FOREACH_DEV(portid) {
+		ret = rte_eth_dev_stop(portid);
+		if (ret != 0)
+			printf("rte_eth_dev_stop: err=%s, port=%u\n",
+			       rte_strerror(-ret), portid);
+	}
+}
 
 static int
 inline_ipsec_testsuite_setup(void)
@@ -3048,43 +3118,43 @@ static struct unit_test_suite inline_ipsec_testsuite  = {
 
 		TEST_CASE_NAMED_WITH_DATA(
 			"IPv4 Reassembly with 2 fragments",
-			ut_setup_inline_ipsec, ut_teardown_inline_ipsec,
+			ut_setup_inline_ipsec_reassembly, ut_teardown_inline_ipsec_reassembly,
 			test_inline_ip_reassembly, &ipv4_2frag_vector),
 		TEST_CASE_NAMED_WITH_DATA(
 			"IPv6 Reassembly with 2 fragments",
-			ut_setup_inline_ipsec, ut_teardown_inline_ipsec,
+			ut_setup_inline_ipsec_reassembly, ut_teardown_inline_ipsec_reassembly,
 			test_inline_ip_reassembly, &ipv6_2frag_vector),
 		TEST_CASE_NAMED_WITH_DATA(
 			"IPv4 Reassembly with 4 fragments",
-			ut_setup_inline_ipsec, ut_teardown_inline_ipsec,
+			ut_setup_inline_ipsec_reassembly, ut_teardown_inline_ipsec_reassembly,
 			test_inline_ip_reassembly, &ipv4_4frag_vector),
 		TEST_CASE_NAMED_WITH_DATA(
 			"IPv6 Reassembly with 4 fragments",
-			ut_setup_inline_ipsec, ut_teardown_inline_ipsec,
+			ut_setup_inline_ipsec_reassembly, ut_teardown_inline_ipsec_reassembly,
 			test_inline_ip_reassembly, &ipv6_4frag_vector),
 		TEST_CASE_NAMED_WITH_DATA(
 			"IPv4 Reassembly with 5 fragments",
-			ut_setup_inline_ipsec, ut_teardown_inline_ipsec,
+			ut_setup_inline_ipsec_reassembly, ut_teardown_inline_ipsec_reassembly,
 			test_inline_ip_reassembly, &ipv4_5frag_vector),
 		TEST_CASE_NAMED_WITH_DATA(
 			"IPv6 Reassembly with 5 fragments",
-			ut_setup_inline_ipsec, ut_teardown_inline_ipsec,
+			ut_setup_inline_ipsec_reassembly, ut_teardown_inline_ipsec_reassembly,
 			test_inline_ip_reassembly, &ipv6_5frag_vector),
 		TEST_CASE_NAMED_WITH_DATA(
 			"IPv4 Reassembly with incomplete fragments",
-			ut_setup_inline_ipsec, ut_teardown_inline_ipsec,
+			ut_setup_inline_ipsec_reassembly, ut_teardown_inline_ipsec_reassembly,
 			test_inline_ip_reassembly, &ipv4_incomplete_vector),
 		TEST_CASE_NAMED_WITH_DATA(
 			"IPv4 Reassembly with overlapping fragments",
-			ut_setup_inline_ipsec, ut_teardown_inline_ipsec,
+			ut_setup_inline_ipsec_reassembly, ut_teardown_inline_ipsec_reassembly,
 			test_inline_ip_reassembly, &ipv4_overlap_vector),
 		TEST_CASE_NAMED_WITH_DATA(
 			"IPv4 Reassembly with out of order fragments",
-			ut_setup_inline_ipsec, ut_teardown_inline_ipsec,
+			ut_setup_inline_ipsec_reassembly, ut_teardown_inline_ipsec_reassembly,
 			test_inline_ip_reassembly, &ipv4_out_of_order_vector),
 		TEST_CASE_NAMED_WITH_DATA(
 			"IPv4 Reassembly with burst of 4 fragments",
-			ut_setup_inline_ipsec, ut_teardown_inline_ipsec,
+			ut_setup_inline_ipsec_reassembly, ut_teardown_inline_ipsec_reassembly,
 			test_inline_ip_reassembly, &ipv4_4frag_burst_vector),
 
 		TEST_CASES_END() /**< NULL terminate unit test array */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.558080000 +0800
+++ 0010-test-security-fix-event-inline-IPsec-reassembly-test.patch	2023-08-09 21:51:18.124352000 +0800
@@ -1 +1 @@
-From 2f97b9439dbbc415ee7f6f51c4474f0eef427e65 Mon Sep 17 00:00:00 2001
+From 64839553ee6f610e96517cf6890a2a86bb06b568 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2f97b9439dbbc415ee7f6f51c4474f0eef427e65 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 7f6fa0ad8c..45aa742c6b 100644
+index 79858e559f..e411a3c21d 100644
@@ -315 +317 @@
-@@ -3057,43 +3127,43 @@ static struct unit_test_suite inline_ipsec_testsuite  = {
+@@ -3048,43 +3118,43 @@ static struct unit_test_suite inline_ipsec_testsuite  = {

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

* patch 'net/nfp: fix IPv6 address for set flow action' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (9 preceding siblings ...)
  2023-08-09 23:47   ` patch 'test/security: fix event inline IPsec reassembly tests' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/nfp: fix unneeded endian conversion' " Xueming Li
                     ` (41 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a5260630921d771535853462bda8bd0b450e2102 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 12 Jun 2023 10:24:24 +0800
Subject: [PATCH] net/nfp: fix IPv6 address for set flow action
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 63f3184382794e19e8be9a0c88aebb55d5f13626 ]

The former logic of set IPv6 source/destination address flow action
can't get the right IPV6 address, a 32 bit big endian value is
expected while a 8 bit value is provided.
This caused the offloaded packets don't have the right IPv6 address
as expected.

Fixes: 596ae2217214 ("net/nfp: support IPv6 source flow action")
Fixes: 51384f79b264 ("net/nfp: support IPv6 destination flow action")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 1700aeec9d..194a5c63c5 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -2154,6 +2154,7 @@ nfp_flow_action_set_ipv6(char *act_data,
 		bool ip_src_flag)
 {
 	int i;
+	rte_be32_t tmp;
 	size_t act_size;
 	struct nfp_fl_act_set_ipv6_addr *set_ip;
 	const struct rte_flow_action_set_ipv6 *set_ipv6;
@@ -2171,7 +2172,8 @@ nfp_flow_action_set_ipv6(char *act_data,
 	set_ip->reserved = 0;
 
 	for (i = 0; i < 4; i++) {
-		set_ip->ipv6[i].exact = set_ipv6->ipv6_addr[i * 4];
+		rte_memcpy(&tmp, &set_ipv6->ipv6_addr[i * 4], 4);
+		set_ip->ipv6[i].exact = tmp;
 		set_ip->ipv6[i].mask = RTE_BE32(0xffffffff);
 	}
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.579336300 +0800
+++ 0011-net-nfp-fix-IPv6-address-for-set-flow-action.patch	2023-08-09 21:51:18.124352000 +0800
@@ -1 +1 @@
-From 63f3184382794e19e8be9a0c88aebb55d5f13626 Mon Sep 17 00:00:00 2001
+From a5260630921d771535853462bda8bd0b450e2102 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 63f3184382794e19e8be9a0c88aebb55d5f13626 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 14749f03a2..4ba49a9b49 100644
+index 1700aeec9d..194a5c63c5 100644
@@ -29 +31 @@
-@@ -2164,6 +2164,7 @@ nfp_flow_action_set_ipv6(char *act_data,
+@@ -2154,6 +2154,7 @@ nfp_flow_action_set_ipv6(char *act_data,
@@ -37 +39 @@
-@@ -2181,7 +2182,8 @@ nfp_flow_action_set_ipv6(char *act_data,
+@@ -2171,7 +2172,8 @@ nfp_flow_action_set_ipv6(char *act_data,

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

* patch 'net/nfp: fix unneeded endian conversion' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (10 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/nfp: fix IPv6 address for set flow action' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/nfp: fix endian conversion for tunnel decap action' " Xueming Li
                     ` (40 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 502acb0f83634579df3514a4a33aea96b94e6d44 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 12 Jun 2023 11:16:25 +0800
Subject: [PATCH] net/nfp: fix unneeded endian conversion
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 766ec2a60758ca2c04955aba880a2b4eeb20ac92 ]

Both of the data types are CPU endian, so there is no need
to do the data endian convert operation.

Fixes: 8ad9ffa2ce7c ("net/nfp: support basic flow items")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 194a5c63c5..7072375e6e 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -728,7 +728,7 @@ nfp_flow_key_layers_calculate_items(const struct rte_flow_item items[],
 			ethdev = &rte_eth_devices[port_id->id];
 			representor = (struct nfp_flower_representor *)
 					ethdev->data->dev_private;
-			key_ls->port = rte_cpu_to_be_32(representor->port_id);
+			key_ls->port = representor->port_id;
 			break;
 		case RTE_FLOW_ITEM_TYPE_VLAN:
 			PMD_DRV_LOG(DEBUG, "RTE_FLOW_ITEM_TYPE_VLAN detected");
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.603980200 +0800
+++ 0012-net-nfp-fix-unneeded-endian-conversion.patch	2023-08-09 21:51:18.124352000 +0800
@@ -1 +1 @@
-From 766ec2a60758ca2c04955aba880a2b4eeb20ac92 Mon Sep 17 00:00:00 2001
+From 502acb0f83634579df3514a4a33aea96b94e6d44 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 766ec2a60758ca2c04955aba880a2b4eeb20ac92 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 4ba49a9b49..89755589ac 100644
+index 194a5c63c5..7072375e6e 100644
@@ -25,2 +27 @@
-@@ -727,7 +727,7 @@ nfp_flow_key_layers_calculate_items(const struct rte_flow_item items[],
- 				return -ERANGE;
+@@ -728,7 +728,7 @@ nfp_flow_key_layers_calculate_items(const struct rte_flow_item items[],
@@ -28 +29,2 @@
- 			representor = ethdev->data->dev_private;
+ 			representor = (struct nfp_flower_representor *)
+ 					ethdev->data->dev_private;

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

* patch 'net/nfp: fix endian conversion for tunnel decap action' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (11 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/nfp: fix unneeded endian conversion' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'ethdev: update documentation for API to set FEC' " Xueming Li
                     ` (39 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c25e954265a4724c85e3d6ca72b54b9ef2e0b60b Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 12 Jun 2023 11:18:32 +0800
Subject: [PATCH] net/nfp: fix endian conversion for tunnel decap action
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 30963f1fdfb530da7d0ecdfe2506d2a98adea545 ]

Add the missing data endian convert operations, the former logic of
processing the 'vlan_tpid' field will cause the tunnel decap action
don't work as expect in some case.

Fixes: 9082336048e8 ("net/nfp: support new solution for tunnel decap action")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 7072375e6e..6fd82639f7 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -2489,10 +2489,10 @@ nfp_flower_add_tun_neigh_v4_decap(struct nfp_app_fw_flower *app_fw_flower,
 	if (nfp_flower_support_decap_v2(app_fw_flower)) {
 		if (meta_tci->tci != 0) {
 			payload.ext.vlan_tci = meta_tci->tci;
-			payload.ext.vlan_tpid = 0x88a8;
+			payload.ext.vlan_tpid = RTE_BE16(0x88a8);
 		} else {
-			payload.ext.vlan_tci = 0xffff;
-			payload.ext.vlan_tpid = 0xffff;
+			payload.ext.vlan_tci = RTE_BE16(0xffff);
+			payload.ext.vlan_tpid = RTE_BE16(0xffff);
 		}
 		payload.ext.host_ctx = nfp_flow_meta->host_ctx_id;
 	}
@@ -2616,10 +2616,10 @@ nfp_flower_add_tun_neigh_v6_decap(struct nfp_app_fw_flower *app_fw_flower,
 	if (nfp_flower_support_decap_v2(app_fw_flower)) {
 		if (meta_tci->tci != 0) {
 			payload.ext.vlan_tci = meta_tci->tci;
-			payload.ext.vlan_tpid = 0x88a8;
+			payload.ext.vlan_tpid = RTE_BE16(0x88a8);
 		} else {
-			payload.ext.vlan_tci = 0xffff;
-			payload.ext.vlan_tpid = 0xffff;
+			payload.ext.vlan_tci = RTE_BE16(0xffff);
+			payload.ext.vlan_tpid = RTE_BE16(0xffff);
 		}
 		payload.ext.host_ctx = nfp_flow_meta->host_ctx_id;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.628780100 +0800
+++ 0013-net-nfp-fix-endian-conversion-for-tunnel-decap-actio.patch	2023-08-09 21:51:18.124352000 +0800
@@ -1 +1 @@
-From 30963f1fdfb530da7d0ecdfe2506d2a98adea545 Mon Sep 17 00:00:00 2001
+From c25e954265a4724c85e3d6ca72b54b9ef2e0b60b Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 30963f1fdfb530da7d0ecdfe2506d2a98adea545 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 89755589ac..5acb7f6ff3 100644
+index 7072375e6e..6fd82639f7 100644
@@ -26 +28 @@
-@@ -2496,10 +2496,10 @@ nfp_flower_add_tun_neigh_v4_decap(struct nfp_app_fw_flower *app_fw_flower,
+@@ -2489,10 +2489,10 @@ nfp_flower_add_tun_neigh_v4_decap(struct nfp_app_fw_flower *app_fw_flower,
@@ -40 +42 @@
-@@ -2623,10 +2623,10 @@ nfp_flower_add_tun_neigh_v6_decap(struct nfp_app_fw_flower *app_fw_flower,
+@@ -2616,10 +2616,10 @@ nfp_flower_add_tun_neigh_v6_decap(struct nfp_app_fw_flower *app_fw_flower,

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

* patch 'ethdev: update documentation for API to set FEC' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (12 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/nfp: fix endian conversion for tunnel decap action' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'ethdev: check that at least one FEC mode is specified' " Xueming Li
                     ` (38 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Denis Pryazhennikov
  Cc: Ivan Malov, Viacheslav Galaktionov, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ff56bf6f3a8a582066e23bfff24f922cf2e251ed Mon Sep 17 00:00:00 2001
From: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Date: Mon, 8 May 2023 15:47:05 +0400
Subject: [PATCH] ethdev: update documentation for API to set FEC
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6af24dc3794059373c2131ae776d55ac78724ffa ]

The documentation for the rte_eth_fec_set() is updated
to provide more detailed information about how FEC modes are
handled. It also includes a description of the case when only
the AUTO bit is set.

Fixes: b7ccfb09da95 ("ethdev: introduce FEC API")

Signed-off-by: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Acked-by: Ivan Malov <ivan.malov@arknetworks.am>
Acked-by: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_ethdev.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 0d83df42a9..7b90e6f99f 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -4200,10 +4200,13 @@ int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa);
  * @param port_id
  *   The port identifier of the Ethernet device.
  * @param fec_capa
- *   A bitmask of allowed FEC modes. If AUTO bit is set, other
- *   bits specify FEC modes which may be negotiated. If AUTO
- *   bit is clear, specify FEC modes to be used (only one valid
- *   mode per speed may be set).
+ *   A bitmask of allowed FEC modes.
+ *   If only the AUTO bit is set, the decision on which FEC
+ *   mode to use will be made by HW/FW or driver.
+ *   If the AUTO bit is set with some FEC modes, only specified
+ *   FEC modes can be set.
+ *   If AUTO bit is clear, specify FEC mode to be used
+ *   (only one valid mode per speed may be set).
  * @return
  *   - (0) if successful.
  *   - (-EINVAL) if the FEC mode is not valid.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.650937700 +0800
+++ 0014-ethdev-update-documentation-for-API-to-set-FEC.patch	2023-08-09 21:51:18.134352000 +0800
@@ -1 +1 @@
-From 6af24dc3794059373c2131ae776d55ac78724ffa Mon Sep 17 00:00:00 2001
+From ff56bf6f3a8a582066e23bfff24f922cf2e251ed Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6af24dc3794059373c2131ae776d55ac78724ffa ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 34ca25bbc0..2f8350a268 100644
+index 0d83df42a9..7b90e6f99f 100644
@@ -26 +28 @@
-@@ -4266,10 +4266,13 @@ int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa);
+@@ -4200,10 +4200,13 @@ int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa);

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

* patch 'ethdev: check that at least one FEC mode is specified' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (13 preceding siblings ...)
  2023-08-09 23:47   ` patch 'ethdev: update documentation for API to set FEC' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'ethdev: update documentation for API to get FEC' " Xueming Li
                     ` (37 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Denis Pryazhennikov
  Cc: Ivan Malov, Viacheslav Galaktionov, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7594b6e44d13945cffa0f7fce3ba14bc156a2cbb Mon Sep 17 00:00:00 2001
From: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Date: Mon, 8 May 2023 15:47:06 +0400
Subject: [PATCH] ethdev: check that at least one FEC mode is specified
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9fdcf2be070dcd5ea3d845ce798c298c5dfbaa4a ]

The behaviour is undefined in the rte_eth_fec_set() function
when the fec_capa parameter is equal to zero.
Add a check to handle this case.

Fixes: b7ccfb09da95 ("ethdev: introduce FEC API")

Signed-off-by: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Acked-by: Ivan Malov <ivan.malov@arknetworks.am>
Acked-by: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 08a08cf431..437d04b34e 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -4362,6 +4362,11 @@ rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
 	dev = &rte_eth_devices[port_id];
 
+	if (fec_capa == 0) {
+		RTE_ETHDEV_LOG(ERR, "At least one FEC mode should be specified\n");
+		return -EINVAL;
+	}
+
 	if (*dev->dev_ops->fec_set == NULL)
 		return -ENOTSUP;
 	return eth_err(port_id, (*dev->dev_ops->fec_set)(dev, fec_capa));
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.674558300 +0800
+++ 0015-ethdev-check-that-at-least-one-FEC-mode-is-specified.patch	2023-08-09 21:51:18.134352000 +0800
@@ -1 +1 @@
-From 9fdcf2be070dcd5ea3d845ce798c298c5dfbaa4a Mon Sep 17 00:00:00 2001
+From 7594b6e44d13945cffa0f7fce3ba14bc156a2cbb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9fdcf2be070dcd5ea3d845ce798c298c5dfbaa4a ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 731423ef03..1e024802ae 100644
+index 08a08cf431..437d04b34e 100644
@@ -25 +27 @@
-@@ -4828,6 +4828,11 @@ rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
+@@ -4362,6 +4362,11 @@ rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
@@ -36 +38 @@
- 	ret = eth_err(port_id, (*dev->dev_ops->fec_set)(dev, fec_capa));
+ 	return eth_err(port_id, (*dev->dev_ops->fec_set)(dev, fec_capa));

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

* patch 'ethdev: update documentation for API to get FEC' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (14 preceding siblings ...)
  2023-08-09 23:47   ` patch 'ethdev: check that at least one FEC mode is specified' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/nfp: fix VNI of VXLAN encap action' " Xueming Li
                     ` (36 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Denis Pryazhennikov; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fa5f6cff44bdfe687f484598b374878ce29031bd Mon Sep 17 00:00:00 2001
From: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Date: Mon, 8 May 2023 15:47:07 +0400
Subject: [PATCH] ethdev: update documentation for API to get FEC
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9e5c9e1868c062780d69d0529f0a447b4092d1e9 ]

The documentation for the rte_eth_fec_get() is updated
to clarify the description for the fec_capa parameter.
The previous description implied that more than one FEC
mode can be obtained.

Fixes: b7ccfb09da95 ("ethdev: introduce FEC API")

Signed-off-by: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_ethdev.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 7b90e6f99f..5f187131e2 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -4177,10 +4177,7 @@ int rte_eth_fec_get_capability(uint16_t port_id,
  * @param port_id
  *   The port identifier of the Ethernet device.
  * @param fec_capa
- *   A bitmask of enabled FEC modes. If AUTO bit is set, other
- *   bits specify FEC modes which may be negotiated. If AUTO
- *   bit is clear, specify FEC modes to be used (only one valid
- *   mode per speed may be set).
+ *   A bitmask with the current FEC mode.
  * @return
  *   - (0) if successful.
  *   - (-ENOTSUP) if underlying hardware OR driver doesn't support.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.704205400 +0800
+++ 0016-ethdev-update-documentation-for-API-to-get-FEC.patch	2023-08-09 21:51:18.134352000 +0800
@@ -1 +1 @@
-From 9e5c9e1868c062780d69d0529f0a447b4092d1e9 Mon Sep 17 00:00:00 2001
+From fa5f6cff44bdfe687f484598b374878ce29031bd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9e5c9e1868c062780d69d0529f0a447b4092d1e9 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 2f8350a268..fcedf768cb 100644
+index 7b90e6f99f..5f187131e2 100644
@@ -24 +26 @@
-@@ -4243,10 +4243,7 @@ int rte_eth_fec_get_capability(uint16_t port_id,
+@@ -4177,10 +4177,7 @@ int rte_eth_fec_get_capability(uint16_t port_id,

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

* patch 'net/nfp: fix VNI of VXLAN encap action' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (15 preceding siblings ...)
  2023-08-09 23:47   ` patch 'ethdev: update documentation for API to get FEC' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/nfp: fix VNI of IPv4 NVGRE " Xueming Li
                     ` (35 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dc6adc599cd6e18ee2b8e33b66b57c08ec4e1087 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Tue, 13 Jun 2023 11:15:39 +0800
Subject: [PATCH] net/nfp: fix VNI of VXLAN encap action
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0b89591f539bb82f644799e2ed1eb3a49c49d5d0 ]

The 'vx_vni' field of VXLAN header is contain 24 bits of VNI and
8 bits of reserved. After convert into CPU endian, the reserved
8 bits should be shifted, or the VNI value will be not correct.

Fixes: 861949032d0f ("net/nfp: fix VNI of VXLAN encap action")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 6fd82639f7..6f242d13a6 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -2740,7 +2740,7 @@ nfp_flow_action_vxlan_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
 
 	set_tun = (struct nfp_fl_act_set_tun *)(act_data + act_pre_size);
 	memset(set_tun, 0, act_set_size);
-	tun_id = rte_be_to_cpu_32(vxlan->hdr.vx_vni);
+	tun_id = rte_be_to_cpu_32(vxlan->hdr.vx_vni) >> 8;
 	nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_VXLAN, tun_id,
 			ipv4->hdr.time_to_live, ipv4->hdr.type_of_service);
 	set_tun->tun_flags = vxlan->hdr.vx_flags;
@@ -2778,7 +2778,7 @@ nfp_flow_action_vxlan_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
 
 	set_tun = (struct nfp_fl_act_set_tun *)(act_data + act_pre_size);
 	memset(set_tun, 0, act_set_size);
-	tun_id = rte_be_to_cpu_32(vxlan->hdr.vx_vni);
+	tun_id = rte_be_to_cpu_32(vxlan->hdr.vx_vni) >> 8;
 	tos = rte_be_to_cpu_32(ipv6->hdr.vtc_flow) >> RTE_IPV6_HDR_TC_SHIFT;
 	nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_VXLAN, tun_id,
 			ipv6->hdr.hop_limits, tos);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.731421900 +0800
+++ 0017-net-nfp-fix-VNI-of-VXLAN-encap-action.patch	2023-08-09 21:51:18.134352000 +0800
@@ -1 +1 @@
-From 0b89591f539bb82f644799e2ed1eb3a49c49d5d0 Mon Sep 17 00:00:00 2001
+From dc6adc599cd6e18ee2b8e33b66b57c08ec4e1087 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0b89591f539bb82f644799e2ed1eb3a49c49d5d0 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 5acb7f6ff3..ac4b15c763 100644
+index 6fd82639f7..6f242d13a6 100644
@@ -26 +28 @@
-@@ -2747,7 +2747,7 @@ nfp_flow_action_vxlan_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
+@@ -2740,7 +2740,7 @@ nfp_flow_action_vxlan_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
@@ -35 +37 @@
-@@ -2785,7 +2785,7 @@ nfp_flow_action_vxlan_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
+@@ -2778,7 +2778,7 @@ nfp_flow_action_vxlan_encap_v6(struct nfp_app_fw_flower *app_fw_flower,

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

* patch 'net/nfp: fix VNI of IPv4 NVGRE encap action' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (16 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/nfp: fix VNI of VXLAN encap action' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/nfp: fix VNI of IPv6 " Xueming Li
                     ` (34 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7797d05cd90272f4fcc78b3ae3932e7d79d4fc18 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Tue, 13 Jun 2023 11:20:35 +0800
Subject: [PATCH] net/nfp: fix VNI of IPv4 NVGRE encap action
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 47e7e5bd044479fcb824966252f2ddc11efb9974 ]

Complete the missing logic of parse the tunnel id of IPv4 NVGRE tunnel
and send it to the firmware by control message.

Fixes: 88cce0538073 ("net/nfp: support IPv4 NVGRE encap flow action")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 6f242d13a6..55cc21b672 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3164,6 +3164,7 @@ nfp_flow_action_nvgre_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
 		struct nfp_fl_rule_metadata *nfp_flow_meta,
 		struct nfp_fl_tun *tun)
 {
+	uint64_t tun_id;
 	const struct rte_ether_hdr *eth;
 	const struct rte_flow_item_ipv4 *ipv4;
 	const struct rte_flow_item_gre *gre;
@@ -3175,6 +3176,7 @@ nfp_flow_action_nvgre_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
 	eth  = (const struct rte_ether_hdr *)raw_encap->data;
 	ipv4 = (const struct rte_flow_item_ipv4 *)(eth + 1);
 	gre  = (const struct rte_flow_item_gre *)(ipv4 + 1);
+	tun_id = rte_be_to_cpu_32(*(const rte_be32_t *)(gre + 1));
 
 	pre_tun = (struct nfp_fl_act_pre_tun *)actions;
 	memset(pre_tun, 0, act_pre_size);
@@ -3182,7 +3184,7 @@ nfp_flow_action_nvgre_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
 
 	set_tun = (struct nfp_fl_act_set_tun *)(act_data + act_pre_size);
 	memset(set_tun, 0, act_set_size);
-	nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_GRE, 0,
+	nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_GRE, tun_id,
 			ipv4->hdr.time_to_live, ipv4->hdr.type_of_service);
 	set_tun->tun_proto = gre->protocol;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.755066300 +0800
+++ 0018-net-nfp-fix-VNI-of-IPv4-NVGRE-encap-action.patch	2023-08-09 21:51:18.134352000 +0800
@@ -1 +1 @@
-From 47e7e5bd044479fcb824966252f2ddc11efb9974 Mon Sep 17 00:00:00 2001
+From 7797d05cd90272f4fcc78b3ae3932e7d79d4fc18 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 47e7e5bd044479fcb824966252f2ddc11efb9974 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index ac4b15c763..697f78673a 100644
+index 6f242d13a6..55cc21b672 100644
@@ -25 +27 @@
-@@ -3171,6 +3171,7 @@ nfp_flow_action_nvgre_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
+@@ -3164,6 +3164,7 @@ nfp_flow_action_nvgre_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
@@ -33 +35 @@
-@@ -3182,6 +3183,7 @@ nfp_flow_action_nvgre_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
+@@ -3175,6 +3176,7 @@ nfp_flow_action_nvgre_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
@@ -41 +43 @@
-@@ -3189,7 +3191,7 @@ nfp_flow_action_nvgre_encap_v4(struct nfp_app_fw_flower *app_fw_flower,
+@@ -3182,7 +3184,7 @@ nfp_flow_action_nvgre_encap_v4(struct nfp_app_fw_flower *app_fw_flower,

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

* patch 'net/nfp: fix VNI of IPv6 NVGRE encap action' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (17 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/nfp: fix VNI of IPv4 NVGRE " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/bonding: fix startup when NUMA is not supported' " Xueming Li
                     ` (33 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 00d2dc7c42418dffdb6315252fd13040f8c50417 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Tue, 13 Jun 2023 11:20:36 +0800
Subject: [PATCH] net/nfp: fix VNI of IPv6 NVGRE encap action
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9fc5514099a1261c64b87ed408f4c0e7b4f4059a ]

Complete the missing logic of parse the tunnel id of IPv6 NVGRE tunnel
and send it to the firmware by control message.

Fixes: fff680eef7f9 ("net/nfp: support IPv6 NVGRE encap flow action")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 55cc21b672..faa0eda325 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3202,6 +3202,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
 		struct nfp_fl_tun *tun)
 {
 	uint8_t tos;
+	uint64_t tun_id;
 	const struct rte_ether_hdr *eth;
 	const struct rte_flow_item_ipv6 *ipv6;
 	const struct rte_flow_item_gre *gre;
@@ -3213,6 +3214,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
 	eth    = (const struct rte_ether_hdr *)raw_encap->data;
 	ipv6   = (const struct rte_flow_item_ipv6 *)(eth + 1);
 	gre    = (const struct rte_flow_item_gre *)(ipv6 + 1);
+	tun_id = rte_be_to_cpu_32(*(const rte_be32_t *)(gre + 1));
 
 	pre_tun = (struct nfp_fl_act_pre_tun *)actions;
 	memset(pre_tun, 0, act_pre_size);
@@ -3221,7 +3223,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
 	set_tun = (struct nfp_fl_act_set_tun *)(act_data + act_pre_size);
 	memset(set_tun, 0, act_set_size);
 	tos = rte_be_to_cpu_32(ipv6->hdr.vtc_flow) >> RTE_IPV6_HDR_TC_SHIFT;
-	nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_GRE, 0,
+	nfp_flow_set_tun_process(set_tun, NFP_FL_TUN_GRE, tun_id,
 			ipv6->hdr.hop_limits, tos);
 	set_tun->tun_proto = gre->protocol;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.778537600 +0800
+++ 0019-net-nfp-fix-VNI-of-IPv6-NVGRE-encap-action.patch	2023-08-09 21:51:18.144352000 +0800
@@ -1 +1 @@
-From 9fc5514099a1261c64b87ed408f4c0e7b4f4059a Mon Sep 17 00:00:00 2001
+From 00d2dc7c42418dffdb6315252fd13040f8c50417 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9fc5514099a1261c64b87ed408f4c0e7b4f4059a ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 697f78673a..b1f76dc027 100644
+index 55cc21b672..faa0eda325 100644
@@ -25 +27 @@
-@@ -3209,6 +3209,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
+@@ -3202,6 +3202,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
@@ -33 +35 @@
-@@ -3220,6 +3221,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
+@@ -3213,6 +3214,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
@@ -41 +43 @@
-@@ -3228,7 +3230,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,
+@@ -3221,7 +3223,7 @@ nfp_flow_action_nvgre_encap_v6(struct nfp_app_fw_flower *app_fw_flower,

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

* patch 'net/bonding: fix startup when NUMA is not supported' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (18 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/nfp: fix VNI of IPv6 " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/bonding: fix destroy dedicated queues flow' " Xueming Li
                     ` (32 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Zerun Fu; +Cc: Peng Zhang, Chaoyong He, Long Wu, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c193423238e8e1e82256ccdd574f6098f568f28f Mon Sep 17 00:00:00 2001
From: Zerun Fu <zerun.fu@corigine.com>
Date: Fri, 16 Jun 2023 15:20:34 +0800
Subject: [PATCH] net/bonding: fix startup when NUMA is not supported
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 85e6be63dfa8bff9c42ab0b4dea6fcbba7d680b2 ]

After the mainline Linux kernel commit
"fe205d984e7730f4d21f6f8ebc60f0698404ac31" (ACPI: Remove side effect
of partly creating a node in acpi_map_pxm_to_online_node) by
Jonathan Cameron. When the system does not support NUMA architecture,
the "socket_id" is expected to be -1. The valid "socket_id" in
BOND PMD is greater than or equal to zero. So it will cause an error
when DPDK checks the validity of the "socket_id" when starting the
bond. This commit can fix this bug.

Fixes: f294e04851fd ("net/bonding: fix socket ID check")

Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_args.c | 6 ++++++
 drivers/net/bonding/rte_eth_bond_pmd.c  | 6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index 6553166f5c..c137efd55f 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -212,6 +212,12 @@ bond_ethdev_parse_socket_id_kvarg(const char *key __rte_unused,
 	if (*endptr != 0 || errno != 0)
 		return -1;
 
+	/* SOCKET_ID_ANY also consider a valid socket id */
+	if ((int8_t)socket_id == SOCKET_ID_ANY) {
+		*(int *)extra_args = SOCKET_ID_ANY;
+		return 0;
+	}
+
 	/* validate socket id value */
 	if (socket_id >= 0 && socket_id < RTE_MAX_NUMA_NODES) {
 		*(int *)extra_args = (int)socket_id;
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index b9bcebc6cb..8cd78ce1ed 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3362,7 +3362,7 @@ static int
 bond_alloc(struct rte_vdev_device *dev, uint8_t mode)
 {
 	const char *name = rte_vdev_device_name(dev);
-	uint8_t socket_id = dev->device.numa_node;
+	int socket_id = dev->device.numa_node;
 	struct bond_dev_private *internals = NULL;
 	struct rte_eth_dev *eth_dev = NULL;
 	uint32_t vlan_filter_bmp_size;
@@ -3564,7 +3564,7 @@ bond_probe(struct rte_vdev_device *dev)
 	port_id = bond_alloc(dev, bonding_mode);
 	if (port_id < 0) {
 		RTE_BOND_LOG(ERR, "Failed to create socket %s in mode %u on "
-				"socket %u.",	name, bonding_mode, socket_id);
+				"socket %d.",	name, bonding_mode, socket_id);
 		goto parse_error;
 	}
 	internals = rte_eth_devices[port_id].data->dev_private;
@@ -3589,7 +3589,7 @@ bond_probe(struct rte_vdev_device *dev)
 
 	rte_eth_dev_probing_finish(&rte_eth_devices[port_id]);
 	RTE_BOND_LOG(INFO, "Create bonded device %s on port %d in mode %u on "
-			"socket %u.",	name, port_id, bonding_mode, socket_id);
+			"socket %d.",	name, port_id, bonding_mode, socket_id);
 	return 0;
 
 parse_error:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.799616400 +0800
+++ 0020-net-bonding-fix-startup-when-NUMA-is-not-supported.patch	2023-08-09 21:51:18.144352000 +0800
@@ -1 +1 @@
-From 85e6be63dfa8bff9c42ab0b4dea6fcbba7d680b2 Mon Sep 17 00:00:00 2001
+From c193423238e8e1e82256ccdd574f6098f568f28f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 85e6be63dfa8bff9c42ab0b4dea6fcbba7d680b2 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -46 +48 @@
-index f0c4f7d26b..73205f78f4 100644
+index b9bcebc6cb..8cd78ce1ed 100644
@@ -49 +51 @@
-@@ -3604,7 +3604,7 @@ static int
+@@ -3362,7 +3362,7 @@ static int
@@ -58 +60 @@
-@@ -3806,7 +3806,7 @@ bond_probe(struct rte_vdev_device *dev)
+@@ -3564,7 +3564,7 @@ bond_probe(struct rte_vdev_device *dev)
@@ -67 +69 @@
-@@ -3831,7 +3831,7 @@ bond_probe(struct rte_vdev_device *dev)
+@@ -3589,7 +3589,7 @@ bond_probe(struct rte_vdev_device *dev)

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

* patch 'net/bonding: fix destroy dedicated queues flow' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (19 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/bonding: fix startup when NUMA is not supported' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/txgbe/base: fix Tx with fiber hotplug' " Xueming Li
                     ` (31 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Long Wu; +Cc: Niklas Söderlund, Chaoyong He, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ff476852e7e2e627b01bf215e214799807921f6d Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Thu, 8 Jun 2023 10:59:03 +0800
Subject: [PATCH] net/bonding: fix destroy dedicated queues flow
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f7755321f3294e94c1f1b9e645cc997a3e39f999 ]

Bonding port in mode 4 enables dedicated queues, we
will create a flow for this feature. So we need to
destroy this flow when we remove the member port.

Furthermore if we don't destroy the flow that created
for dedicated queues when we remove the member port,
maybe we couldn't add the member port to a new bonding
port that needed dedicated queues.

We add the destroy action in removing member port
function.

Fixes: 49dad9028e2a ("net/bonding: support flow API")

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index c0178369b4..85d0528b7c 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -712,6 +712,16 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
 		}
 	}
 
+	/* Remove the dedicated queues flow */
+	if (internals->mode == BONDING_MODE_8023AD &&
+		internals->mode4.dedicated_queues.enabled == 1 &&
+		internals->mode4.dedicated_queues.flow[slave_port_id] != NULL) {
+		rte_flow_destroy(slave_port_id,
+				internals->mode4.dedicated_queues.flow[slave_port_id],
+				&flow_error);
+		internals->mode4.dedicated_queues.flow[slave_port_id] = NULL;
+	}
+
 	slave_eth_dev = &rte_eth_devices[slave_port_id];
 	slave_remove(internals, slave_eth_dev);
 	slave_eth_dev->data->dev_flags &= (~RTE_ETH_DEV_BONDED_SLAVE);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.821637800 +0800
+++ 0021-net-bonding-fix-destroy-dedicated-queues-flow.patch	2023-08-09 21:51:18.144352000 +0800
@@ -1 +1 @@
-From f7755321f3294e94c1f1b9e645cc997a3e39f999 Mon Sep 17 00:00:00 2001
+From ff476852e7e2e627b01bf215e214799807921f6d Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f7755321f3294e94c1f1b9e645cc997a3e39f999 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/txgbe/base: fix Tx with fiber hotplug' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (20 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/bonding: fix destroy dedicated queues flow' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/txgbe: fix interrupt enable mask' " Xueming Li
                     ` (30 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d96c0259e78810bb9c8b298659d3a1f76ac33d18 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:21 +0800
Subject: [PATCH] net/txgbe/base: fix Tx with fiber hotplug
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 196e412b80afe165ca78457d5f9bb1a5bace28ea ]

Under heavy traffic, unplugging and plugging fiber optic cables may cause
Tx failure. The reason is that there is still traffic passing through at
PCS VR reset, during txgbe_set_link_to_*. So totally disable Rx and Tx
before PCS VR reset to fix it.

Fixes: 01c3cf5c85a7 ("net/txgbe: add autoneg control read and write")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_phy.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c
index 87935abdaa..6bbb2a5e71 100644
--- a/drivers/net/txgbe/base/txgbe_phy.c
+++ b/drivers/net/txgbe/base/txgbe_phy.c
@@ -1519,8 +1519,9 @@ txgbe_set_link_to_kx4(struct txgbe_hw *hw, bool autoneg)
 		goto out;
 	}
 
-	wr32m(hw, TXGBE_MACTXCFG, TXGBE_MACTXCFG_TXE,
-			~TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACTXCFG, TXGBE_MACTXCFG_TXE, ~TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACRXCFG, TXGBE_MACRXCFG_ENA, ~TXGBE_MACRXCFG_ENA);
+	hw->mac.disable_sec_tx_path(hw);
 
 	/* 2. Disable xpcs AN-73 */
 	if (!autoneg)
@@ -1734,8 +1735,9 @@ txgbe_set_link_to_kx(struct txgbe_hw *hw,
 		goto out;
 	}
 
-	wr32m(hw, TXGBE_MACTXCFG, TXGBE_MACTXCFG_TXE,
-				~TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACTXCFG, TXGBE_MACTXCFG_TXE, ~TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACRXCFG, TXGBE_MACRXCFG_ENA, ~TXGBE_MACRXCFG_ENA);
+	hw->mac.disable_sec_tx_path(hw);
 
 	/* 2. Disable xpcs AN-73 */
 	if (!autoneg)
@@ -1941,8 +1943,9 @@ txgbe_set_link_to_sfi(struct txgbe_hw *hw,
 		goto out;
 	}
 
-	wr32m(hw, TXGBE_MACTXCFG, TXGBE_MACTXCFG_TXE,
-			~TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACTXCFG, TXGBE_MACTXCFG_TXE, ~TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACRXCFG, TXGBE_MACRXCFG_ENA, ~TXGBE_MACRXCFG_ENA);
+	hw->mac.disable_sec_tx_path(hw);
 
 	/* 2. Disable xpcs AN-73 */
 	wr32_epcs(hw, SR_AN_CTRL, 0x0);
@@ -2293,6 +2296,8 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)
 			txgbe_set_sgmii_an37_ability(hw);
 	}
 
+	hw->mac.enable_sec_tx_path(hw);
+
 	if (speed == TXGBE_LINK_SPEED_10GB_FULL)
 		mactxcfg = TXGBE_MACTXCFG_SPEED_10G;
 	else if (speed == TXGBE_LINK_SPEED_1GB_FULL)
@@ -2302,6 +2307,7 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)
 	wr32m(hw, TXGBE_MACTXCFG,
 		TXGBE_MACTXCFG_SPEED_MASK | TXGBE_MACTXCFG_TXE,
 		mactxcfg | TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACRXCFG, TXGBE_MACRXCFG_ENA, TXGBE_MACRXCFG_ENA);
 }
 
 void txgbe_bp_down_event(struct txgbe_hw *hw)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.845253300 +0800
+++ 0022-net-txgbe-base-fix-Tx-with-fiber-hotplug.patch	2023-08-09 21:51:18.144352000 +0800
@@ -1 +1 @@
-From 196e412b80afe165ca78457d5f9bb1a5bace28ea Mon Sep 17 00:00:00 2001
+From d96c0259e78810bb9c8b298659d3a1f76ac33d18 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 196e412b80afe165ca78457d5f9bb1a5bace28ea ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index f4cadcc510..1eb45b068a 100644
+index 87935abdaa..6bbb2a5e71 100644
@@ -23 +25 @@
-@@ -1541,8 +1541,9 @@ txgbe_set_link_to_kx4(struct txgbe_hw *hw, bool autoneg)
+@@ -1519,8 +1519,9 @@ txgbe_set_link_to_kx4(struct txgbe_hw *hw, bool autoneg)
@@ -35 +37 @@
-@@ -1756,8 +1757,9 @@ txgbe_set_link_to_kx(struct txgbe_hw *hw,
+@@ -1734,8 +1735,9 @@ txgbe_set_link_to_kx(struct txgbe_hw *hw,
@@ -47 +49 @@
-@@ -1963,8 +1965,9 @@ txgbe_set_link_to_sfi(struct txgbe_hw *hw,
+@@ -1941,8 +1943,9 @@ txgbe_set_link_to_sfi(struct txgbe_hw *hw,
@@ -59 +61 @@
-@@ -2315,6 +2318,8 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)
+@@ -2293,6 +2296,8 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)
@@ -68 +70 @@
-@@ -2324,6 +2329,7 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)
+@@ -2302,6 +2307,7 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)

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

* patch 'net/txgbe: fix interrupt enable mask' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (21 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/txgbe/base: fix Tx with fiber hotplug' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/txgbe: adapt to MNG veto bit setting' " Xueming Li
                     ` (29 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a62297801ce18bdf1db7d7ea652b1825181efd02 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:22 +0800
Subject: [PATCH] net/txgbe: fix interrupt enable mask
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 646b058472cdfb503a0c555ed2e0f891c05437a7 ]

When using no LSC mode, GPIO interrupt can still cause
txgbe_dev_interrupt_delayed_handler() to be called, with
TXGBE_FLAG_NEED_LINK_UPDATE to be set. So add a LSC condition on
intr->mask_misc.

Fixes: 2fc745e6b606 ("net/txgbe: add interrupt operation")
Fixes: d3bb4a04eac1 ("net/txgbe: add SFP hotplug identification")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index e0df734946..6562bddd6b 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -3143,7 +3143,8 @@ txgbe_dev_interrupt_delayed_handler(void *param)
 	}
 
 	/* restore original mask */
-	intr->mask_misc |= TXGBE_ICRMISC_LSC;
+	if (dev->data->dev_conf.intr_conf.lsc == 1)
+		intr->mask_misc |= TXGBE_ICRMISC_LSC;
 
 	intr->mask = intr->mask_orig;
 	intr->mask_orig = 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.866851800 +0800
+++ 0023-net-txgbe-fix-interrupt-enable-mask.patch	2023-08-09 21:51:18.144352000 +0800
@@ -1 +1 @@
-From 646b058472cdfb503a0c555ed2e0f891c05437a7 Mon Sep 17 00:00:00 2001
+From a62297801ce18bdf1db7d7ea652b1825181efd02 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 646b058472cdfb503a0c555ed2e0f891c05437a7 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index a3d7461951..5eff1a766e 100644
+index e0df734946..6562bddd6b 100644
@@ -24 +26 @@
-@@ -3232,7 +3232,8 @@ txgbe_dev_interrupt_delayed_handler(void *param)
+@@ -3143,7 +3143,8 @@ txgbe_dev_interrupt_delayed_handler(void *param)

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

* patch 'net/txgbe: adapt to MNG veto bit setting' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (22 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/txgbe: fix interrupt enable mask' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/txgbe: fix to set autoneg for 1G speed' " Xueming Li
                     ` (28 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 57b3a57dfa1ee05e8738f475bf3722e738f96fe3 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:23 +0800
Subject: [PATCH] net/txgbe: adapt to MNG veto bit setting
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 12011b11a3d6339082e647082d30f97f49f6a468 ]

In the new firmware, MNG veto bit is set by default for new features.
It leads to several issues, so driver makes the following changes:
1. Change the way by sending reset command to firmware to LAN reset.
   So that MNG domain will not be reset.
2. Change the hardware flush register since the original register cannot
   be read temporarily after LAN reset.
3. Remove checking of MNG veto bit when handling Tx laser.
4. Workaround for GPIO interrupt lost.

Fixes: f58ae2fcfea6 ("net/txgbe: add HW init and reset operation")
Fixes: e4c515a7bc7e ("net/txgbe: add multi-speed link setup")
Fixes: d3bb4a04eac1 ("net/txgbe: add SFP hotplug identification")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_hw.c   | 23 +++--------------------
 drivers/net/txgbe/base/txgbe_regs.h | 15 ++++++++++++++-
 drivers/net/txgbe/txgbe_ethdev.c    | 27 +++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 21 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_hw.c b/drivers/net/txgbe/base/txgbe_hw.c
index 8966453a03..601c30ab81 100644
--- a/drivers/net/txgbe/base/txgbe_hw.c
+++ b/drivers/net/txgbe/base/txgbe_hw.c
@@ -2987,10 +2987,6 @@ void txgbe_disable_tx_laser_multispeed_fiber(struct txgbe_hw *hw)
 {
 	u32 esdp_reg = rd32(hw, TXGBE_GPIODATA);
 
-	/* Blocked by MNG FW so bail */
-	if (txgbe_check_reset_blocked(hw))
-		return;
-
 	if (txgbe_close_notify(hw))
 		txgbe_led_off(hw, TXGBE_LEDCTL_UP | TXGBE_LEDCTL_10G |
 				TXGBE_LEDCTL_1G | TXGBE_LEDCTL_ACTIVE);
@@ -3038,10 +3034,6 @@ void txgbe_enable_tx_laser_multispeed_fiber(struct txgbe_hw *hw)
  **/
 void txgbe_flap_tx_laser_multispeed_fiber(struct txgbe_hw *hw)
 {
-	/* Blocked by MNG FW so bail */
-	if (txgbe_check_reset_blocked(hw))
-		return;
-
 	if (hw->mac.autotry_restart) {
 		txgbe_disable_tx_laser_multispeed_fiber(hw);
 		txgbe_enable_tx_laser_multispeed_fiber(hw);
@@ -3432,18 +3424,9 @@ s32 txgbe_reset_hw(struct txgbe_hw *hw)
 	autoc = hw->mac.autoc_read(hw);
 
 mac_reset_top:
-	/*
-	 * Issue global reset to the MAC.  Needs to be SW reset if link is up.
-	 * If link reset is used when link is up, it might reset the PHY when
-	 * mng is using it.  If link is down or the flag to force full link
-	 * reset is set, then perform link reset.
-	 */
-	if (txgbe_mng_present(hw)) {
-		txgbe_hic_reset(hw);
-	} else {
-		wr32(hw, TXGBE_RST, TXGBE_RST_LAN(hw->bus.lan_id));
-		txgbe_flush(hw);
-	}
+	/* Do LAN reset, the MNG domain will not be reset. */
+	wr32(hw, TXGBE_RST, TXGBE_RST_LAN(hw->bus.lan_id));
+	txgbe_flush(hw);
 	usec_delay(10);
 
 	txgbe_reset_misc(hw);
diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index 911bb6e04e..79290a7afe 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1579,6 +1579,7 @@ enum txgbe_5tuple_protocol {
 #define TXGBE_GPIOINTMASK               0x014834
 #define TXGBE_GPIOINTTYPE               0x014838
 #define TXGBE_GPIOINTSTAT               0x014840
+#define TXGBE_GPIORAWINTSTAT            0x014844
 #define TXGBE_GPIOEOI                   0x01484C
 
 
@@ -1884,7 +1885,19 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
 }
 
 /* flush all write operations */
-#define txgbe_flush(hw) rd32(hw, 0x00100C)
+static inline void txgbe_flush(struct txgbe_hw *hw)
+{
+	switch (hw->mac.type) {
+	case txgbe_mac_raptor:
+		rd32(hw, TXGBE_PWR);
+		break;
+	case txgbe_mac_raptor_vf:
+		rd32(hw, TXGBE_VFSTATUS);
+		break;
+	default:
+		break;
+	}
+}
 
 #define rd32a(hw, reg, idx) ( \
 	rd32((hw), (reg) + ((idx) << 2)))
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 6562bddd6b..9fb30c896a 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -1530,6 +1530,25 @@ txgbe_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }
 
+static void txgbe_reinit_gpio_intr(struct txgbe_hw *hw)
+{
+	u32 reg;
+
+	wr32(hw, TXGBE_GPIOINTMASK, 0xFF);
+	reg = rd32(hw, TXGBE_GPIORAWINTSTAT);
+
+	if (reg & TXGBE_GPIOBIT_2)
+		wr32(hw, TXGBE_GPIOEOI, TXGBE_GPIOBIT_2);
+
+	if (reg & TXGBE_GPIOBIT_3)
+		wr32(hw, TXGBE_GPIOEOI, TXGBE_GPIOBIT_3);
+
+	if (reg & TXGBE_GPIOBIT_6)
+		wr32(hw, TXGBE_GPIOEOI, TXGBE_GPIOBIT_6);
+
+	wr32(hw, TXGBE_GPIOINTMASK, 0);
+}
+
 static void
 txgbe_dev_phy_intr_setup(struct rte_eth_dev *dev)
 {
@@ -1668,6 +1687,10 @@ txgbe_dev_start(struct rte_eth_dev *dev)
 	hw->mac.get_link_status = true;
 	hw->dev_start = true;
 
+	/* workaround for GPIO intr lost when mng_veto bit is set */
+	if (txgbe_check_reset_blocked(hw))
+		txgbe_reinit_gpio_intr(hw);
+
 	/* configure PF module if SRIOV enabled */
 	txgbe_pf_host_configure(dev);
 
@@ -1884,6 +1907,10 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
 	/* disable interrupts */
 	txgbe_disable_intr(hw);
 
+	/* workaround for GPIO intr lost when mng_veto bit is set */
+	if (txgbe_check_reset_blocked(hw))
+		txgbe_reinit_gpio_intr(hw);
+
 	/* reset the NIC */
 	txgbe_pf_reset_hw(hw);
 	hw->adapter_stopped = 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.890625300 +0800
+++ 0024-net-txgbe-adapt-to-MNG-veto-bit-setting.patch	2023-08-09 21:51:18.154352000 +0800
@@ -1 +1 @@
-From 12011b11a3d6339082e647082d30f97f49f6a468 Mon Sep 17 00:00:00 2001
+From 57b3a57dfa1ee05e8738f475bf3722e738f96fe3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 12011b11a3d6339082e647082d30f97f49f6a468 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
- drivers/net/txgbe/base/txgbe_regs.h | 14 +++++++++++++-
+ drivers/net/txgbe/base/txgbe_regs.h | 15 ++++++++++++++-
@@ -25 +27 @@
- 3 files changed, 43 insertions(+), 21 deletions(-)
+ 3 files changed, 44 insertions(+), 21 deletions(-)
@@ -28 +30 @@
-index e7c9754d26..2952c408fd 100644
+index 8966453a03..601c30ab81 100644
@@ -31 +33 @@
-@@ -2988,10 +2988,6 @@ void txgbe_disable_tx_laser_multispeed_fiber(struct txgbe_hw *hw)
+@@ -2987,10 +2987,6 @@ void txgbe_disable_tx_laser_multispeed_fiber(struct txgbe_hw *hw)
@@ -42 +44 @@
-@@ -3039,10 +3035,6 @@ void txgbe_enable_tx_laser_multispeed_fiber(struct txgbe_hw *hw)
+@@ -3038,10 +3034,6 @@ void txgbe_enable_tx_laser_multispeed_fiber(struct txgbe_hw *hw)
@@ -53 +55 @@
-@@ -3433,18 +3425,9 @@ s32 txgbe_reset_hw(struct txgbe_hw *hw)
+@@ -3432,18 +3424,9 @@ s32 txgbe_reset_hw(struct txgbe_hw *hw)
@@ -76 +78 @@
-index bc2854b01a..79290a7afe 100644
+index 911bb6e04e..79290a7afe 100644
@@ -79 +81,9 @@
-@@ -1885,7 +1885,19 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
+@@ -1579,6 +1579,7 @@ enum txgbe_5tuple_protocol {
+ #define TXGBE_GPIOINTMASK               0x014834
+ #define TXGBE_GPIOINTTYPE               0x014838
+ #define TXGBE_GPIOINTSTAT               0x014840
++#define TXGBE_GPIORAWINTSTAT            0x014844
+ #define TXGBE_GPIOEOI                   0x01484C
+ 
+ 
+@@ -1884,7 +1885,19 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
@@ -101 +111 @@
-index 5eff1a766e..36c74d353d 100644
+index 6562bddd6b..9fb30c896a 100644
@@ -104 +114 @@
-@@ -1531,6 +1531,25 @@ txgbe_dev_configure(struct rte_eth_dev *dev)
+@@ -1530,6 +1530,25 @@ txgbe_dev_configure(struct rte_eth_dev *dev)
@@ -130 +140 @@
-@@ -1680,6 +1699,10 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+@@ -1668,6 +1687,10 @@ txgbe_dev_start(struct rte_eth_dev *dev)
@@ -141 +151 @@
-@@ -1897,6 +1920,10 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -1884,6 +1907,10 @@ txgbe_dev_stop(struct rte_eth_dev *dev)

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

* patch 'net/txgbe: fix to set autoneg for 1G speed' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (23 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/txgbe: adapt to MNG veto bit setting' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/txgbe: fix extended statistics' " Xueming Li
                     ` (27 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 19c8a701a783f363dbc8dede60ea1d7e647c554c Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:24 +0800
Subject: [PATCH] net/txgbe: fix to set autoneg for 1G speed
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 658dbfa6360fcda0a5798669f6eac8293e4a2d73 ]

Autoneg was always on for 1G speed, fix to set autoneg off.

Fixes: 01c3cf5c85a7 ("net/txgbe: add autoneg control read and write")
Fixes: e4c515a7bc7e ("net/txgbe: add multi-speed link setup")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_hw.c   | 14 ++++++++++++++
 drivers/net/txgbe/base/txgbe_phy.c  |  4 +++-
 drivers/net/txgbe/base/txgbe_type.h |  1 +
 drivers/net/txgbe/txgbe_ethdev.c    |  2 ++
 4 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/base/txgbe_hw.c b/drivers/net/txgbe/base/txgbe_hw.c
index 601c30ab81..de96549ae8 100644
--- a/drivers/net/txgbe/base/txgbe_hw.c
+++ b/drivers/net/txgbe/base/txgbe_hw.c
@@ -2273,10 +2273,24 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
 	}
 
 	if (speed & TXGBE_LINK_SPEED_1GB_FULL) {
+		u32 curr_autoneg;
+
 		speedcnt++;
 		if (highest_link_speed == TXGBE_LINK_SPEED_UNKNOWN)
 			highest_link_speed = TXGBE_LINK_SPEED_1GB_FULL;
 
+		status = hw->mac.check_link(hw, &link_speed, &link_up, false);
+		if (status != 0)
+			return status;
+
+		/* If we already have link at this speed, just jump out */
+		if (link_speed == TXGBE_LINK_SPEED_1GB_FULL) {
+			curr_autoneg = rd32_epcs(hw, SR_MII_MMD_CTL);
+			if (link_up && (hw->autoneg ==
+					!!(curr_autoneg & SR_MII_MMD_CTL_AN_EN)))
+				goto out;
+		}
+
 		/* Set the module link speed */
 		switch (hw->phy.media_type) {
 		case txgbe_media_type_fiber:
diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c
index 6bbb2a5e71..a7c11c50df 100644
--- a/drivers/net/txgbe/base/txgbe_phy.c
+++ b/drivers/net/txgbe/base/txgbe_phy.c
@@ -1380,7 +1380,9 @@ txgbe_set_sgmii_an37_ability(struct txgbe_hw *hw)
 		wr32_epcs(hw, SR_MII_MMD_AN_CTL, 0x0105);
 	wr32_epcs(hw, SR_MII_MMD_DIGI_CTL, 0x0200);
 	value = rd32_epcs(hw, SR_MII_MMD_CTL);
-	value = (value & ~0x1200) | (0x1 << 12) | (0x1 << 9);
+	value = (value & ~0x1200) | (0x1 << 9);
+	if (hw->autoneg)
+		value |= SR_MII_MMD_CTL_AN_EN;
 	wr32_epcs(hw, SR_MII_MMD_CTL, value);
 }
 
diff --git a/drivers/net/txgbe/base/txgbe_type.h b/drivers/net/txgbe/base/txgbe_type.h
index c3486b472f..75e839b7de 100644
--- a/drivers/net/txgbe/base/txgbe_type.h
+++ b/drivers/net/txgbe/base/txgbe_type.h
@@ -783,6 +783,7 @@ struct txgbe_hw {
 	bool allow_unsupported_sfp;
 	bool need_crosstalk_fix;
 	bool dev_start;
+	bool autoneg;
 	struct txgbe_devargs devarg;
 
 	uint64_t isb_dma;
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 9fb30c896a..d94c4180ff 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -1809,6 +1809,7 @@ txgbe_dev_start(struct rte_eth_dev *dev)
 		speed = (TXGBE_LINK_SPEED_100M_FULL |
 			 TXGBE_LINK_SPEED_1GB_FULL |
 			 TXGBE_LINK_SPEED_10GB_FULL);
+		hw->autoneg = true;
 	} else {
 		if (*link_speeds & RTE_ETH_LINK_SPEED_10G)
 			speed |= TXGBE_LINK_SPEED_10GB_FULL;
@@ -1820,6 +1821,7 @@ txgbe_dev_start(struct rte_eth_dev *dev)
 			speed |= TXGBE_LINK_SPEED_1GB_FULL;
 		if (*link_speeds & RTE_ETH_LINK_SPEED_100M)
 			speed |= TXGBE_LINK_SPEED_100M_FULL;
+		hw->autoneg = false;
 	}
 
 	err = hw->mac.setup_link(hw, speed, link_up);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.920695600 +0800
+++ 0025-net-txgbe-fix-to-set-autoneg-for-1G-speed.patch	2023-08-09 21:51:18.154352000 +0800
@@ -1 +1 @@
-From 658dbfa6360fcda0a5798669f6eac8293e4a2d73 Mon Sep 17 00:00:00 2001
+From 19c8a701a783f363dbc8dede60ea1d7e647c554c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 658dbfa6360fcda0a5798669f6eac8293e4a2d73 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 2952c408fd..d19fd0065d 100644
+index 601c30ab81..de96549ae8 100644
@@ -50 +52 @@
-index 1eb45b068a..d87af656d5 100644
+index 6bbb2a5e71..a7c11c50df 100644
@@ -53 +55 @@
-@@ -1402,7 +1402,9 @@ txgbe_set_sgmii_an37_ability(struct txgbe_hw *hw)
+@@ -1380,7 +1380,9 @@ txgbe_set_sgmii_an37_ability(struct txgbe_hw *hw)
@@ -77 +79 @@
-index 36c74d353d..962667acdc 100644
+index 9fb30c896a..d94c4180ff 100644
@@ -80 +82 @@
-@@ -1821,6 +1821,7 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+@@ -1809,6 +1809,7 @@ txgbe_dev_start(struct rte_eth_dev *dev)
@@ -88 +90 @@
-@@ -1832,6 +1833,7 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+@@ -1820,6 +1821,7 @@ txgbe_dev_start(struct rte_eth_dev *dev)

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

* patch 'net/txgbe: fix extended statistics' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (24 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/txgbe: fix to set autoneg for 1G speed' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/ngbe: " Xueming Li
                     ` (26 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 409cd85a16c7c8f7ca0204c54657389155574841 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:25 +0800
Subject: [PATCH] net/txgbe: fix extended statistics
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 83f44a283a0bb4d5041161bcbaae5130cb1a8f87 ]

Fix to show tx_broadcast_packets and tx_multicast_packets counters.

Fixes: 91fe49c87d76 ("net/txgbe: support device xstats")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index d94c4180ff..95aef27092 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -179,7 +179,9 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = {
 	HW_XSTAT(tx_total_packets),
 	HW_XSTAT(rx_total_missed_packets),
 	HW_XSTAT(rx_broadcast_packets),
+	HW_XSTAT(tx_broadcast_packets),
 	HW_XSTAT(rx_multicast_packets),
+	HW_XSTAT(tx_multicast_packets),
 	HW_XSTAT(rx_management_packets),
 	HW_XSTAT(tx_management_packets),
 	HW_XSTAT(rx_management_dropped),
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.948155500 +0800
+++ 0026-net-txgbe-fix-extended-statistics.patch	2023-08-09 21:51:18.154352000 +0800
@@ -1 +1 @@
-From 83f44a283a0bb4d5041161bcbaae5130cb1a8f87 Mon Sep 17 00:00:00 2001
+From 409cd85a16c7c8f7ca0204c54657389155574841 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 83f44a283a0bb4d5041161bcbaae5130cb1a8f87 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 962667acdc..74765a469d 100644
+index d94c4180ff..95aef27092 100644
@@ -20 +22 @@
-@@ -180,7 +180,9 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = {
+@@ -179,7 +179,9 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = {

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

* patch 'net/ngbe: fix extended statistics' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (25 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/txgbe: fix extended statistics' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/ngbe: adapt to MNG veto bit setting' " Xueming Li
                     ` (25 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c523de9115db7ea634c1de7dd4d466e01a31e761 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:26 +0800
Subject: [PATCH] net/ngbe: fix extended statistics
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9e2d2fadf89721b6b3ad639f9ad69b672589820a ]

Fix to show tx_broadcast_packets and tx_multicast_packets counters.

Fixes: 8b433d04adc9 ("net/ngbe: support device xstats")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index afdb3ad41f..f719172749 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -160,7 +160,9 @@ static const struct rte_ngbe_xstats_name_off rte_ngbe_stats_strings[] = {
 	HW_XSTAT(tx_total_packets),
 	HW_XSTAT(rx_total_missed_packets),
 	HW_XSTAT(rx_broadcast_packets),
+	HW_XSTAT(tx_broadcast_packets),
 	HW_XSTAT(rx_multicast_packets),
+	HW_XSTAT(tx_multicast_packets),
 	HW_XSTAT(rx_management_packets),
 	HW_XSTAT(tx_management_packets),
 	HW_XSTAT(rx_management_dropped),
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.971338500 +0800
+++ 0027-net-ngbe-fix-extended-statistics.patch	2023-08-09 21:51:18.154352000 +0800
@@ -1 +1 @@
-From 9e2d2fadf89721b6b3ad639f9ad69b672589820a Mon Sep 17 00:00:00 2001
+From c523de9115db7ea634c1de7dd4d466e01a31e761 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9e2d2fadf89721b6b3ad639f9ad69b672589820a ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index c32d954769..836ecfa2da 100644
+index afdb3ad41f..f719172749 100644

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

* patch 'net/ngbe: adapt to MNG veto bit setting' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (26 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/ngbe: " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/ngbe: fix link status in no LSC mode' " Xueming Li
                     ` (24 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1c7e19d4a04133db8edbc21a90cef48c45fe0767 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:27 +0800
Subject: [PATCH] net/ngbe: adapt to MNG veto bit setting
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6f05dc6caf5c0e32ba7620c29ca5a176b36736f8 ]

In the new firmware, MNG veto bit is set by default for new features.
It causes the PHY configuration not to be reset after LAN reset. So PHY
power will be down after stopping device. The internal PHY then cannot
be initialized successfully at device start.

Add setting power on for internal PHY to fix this issue.

Fixes: abea8974c7a6 ("net/ngbe: support link down/up")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_phy_rtl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ngbe/base/ngbe_phy_rtl.c b/drivers/net/ngbe/base/ngbe_phy_rtl.c
index 9b323624ec..88bacec114 100644
--- a/drivers/net/ngbe/base/ngbe_phy_rtl.c
+++ b/drivers/net/ngbe/base/ngbe_phy_rtl.c
@@ -120,6 +120,8 @@ s32 ngbe_init_phy_rtl(struct ngbe_hw *hw)
 	hw->init_phy = true;
 	msec_delay(1);
 
+	hw->phy.set_phy_power(hw, true);
+
 	for (i = 0; i < 15; i++) {
 		if (!rd32m(hw, NGBE_STAT,
 			NGBE_STAT_GPHY_IN_RST(hw->bus.lan_id)))
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:18.994660900 +0800
+++ 0028-net-ngbe-adapt-to-MNG-veto-bit-setting.patch	2023-08-09 21:51:18.154352000 +0800
@@ -1 +1 @@
-From 6f05dc6caf5c0e32ba7620c29ca5a176b36736f8 Mon Sep 17 00:00:00 2001
+From 1c7e19d4a04133db8edbc21a90cef48c45fe0767 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6f05dc6caf5c0e32ba7620c29ca5a176b36736f8 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ngbe: fix link status in no LSC mode' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (27 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/ngbe: adapt to MNG veto bit setting' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/ngbe: remove redundant codes' " Xueming Li
                     ` (23 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e66f9e3fdfd22a69c9443fc7bf8b613ff0c46cb5 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:28 +0800
Subject: [PATCH] net/ngbe: fix link status in no LSC mode
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 21f702d556fabbc50e5e8d43c7ad3dfbe9dac1bd ]

When using no LSC mode, device link status is sometimes get incorrectly.
Introduce hw->lsc to fix this issue.

Fixes: 3d0af7066759 ("net/ngbe: setup PHY link")
Fixes: 3518df5774c7 ("net/ngbe: support device start/stop")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_hw.c      | 10 +++++++---
 drivers/net/ngbe/base/ngbe_phy_rtl.c | 20 ++++++++++++++++++++
 drivers/net/ngbe/base/ngbe_phy_rtl.h |  2 ++
 drivers/net/ngbe/base/ngbe_phy_yt.c  | 16 +++++++++-------
 drivers/net/ngbe/base/ngbe_type.h    |  1 +
 drivers/net/ngbe/ngbe_ethdev.c       |  2 ++
 6 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index 283cdca367..27243d85c8 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -1541,11 +1541,15 @@ s32 ngbe_clear_vfta(struct ngbe_hw *hw)
 s32 ngbe_check_mac_link_em(struct ngbe_hw *hw, u32 *speed,
 			bool *link_up, bool link_up_wait_to_complete)
 {
-	u32 i, reg;
+	u32 i;
 	s32 status = 0;
 
-	reg = rd32(hw, NGBE_GPIOINTSTAT);
-	wr32(hw, NGBE_GPIOEOI, reg);
+	if (hw->lsc) {
+		u32 reg;
+
+		reg = rd32(hw, NGBE_GPIOINTSTAT);
+		wr32(hw, NGBE_GPIOEOI, reg);
+	}
 
 	if (link_up_wait_to_complete) {
 		for (i = 0; i < hw->mac.max_link_up_time; i++) {
diff --git a/drivers/net/ngbe/base/ngbe_phy_rtl.c b/drivers/net/ngbe/base/ngbe_phy_rtl.c
index 88bacec114..b0eb6c97c0 100644
--- a/drivers/net/ngbe/base/ngbe_phy_rtl.c
+++ b/drivers/net/ngbe/base/ngbe_phy_rtl.c
@@ -392,6 +392,26 @@ s32 ngbe_check_phy_link_rtl(struct ngbe_hw *hw, u32 *speed, bool *link_up)
 			*speed = NGBE_LINK_SPEED_10M_FULL;
 	}
 
+	if (hw->lsc)
+		return status;
+
+	/*
+	 * Because of the slow speed of getting link state, RTL_PHYSR
+	 * may still be up while the actual link state is down.
+	 * So we read RTL_GBSR to get accurate state when speed is 1G
+	 * in polling mode.
+	 */
+	if (*speed == NGBE_LINK_SPEED_1GB_FULL) {
+		status = hw->phy.read_reg(hw, RTL_GBSR,
+				RTL_DEV_ZERO, &phy_data);
+		phy_link = phy_data & RTL_GBSR_LRS;
+
+		/* Only need to detect link down */
+		if (!phy_link) {
+			*link_up = false;
+			*speed = NGBE_LINK_SPEED_UNKNOWN;
+		}
+	}
 	return status;
 }
 
diff --git a/drivers/net/ngbe/base/ngbe_phy_rtl.h b/drivers/net/ngbe/base/ngbe_phy_rtl.h
index b2fbc4f74d..6093ee7d5c 100644
--- a/drivers/net/ngbe/base/ngbe_phy_rtl.h
+++ b/drivers/net/ngbe/base/ngbe_phy_rtl.h
@@ -35,6 +35,8 @@
 #define   RTL_ANLPAR_LP			MS16(10, 0x3)
 #define RTL_GBCR			0x9
 #define   RTL_GBCR_1000F		MS16(9, 0x1)
+#define RTL_GBSR			0xA
+#define   RTL_GBSR_LRS			MS16(13, 0x1)
 /* Page 0xa42*/
 #define RTL_GSR				0x10
 #define   RTL_GSR_ST			MS16(0, 0x7)
diff --git a/drivers/net/ngbe/base/ngbe_phy_yt.c b/drivers/net/ngbe/base/ngbe_phy_yt.c
index 726d6c8ef5..754faadd6a 100644
--- a/drivers/net/ngbe/base/ngbe_phy_yt.c
+++ b/drivers/net/ngbe/base/ngbe_phy_yt.c
@@ -102,13 +102,15 @@ s32 ngbe_init_phy_yt(struct ngbe_hw *hw)
 {
 	rte_spinlock_init(&hw->phy_lock);
 
-	rte_spinlock_lock(&hw->phy_lock);
-	/* close sds area register */
-	ngbe_write_phy_reg_ext_yt(hw, YT_SMI_PHY, 0, 0);
-	/* enable interrupts */
-	ngbe_write_phy_reg_mdi(hw, YT_INTR, 0,
-				YT_INTR_ENA_MASK | YT_SDS_INTR_ENA_MASK);
-	rte_spinlock_unlock(&hw->phy_lock);
+	if (hw->lsc) {
+		rte_spinlock_lock(&hw->phy_lock);
+		/* close sds area register */
+		ngbe_write_phy_reg_ext_yt(hw, YT_SMI_PHY, 0, 0);
+		/* enable interrupts */
+		ngbe_write_phy_reg_mdi(hw, YT_INTR, 0,
+					YT_INTR_ENA_MASK | YT_SDS_INTR_ENA_MASK);
+		rte_spinlock_unlock(&hw->phy_lock);
+	}
 
 	hw->phy.set_phy_power(hw, false);
 
diff --git a/drivers/net/ngbe/base/ngbe_type.h b/drivers/net/ngbe/base/ngbe_type.h
index 05804eeab7..37be288a74 100644
--- a/drivers/net/ngbe/base/ngbe_type.h
+++ b/drivers/net/ngbe/base/ngbe_type.h
@@ -431,6 +431,7 @@ struct ngbe_hw {
 	bool offset_loaded;
 	bool is_pf;
 	bool gpio_ctl;
+	bool lsc;
 	u32 led_conf;
 	bool init_phy;
 	rte_spinlock_t phy_lock;
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index f719172749..30952a5632 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -1052,6 +1052,8 @@ ngbe_dev_start(struct rte_eth_dev *dev)
 	if (hw->is_pf && dev->data->dev_conf.lpbk_mode)
 		goto skip_link_setup;
 
+	hw->lsc = dev->data->dev_conf.intr_conf.lsc;
+
 	err = hw->mac.check_link(hw, &speed, &link_up, 0);
 	if (err != 0)
 		goto error;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.016576000 +0800
+++ 0029-net-ngbe-fix-link-status-in-no-LSC-mode.patch	2023-08-09 21:51:18.154352000 +0800
@@ -1 +1 @@
-From 21f702d556fabbc50e5e8d43c7ad3dfbe9dac1bd Mon Sep 17 00:00:00 2001
+From e66f9e3fdfd22a69c9443fc7bf8b613ff0c46cb5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 21f702d556fabbc50e5e8d43c7ad3dfbe9dac1bd ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -130 +132 @@
-index 836ecfa2da..317ad6999c 100644
+index f719172749..30952a5632 100644

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

* patch 'net/ngbe: remove redundant codes' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (28 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/ngbe: fix link status in no LSC mode' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'app/testpmd: fix primary process not polling all queues' " Xueming Li
                     ` (22 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 368138b61bee09f4e67660678b5793a1ef9f9da7 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:29 +0800
Subject: [PATCH] net/ngbe: remove redundant codes
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 659cfce01eb93792e3a931ad3346b5c9cc208e66 ]

Remove redundant function ngbe_dev_setup_link_alarm_handler() and
related codes.

Fixes: b9246b8fa280 ("net/ngbe: support link update")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_ethdev.c | 28 ----------------------------
 drivers/net/ngbe/ngbe_ethdev.h |  1 -
 2 files changed, 29 deletions(-)

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 30952a5632..cb643c6eba 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -974,9 +974,6 @@ ngbe_dev_start(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	/* Stop the link setup handler before resetting the HW. */
-	rte_eal_alarm_cancel(ngbe_dev_setup_link_alarm_handler, dev);
-
 	/* disable uio/vfio intr/eventfd mapping */
 	rte_intr_disable(intr_handle);
 
@@ -1172,8 +1169,6 @@ ngbe_dev_stop(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	rte_eal_alarm_cancel(ngbe_dev_setup_link_alarm_handler, dev);
-
 	if (hw->gpio_ctl) {
 		/* gpio0 is used to power on/off control*/
 		wr32(hw, NGBE_GPIODATA, NGBE_GPIOBIT_0);
@@ -1873,24 +1868,6 @@ ngbe_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 	return NULL;
 }
 
-void
-ngbe_dev_setup_link_alarm_handler(void *param)
-{
-	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
-	struct ngbe_hw *hw = ngbe_dev_hw(dev);
-	struct ngbe_interrupt *intr = ngbe_dev_intr(dev);
-	u32 speed;
-	bool autoneg = false;
-
-	speed = hw->phy.autoneg_advertised;
-	if (!speed)
-		hw->mac.get_link_capabilities(hw, &speed, &autoneg);
-
-	hw->mac.setup_link(hw, speed, true);
-
-	intr->flags &= ~NGBE_FLAG_NEED_LINK_CONFIG;
-}
-
 /* return 0 means link status changed, -1 means not changed */
 int
 ngbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -1900,7 +1877,6 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
 	struct rte_eth_link link;
 	u32 link_speed = NGBE_LINK_SPEED_UNKNOWN;
 	u32 lan_speed = 0;
-	struct ngbe_interrupt *intr = ngbe_dev_intr(dev);
 	bool link_up;
 	int err;
 	int wait = 1;
@@ -1914,9 +1890,6 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
 
 	hw->mac.get_link_status = true;
 
-	if (intr->flags & NGBE_FLAG_NEED_LINK_CONFIG)
-		return rte_eth_linkstatus_set(dev, &link);
-
 	/* check if it needs to wait to complete, if lsc interrupt is enabled */
 	if (wait_to_complete == 0 || dev->data->dev_conf.intr_conf.lsc != 0)
 		wait = 0;
@@ -1931,7 +1904,6 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
 	if (!link_up)
 		return rte_eth_linkstatus_set(dev, &link);
 
-	intr->flags &= ~NGBE_FLAG_NEED_LINK_CONFIG;
 	link.link_status = RTE_ETH_LINK_UP;
 	link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
 
diff --git a/drivers/net/ngbe/ngbe_ethdev.h b/drivers/net/ngbe/ngbe_ethdev.h
index 8d500fd38c..bb96f6a5e7 100644
--- a/drivers/net/ngbe/ngbe_ethdev.h
+++ b/drivers/net/ngbe/ngbe_ethdev.h
@@ -341,7 +341,6 @@ void ngbe_vlan_hw_strip_bitmap_set(struct rte_eth_dev *dev,
 		uint16_t queue, bool on);
 void ngbe_config_vlan_strip_on_all_queues(struct rte_eth_dev *dev,
 						  int mask);
-void ngbe_dev_setup_link_alarm_handler(void *param);
 void ngbe_read_stats_registers(struct ngbe_hw *hw,
 			   struct ngbe_hw_stats *hw_stats);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.042445200 +0800
+++ 0030-net-ngbe-remove-redundant-codes.patch	2023-08-09 21:51:18.164352000 +0800
@@ -1 +1 @@
-From 659cfce01eb93792e3a931ad3346b5c9cc208e66 Mon Sep 17 00:00:00 2001
+From 368138b61bee09f4e67660678b5793a1ef9f9da7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 659cfce01eb93792e3a931ad3346b5c9cc208e66 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 317ad6999c..af77081d9a 100644
+index 30952a5632..cb643c6eba 100644
@@ -41,2 +43,2 @@
-@@ -1895,24 +1890,6 @@ ngbe_dev_overheat(struct rte_eth_dev *dev)
- 	}
+@@ -1873,24 +1868,6 @@ ngbe_dev_supported_ptypes_get(struct rte_eth_dev *dev)
+ 	return NULL;
@@ -66 +68 @@
-@@ -1922,7 +1899,6 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -1900,7 +1877,6 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -74 +76 @@
-@@ -1936,9 +1912,6 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -1914,9 +1890,6 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -84 +86 @@
-@@ -1953,7 +1926,6 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -1931,7 +1904,6 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -93 +95 @@
-index 330f476f6f..3cde7c8750 100644
+index 8d500fd38c..bb96f6a5e7 100644
@@ -96 +98 @@
-@@ -342,7 +342,6 @@ void ngbe_vlan_hw_strip_bitmap_set(struct rte_eth_dev *dev,
+@@ -341,7 +341,6 @@ void ngbe_vlan_hw_strip_bitmap_set(struct rte_eth_dev *dev,

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

* patch 'app/testpmd: fix primary process not polling all queues' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (29 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/ngbe: remove redundant codes' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/nfp: fix representor name too long' " Xueming Li
                     ` (21 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Jie Hai; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 16a82d0d1a7bcea2a3bd5d51e6a8700702571b8d Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Fri, 9 Jun 2023 17:03:40 +0800
Subject: [PATCH] app/testpmd: fix primary process not polling all queues
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 141a520b35f789f37dc06557bc724bf7f0e0a52d ]

Here's how the problem arises.
step1: Start the app.
    dpdk-testpmd -a 0000:35:00.0 -l 0-3 -- -i --rxq=10 --txq=10

step2: Perform the following steps and send traffic. As expected,
queue 7 does not send or receive packets, and other queues do.
    port 0 rxq 7 stop
    port 0 txq 7 stop
    set fwd mac
    start

step3: Perform the following steps and send traffic. All queues
are expected to send and receive packets normally, but that's not
the case for queue 7.
    stop
    port stop all
    port start all
    start
    show port xstats all

In fact, only the value of rx_q7_packets for queue 7 is not zero,
which means queue 7 is enabled for the driver but is not involved
in packet receiving and forwarding by software. If we check queue
state by command 'show rxq info 0 7' and 'show txq info 0 7',
we see queue 7 is started as other queues are.
    Rx queue state: started
    Tx queue state: started
The queue 7 is started but cannot forward. That's the problem.

We know that each stream has a read-only "disabled" field that
control if this stream should be used to forward. This field
depends on testpmd local queue state, please see
commit 3c4426db54fc ("app/testpmd: do not poll stopped queues").
DPDK framework maintains ethdev queue state that drivers reported,
which indicates the real state of queues.

There are commands that update these two kind queue state such as
'port X rxq|txq start|stop'. But these operations take effect only
in one stop-start round. In the following stop-start round, the
preceding operations do not take effect anymore. However, only
the ethdev queue state is updated, causing the testpmd and ethdev
state information to diverge and causing unexpected side effects
as above problem.

There was a similar problem for the secondary process, please see
commit 5028f207a4fa ("app/testpmd: fix secondary process packet
forwarding").

This patch applies its workaround with some difference to the
primary process. Not all PMDs implement rte_eth_rx_queue_info_get and
rte_eth_tx_queue_info_get, however they may support deferred_start
with primary process. To not break their behavior, retain the original
testpmd local queue state for those PMDs.

Fixes: 3c4426db54fc ("app/testpmd: do not poll stopped queues")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/testpmd.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index b69b248e47..5c1388a8c0 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2355,6 +2355,13 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
 		ports[port_id].rxq[queue_id].state =
 			rx_qinfo.queue_state;
 	} else if (rc == -ENOTSUP) {
+		/*
+		 * Do not change the rxq state for primary process
+		 * to ensure that the PMDs do not implement
+		 * rte_eth_rx_queue_info_get can forward as before.
+		 */
+		if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+			return;
 		/*
 		 * Set the rxq state to RTE_ETH_QUEUE_STATE_STARTED
 		 * to ensure that the PMDs do not implement
@@ -2380,6 +2387,13 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
 		ports[port_id].txq[queue_id].state =
 			tx_qinfo.queue_state;
 	} else if (rc == -ENOTSUP) {
+		/*
+		 * Do not change the txq state for primary process
+		 * to ensure that the PMDs do not implement
+		 * rte_eth_tx_queue_info_get can forward as before.
+		 */
+		if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+			return;
 		/*
 		 * Set the txq state to RTE_ETH_QUEUE_STATE_STARTED
 		 * to ensure that the PMDs do not implement
@@ -2447,8 +2461,7 @@ start_packet_forwarding(int with_tx_first)
 		return;
 
 	if (stream_init != NULL) {
-		if (rte_eal_process_type() == RTE_PROC_SECONDARY)
-			update_queue_state();
+		update_queue_state();
 		for (i = 0; i < cur_fwd_config.nb_fwd_streams; i++)
 			stream_init(fwd_streams[i]);
 	}
@@ -3211,8 +3224,7 @@ start_port(portid_t pid)
 		pl[cfg_pi++] = pi;
 	}
 
-	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
-		update_queue_state();
+	update_queue_state();
 
 	if (at_least_one_port_successfully_started && !no_link_check)
 		check_all_ports_link_status(RTE_PORT_ALL);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.067969500 +0800
+++ 0031-app-testpmd-fix-primary-process-not-polling-all-queu.patch	2023-08-09 21:51:18.164352000 +0800
@@ -1 +1 @@
-From 141a520b35f789f37dc06557bc724bf7f0e0a52d Mon Sep 17 00:00:00 2001
+From 16a82d0d1a7bcea2a3bd5d51e6a8700702571b8d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 141a520b35f789f37dc06557bc724bf7f0e0a52d ]
@@ -61 +63,0 @@
-Cc: stable@dpdk.org
@@ -70 +72 @@
-index c6ad9b18bf..1fc70650e0 100644
+index b69b248e47..5c1388a8c0 100644
@@ -73 +75 @@
-@@ -2424,6 +2424,13 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
+@@ -2355,6 +2355,13 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
@@ -87 +89 @@
-@@ -2449,6 +2456,13 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
+@@ -2380,6 +2387,13 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
@@ -101 +103 @@
-@@ -2516,8 +2530,7 @@ start_packet_forwarding(int with_tx_first)
+@@ -2447,8 +2461,7 @@ start_packet_forwarding(int with_tx_first)
@@ -111 +113 @@
-@@ -3280,8 +3293,7 @@ start_port(portid_t pid)
+@@ -3211,8 +3224,7 @@ start_port(portid_t pid)

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

* patch 'net/nfp: fix representor name too long' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (30 preceding siblings ...)
  2023-08-09 23:47   ` patch 'app/testpmd: fix primary process not polling all queues' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/nfp: fix address always related with PF ID 0' " Xueming Li
                     ` (20 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Long Wu; +Cc: Chaoyong He, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 715143b51e7b02fc854a26be0c03df26329789b2 Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Thu, 15 Jun 2023 14:51:30 +0800
Subject: [PATCH] net/nfp: fix representor name too long
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7347341c4815eef11b39ade1e0115d8310ce3b9a ]

The length of representor name may exceed the limit when we use
it to create rte_ring, so we reduce the length of its name.

For example:
old: 0000:af:00.0_fl_repr_p1
new: af:00.0_repr_p1

Fixes: 2003cb447aa5 ("net/nfp: fix representor creation")

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_representor.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index 95e6043a8d..d319aefb08 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -730,8 +730,9 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
 {
 	int i;
 	int ret;
-	struct rte_device *device;
+	const char *pci_name;
 	struct rte_eth_dev *eth_dev;
+	struct rte_pci_device *pci_dev;
 	struct nfp_eth_table *nfp_eth_table;
 	struct nfp_eth_table_port *eth_port;
 	struct nfp_flower_representor flower_repr = {
@@ -755,10 +756,12 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
 	/* PF vNIC reprs get a random MAC address */
 	rte_eth_random_addr(flower_repr.mac_addr.addr_bytes);
 
-	device = &app_fw_flower->pf_hw->pf_dev->pci_dev->device;
+	pci_dev = app_fw_flower->pf_hw->pf_dev->pci_dev;
+
+	pci_name = strchr(pci_dev->name, ':') + 1;
 
 	snprintf(flower_repr.name, sizeof(flower_repr.name),
-			"%s_flower_repr_pf", device->name);
+			"%s_repr_pf", pci_name);
 
 	/* Create a eth_dev for this representor */
 	ret = rte_eth_dev_create(eth_dev->device, flower_repr.name,
@@ -781,7 +784,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
 		rte_ether_addr_copy((struct rte_ether_addr *)eth_port->mac_addr,
 				&flower_repr.mac_addr);
 		snprintf(flower_repr.name, sizeof(flower_repr.name),
-				"%s_fl_repr_p%d", device->name, i);
+				"%s_repr_p%d", pci_name, i);
 
 		/*
 		 * Create a eth_dev for this representor
@@ -813,7 +816,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
 		/* VF reprs get a random MAC address */
 		rte_eth_random_addr(flower_repr.mac_addr.addr_bytes);
 		snprintf(flower_repr.name, sizeof(flower_repr.name),
-				"%s_fl_repr_vf%d", device->name, i);
+				"%s_repr_vf%d", pci_name, i);
 
 		 /* This will also allocate private memory for the device*/
 		ret = rte_eth_dev_create(eth_dev->device, flower_repr.name,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.088276900 +0800
+++ 0032-net-nfp-fix-representor-name-too-long.patch	2023-08-09 21:51:18.164352000 +0800
@@ -1 +1 @@
-From 7347341c4815eef11b39ade1e0115d8310ce3b9a Mon Sep 17 00:00:00 2001
+From 715143b51e7b02fc854a26be0c03df26329789b2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7347341c4815eef11b39ade1e0115d8310ce3b9a ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 7669ab6dae..5f94d20f1b 100644
+index 95e6043a8d..d319aefb08 100644
@@ -26 +28 @@
-@@ -732,8 +732,9 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
+@@ -730,8 +730,9 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
@@ -37 +39 @@
-@@ -757,10 +758,12 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
+@@ -755,10 +756,12 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
@@ -52,3 +54,3 @@
-@@ -782,7 +785,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
- 		/* Copy the real mac of the interface to the representor struct */
- 		rte_ether_addr_copy(&eth_port->mac_addr, &flower_repr.mac_addr);
+@@ -781,7 +784,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
+ 		rte_ether_addr_copy((struct rte_ether_addr *)eth_port->mac_addr,
+ 				&flower_repr.mac_addr);
@@ -61 +63 @@
-@@ -814,7 +817,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
+@@ -813,7 +816,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)

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

* patch 'net/nfp: fix address always related with PF ID 0' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (31 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/nfp: fix representor name too long' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'common/sfc_efx/base: fix Rx queue without RSS hash prefix' " Xueming Li
                     ` (19 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Peng Zhang; +Cc: Chaoyong He, Long Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 47326eff66f1cc6489bf1724bb2b2c9bf86c87d4 Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Fri, 16 Jun 2023 16:57:23 +0800
Subject: [PATCH] net/nfp: fix address always related with PF ID 0
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 467370c93d73267c1d4417bff975cf812b878f48 ]

Now the PCIE configure bar address is always related with PF ID 0.
For the NIC with multiple PCI device, this will lead the host crash.
Fix this problem by make the PCIE configure bar address related with
the PF ID.

Fixes: c7e9729da6b5 ("net/nfp: support CPP")

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

diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
index 22c8bc4b14..e597315498 100644
--- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
+++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
@@ -66,8 +66,8 @@
 #define NFP_PCIE_P2C_GENERAL_TOKEN_OFFSET(bar, x) ((x) << ((bar)->bitsize - 4))
 #define NFP_PCIE_P2C_GENERAL_SIZE(bar)             (1 << ((bar)->bitsize - 4))
 
-#define NFP_PCIE_CFG_BAR_PCIETOCPPEXPBAR(bar, slot) \
-	(NFP_PCIE_BAR(0) + ((bar) * 8 + (slot)) * 4)
+#define NFP_PCIE_CFG_BAR_PCIETOCPPEXPBAR(id, bar, slot) \
+	(NFP_PCIE_BAR(id) + ((bar) * 8 + (slot)) * 4)
 
 #define NFP_PCIE_CPP_BAR_PCIETOCPPEXPBAR(bar, slot) \
 	(((bar) * 8 + (slot)) * 4)
@@ -117,6 +117,7 @@ struct nfp_pcie_user {
 	int secondary_lock;
 	char busdev[BUSDEV_SZ];
 	int barsz;
+	int dev_id;
 	char *cfg;
 };
 
@@ -258,7 +259,7 @@ nfp_bar_write(struct nfp_pcie_user *nfp, struct nfp_bar *bar,
 		return (-ENOMEM);
 
 	bar->csr = nfp->cfg +
-		   NFP_PCIE_CFG_BAR_PCIETOCPPEXPBAR(base, slot);
+		   NFP_PCIE_CFG_BAR_PCIETOCPPEXPBAR(nfp->dev_id, base, slot);
 
 	*(uint32_t *)(bar->csr) = newcfg;
 
@@ -332,10 +333,8 @@ nfp_enable_bars(struct nfp_pcie_user *nfp)
 		bar->base = 0;
 		bar->iomem = NULL;
 		bar->lock = 0;
-		bar->csr = nfp->cfg +
-			   NFP_PCIE_CFG_BAR_PCIETOCPPEXPBAR(bar->index >> 3,
-							   bar->index & 7);
-
+		bar->csr = nfp->cfg + NFP_PCIE_CFG_BAR_PCIETOCPPEXPBAR(nfp->dev_id,
+				bar->index >> 3, bar->index & 7);
 		bar->iomem = nfp->cfg + (bar->index << bar->bitsize);
 	}
 	return 0;
@@ -850,6 +849,7 @@ nfp6000_init(struct nfp_cpp *cpp, struct rte_pci_device *dev)
 		goto error;
 
 	desc->cfg = (char *)dev->mem_resource[0].addr;
+	desc->dev_id = dev->addr.function & 0x7;
 
 	nfp_enable_bars(desc);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.107452100 +0800
+++ 0033-net-nfp-fix-address-always-related-with-PF-ID-0.patch	2023-08-09 21:51:18.164352000 +0800
@@ -1 +1 @@
-From 467370c93d73267c1d4417bff975cf812b878f48 Mon Sep 17 00:00:00 2001
+From 47326eff66f1cc6489bf1724bb2b2c9bf86c87d4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 467370c93d73267c1d4417bff975cf812b878f48 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index e230c40051..658c618ee6 100644
+index 22c8bc4b14..e597315498 100644
@@ -36,2 +38,2 @@
-@@ -116,6 +116,7 @@ struct nfp_pcie_user {
- 	int lock;
+@@ -117,6 +117,7 @@ struct nfp_pcie_user {
+ 	int secondary_lock;
@@ -44 +46 @@
-@@ -245,7 +246,7 @@ nfp_bar_write(struct nfp_pcie_user *nfp, struct nfp_bar *bar,
+@@ -258,7 +259,7 @@ nfp_bar_write(struct nfp_pcie_user *nfp, struct nfp_bar *bar,
@@ -53 +55 @@
-@@ -314,10 +315,8 @@ nfp_enable_bars(struct nfp_pcie_user *nfp)
+@@ -332,10 +333,8 @@ nfp_enable_bars(struct nfp_pcie_user *nfp)
@@ -66 +68 @@
-@@ -779,6 +778,7 @@ nfp6000_init(struct nfp_cpp *cpp, struct rte_pci_device *dev)
+@@ -850,6 +849,7 @@ nfp6000_init(struct nfp_cpp *cpp, struct rte_pci_device *dev)
@@ -69 +71 @@
- 	desc->cfg = dev->mem_resource[0].addr;
+ 	desc->cfg = (char *)dev->mem_resource[0].addr;

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

* patch 'common/sfc_efx/base: fix Rx queue without RSS hash prefix' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (32 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/nfp: fix address always related with PF ID 0' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/iavf: fix VLAN offload with AVX512' " Xueming Li
                     ` (18 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Artemii Morozov; +Cc: Andy Moreton, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 64c315b9e9f078d7cf183f2f31c03e7577f444dd Mon Sep 17 00:00:00 2001
From: Artemii Morozov <artemii.morozov@arknetworks.am>
Date: Thu, 22 Jun 2023 16:31:36 +0400
Subject: [PATCH] common/sfc_efx/base: fix Rx queue without RSS hash prefix
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 80d18a958e4f06e121327073439c391dbc870d80 ]

If the prefix for the RSS hash was not chosen the ENOTSUP error should
be returned.

Before this patch success was returned for this case causing Rx queue
creation to fail.

Fixing return value to indicate failure.

Fixes: f784cdc5cbb1 ("common/sfc_efx/base: provide control to deliver RSS hash")

Signed-off-by: Artemii Morozov <artemii.morozov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/efx_rx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/common/sfc_efx/base/efx_rx.c b/drivers/common/sfc_efx/base/efx_rx.c
index 68f42f5cac..61726a9f0b 100644
--- a/drivers/common/sfc_efx/base/efx_rx.c
+++ b/drivers/common/sfc_efx/base/efx_rx.c
@@ -937,8 +937,10 @@ efx_rx_qcreate_internal(
 
 		rss_hash_field =
 		    &erplp->erpl_fields[EFX_RX_PREFIX_FIELD_RSS_HASH];
-		if (rss_hash_field->erpfi_width_bits == 0)
+		if (rss_hash_field->erpfi_width_bits == 0) {
+			rc = ENOTSUP;
 			goto fail5;
+		}
 	}
 
 	enp->en_rx_qcount++;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.128216000 +0800
+++ 0034-common-sfc_efx-base-fix-Rx-queue-without-RSS-hash-pr.patch	2023-08-09 21:51:18.164352000 +0800
@@ -1 +1 @@
-From 80d18a958e4f06e121327073439c391dbc870d80 Mon Sep 17 00:00:00 2001
+From 64c315b9e9f078d7cf183f2f31c03e7577f444dd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 80d18a958e4f06e121327073439c391dbc870d80 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/iavf: fix VLAN offload with AVX512' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (33 preceding siblings ...)
  2023-08-09 23:47   ` patch 'common/sfc_efx/base: fix Rx queue without RSS hash prefix' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/ice: fix tunnel packet Tx descriptor' " Xueming Li
                     ` (17 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Michal Schmidt; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8a0712739d0709e037cd2d8e9c01c6c888f4c574 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Mon, 27 Mar 2023 12:07:50 +0200
Subject: [PATCH] net/iavf: fix VLAN offload with AVX512
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 32aa88de4dd03b24afeb83195ffe6141b253f7c4 ]

It has been observed that mbufs of some received VLAN packets had the
VLAN tag correctly set in vlan_tci, but ol_flags were missing the
VLAN-indicating flags.

_mm256_shuffle_epi8 operates as two independent 128-bit operations,
not as a single 256-bit operation. To have the RTE_MBUF_F_RX_VLAN* flags
reflected in the resulting vlan_flags for all 8 rx descriptors, the
input l2tag2_flags_shuf must contain the required pattern in both
128-bit halves.

This fix is for the AVX512 Rx path. The same bug in AVX2 was fixed
by commit eb24917428a1 ("net/iavf: fix VLAN offload with AVX2").

Fixes: 4b64ccb328c9 ("net/iavf: fix VLAN extraction in AVX512 path")

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index b416a716cf..b0546a14c6 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -1338,7 +1338,10 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
 							(0, 0, 0, 0,
 							 0, 0, 0, 0,
 							 0, 0, 0, 0,
-							 0, 0, 0, 0,
+							 0, 0,
+							 RTE_MBUF_F_RX_VLAN |
+							 RTE_MBUF_F_RX_VLAN_STRIPPED,
+							 0,
 							 /* end up 128-bits */
 							 0, 0, 0, 0,
 							 0, 0, 0, 0,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.149212100 +0800
+++ 0035-net-iavf-fix-VLAN-offload-with-AVX512.patch	2023-08-09 21:51:18.164352000 +0800
@@ -1 +1 @@
-From 32aa88de4dd03b24afeb83195ffe6141b253f7c4 Mon Sep 17 00:00:00 2001
+From 8a0712739d0709e037cd2d8e9c01c6c888f4c574 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 32aa88de4dd03b24afeb83195ffe6141b253f7c4 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index 4fe9b97278..bd2788121b 100644
+index b416a716cf..b0546a14c6 100644
@@ -32 +34 @@
-@@ -1214,7 +1214,10 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
+@@ -1338,7 +1338,10 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,

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

* patch 'net/ice: fix tunnel packet Tx descriptor' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (34 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/iavf: fix VLAN offload with AVX512' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:47   ` patch 'net/ixgbe: add proper memory barriers in Rx' " Xueming Li
                     ` (16 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Shiyang He; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c8b6f57dc4476ffbada1d3051c2c57680ca1018f Mon Sep 17 00:00:00 2001
From: Shiyang He <shiyangx.he@intel.com>
Date: Thu, 8 Jun 2023 10:19:04 +0000
Subject: [PATCH] net/ice: fix tunnel packet Tx descriptor
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c261e7de45d38ddc3b4b8909c35b448c5e1b0fcf ]

The TX descriptor of tunnel packet filled incorrectly due to the MACLEN
is not set.

This patch fixes this issue by setting MACLEN to correctly fill the
TX descriptor.

Fixes: bd70c451532c ("net/ice: support Tx checksum offload for tunnel")

Signed-off-by: Shiyang He <shiyangx.he@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 665ae32c13..598edb29c9 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2746,10 +2746,7 @@ ice_txd_enable_checksum(uint64_t ol_flags,
 			union ice_tx_offload tx_offload)
 {
 	/* Set MACLEN */
-	if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
-		*td_offset |= (tx_offload.outer_l2_len >> 1)
-			<< ICE_TX_DESC_LEN_MACLEN_S;
-	else
+	if (!(ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK))
 		*td_offset |= (tx_offload.l2_len >> 1)
 			<< ICE_TX_DESC_LEN_MACLEN_S;
 
@@ -3010,9 +3007,12 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 
 		/* Fill in tunneling parameters if necessary */
 		cd_tunneling_params = 0;
-		if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
+		if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
+			td_offset |= (tx_offload.outer_l2_len >> 1)
+				<< ICE_TX_DESC_LEN_MACLEN_S;
 			ice_parse_tunneling_params(ol_flags, tx_offload,
 						   &cd_tunneling_params);
+		}
 
 		/* Enable checksum offloading */
 		if (ol_flags & ICE_TX_CKSUM_OFFLOAD_MASK)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.170286300 +0800
+++ 0036-net-ice-fix-tunnel-packet-Tx-descriptor.patch	2023-08-09 21:51:18.164352000 +0800
@@ -1 +1 @@
-From c261e7de45d38ddc3b4b8909c35b448c5e1b0fcf Mon Sep 17 00:00:00 2001
+From c8b6f57dc4476ffbada1d3051c2c57680ca1018f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c261e7de45d38ddc3b4b8909c35b448c5e1b0fcf ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ixgbe: add proper memory barriers in Rx' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (35 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/ice: fix tunnel packet Tx descriptor' " Xueming Li
@ 2023-08-09 23:47   ` Xueming Li
  2023-08-09 23:48   ` patch 'common/idpf: fix memory leak on AVX512 Tx queue close' " Xueming Li
                     ` (15 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:47 UTC (permalink / raw)
  To: Min Zhou; +Cc: Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 00f8c02c414b3fc3db882c328c2b2deb369050d2 Mon Sep 17 00:00:00 2001
From: Min Zhou <zhoumin@loongson.cn>
Date: Tue, 13 Jun 2023 17:44:25 +0800
Subject: [PATCH] net/ixgbe: add proper memory barriers in Rx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 85e46c532bc76ebe07f6a397aa76211250aca59c ]

Segmentation fault has been observed while running the
ixgbe_recv_pkts_lro() function to receive packets on the Loongson 3C5000
processor which has 64 cores and 4 NUMA nodes.

From the ixgbe_recv_pkts_lro() function, we found that as long as the first
packet has the EOP bit set, and the length of this packet is less than or
equal to rxq->crc_len, the segmentation fault will definitely happen even
though on the other platforms. For example, if we made the first packet
which had the EOP bit set had a zero length by force, the segmentation
fault would happen on X86.

Because when processd the first packet the first_seg->next will be NULL, if
at the same time this packet has the EOP bit set and its length is less
than or equal to rxq->crc_len, the following loop will be executed:

    for (lp = first_seg; lp->next != rxm; lp = lp->next)
        ;

We know that the first_seg->next will be NULL under this condition. So the
expression of lp->next->next will cause the segmentation fault.

Normally, the length of the first packet with EOP bit set will be greater
than rxq->crc_len. However, the out-of-order execution of CPU may make the
read ordering of the status and the rest of the descriptor fields in this
function not be correct. The related codes are as following:

        rxdp = &rx_ring[rx_id];
 #1     staterr = rte_le_to_cpu_32(rxdp->wb.upper.status_error);

        if (!(staterr & IXGBE_RXDADV_STAT_DD))
            break;

 #2     rxd = *rxdp;

The sentence #2 may be executed before sentence #1. This action is likely
to make the ready packet zero length. If the packet is the first packet and
has the EOP bit set, the above segmentation fault will happen.

So, we should add a proper memory barrier to ensure the read ordering be
correct. We also did the same thing in the ixgbe_recv_pkts() function to
make the rxd data be valid even though we did not find segmentation fault
in this function.

Fixes: 8eecb3295aed ("ixgbe: add LRO support")

Signed-off-by: Min Zhou <zhoumin@loongson.cn>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 47 +++++++++++++++-------------------
 1 file changed, 21 insertions(+), 26 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index c9d6ca9efe..dd07f0961e 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1818,11 +1818,22 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		 * of accesses cannot be reordered by the compiler. If they were
 		 * not volatile, they could be reordered which could lead to
 		 * using invalid descriptor fields when read from rxd.
+		 *
+		 * Meanwhile, to prevent the CPU from executing out of order, we
+		 * need to use a proper memory barrier to ensure the memory
+		 * ordering below.
 		 */
 		rxdp = &rx_ring[rx_id];
 		staterr = rxdp->wb.upper.status_error;
 		if (!(staterr & rte_cpu_to_le_32(IXGBE_RXDADV_STAT_DD)))
 			break;
+
+		/*
+		 * Use acquire fence to ensure that status_error which includes
+		 * DD bit is loaded before loading of other descriptor words.
+		 */
+		rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
+
 		rxd = *rxdp;
 
 		/*
@@ -2089,32 +2100,10 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
 
 next_desc:
 		/*
-		 * The code in this whole file uses the volatile pointer to
-		 * ensure the read ordering of the status and the rest of the
-		 * descriptor fields (on the compiler level only!!!). This is so
-		 * UGLY - why not to just use the compiler barrier instead? DPDK
-		 * even has the rte_compiler_barrier() for that.
-		 *
-		 * But most importantly this is just wrong because this doesn't
-		 * ensure memory ordering in a general case at all. For
-		 * instance, DPDK is supposed to work on Power CPUs where
-		 * compiler barrier may just not be enough!
-		 *
-		 * I tried to write only this function properly to have a
-		 * starting point (as a part of an LRO/RSC series) but the
-		 * compiler cursed at me when I tried to cast away the
-		 * "volatile" from rx_ring (yes, it's volatile too!!!). So, I'm
-		 * keeping it the way it is for now.
-		 *
-		 * The code in this file is broken in so many other places and
-		 * will just not work on a big endian CPU anyway therefore the
-		 * lines below will have to be revisited together with the rest
-		 * of the ixgbe PMD.
-		 *
-		 * TODO:
-		 *    - Get rid of "volatile" and let the compiler do its job.
-		 *    - Use the proper memory barrier (rte_rmb()) to ensure the
-		 *      memory ordering below.
+		 * "Volatile" only prevents caching of the variable marked
+		 * volatile. Most important, "volatile" cannot prevent the CPU
+		 * from executing out of order. So, it is necessary to use a
+		 * proper memory barrier to ensure the memory ordering below.
 		 */
 		rxdp = &rx_ring[rx_id];
 		staterr = rte_le_to_cpu_32(rxdp->wb.upper.status_error);
@@ -2122,6 +2111,12 @@ next_desc:
 		if (!(staterr & IXGBE_RXDADV_STAT_DD))
 			break;
 
+		/*
+		 * Use acquire fence to ensure that status_error which includes
+		 * DD bit is loaded before loading of other descriptor words.
+		 */
+		rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
+
 		rxd = *rxdp;
 
 		PMD_RX_LOG(DEBUG, "port_id=%u queue_id=%u rx_id=%u "
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.196958200 +0800
+++ 0037-net-ixgbe-add-proper-memory-barriers-in-Rx.patch	2023-08-09 21:51:18.174352000 +0800
@@ -1 +1 @@
-From 85e46c532bc76ebe07f6a397aa76211250aca59c Mon Sep 17 00:00:00 2001
+From 00f8c02c414b3fc3db882c328c2b2deb369050d2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 85e46c532bc76ebe07f6a397aa76211250aca59c ]
@@ -50 +52,0 @@
-Cc: stable@dpdk.org
@@ -59 +61 @@
-index 6cbb992823..61f17cd90b 100644
+index c9d6ca9efe..dd07f0961e 100644
@@ -62 +64 @@
-@@ -1817,11 +1817,22 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -1818,11 +1818,22 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -85 +87 @@
-@@ -2088,32 +2099,10 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
+@@ -2089,32 +2100,10 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
@@ -122 +124 @@
-@@ -2121,6 +2110,12 @@ next_desc:
+@@ -2122,6 +2111,12 @@ next_desc:

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

* patch 'common/idpf: fix memory leak on AVX512 Tx queue close' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (36 preceding siblings ...)
  2023-08-09 23:47   ` patch 'net/ixgbe: add proper memory barriers in Rx' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'net/iavf: fix abnormal disable HW interrupt' " Xueming Li
                     ` (14 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 520330cbb1764754866e416e04bb5abae3400923 Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Fri, 9 Jun 2023 18:54:05 +0800
Subject: [PATCH] common/idpf: fix memory leak on AVX512 Tx queue close
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b28f22e8709661fb9927c8121bbd4257ddd9202a ]

When releasing mbufs for TX queue software ring of AVX512,
the mbuf in the range [i, tx_tail] should also be freed.
The variable i refers to the index of the last mbuf released
in the software ring.

Fixes: 5bf87b45b2c8 ("net/idpf: add AVX512 data path for single queue model")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/idpf/idpf_rxtx_vec_avx512.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/idpf/idpf_rxtx_vec_avx512.c b/drivers/net/idpf/idpf_rxtx_vec_avx512.c
index fb2b6bb53c..f31582f5fd 100644
--- a/drivers/net/idpf/idpf_rxtx_vec_avx512.c
+++ b/drivers/net/idpf/idpf_rxtx_vec_avx512.c
@@ -843,6 +843,10 @@ idpf_singleq_tx_release_mbufs_avx512(struct idpf_tx_queue *txq)
 		}
 		i = 0;
 	}
+	for (; i < txq->tx_tail; i++) {
+		rte_pktmbuf_free_seg(swr[i].mbuf);
+		swr[i].mbuf = NULL;
+	}
 }
 
 static const struct idpf_txq_ops avx512_singleq_tx_vec_ops = {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.233333400 +0800
+++ 0038-common-idpf-fix-memory-leak-on-AVX512-Tx-queue-close.patch	2023-08-09 21:51:18.174352000 +0800
@@ -1 +1 @@
-From b28f22e8709661fb9927c8121bbd4257ddd9202a Mon Sep 17 00:00:00 2001
+From 520330cbb1764754866e416e04bb5abae3400923 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b28f22e8709661fb9927c8121bbd4257ddd9202a ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
- drivers/common/idpf/idpf_common_rxtx_avx512.c | 4 ++++
+ drivers/net/idpf/idpf_rxtx_vec_avx512.c | 4 ++++
@@ -20,5 +22,5 @@
-diff --git a/drivers/common/idpf/idpf_common_rxtx_avx512.c b/drivers/common/idpf/idpf_common_rxtx_avx512.c
-index dffb11fcf2..81312617cc 100644
---- a/drivers/common/idpf/idpf_common_rxtx_avx512.c
-+++ b/drivers/common/idpf/idpf_common_rxtx_avx512.c
-@@ -1601,6 +1601,10 @@ idpf_tx_release_mbufs_avx512(struct idpf_tx_queue *txq)
+diff --git a/drivers/net/idpf/idpf_rxtx_vec_avx512.c b/drivers/net/idpf/idpf_rxtx_vec_avx512.c
+index fb2b6bb53c..f31582f5fd 100644
+--- a/drivers/net/idpf/idpf_rxtx_vec_avx512.c
++++ b/drivers/net/idpf/idpf_rxtx_vec_avx512.c
+@@ -843,6 +843,10 @@ idpf_singleq_tx_release_mbufs_avx512(struct idpf_tx_queue *txq)
@@ -34 +36 @@
- static const struct idpf_txq_ops avx512_tx_vec_ops = {
+ static const struct idpf_txq_ops avx512_singleq_tx_vec_ops = {

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

* patch 'net/iavf: fix abnormal disable HW interrupt' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (37 preceding siblings ...)
  2023-08-09 23:48   ` patch 'common/idpf: fix memory leak on AVX512 Tx queue close' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'net/i40e: fix tunnel packet Tx descriptor' " Xueming Li
                     ` (13 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Mingjin Ye; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2bdeeb53da0dda4e36a022553d3403c1217d677e Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Wed, 14 Jun 2023 09:53:03 +0000
Subject: [PATCH] net/iavf: fix abnormal disable HW interrupt
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 675a104e2e940ec476e8b469725e8465d01c0098 ]

For command VIRTCHNL_OP_REQUEST_QUEUES, polling access to the admin
queue has the issue of access overruns after disabling interrupt. That
results in FW disabling HW interrupt for protection purposes.

The updates/changes in this patch:
1. Remove the polling admin queue processing and use the generic interrupt
processing instead.
2. Release redundant queue resource before stopping processing interrupt
events.

Fixes: 22b123a36d07 ("net/avf: initialize PMD")
Fixes: ef807926e148 ("net/iavf: support requesting additional queues from PF")
Fixes: 84108425054a ("net/iavf: support asynchronous virtual channel message")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 25 +++++++++---------
 drivers/net/iavf/iavf_vchnl.c  | 48 +++++++---------------------------
 2 files changed, 23 insertions(+), 50 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 3cc4b40712..9b3cbee7d4 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2720,6 +2720,19 @@ iavf_dev_close(struct rte_eth_dev *dev)
 	}
 
 	ret = iavf_dev_stop(dev);
+
+	/*
+	 * Release redundant queue resource when close the dev
+	 * so that other vfs can re-use the queues.
+	 */
+	if (vf->lv_enabled) {
+		ret = iavf_request_queues(dev, IAVF_MAX_NUM_QUEUES_DFLT);
+		if (ret)
+			PMD_DRV_LOG(ERR, "Reset the num of queues failed");
+
+		vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
+	}
+
 	adapter->closed = true;
 
 	/* free iAVF security device context all related resources */
@@ -2736,18 +2749,6 @@ iavf_dev_close(struct rte_eth_dev *dev)
 	if (vf->promisc_unicast_enabled || vf->promisc_multicast_enabled)
 		iavf_config_promisc(adapter, false, false);
 
-	/*
-	 * Release redundant queue resource when close the dev
-	 * so that other vfs can re-use the queues.
-	 */
-	if (vf->lv_enabled) {
-		ret = iavf_request_queues(dev, IAVF_MAX_NUM_QUEUES_DFLT);
-		if (ret)
-			PMD_DRV_LOG(ERR, "Reset the num of queues failed");
-
-		vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
-	}
-
 	iavf_shutdown_adminq(hw);
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
 		/* disable uio intr before callback unregister */
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index aeffb07cca..c2f6b617d6 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -318,6 +318,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
 
 	switch (args->ops) {
 	case VIRTCHNL_OP_RESET_VF:
+	case VIRTCHNL_OP_REQUEST_QUEUES:
 		/*no need to wait for response */
 		_clear_cmd(vf);
 		break;
@@ -341,33 +342,6 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
 		}
 		_clear_cmd(vf);
 		break;
-	case VIRTCHNL_OP_REQUEST_QUEUES:
-		/*
-		 * ignore async reply, only wait for system message,
-		 * vf_reset = true if get VIRTCHNL_EVENT_RESET_IMPENDING,
-		 * if not, means request queues failed.
-		 */
-		do {
-			result = iavf_read_msg_from_pf(adapter, args->out_size,
-						   args->out_buffer);
-			if (result == IAVF_MSG_SYS && vf->vf_reset) {
-				break;
-			} else if (result == IAVF_MSG_CMD ||
-				result == IAVF_MSG_ERR) {
-				err = -1;
-				break;
-			}
-			iavf_msec_delay(ASQ_DELAY_MS);
-			/* If don't read msg or read sys event, continue */
-		} while (i++ < MAX_TRY_TIMES);
-		if (i >= MAX_TRY_TIMES ||
-			vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) {
-			err = -1;
-			PMD_DRV_LOG(ERR, "No response or return failure (%d)"
-				    " for cmd %d", vf->cmd_retval, args->ops);
-		}
-		_clear_cmd(vf);
-		break;
 	default:
 		if (rte_thread_is_intr()) {
 			/* For virtchnl ops were executed in eal_intr_thread,
@@ -2067,11 +2041,11 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
 	struct iavf_adapter *adapter =
 		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct iavf_info *vf =  IAVF_DEV_PRIVATE_TO_VF(adapter);
-	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	struct virtchnl_vf_res_request vfres;
 	struct iavf_cmd_info args;
 	uint16_t num_queue_pairs;
 	int err;
+	int i = 0;
 
 	if (!(vf->vf_res->vf_cap_flags &
 		VIRTCHNL_VF_OFFLOAD_REQ_QUEUES)) {
@@ -2092,16 +2066,7 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
 	args.out_size = IAVF_AQ_BUF_SZ;
 
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
-		/* disable interrupt to avoid the admin queue message to be read
-		 * before iavf_read_msg_from_pf.
-		 *
-		 * don't disable interrupt handler until ready to execute vf cmd.
-		 */
-		rte_spinlock_lock(&vf->aq_lock);
-		rte_intr_disable(pci_dev->intr_handle);
-		err = iavf_execute_vf_cmd(adapter, &args, 0);
-		rte_intr_enable(pci_dev->intr_handle);
-		rte_spinlock_unlock(&vf->aq_lock);
+		err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
 	} else {
 		rte_eal_alarm_cancel(iavf_dev_alarm_handler, dev);
 		err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
@@ -2114,6 +2079,13 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
 		return err;
 	}
 
+	/* wait for interrupt notification vf is resetting */
+	while (i++ < MAX_TRY_TIMES) {
+		if (vf->vf_reset)
+			break;
+		iavf_msec_delay(ASQ_DELAY_MS);
+	}
+
 	/* request queues succeeded, vf is resetting */
 	if (vf->vf_reset) {
 		PMD_DRV_LOG(INFO, "vf is resetting");
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.253367800 +0800
+++ 0039-net-iavf-fix-abnormal-disable-HW-interrupt.patch	2023-08-09 21:51:18.174352000 +0800
@@ -1 +1 @@
-From 675a104e2e940ec476e8b469725e8465d01c0098 Mon Sep 17 00:00:00 2001
+From 2bdeeb53da0dda4e36a022553d3403c1217d677e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 675a104e2e940ec476e8b469725e8465d01c0098 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index b72dbc8ceb..00b963128b 100644
+index 3cc4b40712..9b3cbee7d4 100644
@@ -32 +34 @@
-@@ -2757,6 +2757,19 @@ iavf_dev_close(struct rte_eth_dev *dev)
+@@ -2720,6 +2720,19 @@ iavf_dev_close(struct rte_eth_dev *dev)
@@ -52 +54 @@
-@@ -2773,18 +2786,6 @@ iavf_dev_close(struct rte_eth_dev *dev)
+@@ -2736,18 +2749,6 @@ iavf_dev_close(struct rte_eth_dev *dev)
@@ -72 +74 @@
-index 07eb358824..524732f67d 100644
+index aeffb07cca..c2f6b617d6 100644
@@ -75 +77 @@
-@@ -324,6 +324,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
+@@ -318,6 +318,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
@@ -83 +85 @@
-@@ -347,33 +348,6 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
+@@ -341,33 +342,6 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
@@ -117 +119 @@
-@@ -2082,11 +2056,11 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
+@@ -2067,11 +2041,11 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
@@ -130 +132 @@
-@@ -2107,16 +2081,7 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
+@@ -2092,16 +2066,7 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
@@ -148 +150 @@
-@@ -2129,6 +2094,13 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
+@@ -2114,6 +2079,13 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)

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

* patch 'net/i40e: fix tunnel packet Tx descriptor' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (38 preceding siblings ...)
  2023-08-09 23:48   ` patch 'net/iavf: fix abnormal disable HW interrupt' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'net/e1000: fix queue number initialization' " Xueming Li
                     ` (12 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Shiyang He; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4f26624221580dd54a60e3cff98003be7dd630b2 Mon Sep 17 00:00:00 2001
From: Shiyang He <shiyangx.he@intel.com>
Date: Wed, 14 Jun 2023 09:59:03 +0000
Subject: [PATCH] net/i40e: fix tunnel packet Tx descriptor
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e8b1a5dd7df3e7a3f87b469e1b007d560d46d7f2 ]

The TX descriptor of tunnel packet filled incorrectly due to the MACLEN
is not set.

This patch fixes this issue by setting MACLEN to correctly fill the
TX descriptor.

Fixes: c59faf3fe8fe ("net/i40e: support TSO on tunneling packet")

Signed-off-by: Shiyang He <shiyangx.he@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index fbbefb5015..b4f65b58fa 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -304,10 +304,7 @@ i40e_txd_enable_checksum(uint64_t ol_flags,
 			union i40e_tx_offload tx_offload)
 {
 	/* Set MACLEN */
-	if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
-		*td_offset |= (tx_offload.outer_l2_len >> 1)
-				<< I40E_TX_DESC_LENGTH_MACLEN_SHIFT;
-	else
+	if (!(ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK))
 		*td_offset |= (tx_offload.l2_len >> 1)
 			<< I40E_TX_DESC_LENGTH_MACLEN_SHIFT;
 
@@ -1171,9 +1168,12 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 
 		/* Fill in tunneling parameters if necessary */
 		cd_tunneling_params = 0;
-		if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
+		if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
+			td_offset |= (tx_offload.outer_l2_len >> 1)
+					<< I40E_TX_DESC_LENGTH_MACLEN_SHIFT;
 			i40e_parse_tunneling_params(ol_flags, tx_offload,
 						    &cd_tunneling_params);
+		}
 		/* Enable checksum offloading */
 		if (ol_flags & I40E_TX_CKSUM_OFFLOAD_MASK)
 			i40e_txd_enable_checksum(ol_flags, &td_cmd,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.278109200 +0800
+++ 0040-net-i40e-fix-tunnel-packet-Tx-descriptor.patch	2023-08-09 21:51:18.174352000 +0800
@@ -1 +1 @@
-From e8b1a5dd7df3e7a3f87b469e1b007d560d46d7f2 Mon Sep 17 00:00:00 2001
+From 4f26624221580dd54a60e3cff98003be7dd630b2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e8b1a5dd7df3e7a3f87b469e1b007d560d46d7f2 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/e1000: fix queue number initialization' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (39 preceding siblings ...)
  2023-08-09 23:48   ` patch 'net/i40e: fix tunnel packet Tx descriptor' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'net/ice: fix MAC type of E822 and E823' " Xueming Li
                     ` (11 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a45102d3246d85f3fdd39105aab7d8a3649bb35f Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Tue, 13 Jun 2023 07:51:51 +0000
Subject: [PATCH] net/e1000: fix queue number initialization
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c1a42d646472fd3477429bf016f682e0865b77f0 ]

The initialized queue number is not match the description in HW
datasheet.

Fixes: 805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/e1000/em_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 8ee9be12ad..18efa78ac3 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1073,8 +1073,8 @@ eth_em_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	 * To avoid it we support just one RX queue for now (no RSS).
 	 */
 
-	dev_info->max_rx_queues = 1;
-	dev_info->max_tx_queues = 1;
+	dev_info->max_rx_queues = 2;
+	dev_info->max_tx_queues = 2;
 
 	dev_info->rx_queue_offload_capa = em_get_rx_queue_offloads_capa();
 	dev_info->rx_offload_capa = em_get_rx_port_offloads_capa() |
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.299255800 +0800
+++ 0041-net-e1000-fix-queue-number-initialization.patch	2023-08-09 21:51:18.184352000 +0800
@@ -1 +1 @@
-From c1a42d646472fd3477429bf016f682e0865b77f0 Mon Sep 17 00:00:00 2001
+From a45102d3246d85f3fdd39105aab7d8a3649bb35f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c1a42d646472fd3477429bf016f682e0865b77f0 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 0afedcd00c..c5a4dec693 100644
+index 8ee9be12ad..18efa78ac3 100644
@@ -22 +24 @@
-@@ -1088,8 +1088,8 @@ eth_em_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1073,8 +1073,8 @@ eth_em_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)

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

* patch 'net/ice: fix MAC type of E822 and E823' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (40 preceding siblings ...)
  2023-08-09 23:48   ` patch 'net/e1000: fix queue number initialization' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'net/ice: fix protocol agnostic offloading with big packets' " Xueming Li
                     ` (10 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 15b67727caa8f290b2ee4b6304628818a705c1c0 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Fri, 16 Jun 2023 10:05:31 +0800
Subject: [PATCH] net/ice: fix MAC type of E822 and E823
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9749dffe23c6d66e441daad1dab4f49a01ab5296 ]

E822 and E823 get the wrong mac type, which prevents
the ddp package from loading correctly.

This commit fixes the mac type of E822 and E823.

Fixes: 084e64e6b600 ("net/ice/base: set MAC type for E823C device")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 1a02aad869..a327a4b374 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -167,6 +167,8 @@ static enum ice_status ice_set_mac_type(struct ice_hw *hw)
 	case ICE_DEV_ID_E823C_QSFP:
 	case ICE_DEV_ID_E823C_SFP:
 	case ICE_DEV_ID_E823C_SGMII:
+		hw->mac_type = ICE_MAC_GENERIC;
+		break;
 	case ICE_DEV_ID_E824S:
 	case ICE_DEV_ID_E825C_BACKPLANE:
 	case ICE_DEV_ID_E825C_QSFP:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.319491700 +0800
+++ 0042-net-ice-fix-MAC-type-of-E822-and-E823.patch	2023-08-09 21:51:18.184352000 +0800
@@ -1 +1 @@
-From 9749dffe23c6d66e441daad1dab4f49a01ab5296 Mon Sep 17 00:00:00 2001
+From 15b67727caa8f290b2ee4b6304628818a705c1c0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9749dffe23c6d66e441daad1dab4f49a01ab5296 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 0f26f1d854..8867279c28 100644
+index 1a02aad869..a327a4b374 100644

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

* patch 'net/ice: fix protocol agnostic offloading with big packets' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (41 preceding siblings ...)
  2023-08-09 23:48   ` patch 'net/ice: fix MAC type of E822 and E823' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'net/iavf: " Xueming Li
                     ` (9 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Junfeng Guo; +Cc: Ting Xu, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 04de2b4a56af4e3fe295380521cf72ca9206555a Mon Sep 17 00:00:00 2001
From: Junfeng Guo <junfeng.guo@intel.com>
Date: Thu, 15 Jun 2023 13:17:16 +0800
Subject: [PATCH] net/ice: fix protocol agnostic offloading with big packets
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8f40bad5299a53150dedc38004fca9c5c0ea0f0f ]

In current pattern parsing function for protocol agnostic flow
offloading (raw flow), some of the variables of packet length are
defined as uint8_t, which are too small for some large-size packets,
such as srv6 (Segment Routing over IPv6 dataplane) type. Change the
type to uint16_t.

Fixes: 25be39cc1760 ("net/ice: enable protocol agnostic flow offloading in FDIR")
Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading in RSS")

Signed-off-by: Ting Xu <ting.xu@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c | 2 +-
 drivers/net/ice/ice_hash.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 7914ba9407..81e88c1dd8 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1876,7 +1876,7 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
 				(uint8_t *)(uintptr_t)raw_mask->pattern;
 			uint8_t *tmp_spec, *tmp_mask;
 			uint16_t tmp_val = 0;
-			uint8_t pkt_len = 0;
+			uint16_t pkt_len = 0;
 			uint8_t tmp = 0;
 			int i, j;
 
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index f35727856e..52646e9408 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -653,8 +653,8 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
 	const struct rte_flow_item_raw *raw_spec, *raw_mask;
 	struct ice_parser_profile prof;
 	struct ice_parser_result rslt;
+	uint16_t spec_len, pkt_len;
 	uint8_t *pkt_buf, *msk_buf;
-	uint8_t spec_len, pkt_len;
 	uint8_t tmp_val = 0;
 	uint8_t tmp_c = 0;
 	int i, j;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.347343000 +0800
+++ 0043-net-ice-fix-protocol-agnostic-offloading-with-big-pa.patch	2023-08-09 21:51:18.184352000 +0800
@@ -1 +1 @@
-From 8f40bad5299a53150dedc38004fca9c5c0ea0f0f Mon Sep 17 00:00:00 2001
+From 04de2b4a56af4e3fe295380521cf72ca9206555a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8f40bad5299a53150dedc38004fca9c5c0ea0f0f ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 480b369af8..e8842bc242 100644
+index 7914ba9407..81e88c1dd8 100644

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

* patch 'net/iavf: fix protocol agnostic offloading with big packets' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (42 preceding siblings ...)
  2023-08-09 23:48   ` patch 'net/ice: fix protocol agnostic offloading with big packets' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'net/mlx5: fix risk in NEON Rx descriptor read' " Xueming Li
                     ` (8 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Junfeng Guo; +Cc: Ting Xu, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e149ea19c204cf1da9ef111e949fc98a87cf2509 Mon Sep 17 00:00:00 2001
From: Junfeng Guo <junfeng.guo@intel.com>
Date: Thu, 15 Jun 2023 13:17:17 +0800
Subject: [PATCH] net/iavf: fix protocol agnostic offloading with big packets
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a74f589e431f7107c88a1ade65b86e227e0fc042 ]

In current pattern parsing function for protocol agnostic flow
offloading (raw flow), some of the variables of packet length are
defined as uint8_t, which are too small for some large-size packets,
such as srv6 (Segment Routing over IPv6 dataplane) type. Change the
type to uint16_t.

Fixes: bc0e85586eaf ("net/iavf: support VF RSS flow rule with raw pattern")

Signed-off-by: Ting Xu <ting.xu@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index ae6fb38594..cf4d677101 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -886,8 +886,8 @@ iavf_hash_parse_raw_pattern(const struct rte_flow_item *item,
 			struct iavf_rss_meta *meta)
 {
 	const struct rte_flow_item_raw *raw_spec, *raw_mask;
+	uint16_t spec_len, pkt_len;
 	uint8_t *pkt_buf, *msk_buf;
-	uint8_t spec_len, pkt_len;
 	uint8_t tmp_val = 0;
 	uint8_t tmp_c = 0;
 	int i, j;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.370284600 +0800
+++ 0044-net-iavf-fix-protocol-agnostic-offloading-with-big-p.patch	2023-08-09 21:51:18.184352000 +0800
@@ -1 +1 @@
-From a74f589e431f7107c88a1ade65b86e227e0fc042 Mon Sep 17 00:00:00 2001
+From e149ea19c204cf1da9ef111e949fc98a87cf2509 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a74f589e431f7107c88a1ade65b86e227e0fc042 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/mlx5: fix risk in NEON Rx descriptor read' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (43 preceding siblings ...)
  2023-08-09 23:48   ` patch 'net/iavf: " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'net/mlx5: fix device removal event handling' " Xueming Li
                     ` (7 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Ali Alnubani, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ce6b9b3772a3da8cc0c42712cdb90c95419d9603 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Tue, 30 May 2023 13:48:04 +0800
Subject: [PATCH] net/mlx5: fix risk in NEON Rx descriptor read
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7ac7450b20d1e11a20c138707663867918b39403 ]

In NEON vector PMD, vector load loads two contiguous 8B of
descriptor data into vector register. Given vector load ensures no
16B atomicity, read of the word that includes op_own field could be
reordered after read of other words. In this case, some words could
contain invalid data.

Reloaded qword0 after read barrier to update vector register. This
ensures that the fetched data is correct.

Testpmd single core test on N1SDP/ThunderX2 showed no performance drop.

Fixes: 1742c2d9fab0 ("net/mlx5: fix synchronization on polling Rx completions")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 41b9cf5444..6d3c594e56 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -647,6 +647,14 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 		c0 = vld1q_u64((uint64_t *)(p0 + 48));
 		/* Synchronize for loading the rest of blocks. */
 		rte_io_rmb();
+		/* B.0 (CQE 3) reload lower half of the block. */
+		c3 = vld1q_lane_u64((uint64_t *)(p3 + 48), c3, 0);
+		/* B.0 (CQE 2) reload lower half of the block. */
+		c2 = vld1q_lane_u64((uint64_t *)(p2 + 48), c2, 0);
+		/* B.0 (CQE 1) reload lower half of the block. */
+		c1 = vld1q_lane_u64((uint64_t *)(p1 + 48), c1, 0);
+		/* B.0 (CQE 0) reload lower half of the block. */
+		c0 = vld1q_lane_u64((uint64_t *)(p0 + 48), c0, 0);
 		/* Prefetch next 4 CQEs. */
 		if (pkts_n - pos >= 2 * MLX5_VPMD_DESCS_PER_LOOP) {
 			unsigned int next = pos + MLX5_VPMD_DESCS_PER_LOOP;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.393188200 +0800
+++ 0045-net-mlx5-fix-risk-in-NEON-Rx-descriptor-read.patch	2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From 7ac7450b20d1e11a20c138707663867918b39403 Mon Sep 17 00:00:00 2001
+From ce6b9b3772a3da8cc0c42712cdb90c95419d9603 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7ac7450b20d1e11a20c138707663867918b39403 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 91c85bec6d..3ed688191f 100644
+index 41b9cf5444..6d3c594e56 100644
@@ -31 +33 @@
-@@ -675,6 +675,14 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -647,6 +647,14 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,

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

* patch 'net/mlx5: fix device removal event handling' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (44 preceding siblings ...)
  2023-08-09 23:48   ` patch 'net/mlx5: fix risk in NEON Rx descriptor read' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'common/mlx5: adjust fork call with new kernel API' " Xueming Li
                     ` (6 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 79310b1b61afd7556000b23303a28a4c49ed8fa2 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Tue, 30 May 2023 18:13:28 +0300
Subject: [PATCH] net/mlx5: fix device removal event handling
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 22dc56cfbd39692eb74fad93ff5ecc3df5fd0633 ]

On the device removal kernel notifies user space application
with queueing the IBV_DEVICE_FATAL_EVENT and triggering appropriate
file descriptor. Mellanox kernel driver stack emits this event
twice from different layers (mlx5 and uverbs). The IB port index
is not applicable in the event structure and should be ignored
for IBV_DEVICE_FATAL_EVENT events.

Also, on the older kernels (at least from OFED 4.9) there might be
race conditions causing the event queue close before application
fetches the IBV_DEVICE_FATAL_EVENT message with ibv_get_async_event()
API.

To provide the reliable device removal event detection the patch:

  - ignores the IB port index for the IBV_DEVICE_FATAL_EVENT
  - introduces the flag to notify PMD about removal only once
  - acks event with ibv_ack_async_event after actual handling
  - checks for EIO error, making sure queue is not closed yet

Fixes: 40d9f906f4e2 ("net/mlx5: fix device removal handler for multiport")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 34 +++++++++++++++++--------
 drivers/net/mlx5/mlx5.h                 |  1 +
 2 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 55801534d1..639e629fe4 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -746,6 +746,7 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
 
 	for (i = 0; i < sh->max_port; ++i) {
 		struct rte_eth_dev *dev;
+		struct mlx5_priv *priv;
 
 		if (sh->port[i].ih_port_id >= RTE_MAX_ETHPORTS) {
 			/*
@@ -756,9 +757,14 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
 		}
 		dev = &rte_eth_devices[sh->port[i].ih_port_id];
 		MLX5_ASSERT(dev);
-		if (dev->data->dev_conf.intr_conf.rmv)
+		priv = dev->data->dev_private;
+		MLX5_ASSERT(priv);
+		if (!priv->rmv_notified && dev->data->dev_conf.intr_conf.rmv) {
+			/* Notify driver about removal only once. */
+			priv->rmv_notified = 1;
 			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_RMV, NULL);
+		}
 	}
 }
 
@@ -830,21 +836,29 @@ mlx5_dev_interrupt_handler(void *cb_arg)
 		struct rte_eth_dev *dev;
 		uint32_t tmp;
 
-		if (mlx5_glue->get_async_event(sh->cdev->ctx, &event))
+		if (mlx5_glue->get_async_event(sh->cdev->ctx, &event)) {
+			if (errno == EIO) {
+				DRV_LOG(DEBUG,
+					"IBV async event queue closed on: %s",
+					sh->ibdev_name);
+				mlx5_dev_interrupt_device_fatal(sh);
+			}
 			break;
-		/* Retrieve and check IB port index. */
-		tmp = (uint32_t)event.element.port_num;
-		if (!tmp && event.event_type == IBV_EVENT_DEVICE_FATAL) {
+		}
+		if (event.event_type == IBV_EVENT_DEVICE_FATAL) {
 			/*
-			 * The DEVICE_FATAL event is called once for
-			 * entire device without port specifying.
-			 * We should notify all existing ports.
+			 * The DEVICE_FATAL event can be called by kernel
+			 * twice - from mlx5 and uverbs layers, and port
+			 * index is not applicable. We should notify all
+			 * existing ports.
 			 */
-			mlx5_glue->ack_async_event(&event);
 			mlx5_dev_interrupt_device_fatal(sh);
+			mlx5_glue->ack_async_event(&event);
 			continue;
 		}
-		MLX5_ASSERT(tmp && (tmp <= sh->max_port));
+		/* Retrieve and check IB port index. */
+		tmp = (uint32_t)event.element.port_num;
+		MLX5_ASSERT(tmp <= sh->max_port);
 		if (!tmp) {
 			/* Unsupported device level event. */
 			mlx5_glue->ack_async_event(&event);
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 9f27e1dba4..5f8361c52b 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1665,6 +1665,7 @@ struct mlx5_priv {
 	unsigned int mtr_en:1; /* Whether support meter. */
 	unsigned int mtr_reg_share:1; /* Whether support meter REG_C share. */
 	unsigned int lb_used:1; /* Loopback queue is referred to. */
+	unsigned int rmv_notified:1; /* Notified about removal event */
 	uint32_t mark_enabled:1; /* If mark action is enabled on rxqs. */
 	uint16_t domain_id; /* Switch domain identifier. */
 	uint16_t vport_id; /* Associated VF vport index (if any). */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.414550200 +0800
+++ 0046-net-mlx5-fix-device-removal-event-handling.patch	2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From 22dc56cfbd39692eb74fad93ff5ecc3df5fd0633 Mon Sep 17 00:00:00 2001
+From 79310b1b61afd7556000b23303a28a4c49ed8fa2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 22dc56cfbd39692eb74fad93ff5ecc3df5fd0633 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -102 +104 @@
-index fffd3c79f1..10a2f33ea0 100644
+index 9f27e1dba4..5f8361c52b 100644
@@ -105 +107 @@
-@@ -1744,6 +1744,7 @@ struct mlx5_priv {
+@@ -1665,6 +1665,7 @@ struct mlx5_priv {
@@ -111,2 +113,2 @@
- 	uint32_t num_lag_ports:4; /* Number of ports can be bonded. */
- 	uint32_t tunnel_enabled:1; /* If tunnel offloading is enabled on rxqs. */
+ 	uint16_t domain_id; /* Switch domain identifier. */
+ 	uint16_t vport_id; /* Associated VF vport index (if any). */

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

* patch 'common/mlx5: adjust fork call with new kernel API' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (45 preceding siblings ...)
  2023-08-09 23:48   ` patch 'net/mlx5: fix device removal event handling' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'net/cnxk: flush SQ before configuring MTU' " Xueming Li
                     ` (5 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Erez Ferber; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dcd21e65bdd3a7c33c1d578b760b3127aa02c401 Mon Sep 17 00:00:00 2001
From: Erez Ferber <erezf@nvidia.com>
Date: Wed, 24 May 2023 15:01:40 +0300
Subject: [PATCH] common/mlx5: adjust fork call with new kernel API
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 42f113c53cbbbc4585ad68b4d2a8aa9bddad23da ]

While doing process fork() the operating system remaps all the parent
process's memory to the address space of the child process and activates
the Copy-on-Write mechanics - it duplicates physical pages once memory
writing happens in the child process. Sometimes memory duplication is
not allowed - for example, if the page contains hardware queue
descriptors. To handle similar issues the rdma-core library should be
prepared for forking.

The ibv_fork_init() prepares the library to track all the related memory
and prevent it from forking using madvise() system API. This approach
allows fork, but not all the memory is forked to the child process and,
application should care not to touch pages where the parent application
allocated the rdma-core objects.

The newer kernels propose an option of copy-on-fork for DMA pages and
tracking all the memory and disabling it for the forking is no longer
needed. The new API routine ibv_is_fork_initialized() should be involved
to decide if library initialization for forking is required.

Fixes: 0e83b8e536c1 ("net/mlx5: move rdma-core calls to separate file")

Signed-off-by: Erez Ferber <erezf@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/linux/meson.build | 2 ++
 drivers/common/mlx5/linux/mlx5_glue.c | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index 7e1575efc8..b13ae29844 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -217,6 +217,8 @@ has_sym_args = [
             'ibv_import_device' ],
         [ 'HAVE_MLX5DV_DR_ACTION_CREATE_DEST_ROOT_TABLE', 'infiniband/mlx5dv.h',
             'mlx5dv_dr_action_create_dest_root_table' ],
+        [ 'HAVE_IBV_FORK_UNNEEDED', 'infiniband/verbs.h',
+            'ibv_is_fork_initialized'],
 ]
 if  libmtcr_ul_found
     has_sym_args += [
diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c
index 702eb36b62..88b99fe029 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.c
+++ b/drivers/common/mlx5/linux/mlx5_glue.c
@@ -19,6 +19,10 @@
 static int
 mlx5_glue_fork_init(void)
 {
+#ifdef HAVE_IBV_FORK_UNNEEDED
+	if (ibv_is_fork_initialized() == IBV_FORK_UNNEEDED)
+		return 0; /* ibv_fork_init() not needed */
+#endif
 	return ibv_fork_init();
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.438332400 +0800
+++ 0047-common-mlx5-adjust-fork-call-with-new-kernel-API.patch	2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From 42f113c53cbbbc4585ad68b4d2a8aa9bddad23da Mon Sep 17 00:00:00 2001
+From dcd21e65bdd3a7c33c1d578b760b3127aa02c401 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 42f113c53cbbbc4585ad68b4d2a8aa9bddad23da ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -36 +38 @@
-index 718da020f7..15edc13041 100644
+index 7e1575efc8..b13ae29844 100644
@@ -39 +41,3 @@
-@@ -221,6 +221,8 @@ has_sym_args = [
+@@ -217,6 +217,8 @@ has_sym_args = [
+             'ibv_import_device' ],
+         [ 'HAVE_MLX5DV_DR_ACTION_CREATE_DEST_ROOT_TABLE', 'infiniband/mlx5dv.h',
@@ -41,2 +44,0 @@
-         [ 'HAVE_MLX5DV_CREATE_STEERING_ANCHOR', 'infiniband/mlx5dv.h',
-             'mlx5dv_create_steering_anchor'],
@@ -49 +51 @@
-index 3497aa940d..6f858db8fc 100644
+index 702eb36b62..88b99fe029 100644

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

* patch 'net/cnxk: flush SQ before configuring MTU' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (46 preceding siblings ...)
  2023-08-09 23:48   ` patch 'common/mlx5: adjust fork call with new kernel API' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'net/cnxk: fix cookies check with security offload' " Xueming Li
                     ` (4 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Satha Rao; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c98cf071f83b67bcdf858a835e059577eb794edb Mon Sep 17 00:00:00 2001
From: Satha Rao <skoteshwar@marvell.com>
Date: Thu, 15 Jun 2023 01:04:23 -0400
Subject: [PATCH] net/cnxk: flush SQ before configuring MTU
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b33bef500a50b750577e3028e7ae8aff08bf3ae9 ]

When try to configure MTU for lower value causes run time failure
due to old bigger packets enqueued. To avoid error interrupts better
to flush the all SQs of this port before configuring new MTU.

Fixes: 8589ec212e80 ("net/cnxk: support MTU set")

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev.h     |  1 +
 drivers/net/cnxk/cnxk_ethdev_ops.c | 47 ++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index 651ef45ea8..83d6e9398f 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -494,6 +494,7 @@ int cnxk_nix_probe(struct rte_pci_driver *pci_drv,
 		   struct rte_pci_device *pci_dev);
 int cnxk_nix_remove(struct rte_pci_device *pci_dev);
 int cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu);
+int cnxk_nix_sq_flush(struct rte_eth_dev *eth_dev);
 int cnxk_nix_mc_addr_list_configure(struct rte_eth_dev *eth_dev,
 				    struct rte_ether_addr *mc_addr_set,
 				    uint32_t nb_mc_addr);
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index 8f7287161b..7a7478cda8 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -463,6 +463,44 @@ cnxk_nix_mac_addr_del(struct rte_eth_dev *eth_dev, uint32_t index)
 	dev->dmac_filter_count--;
 }
 
+int
+cnxk_nix_sq_flush(struct rte_eth_dev *eth_dev)
+{
+	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
+	struct rte_eth_dev_data *data = eth_dev->data;
+	int i, rc = 0;
+
+	/* Flush all tx queues */
+	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
+		struct roc_nix_sq *sq = &dev->sqs[i];
+
+		if (eth_dev->data->tx_queues[i] == NULL)
+			continue;
+
+		rc = roc_nix_tm_sq_aura_fc(sq, false);
+		if (rc) {
+			plt_err("Failed to disable sqb aura fc, rc=%d", rc);
+			goto exit;
+		}
+
+		/* Wait for sq entries to be flushed */
+		rc = roc_nix_tm_sq_flush_spin(sq);
+		if (rc) {
+			plt_err("Failed to drain sq, rc=%d\n", rc);
+			goto exit;
+		}
+		if (data->tx_queue_state[i] == RTE_ETH_QUEUE_STATE_STARTED) {
+			rc = roc_nix_tm_sq_aura_fc(sq, true);
+			if (rc) {
+				plt_err("Failed to enable sq aura fc, txq=%u, rc=%d", i, rc);
+				goto exit;
+			}
+		}
+	}
+exit:
+	return rc;
+}
+
 int
 cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 {
@@ -506,6 +544,15 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 		goto exit;
 	}
 
+	/* if new MTU was smaller than old one, then flush all SQs before MTU change */
+	if (old_frame_size > frame_size) {
+		if (data->dev_started) {
+			plt_err("Reducing MTU is not supported when device started");
+			goto exit;
+		}
+		cnxk_nix_sq_flush(eth_dev);
+	}
+
 	frame_size -= RTE_ETHER_CRC_LEN;
 
 	/* Update mtu on Tx */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.460690600 +0800
+++ 0048-net-cnxk-flush-SQ-before-configuring-MTU.patch	2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From b33bef500a50b750577e3028e7ae8aff08bf3ae9 Mon Sep 17 00:00:00 2001
+From c98cf071f83b67bcdf858a835e059577eb794edb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b33bef500a50b750577e3028e7ae8aff08bf3ae9 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 45dc72b609..ed531fb277 100644
+index 651ef45ea8..83d6e9398f 100644
@@ -23 +25 @@
-@@ -465,6 +465,7 @@ int cnxk_nix_probe(struct rte_pci_driver *pci_drv,
+@@ -494,6 +494,7 @@ int cnxk_nix_probe(struct rte_pci_driver *pci_drv,
@@ -32 +34 @@
-index bce6d59bbc..da5ee19c85 100644
+index 8f7287161b..7a7478cda8 100644
@@ -35 +37 @@
-@@ -495,6 +495,44 @@ cnxk_nix_mac_addr_del(struct rte_eth_dev *eth_dev, uint32_t index)
+@@ -463,6 +463,44 @@ cnxk_nix_mac_addr_del(struct rte_eth_dev *eth_dev, uint32_t index)
@@ -80 +82 @@
-@@ -538,6 +576,15 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
+@@ -506,6 +544,15 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)

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

* patch 'net/cnxk: fix cookies check with security offload' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (47 preceding siblings ...)
  2023-08-09 23:48   ` patch 'net/cnxk: flush SQ before configuring MTU' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'net/cnxk: fix flow queue index validation' " Xueming Li
                     ` (3 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cd88b5ff390862700e60e46185f3dc9fd8d46765 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Thu, 15 Jun 2023 18:39:22 +0530
Subject: [PATCH] net/cnxk: fix cookies check with security offload
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7364015fefd308ac89565fc78a4b910e83546422 ]

Fix missing/incorrect check cookies call's with security offload
enabled on Rx and Tx.

Fixes: 55bfac717c72 ("net/cnxk: support Tx security offload on cn10k")
Fixes: 0ed7107373b4 ("net/cnxk: remove duplicate mempool debug checks")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/cnxk/cn10k_rx.h | 12 ++++++------
 drivers/net/cnxk/cn10k_tx.h |  2 ++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_rx.h b/drivers/net/cnxk/cn10k_rx.h
index 721127dddd..20384e64c7 100644
--- a/drivers/net/cnxk/cn10k_rx.h
+++ b/drivers/net/cnxk/cn10k_rx.h
@@ -1216,6 +1216,12 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
 		mbuf2 = (struct rte_mbuf *)vgetq_lane_u64(mbuf23, 0);
 		mbuf3 = (struct rte_mbuf *)vgetq_lane_u64(mbuf23, 1);
 
+		/* Mark mempool obj as "get" as it is alloc'ed by NIX */
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf0->pool, (void **)&mbuf0, 1, 1);
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf1->pool, (void **)&mbuf1, 1, 1);
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf2->pool, (void **)&mbuf2, 1, 1);
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf3->pool, (void **)&mbuf3, 1, 1);
+
 		if (!(flags & NIX_RX_VWQE_F)) {
 			/* Mask to get packet len from NIX_RX_SG_S */
 			const uint8x16_t shuf_msk = {
@@ -1716,12 +1722,6 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
 		vst1q_u64((uint64_t *)&mbufs[packets], mbuf01);
 		vst1q_u64((uint64_t *)&mbufs[packets + 2], mbuf23);
 
-		/* Mark mempool obj as "get" as it is alloc'ed by NIX */
-		RTE_MEMPOOL_CHECK_COOKIES(mbuf0->pool, (void **)&mbuf0, 1, 1);
-		RTE_MEMPOOL_CHECK_COOKIES(mbuf1->pool, (void **)&mbuf1, 1, 1);
-		RTE_MEMPOOL_CHECK_COOKIES(mbuf2->pool, (void **)&mbuf2, 1, 1);
-		RTE_MEMPOOL_CHECK_COOKIES(mbuf3->pool, (void **)&mbuf3, 1, 1);
-
 		nix_mbuf_validate_next(mbuf0);
 		nix_mbuf_validate_next(mbuf1);
 		nix_mbuf_validate_next(mbuf2);
diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index 815cd2ff1f..63cf6821d2 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -1696,10 +1696,12 @@ cn10k_nix_xmit_store(struct rte_mbuf *mbuf, uint8_t segdw, uintptr_t laddr,
 			vst1q_u64(LMT_OFF(laddr, 0, 16), cmd2);
 			vst1q_u64(LMT_OFF(laddr, 0, 32), cmd1);
 		}
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 0);
 	} else {
 		/* Store the prepared send desc to LMT lines */
 		vst1q_u64(LMT_OFF(laddr, 0, 0), cmd0);
 		vst1q_u64(LMT_OFF(laddr, 0, 16), cmd1);
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 0);
 	}
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.481457200 +0800
+++ 0049-net-cnxk-fix-cookies-check-with-security-offload.patch	2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From 7364015fefd308ac89565fc78a4b910e83546422 Mon Sep 17 00:00:00 2001
+From cd88b5ff390862700e60e46185f3dc9fd8d46765 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7364015fefd308ac89565fc78a4b910e83546422 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index b7074906a6..8148866e44 100644
+index 721127dddd..20384e64c7 100644
@@ -23 +25 @@
-@@ -1241,6 +1241,12 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
+@@ -1216,6 +1216,12 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
@@ -36 +38 @@
-@@ -1753,12 +1759,6 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
+@@ -1716,12 +1722,6 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
@@ -50 +52 @@
-index 9f0af7248f..298d243aac 100644
+index 815cd2ff1f..63cf6821d2 100644
@@ -53 +55 @@
-@@ -1966,10 +1966,12 @@ cn10k_nix_xmit_store(struct cn10k_eth_txq *txq,
+@@ -1696,10 +1696,12 @@ cn10k_nix_xmit_store(struct rte_mbuf *mbuf, uint8_t segdw, uintptr_t laddr,

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

* patch 'net/cnxk: fix flow queue index validation' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (48 preceding siblings ...)
  2023-08-09 23:48   ` patch 'net/cnxk: fix cookies check with security offload' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'cryptodev: fix comments of modular operation parameters' " Xueming Li
                     ` (2 subsequent siblings)
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a60ddd695499c9d7383d8f5980b1c71fffccba28 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Tue, 20 Jun 2023 16:31:37 +0530
Subject: [PATCH] net/cnxk: fix flow queue index validation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 47f4051664c3235586c08095a2b328d5c86b87e2 ]

When creating a flow rule directing traffic from PF
to VF, current validation is incorrectly checking the
RQ index in flow action with the PF's maximum
configured RQs. This validation is applicable only
when action target is an RQ of the PF. The validation
has been modified accordingly.

Fixes: 8c009b4505e9 ("net/cnxk: support flow API")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/net/cnxk/cnxk_flow.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
index 6d155d924c..422c5d74df 100644
--- a/drivers/net/cnxk/cnxk_flow.c
+++ b/drivers/net/cnxk/cnxk_flow.c
@@ -115,14 +115,15 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
 		 struct roc_npc_action in_actions[], uint32_t *flowkey_cfg)
 {
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
+	const struct rte_flow_action_queue *act_q = NULL;
 	const struct rte_flow_action_ethdev *act_ethdev;
 	const struct rte_flow_action_port_id *port_act;
-	const struct rte_flow_action_queue *act_q;
 	struct roc_npc *roc_npc_src = &dev->npc;
 	struct rte_eth_dev *portid_eth_dev;
 	char if_name[RTE_ETH_NAME_MAX_LEN];
 	struct cnxk_eth_dev *hw_dst;
 	struct roc_npc *roc_npc_dst;
+	bool is_vf_action = false;
 	int i = 0, rc = 0;
 	int rq;
 
@@ -156,6 +157,7 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
 		case RTE_FLOW_ACTION_TYPE_VF:
 			in_actions[i].type = ROC_NPC_ACTION_TYPE_VF;
 			in_actions[i].conf = actions->conf;
+			is_vf_action = true;
 			break;
 
 		case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
@@ -193,13 +195,7 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
 			break;
 
 		case RTE_FLOW_ACTION_TYPE_QUEUE:
-			act_q = (const struct rte_flow_action_queue *)
-					actions->conf;
-			rq = act_q->index;
-			if (rq >= eth_dev->data->nb_rx_queues) {
-				plt_npc_dbg("Invalid queue index");
-				goto err_exit;
-			}
+			act_q = (const struct rte_flow_action_queue *)actions->conf;
 			in_actions[i].type = ROC_NPC_ACTION_TYPE_QUEUE;
 			in_actions[i].conf = actions->conf;
 			break;
@@ -245,6 +241,14 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
 		}
 		i++;
 	}
+
+	if (!is_vf_action && act_q) {
+		rq = act_q->index;
+		if (rq >= eth_dev->data->nb_rx_queues) {
+			plt_npc_dbg("Invalid queue index");
+			goto err_exit;
+		}
+	}
 	in_actions[i].type = ROC_NPC_ACTION_TYPE_END;
 	return 0;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.503097200 +0800
+++ 0050-net-cnxk-fix-flow-queue-index-validation.patch	2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From 47f4051664c3235586c08095a2b328d5c86b87e2 Mon Sep 17 00:00:00 2001
+From a60ddd695499c9d7383d8f5980b1c71fffccba28 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 47f4051664c3235586c08095a2b328d5c86b87e2 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 1b88542dcb..3b8348ae9c 100644
+index 6d155d924c..422c5d74df 100644
@@ -26,2 +28,2 @@
-@@ -117,13 +117,14 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
- 		 uint32_t *flowkey_cfg, uint16_t *dst_pf_func)
+@@ -115,14 +115,15 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
+ 		 struct roc_npc_action in_actions[], uint32_t *flowkey_cfg)
@@ -33,0 +36 @@
+ 	struct roc_npc *roc_npc_src = &dev->npc;
@@ -42 +45 @@
-@@ -157,6 +158,7 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
+@@ -156,6 +157,7 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
@@ -50 +53 @@
-@@ -189,13 +191,7 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
+@@ -193,13 +195,7 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
@@ -65 +68 @@
-@@ -241,6 +237,14 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
+@@ -245,6 +241,14 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,

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

* patch 'cryptodev: fix comments of modular operation parameters' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (49 preceding siblings ...)
  2023-08-09 23:48   ` patch 'net/cnxk: fix flow queue index validation' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'raw/ntb: avoid disabling interrupt twice' " Xueming Li
  2023-08-09 23:48   ` patch 'ipc: fix file descriptor leakage with unhandled messages' " Xueming Li
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 54182cce724df53526c32354988b12f7949ec77b Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 14 Jun 2023 16:26:51 +0200
Subject: [PATCH] cryptodev: fix comments of modular operation parameters
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f504f9722a22b90af708ce2e5dd6d360289bef90 ]

The Doxygen comments are made after the struct field,
but were missing the Doxygen syntax /**<.

Fixes: 518a974bfecc ("cryptodev: reorganize asymmetric structs")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/cryptodev/rte_crypto_asym.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index 38c8b60779..70ef69b97b 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -388,9 +388,9 @@ struct rte_crypto_ec_xform {
  */
 struct rte_crypto_mod_op_param {
 	rte_crypto_uint base;
-	/** Base of modular exponentiation/multiplicative inverse */
+	/**< Base of modular exponentiation/multiplicative inverse. */
 	rte_crypto_uint result;
-	/** Result of modular exponentiation/multiplicative inverse */
+	/**< Result of modular exponentiation/multiplicative inverse. */
 };
 
 /**
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.524265600 +0800
+++ 0051-cryptodev-fix-comments-of-modular-operation-paramete.patch	2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From f504f9722a22b90af708ce2e5dd6d360289bef90 Mon Sep 17 00:00:00 2001
+From 54182cce724df53526c32354988b12f7949ec77b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f504f9722a22b90af708ce2e5dd6d360289bef90 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index fc3f331393..8b5794fb7c 100644
+index 38c8b60779..70ef69b97b 100644
@@ -22 +24 @@
-@@ -395,9 +395,9 @@ struct rte_crypto_sm2_xform {
+@@ -388,9 +388,9 @@ struct rte_crypto_ec_xform {

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

* patch 'raw/ntb: avoid disabling interrupt twice' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (50 preceding siblings ...)
  2023-08-09 23:48   ` patch 'cryptodev: fix comments of modular operation parameters' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  2023-08-09 23:48   ` patch 'ipc: fix file descriptor leakage with unhandled messages' " Xueming Li
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Junfeng Guo; +Cc: Wei Ling, Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 008fdd0e07b47e782154c8142c7d930ef1798cdd Mon Sep 17 00:00:00 2001
From: Junfeng Guo <junfeng.guo@intel.com>
Date: Wed, 28 Jun 2023 17:12:18 +0800
Subject: [PATCH] raw/ntb: avoid disabling interrupt twice
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a10529f4025eaef0c9803d845b9afc1d5fb17b59 ]

During EAL cleanup stage, all bus devices are cleaned up properly.
In the meantime, the ntb example app will also do the device cleanup
process, which may call the dev ops '*dev->dev_ops->dev_close' twice.

If this dev ops for ntb was called twice, the interrupt handle for
EAL will be disabled twice and will lead to error for the second
time. Like this: "EAL: Error disabling MSI-X interrupts for fd xx"

Thus, this patch added the check process for disabling interrupt in
dev_close ops, to ensure that interrupt only be disabled once.

Fixes: 1cab1a40ea9b ("bus: cleanup devices on shutdown")

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/raw/ntb/ntb.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index 76e98fe515..0ed4c14592 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -1045,6 +1045,11 @@ ntb_dev_close(struct rte_rawdev *dev)
 	hw->queue_pairs = 0;
 
 	intr_handle = hw->pci_dev->intr_handle;
+	/* Disable interrupt only once */
+	if (!rte_intr_nb_efd_get(intr_handle) &&
+	    !rte_intr_max_intr_get(intr_handle))
+		return 0;
+
 	/* Clean datapath event and vec mapping */
 	rte_intr_efd_disable(intr_handle);
 	rte_intr_vec_list_free(intr_handle);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.545301600 +0800
+++ 0052-raw-ntb-avoid-disabling-interrupt-twice.patch	2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From a10529f4025eaef0c9803d845b9afc1d5fb17b59 Mon Sep 17 00:00:00 2001
+From 008fdd0e07b47e782154c8142c7d930ef1798cdd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a10529f4025eaef0c9803d845b9afc1d5fb17b59 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org

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

* patch 'ipc: fix file descriptor leakage with unhandled messages' has been queued to stable release 22.11.3
  2023-08-09 23:47 ` patch " Xueming Li
                     ` (51 preceding siblings ...)
  2023-08-09 23:48   ` patch 'raw/ntb: avoid disabling interrupt twice' " Xueming Li
@ 2023-08-09 23:48   ` Xueming Li
  52 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:48 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Chengwen Feng, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 90aa091a205084082bebb14b41801b901f9ffe4d Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 28 Jun 2023 15:19:38 +0300
Subject: [PATCH] ipc: fix file descriptor leakage with unhandled messages
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a64a4564705d18d20d20cfa16c79e795b7bf0f1e ]

The sendmsg()/recvmsg() API is used to establish communication between
the DPDK processes. The API supposes inter-process file descriptors
sending and conversion, the recipient sees the resulting descriptors
in the received message - the operating systems creates ones in the
right context.

The message receiving is performed by EAL in the dedicated thread
and it might happen the message is received by EAL and not handled
by addressed PMD or application due to some reasons (timeouts, race
condition, etc). EAL just dropped unhandled messages causing the
file descriptor leakage if these ones were presented in the message.

The patch closes the descriptors (if any) in unhandled messages.

Fixes: 783b6e54971d ("eal: add synchronous multi-process communication")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/eal/common/eal_common_proc.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c
index 1fc1d6c53b..9676dd73c5 100644
--- a/lib/eal/common/eal_common_proc.c
+++ b/lib/eal/common/eal_common_proc.c
@@ -321,6 +321,15 @@ retry:
 	return msglen;
 }
 
+static void
+cleanup_msg_fds(const struct rte_mp_msg *msg)
+{
+	int i;
+
+	for (i = 0; i < msg->num_fds; i++)
+		close(msg->fds[i]);
+}
+
 static void
 process_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
 {
@@ -349,8 +358,10 @@ process_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
 			else if (pending_req->type == REQUEST_TYPE_ASYNC)
 				req = async_reply_handle_thread_unsafe(
 						pending_req);
-		} else
+		} else {
 			RTE_LOG(ERR, EAL, "Drop mp reply: %s\n", msg->name);
+			cleanup_msg_fds(msg);
+		}
 		pthread_mutex_unlock(&pending_requests.lock);
 
 		if (req != NULL)
@@ -380,6 +391,7 @@ process_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
 			RTE_LOG(ERR, EAL, "Cannot find action: %s\n",
 				msg->name);
 		}
+		cleanup_msg_fds(msg);
 	} else if (action(msg, s->sun_path) < 0) {
 		RTE_LOG(ERR, EAL, "Fail to handle message: %s\n", msg->name);
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.565073500 +0800
+++ 0053-ipc-fix-file-descriptor-leakage-with-unhandled-messa.patch	2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From a64a4564705d18d20d20cfa16c79e795b7bf0f1e Mon Sep 17 00:00:00 2001
+From 90aa091a205084082bebb14b41801b901f9ffe4d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a64a4564705d18d20d20cfa16c79e795b7bf0f1e ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index 7a038e0a3c..02d4599d67 100644
+index 1fc1d6c53b..9676dd73c5 100644

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

* patch 'devtools: fix mailmap check for parentheses' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (126 preceding siblings ...)
  2023-08-09 23:47 ` patch " Xueming Li
@ 2023-08-09 23:58 ` Xueming Li
  2023-08-09 23:58   ` patch 'fib: fix adding default route' " Xueming Li
                     ` (38 more replies)
  2023-08-10  0:06 ` Xueming Li
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
  129 siblings, 39 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fc4be70deda0f278f9513f84ec0c97a946398090 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 26 Jun 2023 12:24:03 +0200
Subject: [PATCH] devtools: fix mailmap check for parentheses
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6fd14c1b58e669b109d5ff68e401f4c1f201c39f ]

When checking names having parentheses, the grep matching was failing.
It is fixed by escaping the open parenthesis.

Also, the mailmap path was relative to the root directory.
The path is made absolute.

Fixes: e83d41f0694d ("mailmap: add list of contributors")
Fixes: 83812de4f2f3 ("devtools: move mailmap check after patch applied")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 devtools/check-git-log.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index af751e49ab..89544a2cc5 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -264,8 +264,10 @@ names=$(git log --format='From: %an <%ae>%n%b' --reverse $range |
 	sed -rn 's,.*: (.*<.*@.*>),\1,p' |
 	sort -u)
 bad=$(for contributor in $names ; do
+	contributor=${contributor//(/\\(}
 	! grep -qE "^$contributor($| <)" $selfdir/../.mailmap || continue
-	if grep -q "^${contributor%% <*} <" .mailmap ; then
+	name=${contributor%% <*}
+	if grep -q "^$name <" $selfdir/../.mailmap ; then
 		printf "\t$contributor is not the primary email address\n"
 	else
 		printf "\t$contributor is unknown in .mailmap\n"
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.585732800 +0800
+++ 0054-devtools-fix-mailmap-check-for-parentheses.patch	2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From 6fd14c1b58e669b109d5ff68e401f4c1f201c39f Mon Sep 17 00:00:00 2001
+From fc4be70deda0f278f9513f84ec0c97a946398090 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6fd14c1b58e669b109d5ff68e401f4c1f201c39f ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* patch 'fib: fix adding default route' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'mem: fix memsegs exhausted message' " Xueming Li
                     ` (37 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7a57c9edd6f50e4b42be94fb94850b480c41025a Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 3 Jul 2023 15:43:35 +0000
Subject: [PATCH] fib: fix adding default route
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 880bc2b5f3bdbde0eee4d880afaaf91b4babbdfc ]

Fixed an issue that occurs when
adding a default route as the first route.

Bugzilla ID: 1160
Fixes: 7dc7868b200d ("fib: add DIR24-8 dataplane algorithm")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/fib/dir24_8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fib/dir24_8.c b/lib/fib/dir24_8.c
index a8ba4f64ca..3efdcb533c 100644
--- a/lib/fib/dir24_8.c
+++ b/lib/fib/dir24_8.c
@@ -390,7 +390,7 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip,
 				(uint32_t)(1ULL << (32 - tmp_depth));
 		} else {
 			redge = ip + (uint32_t)(1ULL << (32 - depth));
-			if (ledge == redge)
+			if (ledge == redge && ledge != 0)
 				break;
 			ret = install_to_fib(dp, ledge, redge,
 				next_hop);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.606429900 +0800
+++ 0055-fib-fix-adding-default-route.patch	2023-08-09 21:51:18.194352000 +0800
@@ -1 +1 @@
-From 880bc2b5f3bdbde0eee4d880afaaf91b4babbdfc Mon Sep 17 00:00:00 2001
+From 7a57c9edd6f50e4b42be94fb94850b480c41025a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 880bc2b5f3bdbde0eee4d880afaaf91b4babbdfc ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'mem: fix memsegs exhausted message' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
  2023-08-09 23:58   ` patch 'fib: fix adding default route' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'hash: fix reading unaligned bits in Toeplitz hash' " Xueming Li
                     ` (36 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Fengnan Chang; +Cc: Anatoly Burakov, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7e6b4e9d63bc8c3ae31512f8de5a1517e676cc23 Mon Sep 17 00:00:00 2001
From: Fengnan Chang <changfengnan@bytedance.com>
Date: Tue, 4 Jul 2023 20:17:51 +0800
Subject: [PATCH] mem: fix memsegs exhausted message
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d93000bb9310685d0df3aa2c11cff3000ed17a82 ]

When there is not enough space to memsegs, we should prompt
which configuration should be modified instead of printing
some numbers.

Fixes: dd61b34d580b ("mem: error if requesting more segments than MAX_MEMSEG")
Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")

Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/eal/common/eal_common_dynmem.c |  6 ++----
 lib/eal/freebsd/eal_memory.c       |  8 +++-----
 lib/eal/linux/eal_memory.c         | 11 ++++-------
 3 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/lib/eal/common/eal_common_dynmem.c b/lib/eal/common/eal_common_dynmem.c
index 52e52e5986..bdbbe233a0 100644
--- a/lib/eal/common/eal_common_dynmem.c
+++ b/lib/eal/common/eal_common_dynmem.c
@@ -120,8 +120,7 @@ eal_dynmem_memseg_lists_init(void)
 	max_seglists_per_type = RTE_MAX_MEMSEG_LISTS / n_memtypes;
 
 	if (max_seglists_per_type == 0) {
-		RTE_LOG(ERR, EAL, "Cannot accommodate all memory types, please increase %s\n",
-			RTE_STR(RTE_MAX_MEMSEG_LISTS));
+		RTE_LOG(ERR, EAL, "Cannot accommodate all memory types, please increase RTE_MAX_MEMSEG_LISTS\n");
 		goto out;
 	}
 
@@ -180,8 +179,7 @@ eal_dynmem_memseg_lists_init(void)
 		for (cur_seglist = 0; cur_seglist < n_seglists; cur_seglist++) {
 			if (msl_idx >= RTE_MAX_MEMSEG_LISTS) {
 				RTE_LOG(ERR, EAL,
-					"No more space in memseg lists, please increase %s\n",
-					RTE_STR(RTE_MAX_MEMSEG_LISTS));
+					"No more space in memseg lists, please increase RTE_MAX_MEMSEG_LISTS\n");
 				goto out;
 			}
 			msl = &mcfg->memsegs[msl_idx++];
diff --git a/lib/eal/freebsd/eal_memory.c b/lib/eal/freebsd/eal_memory.c
index 17ab10e0ca..5c6165c580 100644
--- a/lib/eal/freebsd/eal_memory.c
+++ b/lib/eal/freebsd/eal_memory.c
@@ -172,9 +172,8 @@ rte_eal_hugepage_init(void)
 				break;
 			}
 			if (msl_idx == RTE_MAX_MEMSEG_LISTS) {
-				RTE_LOG(ERR, EAL, "Could not find space for memseg. Please increase %s and/or %s in configuration.\n",
-					RTE_STR(RTE_MAX_MEMSEG_PER_TYPE),
-					RTE_STR(RTE_MAX_MEM_MB_PER_TYPE));
+				RTE_LOG(ERR, EAL, "Could not find space for memseg. Please increase RTE_MAX_MEMSEG_PER_LIST "
+					"RTE_MAX_MEMSEG_PER_TYPE and/or RTE_MAX_MEM_MB_PER_TYPE in configuration.\n");
 				return -1;
 			}
 			arr = &msl->memseg_arr;
@@ -404,8 +403,7 @@ memseg_primary_init(void)
 
 			if (msl_idx >= RTE_MAX_MEMSEG_LISTS) {
 				RTE_LOG(ERR, EAL,
-					"No more space in memseg lists, please increase %s\n",
-					RTE_STR(RTE_MAX_MEMSEG_LISTS));
+					"No more space in memseg lists, please increase RTE_MAX_MEMSEG_LISTS\n");
 				return -1;
 			}
 
diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index 0876974631..9b6f08fba8 100644
--- a/lib/eal/linux/eal_memory.c
+++ b/lib/eal/linux/eal_memory.c
@@ -716,9 +716,8 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
 		break;
 	}
 	if (msl_idx == RTE_MAX_MEMSEG_LISTS) {
-		RTE_LOG(ERR, EAL, "Could not find space for memseg. Please increase %s and/or %s in configuration.\n",
-				RTE_STR(RTE_MAX_MEMSEG_PER_TYPE),
-				RTE_STR(RTE_MAX_MEM_MB_PER_TYPE));
+		RTE_LOG(ERR, EAL, "Could not find space for memseg. Please increase RTE_MAX_MEMSEG_PER_LIST "
+			"RTE_MAX_MEMSEG_PER_TYPE and/or RTE_MAX_MEM_MB_PER_TYPE in configuration.\n");
 		return -1;
 	}
 
@@ -966,8 +965,7 @@ prealloc_segments(struct hugepage_file *hugepages, int n_pages)
 				break;
 			}
 			if (msl_idx == RTE_MAX_MEMSEG_LISTS) {
-				RTE_LOG(ERR, EAL, "Not enough space in memseg lists, please increase %s\n",
-					RTE_STR(RTE_MAX_MEMSEG_LISTS));
+				RTE_LOG(ERR, EAL, "Not enough space in memseg lists, please increase RTE_MAX_MEMSEG_LISTS\n");
 				return -1;
 			}
 
@@ -1833,8 +1831,7 @@ memseg_primary_init_32(void)
 
 				if (msl_idx >= RTE_MAX_MEMSEG_LISTS) {
 					RTE_LOG(ERR, EAL,
-						"No more space in memseg lists, please increase %s\n",
-						RTE_STR(RTE_MAX_MEMSEG_LISTS));
+						"No more space in memseg lists, please increase RTE_MAX_MEMSEG_LISTS\n");
 					return -1;
 				}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.627711600 +0800
+++ 0056-mem-fix-memsegs-exhausted-message.patch	2023-08-09 21:51:18.204352000 +0800
@@ -1 +1 @@
-From d93000bb9310685d0df3aa2c11cff3000ed17a82 Mon Sep 17 00:00:00 2001
+From 7e6b4e9d63bc8c3ae31512f8de5a1517e676cc23 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d93000bb9310685d0df3aa2c11cff3000ed17a82 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'hash: fix reading unaligned bits in Toeplitz hash' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
  2023-08-09 23:58   ` patch 'fib: fix adding default route' " Xueming Li
  2023-08-09 23:58   ` patch 'mem: fix memsegs exhausted message' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'member: fix PRNG seed reset in NitroSketch mode' " Xueming Li
                     ` (35 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

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

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

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=1db71d413ef0fc45a8acdd06bca3268ac51d18a5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1db71d413ef0fc45a8acdd06bca3268ac51d18a5 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Fri, 30 Jun 2023 17:09:26 +0000
Subject: [PATCH] hash: fix reading unaligned bits in Toeplitz hash
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3a54f8de715c29613cf3d34ce3910d2bd27bffb9 ]

Fixes: 28ebff11c2dc ("hash: add predictable RSS")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
---
 lib/hash/rte_thash.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c
index 0249883b8d..2228af576b 100644
--- a/lib/hash/rte_thash.c
+++ b/lib/hash/rte_thash.c
@@ -670,7 +670,7 @@ rte_thash_get_gfni_matrices(struct rte_thash_ctx *ctx)
 }
 
 static inline uint8_t
-read_unaligned_byte(uint8_t *ptr, unsigned int len, unsigned int offset)
+read_unaligned_byte(uint8_t *ptr, unsigned int offset)
 {
 	uint8_t ret = 0;
 
@@ -681,13 +681,14 @@ read_unaligned_byte(uint8_t *ptr, unsigned int len, unsigned int offset)
 			(CHAR_BIT - (offset % CHAR_BIT));
 	}
 
-	return ret >> (CHAR_BIT - len);
+	return ret;
 }
 
 static inline uint32_t
 read_unaligned_bits(uint8_t *ptr, int len, int offset)
 {
 	uint32_t ret = 0;
+	int shift;
 
 	len = RTE_MAX(len, 0);
 	len = RTE_MIN(len, (int)(sizeof(uint32_t) * CHAR_BIT));
@@ -695,13 +696,14 @@ read_unaligned_bits(uint8_t *ptr, int len, int offset)
 	while (len > 0) {
 		ret <<= CHAR_BIT;
 
-		ret |= read_unaligned_byte(ptr, RTE_MIN(len, CHAR_BIT),
-			offset);
+		ret |= read_unaligned_byte(ptr, offset);
 		offset += CHAR_BIT;
 		len -= CHAR_BIT;
 	}
 
-	return ret;
+	shift = (len == 0) ? 0 :
+		(CHAR_BIT - ((len + CHAR_BIT) % CHAR_BIT));
+	return ret >> shift;
 }
 
 /* returns mask for len bits with given offset inside byte */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.649886200 +0800
+++ 0057-hash-fix-reading-unaligned-bits-in-Toeplitz-hash.patch	2023-08-09 21:51:18.204352000 +0800
@@ -1 +1 @@
-From 3a54f8de715c29613cf3d34ce3910d2bd27bffb9 Mon Sep 17 00:00:00 2001
+From 1db71d413ef0fc45a8acdd06bca3268ac51d18a5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3a54f8de715c29613cf3d34ce3910d2bd27bffb9 ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'member: fix PRNG seed reset in NitroSketch mode' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (2 preceding siblings ...)
  2023-08-09 23:58   ` patch 'hash: fix reading unaligned bits in Toeplitz hash' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/netvsc: fix sizeof calculation' " Xueming Li
                     ` (34 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=d5309394d17fc695506b4bb44b9d5dbe1263ac0b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d5309394d17fc695506b4bb44b9d5dbe1263ac0b Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Wed, 21 Jun 2023 00:17:20 +0300
Subject: [PATCH] member: fix PRNG seed reset in NitroSketch mode
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ed9e8206e19648028774fcd16b9ceadb8ab79f04 ]

Sketch creation seeded the global PRNG
using the supplied seed for hashing.
The use of this seed by SKETCH set summary was not documented.
SKETCH set summary does not require two independent hash seeds,
unlike other set summary types.
Seeding the global PRNG at sketch creation
does not make the sketch operation deterministic:
it uses rte_rand() later, the PRNG may be seeded again by that point.
On the other hand, seeding the global PRNG with a hash seed,
is likely undesired, because it may be low-entropy or even constant.
Deterministic operation can be achieved by seeding the PRNG externally.

Remove the call to rte_srand() at sketch creation.
Document that hash seeds are not used by SKETCH set summary type.

Fixes: db354bd2e1f8 ("member: add NitroSketch mode")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/member/rte_member.h        | 1 +
 lib/member/rte_member_sketch.c | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/member/rte_member.h b/lib/member/rte_member.h
index 072a253c89..d08b143e51 100644
--- a/lib/member/rte_member.h
+++ b/lib/member/rte_member.h
@@ -314,6 +314,7 @@ struct rte_member_parameters {
 	 * for bucket location.
 	 * For vBF type, these two hashes and their combinations are used as
 	 * hash locations to index the bit array.
+	 * For Sketch type, these seeds are not used.
 	 */
 	uint32_t prim_hash_seed;
 
diff --git a/lib/member/rte_member_sketch.c b/lib/member/rte_member_sketch.c
index 524ba77620..d5f35aabe9 100644
--- a/lib/member/rte_member_sketch.c
+++ b/lib/member/rte_member_sketch.c
@@ -227,7 +227,6 @@ rte_member_create_sketch(struct rte_member_setsum *ss,
 		goto error_runtime;
 	}
 
-	rte_srand(ss->prim_hash_seed);
 	for (i = 0; i < ss->num_row; i++)
 		ss->hash_seeds[i] = rte_rand();
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.670244300 +0800
+++ 0058-member-fix-PRNG-seed-reset-in-NitroSketch-mode.patch	2023-08-09 21:51:18.204352000 +0800
@@ -1 +1 @@
-From ed9e8206e19648028774fcd16b9ceadb8ab79f04 Mon Sep 17 00:00:00 2001
+From d5309394d17fc695506b4bb44b9d5dbe1263ac0b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ed9e8206e19648028774fcd16b9ceadb8ab79f04 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 237d403714..a15e0d69e6 100644
+index 072a253c89..d08b143e51 100644
@@ -35 +37 @@
-@@ -313,6 +313,7 @@ struct rte_member_parameters {
+@@ -314,6 +314,7 @@ struct rte_member_parameters {

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/netvsc: fix sizeof calculation' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (3 preceding siblings ...)
  2023-08-09 23:58   ` patch 'member: fix PRNG seed reset in NitroSketch mode' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'app/testpmd: fix checksum engine with GTP on 32-bit' " Xueming Li
                     ` (33 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Long Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=67912c46f49c1b2617aac34e9c4e4fc05fbf7c3d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 67912c46f49c1b2617aac34e9c4e4fc05fbf7c3d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 28 Jun 2023 17:29:57 -0700
Subject: [PATCH] net/netvsc: fix sizeof calculation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 86fb73f5bf401afc9d52144f27e6d1cf4f64348b ]

Found by cppcheck.

drivers/net/netvsc/hn_rndis.c:332:21: warning:
 Found calculation inside sizeof().
 [sizeofCalculation]  if (len < sizeof(3 * sizeof(uint32_t))) {

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_rndis.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index e6f1f28768..29c6009b2c 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -329,7 +329,8 @@ void hn_rndis_receive_response(struct hn_data *hv,
 
 	hn_rndis_dump(data);
 
-	if (len < sizeof(3 * sizeof(uint32_t))) {
+	/* Check we can read first three data fields from RNDIS header */
+	if (len < 3 * sizeof(uint32_t)) {
 		PMD_DRV_LOG(ERR,
 			    "missing RNDIS header %u", len);
 		return;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.697626300 +0800
+++ 0059-net-netvsc-fix-sizeof-calculation.patch	2023-08-09 21:51:18.204352000 +0800
@@ -1 +1 @@
-From 86fb73f5bf401afc9d52144f27e6d1cf4f64348b Mon Sep 17 00:00:00 2001
+From 67912c46f49c1b2617aac34e9c4e4fc05fbf7c3d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 86fb73f5bf401afc9d52144f27e6d1cf4f64348b ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'app/testpmd: fix checksum engine with GTP on 32-bit' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (4 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/netvsc: fix sizeof calculation' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/hns3: delete duplicate macro definition' " Xueming Li
                     ` (32 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Shiyang He; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=3a935374f2affc93c32c1ef84d52423a675d7561

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3a935374f2affc93c32c1ef84d52423a675d7561 Mon Sep 17 00:00:00 2001
From: Shiyang He <shiyangx.he@intel.com>
Date: Thu, 29 Jun 2023 10:09:55 +0000
Subject: [PATCH] app/testpmd: fix checksum engine with GTP on 32-bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f7bfa1285fe943b5189a63bb1d427e823b7fcc20 ]

l2_len is not calculated correctly on 32-bit systems, resulting in
packet forwarding failure.

This patch fixes this issue by changing the l2_len calculation.

Fixes: dd827fa42a30 ("app/testpmd: fix GTP L2 length in checksum engine")

Signed-off-by: Shiyang He <shiyangx.he@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/csumonly.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 9ac0d05fff..4efb72be77 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -250,7 +250,7 @@ parse_gtp(struct rte_udp_hdr *udp_hdr,
 		info->l4_proto = 0;
 	}
 
-	info->l2_len += gtp_len + sizeof(udp_hdr);
+	info->l2_len += gtp_len + sizeof(*udp_hdr);
 }
 
 /* Parse a vxlan header */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.721016700 +0800
+++ 0060-app-testpmd-fix-checksum-engine-with-GTP-on-32-bit.patch	2023-08-09 21:51:18.204352000 +0800
@@ -1 +1 @@
-From f7bfa1285fe943b5189a63bb1d427e823b7fcc20 Mon Sep 17 00:00:00 2001
+From 3a935374f2affc93c32c1ef84d52423a675d7561 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f7bfa1285fe943b5189a63bb1d427e823b7fcc20 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 7af635e3f7..c103e54111 100644
+index 9ac0d05fff..4efb72be77 100644

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/hns3: delete duplicate macro definition' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (5 preceding siblings ...)
  2023-08-09 23:58   ` patch 'app/testpmd: fix checksum engine with GTP on 32-bit' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'doc: fix kernel patch link in hns3 guide' " Xueming Li
                     ` (31 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=9b9ae1aff19d9b03c75f3c84183bb8fcfce2320f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9b9ae1aff19d9b03c75f3c84183bb8fcfce2320f Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 29 Jun 2023 21:21:26 +0800
Subject: [PATCH] net/hns3: delete duplicate macro definition
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a939584a45dff2c5d855d25bf4867ba07428bdfc ]

This patch delete some duplicate macro definitions.

Fixes: a4c7152d0581 ("net/hns3: extract common code to its own file")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 046a37b7d3..58572948fe 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -871,13 +871,6 @@ struct hns3_adapter {
 	struct hns3_ptype_table ptype_tbl __rte_cache_aligned;
 };
 
-#define HNS3_DEVARG_RX_FUNC_HINT	"rx_func_hint"
-#define HNS3_DEVARG_TX_FUNC_HINT	"tx_func_hint"
-
-#define HNS3_DEVARG_DEV_CAPS_MASK	"dev_caps_mask"
-
-#define HNS3_DEVARG_MBX_TIME_LIMIT_MS	"mbx_time_limit_ms"
-
 enum hns3_dev_cap {
 	HNS3_DEV_SUPPORT_DCB_B,
 	HNS3_DEV_SUPPORT_COPPER_B,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.747353800 +0800
+++ 0061-net-hns3-delete-duplicate-macro-definition.patch	2023-08-09 21:51:18.204352000 +0800
@@ -1 +1 @@
-From a939584a45dff2c5d855d25bf4867ba07428bdfc Mon Sep 17 00:00:00 2001
+From 9b9ae1aff19d9b03c75f3c84183bb8fcfce2320f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a939584a45dff2c5d855d25bf4867ba07428bdfc ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index c58094d87b..c85a6912ad 100644
+index 046a37b7d3..58572948fe 100644
@@ -21 +23 @@
-@@ -873,13 +873,6 @@ struct hns3_adapter {
+@@ -871,13 +871,6 @@ struct hns3_adapter {

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'doc: fix kernel patch link in hns3 guide' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (6 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/hns3: delete duplicate macro definition' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'doc: fix syntax " Xueming Li
                     ` (30 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Dongdong Liu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=ece673c7a11488157b3240826693413dfc6fc9d7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ece673c7a11488157b3240826693413dfc6fc9d7 Mon Sep 17 00:00:00 2001
From: Dongdong Liu <liudongdong3@huawei.com>
Date: Fri, 30 Jun 2023 15:37:35 +0800
Subject: [PATCH] doc: fix kernel patch link in hns3 guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2de9a0f162f68b3e507a1c2a6a2555b6131ed45f ]

The LSC support of VF driver depends on a patch link in kernel PF
driver.
But current the link is invalid, so fixes it.

Add a blank line after the link.

Fixes: 80006b598730 ("doc: add link status event requirements in hns3 guide")

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 doc/guides/nics/hns3.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 791c9cc2ed..424b97cb50 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -137,7 +137,8 @@ Firmware 1.8.0.0 and later versions support reporting link changes to the PF.
 Therefore, to use the LSC for the PF driver, ensure that the firmware version
 also supports reporting link changes.
 If the VF driver needs to support LSC, special patch must be added:
-`<https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/hisilicon/hns3?h=next-20210428&id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_.
+`<https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_.
+
 Note: The patch has been uploaded to 5.13 of the Linux kernel mainline.
 
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.783695500 +0800
+++ 0062-doc-fix-kernel-patch-link-in-hns3-guide.patch	2023-08-09 21:51:18.204352000 +0800
@@ -1 +1 @@
-From 2de9a0f162f68b3e507a1c2a6a2555b6131ed45f Mon Sep 17 00:00:00 2001
+From ece673c7a11488157b3240826693413dfc6fc9d7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2de9a0f162f68b3e507a1c2a6a2555b6131ed45f ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index d6ac618565..728c6d49a2 100644
+index 791c9cc2ed..424b97cb50 100644
@@ -24 +26 @@
-@@ -54,7 +54,8 @@ Firmware 1.8.0.0 and later versions support reporting link changes to the PF.
+@@ -137,7 +137,8 @@ Firmware 1.8.0.0 and later versions support reporting link changes to the PF.

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'doc: fix syntax in hns3 guide' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (7 preceding siblings ...)
  2023-08-09 23:58   ` patch 'doc: fix kernel patch link in hns3 guide' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'doc: fix number of leading spaces " Xueming Li
                     ` (29 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Dongdong Liu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=8b5633f1e2e1b312a4d7d00eed301f4129f72232

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8b5633f1e2e1b312a4d7d00eed301f4129f72232 Mon Sep 17 00:00:00 2001
From: Dongdong Liu <liudongdong3@huawei.com>
Date: Fri, 30 Jun 2023 15:37:36 +0800
Subject: [PATCH] doc: fix syntax in hns3 guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 258e6e1b370c1b3f5e50877b8539511fa248a63a ]

'::' doesn't provide pre-formatted text without an empty line after it,
so fixes it.

Fixes: cdf6a5fbc540 ("doc: add runtime option examples to hns3 guide")

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 doc/guides/nics/hns3.rst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 424b97cb50..8a6998fd65 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -81,6 +81,7 @@ Runtime Config Options
   ``common``.
 
   For example::
+
   -a 0000:7d:00.0,rx_func_hint=simple
 
 - ``tx_func_hint`` (default ``none``)
@@ -101,6 +102,7 @@ Runtime Config Options
   ``common``.
 
   For example::
+
   -a 0000:7d:00.0,tx_func_hint=common
 
 - ``dev_caps_mask`` (default ``0``)
@@ -113,6 +115,7 @@ Runtime Config Options
   Its main purpose is to debug and avoid problems.
 
   For example::
+
   -a 0000:7d:00.0,dev_caps_mask=0xF
 
 - ``mbx_time_limit_ms`` (default ``500``)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.805354400 +0800
+++ 0063-doc-fix-syntax-in-hns3-guide.patch	2023-08-09 21:51:18.204352000 +0800
@@ -1 +1 @@
-From 258e6e1b370c1b3f5e50877b8539511fa248a63a Mon Sep 17 00:00:00 2001
+From 8b5633f1e2e1b312a4d7d00eed301f4129f72232 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 258e6e1b370c1b3f5e50877b8539511fa248a63a ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 728c6d49a2..11cbc992e7 100644
+index 424b97cb50..8a6998fd65 100644
@@ -21 +23 @@
-@@ -92,6 +92,7 @@ Runtime Configuration
+@@ -81,6 +81,7 @@ Runtime Config Options
@@ -29 +31 @@
-@@ -112,6 +113,7 @@ Runtime Configuration
+@@ -101,6 +102,7 @@ Runtime Config Options
@@ -37 +39 @@
-@@ -124,6 +126,7 @@ Runtime Configuration
+@@ -113,6 +115,7 @@ Runtime Config Options

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'doc: fix number of leading spaces in hns3 guide' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (8 preceding siblings ...)
  2023-08-09 23:58   ` patch 'doc: fix syntax " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/txgbe: fix blocking system events' " Xueming Li
                     ` (28 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Dongdong Liu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=7a44cac46c71c87928c34f401641f74788d7019e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7a44cac46c71c87928c34f401641f74788d7019e Mon Sep 17 00:00:00 2001
From: Dongdong Liu <liudongdong3@huawei.com>
Date: Fri, 30 Jun 2023 15:37:37 +0800
Subject: [PATCH] doc: fix number of leading spaces in hns3 guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 620cd2d5ac5a6d7de750a4827e2840209a1b0cbb ]

The current description of 'mbx_time_limit_ms' has three spaces
at the beginning. Use two spaces to keep the same style with other
places and add a blank line after '::'.

Fixes: 2fc3e696a7f1 ("net/hns3: add runtime config for mailbox limit time")

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 doc/guides/nics/hns3.rst | 34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 8a6998fd65..6fbd4320ef 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -82,7 +82,7 @@ Runtime Config Options
 
   For example::
 
-  -a 0000:7d:00.0,rx_func_hint=simple
+    -a 0000:7d:00.0,rx_func_hint=simple
 
 - ``tx_func_hint`` (default ``none``)
 
@@ -103,7 +103,7 @@ Runtime Config Options
 
   For example::
 
-  -a 0000:7d:00.0,tx_func_hint=common
+    -a 0000:7d:00.0,tx_func_hint=common
 
 - ``dev_caps_mask`` (default ``0``)
 
@@ -116,22 +116,24 @@ Runtime Config Options
 
   For example::
 
-  -a 0000:7d:00.0,dev_caps_mask=0xF
+    -a 0000:7d:00.0,dev_caps_mask=0xF
 
 - ``mbx_time_limit_ms`` (default ``500``)
-   Used to define the mailbox time limit by user.
-   Current, the max waiting time for MBX response is 500ms, but in
-   some scenarios, it is not enough. Since it depends on the response
-   of the kernel mode driver, and its response time is related to the
-   scheduling of the system. In this special scenario, most of the
-   cores are isolated, and only a few cores are used for system
-   scheduling. When a large number of services are started, the
-   scheduling of the system will be very busy, and the reply of the
-   mbx message will time out, which will cause our PMD initialization
-   to fail. So provide access to set mailbox time limit for user.
-
-   For example::
-   -a 0000:7d:00.0,mbx_time_limit_ms=600
+
+  Used to define the mailbox time limit by user.
+  Current, the max waiting time for MBX response is 500ms, but in
+  some scenarios, it is not enough. Since it depends on the response
+  of the kernel mode driver, and its response time is related to the
+  scheduling of the system. In this special scenario, most of the
+  cores are isolated, and only a few cores are used for system
+  scheduling. When a large number of services are started, the
+  scheduling of the system will be very busy, and the reply of the
+  mbx message will time out, which will cause our PMD initialization
+  to fail. So provide access to set mailbox time limit for user.
+
+  For example::
+
+    -a 0000:7d:00.0,mbx_time_limit_ms=600
 
 Link status event Pre-conditions
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.825621700 +0800
+++ 0064-doc-fix-number-of-leading-spaces-in-hns3-guide.patch	2023-08-09 21:51:18.204352000 +0800
@@ -1 +1 @@
-From 620cd2d5ac5a6d7de750a4827e2840209a1b0cbb Mon Sep 17 00:00:00 2001
+From 7a44cac46c71c87928c34f401641f74788d7019e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 620cd2d5ac5a6d7de750a4827e2840209a1b0cbb ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 11cbc992e7..ee774639d3 100644
+index 8a6998fd65..6fbd4320ef 100644
@@ -22 +24 @@
-@@ -93,7 +93,7 @@ Runtime Configuration
+@@ -82,7 +82,7 @@ Runtime Config Options
@@ -31 +33 @@
-@@ -114,7 +114,7 @@ Runtime Configuration
+@@ -103,7 +103,7 @@ Runtime Config Options
@@ -40 +42 @@
-@@ -127,22 +127,24 @@ Runtime Configuration
+@@ -116,22 +116,24 @@ Runtime Config Options
@@ -77,2 +79,2 @@
- - ``fdir_vlan_match_mode`` (default ``strict``)
- 
+ Link status event Pre-conditions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/txgbe: fix blocking system events' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (9 preceding siblings ...)
  2023-08-09 23:58   ` patch 'doc: fix number of leading spaces " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'app/testpmd: revert primary process polling all queues fix' " Xueming Li
                     ` (27 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=09d8d1fe4f7b75079d1aede67252b8c32f210033

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 09d8d1fe4f7b75079d1aede67252b8c32f210033 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Fri, 30 Jun 2023 17:35:12 +0800
Subject: [PATCH] net/txgbe: fix blocking system events
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5e170dd8b690cd55a2931ddbfe3db0f9b1cad462 ]

Refer to commit 819d0d1d57f1 ("net/ixgbe: fix blocking system events").
Fix the same issue as ixgbe.

TXGBE link status task uses rte alarm thread in old implementation.
Sometime txgbe link status task takes up to 9 seconds. This will
severely affect the rte-alarm-thread dependent tasks in the
system, like interrupt or hotplug event. So replace with an
independent thread which has the same thread affinity settings
as rte interrupt.

Fixes: 0c061eadec59 ("net/txgbe: add link status change")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c    | 69 ++++++++++++++++++++++++++---
 drivers/net/txgbe/txgbe_ethdev.h    |  6 +++
 drivers/net/txgbe/txgbe_ethdev_vf.c |  6 ++-
 3 files changed, 73 insertions(+), 8 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 95aef27092..2c7d71c0db 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -545,6 +545,7 @@ null:
 static int
 eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 {
+	struct txgbe_adapter *ad = eth_dev->data->dev_private;
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
 	struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev);
 	struct txgbe_vfta *shadow_vfta = TXGBE_DEV_VFTA(eth_dev);
@@ -593,6 +594,7 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 		return 0;
 	}
 
+	__atomic_clear(&ad->link_thread_running, __ATOMIC_SEQ_CST);
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 
 	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
@@ -1668,7 +1670,7 @@ txgbe_dev_start(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
 	/* Stop the link setup handler before resetting the HW. */
-	rte_eal_alarm_cancel(txgbe_dev_setup_link_alarm_handler, dev);
+	txgbe_dev_wait_setup_link_complete(dev, 0);
 
 	/* disable uio/vfio intr/eventfd mapping */
 	rte_intr_disable(intr_handle);
@@ -1906,7 +1908,7 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	rte_eal_alarm_cancel(txgbe_dev_setup_link_alarm_handler, dev);
+	txgbe_dev_wait_setup_link_complete(dev, 0);
 
 	/* disable interrupts */
 	txgbe_disable_intr(hw);
@@ -2722,11 +2724,52 @@ txgbe_dev_setup_link_alarm_handler(void *param)
 	intr->flags &= ~TXGBE_FLAG_NEED_LINK_CONFIG;
 }
 
+/*
+ * If @timeout_ms was 0, it means that it will not return until link complete.
+ * It returns 1 on complete, return 0 on timeout.
+ */
+int
+txgbe_dev_wait_setup_link_complete(struct rte_eth_dev *dev, uint32_t timeout_ms)
+{
+#define WARNING_TIMEOUT    9000 /* 9s in total */
+	struct txgbe_adapter *ad = TXGBE_DEV_ADAPTER(dev);
+	uint32_t timeout = timeout_ms ? timeout_ms : WARNING_TIMEOUT;
+
+	while (__atomic_load_n(&ad->link_thread_running, __ATOMIC_SEQ_CST)) {
+		msec_delay(1);
+		timeout--;
+
+		if (timeout_ms) {
+			if (!timeout)
+				return 0;
+		} else if (!timeout) {
+			/* It will not return until link complete */
+			timeout = WARNING_TIMEOUT;
+			PMD_DRV_LOG(ERR, "TXGBE link thread not complete too long time!");
+		}
+	}
+
+	return 1;
+}
+
+static uint32_t
+txgbe_dev_setup_link_thread_handler(void *param)
+{
+	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
+	struct txgbe_adapter *ad = TXGBE_DEV_ADAPTER(dev);
+
+	rte_thread_detach(rte_thread_self());
+	txgbe_dev_setup_link_alarm_handler(dev);
+	__atomic_clear(&ad->link_thread_running, __ATOMIC_SEQ_CST);
+	return 0;
+}
+
 /* return 0 means link status changed, -1 means not changed */
 int
 txgbe_dev_link_update_share(struct rte_eth_dev *dev,
 			    int wait_to_complete)
 {
+	struct txgbe_adapter *ad = TXGBE_DEV_ADAPTER(dev);
 	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
 	struct rte_eth_link link;
 	u32 link_speed = TXGBE_LINK_SPEED_UNKNOWN;
@@ -2763,10 +2806,24 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
 		if ((hw->subsystem_device_id & 0xFF) ==
 				TXGBE_DEV_ID_KR_KX_KX4) {
 			hw->mac.bp_down_event(hw);
-		} else if (hw->phy.media_type == txgbe_media_type_fiber) {
-			intr->flags |= TXGBE_FLAG_NEED_LINK_CONFIG;
-			rte_eal_alarm_set(10,
-				txgbe_dev_setup_link_alarm_handler, dev);
+		} else if (hw->phy.media_type == txgbe_media_type_fiber &&
+				dev->data->dev_conf.intr_conf.lsc != 0) {
+			txgbe_dev_wait_setup_link_complete(dev, 0);
+			if (!__atomic_test_and_set(&ad->link_thread_running, __ATOMIC_SEQ_CST)) {
+				/* To avoid race condition between threads, set
+				 * the TXGBE_FLAG_NEED_LINK_CONFIG flag only
+				 * when there is no link thread running.
+				 */
+				intr->flags |= TXGBE_FLAG_NEED_LINK_CONFIG;
+				if (rte_thread_create(&ad->link_thread_tid, NULL,
+					txgbe_dev_setup_link_thread_handler, dev) < 0) {
+					PMD_DRV_LOG(ERR, "Create link thread failed!");
+					__atomic_clear(&ad->link_thread_running, __ATOMIC_SEQ_CST);
+				}
+			} else {
+				PMD_DRV_LOG(ERR,
+					"Other link thread is running now!");
+			}
 		}
 		return rte_eth_linkstatus_set(dev, &link);
 	} else if (!hw->dev_start) {
diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h
index 6a18865e23..b8a39204e2 100644
--- a/drivers/net/txgbe/txgbe_ethdev.h
+++ b/drivers/net/txgbe/txgbe_ethdev.h
@@ -369,6 +369,9 @@ struct txgbe_adapter {
 
 	/* For RSS reta table update */
 	uint8_t rss_reta_updated;
+
+	uint32_t link_thread_running;
+	rte_thread_t link_thread_tid;
 };
 
 #define TXGBE_DEV_ADAPTER(dev) \
@@ -560,6 +563,9 @@ void txgbe_configure_dcb(struct rte_eth_dev *dev);
 int
 txgbe_dev_link_update_share(struct rte_eth_dev *dev,
 		int wait_to_complete);
+int
+txgbe_dev_wait_setup_link_complete(struct rte_eth_dev *dev,
+		uint32_t timeout_ms);
 int txgbe_pf_host_init(struct rte_eth_dev *eth_dev);
 
 void txgbe_pf_host_uninit(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index 3b1f7c913b..f1341fbf7e 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -165,6 +165,7 @@ eth_txgbevf_dev_init(struct rte_eth_dev *eth_dev)
 {
 	int err;
 	uint32_t tc, tcs;
+	struct txgbe_adapter *ad = eth_dev->data->dev_private;
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
 	struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
 	struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev);
@@ -205,6 +206,7 @@ eth_txgbevf_dev_init(struct rte_eth_dev *eth_dev)
 		return 0;
 	}
 
+	__atomic_clear(&ad->link_thread_running, __ATOMIC_SEQ_CST);
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 
 	hw->device_id = pci_dev->id.device_id;
@@ -618,7 +620,7 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
 	/* Stop the link setup handler before resetting the HW. */
-	rte_eal_alarm_cancel(txgbe_dev_setup_link_alarm_handler, dev);
+	txgbe_dev_wait_setup_link_complete(dev, 0);
 
 	err = hw->mac.reset_hw(hw);
 	if (err) {
@@ -720,7 +722,7 @@ txgbevf_dev_stop(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	rte_eal_alarm_cancel(txgbe_dev_setup_link_alarm_handler, dev);
+	txgbe_dev_wait_setup_link_complete(dev, 0);
 
 	txgbevf_intr_disable(dev);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.846628300 +0800
+++ 0065-net-txgbe-fix-blocking-system-events.patch	2023-08-09 21:51:18.204352000 +0800
@@ -1 +1 @@
-From 5e170dd8b690cd55a2931ddbfe3db0f9b1cad462 Mon Sep 17 00:00:00 2001
+From 09d8d1fe4f7b75079d1aede67252b8c32f210033 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5e170dd8b690cd55a2931ddbfe3db0f9b1cad462 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
- drivers/net/txgbe/txgbe_ethdev.c    | 70 ++++++++++++++++++++++++++---
+ drivers/net/txgbe/txgbe_ethdev.c    | 69 ++++++++++++++++++++++++++---
@@ -24 +26 @@
- 3 files changed, 74 insertions(+), 8 deletions(-)
+ 3 files changed, 73 insertions(+), 8 deletions(-)
@@ -27 +29 @@
-index 74765a469d..d942b542ea 100644
+index 95aef27092..2c7d71c0db 100644
@@ -30 +32 @@
-@@ -546,6 +546,7 @@ null:
+@@ -545,6 +545,7 @@ null:
@@ -38 +40 @@
-@@ -594,6 +595,7 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -593,6 +594,7 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -46 +48,2 @@
-@@ -1680,7 +1682,7 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+@@ -1668,7 +1670,7 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+ 	PMD_INIT_FUNC_TRACE();
@@ -49 +51,0 @@
- 	rte_eal_alarm_cancel(txgbe_dev_detect_sfp, dev);
@@ -55 +57,2 @@
-@@ -1919,7 +1921,7 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -1906,7 +1908,7 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
+ 
@@ -58 +60,0 @@
- 	rte_eal_alarm_cancel(txgbe_dev_detect_sfp, dev);
@@ -64 +66 @@
-@@ -2803,11 +2805,52 @@ txgbe_dev_setup_link_alarm_handler(void *param)
+@@ -2722,11 +2724,52 @@ txgbe_dev_setup_link_alarm_handler(void *param)
@@ -117 +119 @@
-@@ -2844,10 +2887,25 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -2763,10 +2806,24 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -134,2 +136 @@
-+				if (rte_thread_create_control(&ad->link_thread_tid,
-+					"txgbe-link-thread", NULL,
++				if (rte_thread_create(&ad->link_thread_tid, NULL,
@@ -148 +149 @@
-index c59b6370bb..6b296d6fd1 100644
+index 6a18865e23..b8a39204e2 100644
@@ -151 +152 @@
-@@ -370,6 +370,9 @@ struct txgbe_adapter {
+@@ -369,6 +369,9 @@ struct txgbe_adapter {
@@ -161 +162 @@
-@@ -561,6 +564,9 @@ void txgbe_configure_dcb(struct rte_eth_dev *dev);
+@@ -560,6 +563,9 @@ void txgbe_configure_dcb(struct rte_eth_dev *dev);

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'app/testpmd: revert primary process polling all queues fix' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (10 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/txgbe: fix blocking system events' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/hns3: fix non-zero weight for disabled TC' " Xueming Li
                     ` (26 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Song Jiale, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=56b89656df888c122f485125b0c259f9758cf690

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 56b89656df888c122f485125b0c259f9758cf690 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 5 Jul 2023 15:32:06 +0100
Subject: [PATCH] app/testpmd: revert primary process polling all queues fix
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d7d802daf80f4a03c77a815da6d47a7b3657ef2c ]

For some drivers [1], testpmd forwarding is broken with commit [2].

This is because with [2] testpmd gets queue state from ethdev and
forwarding is done only on queues in started state, but some drivers
don't update queue status properly, and this breaks forwarding for those
drivers.

Drivers should be fixed but more time is required to verify drivers
again, instead reverting [2] for now to not break drivers.
Target is to merge [2] back at the beginning of next release cycle and
fix drivers accordingly.

[1]
Bugzilla ID: 1259

[2]
Fixes: 141a520b35f7 ("app/testpmd: fix primary process not polling all queues")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 app/test-pmd/testpmd.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 5c1388a8c0..b69b248e47 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2355,13 +2355,6 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
 		ports[port_id].rxq[queue_id].state =
 			rx_qinfo.queue_state;
 	} else if (rc == -ENOTSUP) {
-		/*
-		 * Do not change the rxq state for primary process
-		 * to ensure that the PMDs do not implement
-		 * rte_eth_rx_queue_info_get can forward as before.
-		 */
-		if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-			return;
 		/*
 		 * Set the rxq state to RTE_ETH_QUEUE_STATE_STARTED
 		 * to ensure that the PMDs do not implement
@@ -2387,13 +2380,6 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
 		ports[port_id].txq[queue_id].state =
 			tx_qinfo.queue_state;
 	} else if (rc == -ENOTSUP) {
-		/*
-		 * Do not change the txq state for primary process
-		 * to ensure that the PMDs do not implement
-		 * rte_eth_tx_queue_info_get can forward as before.
-		 */
-		if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-			return;
 		/*
 		 * Set the txq state to RTE_ETH_QUEUE_STATE_STARTED
 		 * to ensure that the PMDs do not implement
@@ -2461,7 +2447,8 @@ start_packet_forwarding(int with_tx_first)
 		return;
 
 	if (stream_init != NULL) {
-		update_queue_state();
+		if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+			update_queue_state();
 		for (i = 0; i < cur_fwd_config.nb_fwd_streams; i++)
 			stream_init(fwd_streams[i]);
 	}
@@ -3224,7 +3211,8 @@ start_port(portid_t pid)
 		pl[cfg_pi++] = pi;
 	}
 
-	update_queue_state();
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+		update_queue_state();
 
 	if (at_least_one_port_successfully_started && !no_link_check)
 		check_all_ports_link_status(RTE_PORT_ALL);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.869420300 +0800
+++ 0066-app-testpmd-revert-primary-process-polling-all-queue.patch	2023-08-09 21:51:18.214352000 +0800
@@ -1 +1 @@
-From d7d802daf80f4a03c77a815da6d47a7b3657ef2c Mon Sep 17 00:00:00 2001
+From 56b89656df888c122f485125b0c259f9758cf690 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d7d802daf80f4a03c77a815da6d47a7b3657ef2c ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -29,3 +31,2 @@
- app/test-pmd/testpmd.c                 | 20 ++++----------------
- doc/guides/rel_notes/release_23_07.rst |  9 +++++++++
- 2 files changed, 13 insertions(+), 16 deletions(-)
+ app/test-pmd/testpmd.c | 20 ++++----------------
+ 1 file changed, 4 insertions(+), 16 deletions(-)
@@ -34 +35 @@
-index 1fc70650e0..c6ad9b18bf 100644
+index 5c1388a8c0..b69b248e47 100644
@@ -37 +38 @@
-@@ -2424,13 +2424,6 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
+@@ -2355,13 +2355,6 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
@@ -51 +52 @@
-@@ -2456,13 +2449,6 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
+@@ -2387,13 +2380,6 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
@@ -65 +66 @@
-@@ -2530,7 +2516,8 @@ start_packet_forwarding(int with_tx_first)
+@@ -2461,7 +2447,8 @@ start_packet_forwarding(int with_tx_first)
@@ -75 +76 @@
-@@ -3293,7 +3280,8 @@ start_port(portid_t pid)
+@@ -3224,7 +3211,8 @@ start_port(portid_t pid)
@@ -85,20 +85,0 @@
-diff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst
-index be8027f71a..234650ac39 100644
---- a/doc/guides/rel_notes/release_23_07.rst
-+++ b/doc/guides/rel_notes/release_23_07.rst
-@@ -286,6 +286,15 @@ Known Issues
-    Also, make sure to start the actual text at the margin.
-    =======================================================
- 
-+* **Testpmd is not forwarding on queues individually stopped.**
-+
-+  Testpmd forwards packets on started queues.
-+  If a queue explicitly stopped, and later port stopped and started again,
-+  the status of the previously stopped queue is not updated,
-+  so forwarding is not working on those queues.
-+
-+  As a workaround start queues back explicitly, instead of port stop/start.
-+
- 
- Tested Platforms
- ----------------

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/hns3: fix non-zero weight for disabled TC' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (11 preceding siblings ...)
  2023-08-09 23:58   ` patch 'app/testpmd: revert primary process polling all queues fix' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'app/testpmd: fix flow rule number parsing' " Xueming Li
                     ` (25 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=36791bbc4b30bd40800a41efd850b6e0623774ce

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 36791bbc4b30bd40800a41efd850b6e0623774ce Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 7 Jul 2023 18:40:53 +0800
Subject: [PATCH] net/hns3: fix non-zero weight for disabled TC
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1abcdb3f247393a04703071452b560a77ab23c04 ]

hns3 PF driver enables one TC, allocates to 100% weight for this
TC and 0% for other disabled TC by default. But driver modifies
the weight to 1% for disabled TC and then set to hardware to make
all TC work in DWRR mode. As a result, the total percent of all TC
is more than 100%. Actually, this operation is also redundant,
because these disabled TC will never be used. So this patch sets
the weight of all TC based on user's configuration.

Fixes: 62e3ccc2b94c ("net/hns3: support flow control")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_dcb.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index af045b22f7..07b8c46a81 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -237,9 +237,9 @@ hns3_dcb_qs_weight_cfg(struct hns3_hw *hw, uint16_t qs_id, uint8_t dwrr)
 static int
 hns3_dcb_ets_tc_dwrr_cfg(struct hns3_hw *hw)
 {
-#define DEFAULT_TC_WEIGHT	1
 #define DEFAULT_TC_OFFSET	14
 	struct hns3_ets_tc_weight_cmd *ets_weight;
+	struct hns3_pg_info *pg_info;
 	struct hns3_cmd_desc desc;
 	uint8_t i;
 
@@ -247,13 +247,6 @@ hns3_dcb_ets_tc_dwrr_cfg(struct hns3_hw *hw)
 	ets_weight = (struct hns3_ets_tc_weight_cmd *)desc.data;
 
 	for (i = 0; i < HNS3_MAX_TC_NUM; i++) {
-		struct hns3_pg_info *pg_info;
-
-		ets_weight->tc_weight[i] = DEFAULT_TC_WEIGHT;
-
-		if (!(hw->hw_tc_map & BIT(i)))
-			continue;
-
 		pg_info = &hw->dcb_info.pg_info[hw->dcb_info.tc_info[i].pgid];
 		ets_weight->tc_weight[i] = pg_info->tc_dwrr[i];
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.893984700 +0800
+++ 0067-net-hns3-fix-non-zero-weight-for-disabled-TC.patch	2023-08-09 21:51:18.214352000 +0800
@@ -1 +1 @@
-From 1abcdb3f247393a04703071452b560a77ab23c04 Mon Sep 17 00:00:00 2001
+From 36791bbc4b30bd40800a41efd850b6e0623774ce Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1abcdb3f247393a04703071452b560a77ab23c04 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'app/testpmd: fix flow rule number parsing' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (12 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/hns3: fix non-zero weight for disabled TC' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/mana: fix counter overflow for posted WQE' " Xueming Li
                     ` (24 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=626cc012ccc96a76eebde80739274bb8a23e8ca4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 626cc012ccc96a76eebde80739274bb8a23e8ca4 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Fri, 30 Jun 2023 16:30:02 +0300
Subject: [PATCH] app/testpmd: fix flow rule number parsing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 70a7d9bc4d3fd7f2f2c89f1721daa4c99f60f987 ]

When creating a template table, the object pointer of the
command line "struct context" was set with an offset from the
original out buffer if there is a template ID.

If the "rules_number" is specified after the template IDs, it
couldn't be set and passed to the API correctly. With this commit,
the pointer is reset before pasring the "rules_number" field.

Fixes: c4b38873346b ("app/testpmd: add flow table management")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 042da57a61..b30fad18ad 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -2940,6 +2940,7 @@ static const struct token token_list[] = {
 			     NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct buffer,
 					args.table.attr.nb_flows)),
+		.call = parse_table,
 	},
 	[TABLE_PATTERN_TEMPLATE] = {
 		.name = "pattern_template",
@@ -8993,6 +8994,11 @@ parse_table(struct context *ctx, const struct token *token,
 	case TABLE_TRANSFER:
 		out->args.table.attr.flow_attr.transfer = 1;
 		return len;
+		return len;
+	case TABLE_RULES_NUMBER:
+		ctx->objdata = 0;
+		ctx->object = out;
+		ctx->objmask = NULL;
 	default:
 		return -1;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.915009500 +0800
+++ 0068-app-testpmd-fix-flow-rule-number-parsing.patch	2023-08-09 21:51:18.214352000 +0800
@@ -1 +1 @@
-From 70a7d9bc4d3fd7f2f2c89f1721daa4c99f60f987 Mon Sep 17 00:00:00 2001
+From 626cc012ccc96a76eebde80739274bb8a23e8ca4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 70a7d9bc4d3fd7f2f2c89f1721daa4c99f60f987 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 8557704785..94827bcc4a 100644
+index 042da57a61..b30fad18ad 100644
@@ -27 +29 @@
-@@ -3390,6 +3390,7 @@ static const struct token token_list[] = {
+@@ -2940,6 +2940,7 @@ static const struct token token_list[] = {
@@ -35,3 +37,3 @@
-@@ -10234,6 +10235,11 @@ parse_table(struct context *ctx, const struct token *token,
- 			return -1;
- 		out->args.table.attr.specialize = RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_VPORT_ORIG;
+@@ -8993,6 +8994,11 @@ parse_table(struct context *ctx, const struct token *token,
+ 	case TABLE_TRANSFER:
+ 		out->args.table.attr.flow_attr.transfer = 1;
@@ -38,0 +41 @@
++		return len;
@@ -43 +45,0 @@
-+		return len;

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mana: fix counter overflow for posted WQE' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (13 preceding siblings ...)
  2023-08-09 23:58   ` patch 'app/testpmd: fix flow rule number parsing' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/mana: fix WQE count for ringing RQ doorbell' " Xueming Li
                     ` (23 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=0a2bee7f05a49852d046c8bb89e28728da22f0bd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0a2bee7f05a49852d046c8bb89e28728da22f0bd Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Mon, 10 Jul 2023 16:51:07 -0700
Subject: [PATCH] net/mana: fix counter overflow for posted WQE
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8a56ff3d246899b77b81c6450680214a8697749b ]

This counter should set to uint16_t, the same type as pkt_received.
Otherwise, it may overflow when pkt_received goes over 256.

Thanks Xinhao Kong <t-kongxinhao@microsoft.com> for debugging this.

Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c
index 6e1c397be8..5c5f609ece 100644
--- a/drivers/net/mana/rx.c
+++ b/drivers/net/mana/rx.c
@@ -380,7 +380,7 @@ uint16_t
 mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 {
 	uint16_t pkt_received = 0;
-	uint8_t wqe_posted = 0;
+	uint16_t wqe_posted = 0;
 	struct mana_rxq *rxq = dpdk_rxq;
 	struct mana_priv *priv = rxq->priv;
 	struct rte_mbuf *mbuf;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.941468600 +0800
+++ 0069-net-mana-fix-counter-overflow-for-posted-WQE.patch	2023-08-09 21:51:18.214352000 +0800
@@ -1 +1 @@
-From 8a56ff3d246899b77b81c6450680214a8697749b Mon Sep 17 00:00:00 2001
+From 0a2bee7f05a49852d046c8bb89e28728da22f0bd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8a56ff3d246899b77b81c6450680214a8697749b ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 220b372b15..6ba0a712ef 100644
+index 6e1c397be8..5c5f609ece 100644
@@ -23 +25 @@
-@@ -384,7 +384,7 @@ uint16_t
+@@ -380,7 +380,7 @@ uint16_t

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mana: fix WQE count for ringing RQ doorbell' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (14 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/mana: fix counter overflow for posted WQE' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/hns3: fix index to look up table in NEON Rx' " Xueming Li
                     ` (22 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=17a066c87e0d4e38a5eeaea8393da1255050177e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 17a066c87e0d4e38a5eeaea8393da1255050177e Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Mon, 10 Jul 2023 16:51:47 -0700
Subject: [PATCH] net/mana: fix WQE count for ringing RQ doorbell
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 304ad3268b66c746d7e6d98840a64f17a3f48e53 ]

The hardware specification specifies that WQE_COUNT should set to 0 for
the Receive Queue. Although currently the hardware doesn't enforce the
check, in the future releases it may check on this value.

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/mana.h |  2 +-
 drivers/net/mana/rx.c   | 11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h
index b653e1dd82..7dfacd57f3 100644
--- a/drivers/net/mana/mana.h
+++ b/drivers/net/mana/mana.h
@@ -452,7 +452,7 @@ extern int mana_logtype_init;
 
 int mana_ring_doorbell(void *db_page, enum gdma_queue_types queue_type,
 		       uint32_t queue_id, uint32_t tail, uint8_t arm);
-int mana_rq_ring_doorbell(struct mana_rxq *rxq, uint8_t arm);
+int mana_rq_ring_doorbell(struct mana_rxq *rxq);
 
 int gdma_post_work_request(struct mana_gdma_queue *queue,
 			   struct gdma_work_request *work_req,
diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c
index 5c5f609ece..fdb56ce05d 100644
--- a/drivers/net/mana/rx.c
+++ b/drivers/net/mana/rx.c
@@ -22,7 +22,7 @@ static uint8_t mana_rss_hash_key_default[TOEPLITZ_HASH_KEY_SIZE_IN_BYTES] = {
 };
 
 int
-mana_rq_ring_doorbell(struct mana_rxq *rxq, uint8_t arm)
+mana_rq_ring_doorbell(struct mana_rxq *rxq)
 {
 	struct mana_priv *priv = rxq->priv;
 	int ret;
@@ -36,10 +36,13 @@ mana_rq_ring_doorbell(struct mana_rxq *rxq, uint8_t arm)
 		db_page = process_priv->db_page;
 	}
 
+	/* Hardware Spec specifies that software client should set 0 for
+	 * wqe_cnt for Receive Queues.
+	 */
 	ret = mana_ring_doorbell(db_page, GDMA_QUEUE_RECEIVE,
 			 rxq->gdma_rq.id,
 			 rxq->gdma_rq.head * GDMA_WQE_ALIGNMENT_UNIT_SIZE,
-			 arm);
+			 0);
 
 	if (ret)
 		DP_LOG(ERR, "failed to ring RX doorbell ret %d", ret);
@@ -120,7 +123,7 @@ mana_alloc_and_post_rx_wqes(struct mana_rxq *rxq)
 		}
 	}
 
-	mana_rq_ring_doorbell(rxq, rxq->num_desc);
+	mana_rq_ring_doorbell(rxq);
 
 	return ret;
 }
@@ -470,7 +473,7 @@ drop:
 	}
 
 	if (wqe_posted)
-		mana_rq_ring_doorbell(rxq, wqe_posted);
+		mana_rq_ring_doorbell(rxq);
 
 	return pkt_received;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.961885400 +0800
+++ 0070-net-mana-fix-WQE-count-for-ringing-RQ-doorbell.patch	2023-08-09 21:51:18.214352000 +0800
@@ -1 +1 @@
-From 304ad3268b66c746d7e6d98840a64f17a3f48e53 Mon Sep 17 00:00:00 2001
+From 17a066c87e0d4e38a5eeaea8393da1255050177e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 304ad3268b66c746d7e6d98840a64f17a3f48e53 ]
@@ -10,2 +12,0 @@
-Cc: stable@dpdk.org
-
@@ -19 +20 @@
-index dfeda531eb..5801491d75 100644
+index b653e1dd82..7dfacd57f3 100644
@@ -22 +23 @@
-@@ -457,7 +457,7 @@ extern int mana_logtype_init;
+@@ -452,7 +452,7 @@ extern int mana_logtype_init;
@@ -32 +33 @@
-index 6ba0a712ef..14d9085801 100644
+index 5c5f609ece..fdb56ce05d 100644
@@ -68 +69 @@
-@@ -517,7 +520,7 @@ drop:
+@@ -470,7 +473,7 @@ drop:

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/hns3: fix index to look up table in NEON Rx' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (15 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/mana: fix WQE count for ringing RQ doorbell' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'ethdev: fix potential leak in PCI probing helper' " Xueming Li
                     ` (21 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=7356dae686815bb57a125cb21ab983423a42a8f4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7356dae686815bb57a125cb21ab983423a42a8f4 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 11 Jul 2023 18:24:44 +0800
Subject: [PATCH] net/hns3: fix index to look up table in NEON Rx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6bec7c50be7a38c114680481f285976142df40d0 ]

In hns3_recv_burst_vec(), the index to get packet length and data
size are reversed. Fortunately, this doesn't affect functionality
because the NEON Rx only supports single BD in which the packet
length is equal to the date size. Now this patch fixes it to get
back to the truth.

Fixes: a3d4f4d291d7 ("net/hns3: support NEON Rx")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_rxtx_vec_neon.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h
index 55d9bf817d..a20a6b6acb 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_neon.h
+++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h
@@ -142,8 +142,8 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
 	/* mask to shuffle from desc to mbuf's rx_descriptor_fields1 */
 	uint8x16_t shuf_desc_fields_msk = {
 		0xff, 0xff, 0xff, 0xff,  /* packet type init zero */
-		22, 23, 0xff, 0xff,      /* rx.pkt_len to rte_mbuf.pkt_len */
-		20, 21,	                 /* size to rte_mbuf.data_len */
+		20, 21, 0xff, 0xff,      /* rx.pkt_len to rte_mbuf.pkt_len */
+		22, 23,	                 /* size to rte_mbuf.data_len */
 		0xff, 0xff,	         /* rte_mbuf.vlan_tci init zero */
 		8, 9, 10, 11,	         /* rx.rss_hash to rte_mbuf.hash.rss */
 	};
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:19.982351000 +0800
+++ 0071-net-hns3-fix-index-to-look-up-table-in-NEON-Rx.patch	2023-08-09 21:51:18.214352000 +0800
@@ -1 +1 @@
-From 6bec7c50be7a38c114680481f285976142df40d0 Mon Sep 17 00:00:00 2001
+From 7356dae686815bb57a125cb21ab983423a42a8f4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6bec7c50be7a38c114680481f285976142df40d0 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 6c49c70fc7..564d831a48 100644
+index 55d9bf817d..a20a6b6acb 100644

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'ethdev: fix potential leak in PCI probing helper' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (16 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/hns3: fix index to look up table in NEON Rx' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/mlx5: fix flow dump for modify field' " Xueming Li
                     ` (20 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Kaiyu Zhang; +Cc: Chengwen Feng, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=5aa903d5ef85d3eb38157c1b0837fce8e22c8e71

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5aa903d5ef85d3eb38157c1b0837fce8e22c8e71 Mon Sep 17 00:00:00 2001
From: Kaiyu Zhang <squirrel.prog@gmail.com>
Date: Tue, 11 Jul 2023 01:18:09 +0000
Subject: [PATCH] ethdev: fix potential leak in PCI probing helper
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1f00a6a037040a7c6ba883e2c312894c6ebc4c32 ]

Sanity check is performed after a rte_eth_dev object is allocated.

The object is not freed if the check fails, though in the current
reality this never happens, but it's better programming paradigm
to move the quick check up front to the start of
rte_eth_dev_pci_generic_probe().

Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers")

Signed-off-by: Kaiyu Zhang <squirrel.prog@gmail.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                | 1 +
 lib/ethdev/ethdev_pci.h | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index 6b38c488c2..a20c942643 100644
--- a/.mailmap
+++ b/.mailmap
@@ -678,6 +678,7 @@ Juraj Linkeš <juraj.linkes@pantheon.tech>
 Kai Ji <kai.ji@intel.com>
 Kaijun Zeng <corezeng@gmail.com>
 Kaiwen Deng <kaiwenx.deng@intel.com>
+Kaiyu Zhang <squirrel.prog@gmail.com>
 Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Kamalakannan R <kamalakannan.r@intel.com>
 Kamalakshitha Aligeri <kamalakshitha.aligeri@arm.com>
diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h
index 94b8fba5d7..320e3e0093 100644
--- a/lib/ethdev/ethdev_pci.h
+++ b/lib/ethdev/ethdev_pci.h
@@ -126,12 +126,13 @@ rte_eth_dev_pci_generic_probe(struct rte_pci_device *pci_dev,
 	struct rte_eth_dev *eth_dev;
 	int ret;
 
+	if (*dev_init == NULL)
+		return -EINVAL;
+
 	eth_dev = rte_eth_dev_pci_allocate(pci_dev, private_data_size);
 	if (!eth_dev)
 		return -ENOMEM;
 
-	if (*dev_init == NULL)
-		return -EINVAL;
 	ret = dev_init(eth_dev);
 	if (ret)
 		rte_eth_dev_release_port(eth_dev);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.002615400 +0800
+++ 0072-ethdev-fix-potential-leak-in-PCI-probing-helper.patch	2023-08-09 21:51:18.214352000 +0800
@@ -1 +1 @@
-From 1f00a6a037040a7c6ba883e2c312894c6ebc4c32 Mon Sep 17 00:00:00 2001
+From 5aa903d5ef85d3eb38157c1b0837fce8e22c8e71 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1f00a6a037040a7c6ba883e2c312894c6ebc4c32 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index d200f36339..6c28ea798d 100644
+index 6b38c488c2..a20c942643 100644
@@ -28 +30,2 @@
-@@ -698,6 +698,7 @@ Kai Ji <kai.ji@intel.com>
+@@ -678,6 +678,7 @@ Juraj Linkeš <juraj.linkes@pantheon.tech>
+ Kai Ji <kai.ji@intel.com>
@@ -30 +32,0 @@
- Kaisen You <kaisenx.you@intel.com>

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix flow dump for modify field' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (17 preceding siblings ...)
  2023-08-09 23:58   ` patch 'ethdev: fix potential leak in PCI probing helper' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/mlx5: fix error set in Tx representor tagging' " Xueming Li
                     ` (19 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Sean Zhang; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=fa39f4c3582f719937e87e7b50490c5742e725dd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fa39f4c3582f719937e87e7b50490c5742e725dd Mon Sep 17 00:00:00 2001
From: Sean Zhang <xiazhang@nvidia.com>
Date: Thu, 29 Jun 2023 13:00:44 +0300
Subject: [PATCH] net/mlx5: fix flow dump for modify field
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit faecafc16f69c559323ec46ef110a771ce0bd7fb ]

When using other process to dump flow information, the modify field
information cannot be dumpped due to incorrect lcore value. Add loop
to get modify field information from all lcore to fix the issue.

Fixes: a7ac7fae4919 ("net/mlx5: enhance flow dump")

Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 58 +++++++++++++++++++++++++-----------
 1 file changed, 41 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index f4487bc136..54cab0ec05 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -9775,23 +9775,47 @@ mlx5_flow_dev_dump_sh_all(struct rte_eth_dev *dev,
 		}
 		i = lcore_index;
 
-		for (j = 0; j <= h->mask; j++) {
-			l_inconst = &h->buckets[j].l;
-			if (!l_inconst || !l_inconst->cache[i])
-				continue;
-
-			e = LIST_FIRST(&l_inconst->cache[i]->h);
-			while (e) {
-				modify_hdr =
-				(struct mlx5_flow_dv_modify_hdr_resource *)e;
-				data = (const uint8_t *)modify_hdr->actions;
-				size = (size_t)(modify_hdr->actions_num) * 8;
-				actions_num = modify_hdr->actions_num;
-				id = (uint64_t)(uintptr_t)modify_hdr->action;
-				type = DR_DUMP_REC_TYPE_PMD_MODIFY_HDR;
-				save_dump_file(data, size, type, id,
-						(void *)(&actions_num), file);
-				e = LIST_NEXT(e, next);
+		if (lcore_index == MLX5_LIST_NLCORE) {
+			for (i = 0; i <= (uint32_t)lcore_index; i++) {
+				for (j = 0; j <= h->mask; j++) {
+					l_inconst = &h->buckets[j].l;
+					if (!l_inconst || !l_inconst->cache[i])
+						continue;
+
+					e = LIST_FIRST(&l_inconst->cache[i]->h);
+					while (e) {
+						modify_hdr =
+						(struct mlx5_flow_dv_modify_hdr_resource *)e;
+						data = (const uint8_t *)modify_hdr->actions;
+						size = (size_t)(modify_hdr->actions_num) * 8;
+						actions_num = modify_hdr->actions_num;
+						id = (uint64_t)(uintptr_t)modify_hdr->action;
+						type = DR_DUMP_REC_TYPE_PMD_MODIFY_HDR;
+						save_dump_file(data, size, type, id,
+								(void *)(&actions_num), file);
+						e = LIST_NEXT(e, next);
+					}
+				}
+			}
+		} else {
+			for (j = 0; j <= h->mask; j++) {
+				l_inconst = &h->buckets[j].l;
+				if (!l_inconst || !l_inconst->cache[i])
+					continue;
+
+				e = LIST_FIRST(&l_inconst->cache[i]->h);
+				while (e) {
+					modify_hdr =
+					(struct mlx5_flow_dv_modify_hdr_resource *)e;
+					data = (const uint8_t *)modify_hdr->actions;
+					size = (size_t)(modify_hdr->actions_num) * 8;
+					actions_num = modify_hdr->actions_num;
+					id = (uint64_t)(uintptr_t)modify_hdr->action;
+					type = DR_DUMP_REC_TYPE_PMD_MODIFY_HDR;
+					save_dump_file(data, size, type, id,
+							(void *)(&actions_num), file);
+					e = LIST_NEXT(e, next);
+				}
 			}
 		}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.025556500 +0800
+++ 0073-net-mlx5-fix-flow-dump-for-modify-field.patch	2023-08-09 21:51:18.224352000 +0800
@@ -1 +1 @@
-From faecafc16f69c559323ec46ef110a771ce0bd7fb Mon Sep 17 00:00:00 2001
+From fa39f4c3582f719937e87e7b50490c5742e725dd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit faecafc16f69c559323ec46ef110a771ce0bd7fb ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index cf83db7b60..abb86241fc 100644
+index f4487bc136..54cab0ec05 100644
@@ -23 +25 @@
-@@ -10390,23 +10390,47 @@ mlx5_flow_dev_dump_sh_all(struct rte_eth_dev *dev,
+@@ -9775,23 +9775,47 @@ mlx5_flow_dev_dump_sh_all(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix error set in Tx representor tagging' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (18 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/mlx5: fix flow dump for modify field' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/mlx5: fix return value of vport action' " Xueming Li
                     ` (18 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=0a632c40ee7dcbfc4688c7e52cc54a353e290050

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0a632c40ee7dcbfc4688c7e52cc54a353e290050 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Fri, 30 Jun 2023 12:13:14 +0300
Subject: [PATCH] net/mlx5: fix error set in Tx representor tagging
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 39ea353caf9bd0e671a2ad600a70608cf11c1898 ]

In the previous implementation, the error information was not set
when there was a failure during the initialization.

The pointer from the user should be passed to the called functions
to be set properly before returning.

Fixes: 483181f7b6dd ("net/mlx5: support device control of representor matching")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 42 +++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 18 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index ea0159406f..60afc268bc 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -5295,12 +5295,14 @@ flow_hw_free_vport_actions(struct mlx5_priv *priv)
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param[out] error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to pattern template on success. NULL otherwise, and rte_errno is set.
  */
 static struct rte_flow_pattern_template *
-flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev)
+flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev, struct rte_flow_error *error)
 {
 	struct rte_flow_pattern_template_attr attr = {
 		.relaxed_matching = 0,
@@ -5319,7 +5321,7 @@ flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev)
 		},
 	};
 
-	return flow_hw_pattern_template_create(dev, &attr, items, NULL);
+	return flow_hw_pattern_template_create(dev, &attr, items, error);
 }
 
 static __rte_always_inline uint32_t
@@ -5377,12 +5379,15 @@ flow_hw_update_action_mask(struct rte_flow_action *action,
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param[out] error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to actions template on success. NULL otherwise, and rte_errno is set.
  */
 static struct rte_flow_actions_template *
-flow_hw_create_tx_repr_tag_jump_acts_tmpl(struct rte_eth_dev *dev)
+flow_hw_create_tx_repr_tag_jump_acts_tmpl(struct rte_eth_dev *dev,
+					  struct rte_flow_error *error)
 {
 	uint32_t tag_mask = flow_hw_tx_tag_regc_mask(dev);
 	uint32_t tag_value = flow_hw_tx_tag_regc_value(dev);
@@ -5468,7 +5473,7 @@ flow_hw_create_tx_repr_tag_jump_acts_tmpl(struct rte_eth_dev *dev)
 				   NULL, NULL);
 	idx++;
 	MLX5_ASSERT(idx <= RTE_DIM(actions_v));
-	return flow_hw_actions_template_create(dev, &attr, actions_v, actions_m, NULL);
+	return flow_hw_actions_template_create(dev, &attr, actions_v, actions_m, error);
 }
 
 static void
@@ -5497,12 +5502,14 @@ flow_hw_cleanup_tx_repr_tagging(struct rte_eth_dev *dev)
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param[out] error
+ *   Pointer to error structure.
  *
  * @return
  *   0 on success, negative errno value otherwise.
  */
 static int
-flow_hw_setup_tx_repr_tagging(struct rte_eth_dev *dev)
+flow_hw_setup_tx_repr_tagging(struct rte_eth_dev *dev, struct rte_flow_error *error)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct rte_flow_template_table_attr attr = {
@@ -5520,20 +5527,22 @@ flow_hw_setup_tx_repr_tagging(struct rte_eth_dev *dev)
 
 	MLX5_ASSERT(priv->sh->config.dv_esw_en);
 	MLX5_ASSERT(priv->sh->config.repr_matching);
-	priv->hw_tx_repr_tagging_pt = flow_hw_create_tx_repr_sq_pattern_tmpl(dev);
+	priv->hw_tx_repr_tagging_pt =
+		flow_hw_create_tx_repr_sq_pattern_tmpl(dev, error);
 	if (!priv->hw_tx_repr_tagging_pt)
-		goto error;
-	priv->hw_tx_repr_tagging_at = flow_hw_create_tx_repr_tag_jump_acts_tmpl(dev);
+		goto err;
+	priv->hw_tx_repr_tagging_at =
+		flow_hw_create_tx_repr_tag_jump_acts_tmpl(dev, error);
 	if (!priv->hw_tx_repr_tagging_at)
-		goto error;
+		goto err;
 	priv->hw_tx_repr_tagging_tbl = flow_hw_table_create(dev, &cfg,
 							    &priv->hw_tx_repr_tagging_pt, 1,
 							    &priv->hw_tx_repr_tagging_at, 1,
-							    NULL);
+							    error);
 	if (!priv->hw_tx_repr_tagging_tbl)
-		goto error;
+		goto err;
 	return 0;
-error:
+err:
 	flow_hw_cleanup_tx_repr_tagging(dev);
 	return -rte_errno;
 }
@@ -6860,8 +6869,7 @@ flow_hw_configure(struct rte_eth_dev *dev,
 		goto err;
 	}
 
-	memcpy(_queue_attr, queue_attr,
-	       sizeof(void *) * nb_queue);
+	memcpy(_queue_attr, queue_attr, sizeof(void *) * nb_queue);
 	_queue_attr[nb_queue] = &ctrl_queue_attr;
 	priv->acts_ipool = mlx5_ipool_create(&cfg);
 	if (!priv->acts_ipool)
@@ -6976,11 +6984,9 @@ flow_hw_configure(struct rte_eth_dev *dev,
 			goto err;
 	}
 	if (priv->sh->config.dv_esw_en && priv->sh->config.repr_matching) {
-		ret = flow_hw_setup_tx_repr_tagging(dev);
-		if (ret) {
-			rte_errno = -ret;
+		ret = flow_hw_setup_tx_repr_tagging(dev, error);
+		if (ret)
 			goto err;
-		}
 	}
 	if (is_proxy) {
 		ret = flow_hw_create_vport_actions(priv);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.052060700 +0800
+++ 0074-net-mlx5-fix-error-set-in-Tx-representor-tagging.patch	2023-08-09 21:51:18.224352000 +0800
@@ -1 +1 @@
-From 39ea353caf9bd0e671a2ad600a70608cf11c1898 Mon Sep 17 00:00:00 2001
+From 0a632c40ee7dcbfc4688c7e52cc54a353e290050 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 39ea353caf9bd0e671a2ad600a70608cf11c1898 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +20,2 @@
- drivers/net/mlx5/mlx5_flow_hw.c | 44 +++++++++++++++++++--------------
- 1 file changed, 25 insertions(+), 19 deletions(-)
+ drivers/net/mlx5/mlx5_flow_hw.c | 42 +++++++++++++++++++--------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
@@ -22 +24 @@
-index a0c7956626..697da91f03 100644
+index ea0159406f..60afc268bc 100644
@@ -25 +27 @@
-@@ -5965,12 +5965,14 @@ flow_hw_destroy_send_to_kernel_action(struct mlx5_priv *priv)
+@@ -5295,12 +5295,14 @@ flow_hw_free_vport_actions(struct mlx5_priv *priv)
@@ -41 +43 @@
-@@ -5989,7 +5991,7 @@ flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev)
+@@ -5319,7 +5321,7 @@ flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev)
@@ -50 +52 @@
-@@ -6047,12 +6049,15 @@ flow_hw_update_action_mask(struct rte_flow_action *action,
+@@ -5377,12 +5379,15 @@ flow_hw_update_action_mask(struct rte_flow_action *action,
@@ -67 +69 @@
-@@ -6141,7 +6146,7 @@ flow_hw_create_tx_repr_tag_jump_acts_tmpl(struct rte_eth_dev *dev)
+@@ -5468,7 +5473,7 @@ flow_hw_create_tx_repr_tag_jump_acts_tmpl(struct rte_eth_dev *dev)
@@ -76 +78 @@
-@@ -6170,12 +6175,14 @@ flow_hw_cleanup_tx_repr_tagging(struct rte_eth_dev *dev)
+@@ -5497,12 +5502,14 @@ flow_hw_cleanup_tx_repr_tagging(struct rte_eth_dev *dev)
@@ -92 +94 @@
-@@ -6193,20 +6200,22 @@ flow_hw_setup_tx_repr_tagging(struct rte_eth_dev *dev)
+@@ -5520,20 +5527,22 @@ flow_hw_setup_tx_repr_tagging(struct rte_eth_dev *dev)
@@ -122 +124 @@
-@@ -7638,8 +7647,7 @@ flow_hw_configure(struct rte_eth_dev *dev,
+@@ -6860,8 +6869,7 @@ flow_hw_configure(struct rte_eth_dev *dev,
@@ -132,10 +134 @@
-@@ -7732,7 +7740,7 @@ flow_hw_configure(struct rte_eth_dev *dev,
- 		MLX5_ASSERT(rte_eth_dev_is_valid_port(port_attr->host_port_id));
- 		if (is_proxy) {
- 			DRV_LOG(ERR, "cross vHCA shared mode not supported "
--				     " for E-Switch confgiurations");
-+				"for E-Switch confgiurations");
- 			rte_errno = ENOTSUP;
- 			goto err;
- 		}
-@@ -7816,11 +7824,9 @@ flow_hw_configure(struct rte_eth_dev *dev,
+@@ -6976,11 +6984,9 @@ flow_hw_configure(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix return value of vport action' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (19 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/mlx5: fix error set in Tx representor tagging' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/mlx5: fix error set in control tables create' " Xueming Li
                     ` (17 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=d8bdfa579e421030173f06fffd047112cc9c8f2c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d8bdfa579e421030173f06fffd047112cc9c8f2c Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Fri, 30 Jun 2023 12:21:34 +0300
Subject: [PATCH] net/mlx5: fix return value of vport action
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d0f8a9ae22a02455233052ee06c6c3bacd3c59f3 ]

The "rte_flow_error" should be set in case a invalid pointer access
to the message member.

Fixes: 1939eb6f660c ("net/mlx5: support flow port action with HWS")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 60afc268bc..ccd78990a6 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -6991,7 +6991,8 @@ flow_hw_configure(struct rte_eth_dev *dev,
 	if (is_proxy) {
 		ret = flow_hw_create_vport_actions(priv);
 		if (ret) {
-			rte_errno = -ret;
+			rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+					   NULL, "Failed to create vport actions.");
 			goto err;
 		}
 		ret = flow_hw_create_ctrl_tables(dev);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.079508300 +0800
+++ 0075-net-mlx5-fix-return-value-of-vport-action.patch	2023-08-09 21:51:18.224352000 +0800
@@ -1 +1 @@
-From d0f8a9ae22a02455233052ee06c6c3bacd3c59f3 Mon Sep 17 00:00:00 2001
+From d8bdfa579e421030173f06fffd047112cc9c8f2c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d0f8a9ae22a02455233052ee06c6c3bacd3c59f3 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 697da91f03..0a9b7700e0 100644
+index 60afc268bc..ccd78990a6 100644
@@ -22 +24 @@
-@@ -7831,7 +7831,8 @@ flow_hw_configure(struct rte_eth_dev *dev,
+@@ -6991,7 +6991,8 @@ flow_hw_configure(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix error set in control tables create' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (20 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/mlx5: fix return value of vport action' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/mlx5: fix error set for age pool initialization' " Xueming Li
                     ` (16 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Suanming Mou, Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=6f086a7a7497e454ec00b842a1f578bbf302c16b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6f086a7a7497e454ec00b842a1f578bbf302c16b Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Fri, 30 Jun 2023 12:46:35 +0300
Subject: [PATCH] net/mlx5: fix error set in control tables create
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0dc3b3d06823770c85eacd5b9f70132e69ac75b2 ]

When some failure occurs in the flow_hw_create_ctrl_tables(), the
"rte_flow_error" should be set properly with all needed information.
Then the rte_errno and the "message" will reflect the actual failure.

This will also solve the crash when trying to access the "message".

Fixes: 1939eb6f660c ("net/mlx5: support flow port action with HWS")
Fixes: 483181f7b6dd ("net/mlx5: support device control of representor matching")
Fixes: ddb68e47331e ("net/mlx5: add extended metadata mode for HWS")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 176 +++++++++++++++++++-------------
 1 file changed, 106 insertions(+), 70 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index ccd78990a6..3a1b3dfd06 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -4814,7 +4814,7 @@ flow_hw_pattern_template_create(struct rte_eth_dev *dev,
 	struct rte_flow_pattern_template *it;
 	struct rte_flow_item *copied_items = NULL;
 	const struct rte_flow_item *tmpl_items;
-	uint64_t orig_item_nb;
+	uint32_t orig_item_nb;
 	struct rte_flow_item port = {
 		.type = RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT,
 		.mask = &rte_flow_item_ethdev_mask,
@@ -5573,12 +5573,15 @@ flow_hw_esw_mgr_regc_marker(struct rte_eth_dev *dev)
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to flow pattern template on success, NULL otherwise.
  */
 static struct rte_flow_pattern_template *
-flow_hw_create_ctrl_esw_mgr_pattern_template(struct rte_eth_dev *dev)
+flow_hw_create_ctrl_esw_mgr_pattern_template(struct rte_eth_dev *dev,
+					     struct rte_flow_error *error)
 {
 	struct rte_flow_pattern_template_attr attr = {
 		.relaxed_matching = 0,
@@ -5608,7 +5611,7 @@ flow_hw_create_ctrl_esw_mgr_pattern_template(struct rte_eth_dev *dev)
 		},
 	};
 
-	return flow_hw_pattern_template_create(dev, &attr, items, NULL);
+	return flow_hw_pattern_template_create(dev, &attr, items, error);
 }
 
 /**
@@ -5621,12 +5624,15 @@ flow_hw_create_ctrl_esw_mgr_pattern_template(struct rte_eth_dev *dev)
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to flow pattern template on success, NULL otherwise.
  */
 static struct rte_flow_pattern_template *
-flow_hw_create_ctrl_regc_sq_pattern_template(struct rte_eth_dev *dev)
+flow_hw_create_ctrl_regc_sq_pattern_template(struct rte_eth_dev *dev,
+					     struct rte_flow_error *error)
 {
 	struct rte_flow_pattern_template_attr attr = {
 		.relaxed_matching = 0,
@@ -5659,7 +5665,7 @@ flow_hw_create_ctrl_regc_sq_pattern_template(struct rte_eth_dev *dev)
 		},
 	};
 
-	return flow_hw_pattern_template_create(dev, &attr, items, NULL);
+	return flow_hw_pattern_template_create(dev, &attr, items, error);
 }
 
 /**
@@ -5669,12 +5675,15 @@ flow_hw_create_ctrl_regc_sq_pattern_template(struct rte_eth_dev *dev)
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to flow pattern template on success, NULL otherwise.
  */
 static struct rte_flow_pattern_template *
-flow_hw_create_ctrl_port_pattern_template(struct rte_eth_dev *dev)
+flow_hw_create_ctrl_port_pattern_template(struct rte_eth_dev *dev,
+					  struct rte_flow_error *error)
 {
 	struct rte_flow_pattern_template_attr attr = {
 		.relaxed_matching = 0,
@@ -5693,7 +5702,7 @@ flow_hw_create_ctrl_port_pattern_template(struct rte_eth_dev *dev)
 		},
 	};
 
-	return flow_hw_pattern_template_create(dev, &attr, items, NULL);
+	return flow_hw_pattern_template_create(dev, &attr, items, error);
 }
 
 /*
@@ -5703,12 +5712,15 @@ flow_hw_create_ctrl_port_pattern_template(struct rte_eth_dev *dev)
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to flow pattern template on success, NULL otherwise.
  */
 static struct rte_flow_pattern_template *
-flow_hw_create_tx_default_mreg_copy_pattern_template(struct rte_eth_dev *dev)
+flow_hw_create_tx_default_mreg_copy_pattern_template(struct rte_eth_dev *dev,
+						     struct rte_flow_error *error)
 {
 	struct rte_flow_pattern_template_attr tx_pa_attr = {
 		.relaxed_matching = 0,
@@ -5729,10 +5741,8 @@ flow_hw_create_tx_default_mreg_copy_pattern_template(struct rte_eth_dev *dev)
 			.type = RTE_FLOW_ITEM_TYPE_END,
 		},
 	};
-	struct rte_flow_error drop_err;
 
-	RTE_SET_USED(drop_err);
-	return flow_hw_pattern_template_create(dev, &tx_pa_attr, eth_all, &drop_err);
+	return flow_hw_pattern_template_create(dev, &tx_pa_attr, eth_all, error);
 }
 
 /**
@@ -5743,12 +5753,15 @@ flow_hw_create_tx_default_mreg_copy_pattern_template(struct rte_eth_dev *dev)
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to flow actions template on success, NULL otherwise.
  */
 static struct rte_flow_actions_template *
-flow_hw_create_ctrl_regc_jump_actions_template(struct rte_eth_dev *dev)
+flow_hw_create_ctrl_regc_jump_actions_template(struct rte_eth_dev *dev,
+					       struct rte_flow_error *error)
 {
 	uint32_t marker_mask = flow_hw_esw_mgr_regc_marker_mask(dev);
 	uint32_t marker_bits = flow_hw_esw_mgr_regc_marker(dev);
@@ -5814,7 +5827,7 @@ flow_hw_create_ctrl_regc_jump_actions_template(struct rte_eth_dev *dev)
 	set_reg_v.dst.offset = rte_bsf32(marker_mask);
 	rte_memcpy(set_reg_v.src.value, &marker_bits, sizeof(marker_bits));
 	rte_memcpy(set_reg_m.src.value, &marker_mask, sizeof(marker_mask));
-	return flow_hw_actions_template_create(dev, &attr, actions_v, actions_m, NULL);
+	return flow_hw_actions_template_create(dev, &attr, actions_v, actions_m, error);
 }
 
 /**
@@ -5826,13 +5839,16 @@ flow_hw_create_ctrl_regc_jump_actions_template(struct rte_eth_dev *dev)
  *   Pointer to Ethernet device.
  * @param group
  *   Destination group for this action template.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to flow actions template on success, NULL otherwise.
  */
 static struct rte_flow_actions_template *
 flow_hw_create_ctrl_jump_actions_template(struct rte_eth_dev *dev,
-					  uint32_t group)
+					  uint32_t group,
+					  struct rte_flow_error *error)
 {
 	struct rte_flow_actions_template_attr attr = {
 		.transfer = 1,
@@ -5862,8 +5878,8 @@ flow_hw_create_ctrl_jump_actions_template(struct rte_eth_dev *dev,
 		}
 	};
 
-	return flow_hw_actions_template_create(dev, &attr, actions_v, actions_m,
-					       NULL);
+	return flow_hw_actions_template_create(dev, &attr, actions_v,
+					       actions_m, error);
 }
 
 /**
@@ -5872,12 +5888,15 @@ flow_hw_create_ctrl_jump_actions_template(struct rte_eth_dev *dev,
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to flow action template on success, NULL otherwise.
  */
 static struct rte_flow_actions_template *
-flow_hw_create_ctrl_port_actions_template(struct rte_eth_dev *dev)
+flow_hw_create_ctrl_port_actions_template(struct rte_eth_dev *dev,
+					  struct rte_flow_error *error)
 {
 	struct rte_flow_actions_template_attr attr = {
 		.transfer = 1,
@@ -5907,8 +5926,7 @@ flow_hw_create_ctrl_port_actions_template(struct rte_eth_dev *dev)
 		}
 	};
 
-	return flow_hw_actions_template_create(dev, &attr, actions_v, actions_m,
-					       NULL);
+	return flow_hw_actions_template_create(dev, &attr, actions_v, actions_m, error);
 }
 
 /*
@@ -5917,12 +5935,15 @@ flow_hw_create_ctrl_port_actions_template(struct rte_eth_dev *dev)
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to flow actions template on success, NULL otherwise.
  */
 static struct rte_flow_actions_template *
-flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev)
+flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev,
+						     struct rte_flow_error *error)
 {
 	struct rte_flow_actions_template_attr tx_act_attr = {
 		.egress = 1,
@@ -5985,11 +6006,9 @@ flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev)
 			.type = RTE_FLOW_ACTION_TYPE_END,
 		},
 	};
-	struct rte_flow_error drop_err;
 
-	RTE_SET_USED(drop_err);
 	return flow_hw_actions_template_create(dev, &tx_act_attr, actions,
-					       masks, &drop_err);
+					       masks, error);
 }
 
 /**
@@ -6002,6 +6021,8 @@ flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev)
  *   Pointer to flow pattern template.
  * @param at
  *   Pointer to flow actions template.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to flow table on success, NULL otherwise.
@@ -6009,7 +6030,8 @@ flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev)
 static struct rte_flow_template_table*
 flow_hw_create_ctrl_sq_miss_root_table(struct rte_eth_dev *dev,
 				       struct rte_flow_pattern_template *it,
-				       struct rte_flow_actions_template *at)
+				       struct rte_flow_actions_template *at,
+				       struct rte_flow_error *error)
 {
 	struct rte_flow_template_table_attr attr = {
 		.flow_attr = {
@@ -6026,7 +6048,7 @@ flow_hw_create_ctrl_sq_miss_root_table(struct rte_eth_dev *dev,
 		.external = false,
 	};
 
-	return flow_hw_table_create(dev, &cfg, &it, 1, &at, 1, NULL);
+	return flow_hw_table_create(dev, &cfg, &it, 1, &at, 1, error);
 }
 
 
@@ -6040,6 +6062,8 @@ flow_hw_create_ctrl_sq_miss_root_table(struct rte_eth_dev *dev,
  *   Pointer to flow pattern template.
  * @param at
  *   Pointer to flow actions template.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to flow table on success, NULL otherwise.
@@ -6047,7 +6071,8 @@ flow_hw_create_ctrl_sq_miss_root_table(struct rte_eth_dev *dev,
 static struct rte_flow_template_table*
 flow_hw_create_ctrl_sq_miss_table(struct rte_eth_dev *dev,
 				  struct rte_flow_pattern_template *it,
-				  struct rte_flow_actions_template *at)
+				  struct rte_flow_actions_template *at,
+				  struct rte_flow_error *error)
 {
 	struct rte_flow_template_table_attr attr = {
 		.flow_attr = {
@@ -6064,7 +6089,7 @@ flow_hw_create_ctrl_sq_miss_table(struct rte_eth_dev *dev,
 		.external = false,
 	};
 
-	return flow_hw_table_create(dev, &cfg, &it, 1, &at, 1, NULL);
+	return flow_hw_table_create(dev, &cfg, &it, 1, &at, 1, error);
 }
 
 /*
@@ -6076,6 +6101,8 @@ flow_hw_create_ctrl_sq_miss_table(struct rte_eth_dev *dev,
  *   Pointer to flow pattern template.
  * @param at
  *   Pointer to flow actions template.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to flow table on success, NULL otherwise.
@@ -6083,7 +6110,8 @@ flow_hw_create_ctrl_sq_miss_table(struct rte_eth_dev *dev,
 static struct rte_flow_template_table*
 flow_hw_create_tx_default_mreg_copy_table(struct rte_eth_dev *dev,
 					  struct rte_flow_pattern_template *pt,
-					  struct rte_flow_actions_template *at)
+					  struct rte_flow_actions_template *at,
+					  struct rte_flow_error *error)
 {
 	struct rte_flow_template_table_attr tx_tbl_attr = {
 		.flow_attr = {
@@ -6097,14 +6125,8 @@ flow_hw_create_tx_default_mreg_copy_table(struct rte_eth_dev *dev,
 		.attr = tx_tbl_attr,
 		.external = false,
 	};
-	struct rte_flow_error drop_err = {
-		.type = RTE_FLOW_ERROR_TYPE_NONE,
-		.cause = NULL,
-		.message = NULL,
-	};
 
-	RTE_SET_USED(drop_err);
-	return flow_hw_table_create(dev, &tx_tbl_cfg, &pt, 1, &at, 1, &drop_err);
+	return flow_hw_table_create(dev, &tx_tbl_cfg, &pt, 1, &at, 1, error);
 }
 
 /**
@@ -6117,6 +6139,8 @@ flow_hw_create_tx_default_mreg_copy_table(struct rte_eth_dev *dev,
  *   Pointer to flow pattern template.
  * @param at
  *   Pointer to flow actions template.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
  *   Pointer to flow table on success, NULL otherwise.
@@ -6124,7 +6148,8 @@ flow_hw_create_tx_default_mreg_copy_table(struct rte_eth_dev *dev,
 static struct rte_flow_template_table *
 flow_hw_create_ctrl_jump_table(struct rte_eth_dev *dev,
 			       struct rte_flow_pattern_template *it,
-			       struct rte_flow_actions_template *at)
+			       struct rte_flow_actions_template *at,
+			       struct rte_flow_error *error)
 {
 	struct rte_flow_template_table_attr attr = {
 		.flow_attr = {
@@ -6141,7 +6166,7 @@ flow_hw_create_ctrl_jump_table(struct rte_eth_dev *dev,
 		.external = false,
 	};
 
-	return flow_hw_table_create(dev, &cfg, &it, 1, &at, 1, NULL);
+	return flow_hw_table_create(dev, &cfg, &it, 1, &at, 1, error);
 }
 
 /**
@@ -6150,12 +6175,14 @@ flow_hw_create_ctrl_jump_table(struct rte_eth_dev *dev,
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param error
+ *   Pointer to error structure.
  *
  * @return
- *   0 on success, EINVAL otherwise
+ *   0 on success, negative values otherwise
  */
 static __rte_unused int
-flow_hw_create_ctrl_tables(struct rte_eth_dev *dev)
+flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct rte_flow_pattern_template *esw_mgr_items_tmpl = NULL;
@@ -6168,96 +6195,107 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev)
 	struct rte_flow_actions_template *tx_meta_actions_tmpl = NULL;
 	uint32_t xmeta = priv->sh->config.dv_xmeta_en;
 	uint32_t repr_matching = priv->sh->config.repr_matching;
+	int ret;
 
 	/* Create templates and table for default SQ miss flow rules - root table. */
-	esw_mgr_items_tmpl = flow_hw_create_ctrl_esw_mgr_pattern_template(dev);
+	esw_mgr_items_tmpl = flow_hw_create_ctrl_esw_mgr_pattern_template(dev, error);
 	if (!esw_mgr_items_tmpl) {
 		DRV_LOG(ERR, "port %u failed to create E-Switch Manager item"
 			" template for control flows", dev->data->port_id);
-		goto error;
+		goto err;
 	}
-	regc_jump_actions_tmpl = flow_hw_create_ctrl_regc_jump_actions_template(dev);
+	regc_jump_actions_tmpl = flow_hw_create_ctrl_regc_jump_actions_template(dev, error);
 	if (!regc_jump_actions_tmpl) {
 		DRV_LOG(ERR, "port %u failed to create REG_C set and jump action template"
 			" for control flows", dev->data->port_id);
-		goto error;
+		goto err;
 	}
 	MLX5_ASSERT(priv->hw_esw_sq_miss_root_tbl == NULL);
 	priv->hw_esw_sq_miss_root_tbl = flow_hw_create_ctrl_sq_miss_root_table
-			(dev, esw_mgr_items_tmpl, regc_jump_actions_tmpl);
+			(dev, esw_mgr_items_tmpl, regc_jump_actions_tmpl, error);
 	if (!priv->hw_esw_sq_miss_root_tbl) {
 		DRV_LOG(ERR, "port %u failed to create table for default sq miss (root table)"
 			" for control flows", dev->data->port_id);
-		goto error;
+		goto err;
 	}
 	/* Create templates and table for default SQ miss flow rules - non-root table. */
-	regc_sq_items_tmpl = flow_hw_create_ctrl_regc_sq_pattern_template(dev);
+	regc_sq_items_tmpl = flow_hw_create_ctrl_regc_sq_pattern_template(dev, error);
 	if (!regc_sq_items_tmpl) {
 		DRV_LOG(ERR, "port %u failed to create SQ item template for"
 			" control flows", dev->data->port_id);
-		goto error;
+		goto err;
 	}
-	port_actions_tmpl = flow_hw_create_ctrl_port_actions_template(dev);
+	port_actions_tmpl = flow_hw_create_ctrl_port_actions_template(dev, error);
 	if (!port_actions_tmpl) {
 		DRV_LOG(ERR, "port %u failed to create port action template"
 			" for control flows", dev->data->port_id);
-		goto error;
+		goto err;
 	}
 	MLX5_ASSERT(priv->hw_esw_sq_miss_tbl == NULL);
 	priv->hw_esw_sq_miss_tbl = flow_hw_create_ctrl_sq_miss_table(dev, regc_sq_items_tmpl,
-								     port_actions_tmpl);
+								     port_actions_tmpl, error);
 	if (!priv->hw_esw_sq_miss_tbl) {
 		DRV_LOG(ERR, "port %u failed to create table for default sq miss (non-root table)"
 			" for control flows", dev->data->port_id);
-		goto error;
+		goto err;
 	}
 	/* Create templates and table for default FDB jump flow rules. */
-	port_items_tmpl = flow_hw_create_ctrl_port_pattern_template(dev);
+	port_items_tmpl = flow_hw_create_ctrl_port_pattern_template(dev, error);
 	if (!port_items_tmpl) {
 		DRV_LOG(ERR, "port %u failed to create SQ item template for"
 			" control flows", dev->data->port_id);
-		goto error;
+		goto err;
 	}
 	jump_one_actions_tmpl = flow_hw_create_ctrl_jump_actions_template
-			(dev, MLX5_HW_LOWEST_USABLE_GROUP);
+			(dev, MLX5_HW_LOWEST_USABLE_GROUP, error);
 	if (!jump_one_actions_tmpl) {
 		DRV_LOG(ERR, "port %u failed to create jump action template"
 			" for control flows", dev->data->port_id);
-		goto error;
+		goto err;
 	}
 	MLX5_ASSERT(priv->hw_esw_zero_tbl == NULL);
 	priv->hw_esw_zero_tbl = flow_hw_create_ctrl_jump_table(dev, port_items_tmpl,
-							       jump_one_actions_tmpl);
+							       jump_one_actions_tmpl,
+							       error);
 	if (!priv->hw_esw_zero_tbl) {
 		DRV_LOG(ERR, "port %u failed to create table for default jump to group 1"
 			" for control flows", dev->data->port_id);
-		goto error;
+		goto err;
 	}
 	/* Create templates and table for default Tx metadata copy flow rule. */
 	if (!repr_matching && xmeta == MLX5_XMETA_MODE_META32_HWS) {
-		tx_meta_items_tmpl = flow_hw_create_tx_default_mreg_copy_pattern_template(dev);
+		tx_meta_items_tmpl =
+			flow_hw_create_tx_default_mreg_copy_pattern_template(dev, error);
 		if (!tx_meta_items_tmpl) {
 			DRV_LOG(ERR, "port %u failed to Tx metadata copy pattern"
 				" template for control flows", dev->data->port_id);
-			goto error;
+			goto err;
 		}
-		tx_meta_actions_tmpl = flow_hw_create_tx_default_mreg_copy_actions_template(dev);
+		tx_meta_actions_tmpl =
+			flow_hw_create_tx_default_mreg_copy_actions_template(dev, error);
 		if (!tx_meta_actions_tmpl) {
 			DRV_LOG(ERR, "port %u failed to Tx metadata copy actions"
 				" template for control flows", dev->data->port_id);
-			goto error;
+			goto err;
 		}
 		MLX5_ASSERT(priv->hw_tx_meta_cpy_tbl == NULL);
-		priv->hw_tx_meta_cpy_tbl = flow_hw_create_tx_default_mreg_copy_table(dev,
-					tx_meta_items_tmpl, tx_meta_actions_tmpl);
+		priv->hw_tx_meta_cpy_tbl =
+			flow_hw_create_tx_default_mreg_copy_table(dev, tx_meta_items_tmpl,
+								  tx_meta_actions_tmpl, error);
 		if (!priv->hw_tx_meta_cpy_tbl) {
 			DRV_LOG(ERR, "port %u failed to create table for default"
 				" Tx metadata copy flow rule", dev->data->port_id);
-			goto error;
+			goto err;
 		}
 	}
 	return 0;
-error:
+err:
+	/* Do not overwrite the rte_errno. */
+	ret = -rte_errno;
+	if (ret == 0)
+		ret = rte_flow_error_set(error, EINVAL,
+					 RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+					 "Failed to create control tables.");
 	if (priv->hw_esw_zero_tbl) {
 		flow_hw_table_destroy(dev, priv->hw_esw_zero_tbl, NULL);
 		priv->hw_esw_zero_tbl = NULL;
@@ -6286,7 +6324,7 @@ error:
 		flow_hw_pattern_template_destroy(dev, regc_sq_items_tmpl, NULL);
 	if (esw_mgr_items_tmpl)
 		flow_hw_pattern_template_destroy(dev, esw_mgr_items_tmpl, NULL);
-	return -EINVAL;
+	return ret;
 }
 
 static void
@@ -6995,11 +7033,9 @@ flow_hw_configure(struct rte_eth_dev *dev,
 					   NULL, "Failed to create vport actions.");
 			goto err;
 		}
-		ret = flow_hw_create_ctrl_tables(dev);
-		if (ret) {
-			rte_errno = -ret;
+		ret = flow_hw_create_ctrl_tables(dev, error);
+		if (ret)
 			goto err;
-		}
 	}
 	if (port_attr->nb_conn_tracks) {
 		mem_size = sizeof(struct mlx5_aso_sq) * nb_q_updated +
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.105964700 +0800
+++ 0076-net-mlx5-fix-error-set-in-control-tables-create.patch	2023-08-09 21:51:18.234352000 +0800
@@ -1 +1 @@
-From 0dc3b3d06823770c85eacd5b9f70132e69ac75b2 Mon Sep 17 00:00:00 2001
+From 6f086a7a7497e454ec00b842a1f578bbf302c16b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0dc3b3d06823770c85eacd5b9f70132e69ac75b2 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 0a9b7700e0..94179ff747 100644
+index ccd78990a6..3a1b3dfd06 100644
@@ -28 +30 @@
-@@ -5425,7 +5425,7 @@ flow_hw_pattern_template_create(struct rte_eth_dev *dev,
+@@ -4814,7 +4814,7 @@ flow_hw_pattern_template_create(struct rte_eth_dev *dev,
@@ -37 +39 @@
-@@ -6246,12 +6246,15 @@ flow_hw_esw_mgr_regc_marker(struct rte_eth_dev *dev)
+@@ -5573,12 +5573,15 @@ flow_hw_esw_mgr_regc_marker(struct rte_eth_dev *dev)
@@ -54 +56 @@
-@@ -6281,7 +6284,7 @@ flow_hw_create_ctrl_esw_mgr_pattern_template(struct rte_eth_dev *dev)
+@@ -5608,7 +5611,7 @@ flow_hw_create_ctrl_esw_mgr_pattern_template(struct rte_eth_dev *dev)
@@ -63 +65 @@
-@@ -6294,12 +6297,15 @@ flow_hw_create_ctrl_esw_mgr_pattern_template(struct rte_eth_dev *dev)
+@@ -5621,12 +5624,15 @@ flow_hw_create_ctrl_esw_mgr_pattern_template(struct rte_eth_dev *dev)
@@ -80 +82 @@
-@@ -6332,7 +6338,7 @@ flow_hw_create_ctrl_regc_sq_pattern_template(struct rte_eth_dev *dev)
+@@ -5659,7 +5665,7 @@ flow_hw_create_ctrl_regc_sq_pattern_template(struct rte_eth_dev *dev)
@@ -89 +91 @@
-@@ -6342,12 +6348,15 @@ flow_hw_create_ctrl_regc_sq_pattern_template(struct rte_eth_dev *dev)
+@@ -5669,12 +5675,15 @@ flow_hw_create_ctrl_regc_sq_pattern_template(struct rte_eth_dev *dev)
@@ -106 +108 @@
-@@ -6366,7 +6375,7 @@ flow_hw_create_ctrl_port_pattern_template(struct rte_eth_dev *dev)
+@@ -5693,7 +5702,7 @@ flow_hw_create_ctrl_port_pattern_template(struct rte_eth_dev *dev)
@@ -115 +117 @@
-@@ -6376,12 +6385,15 @@ flow_hw_create_ctrl_port_pattern_template(struct rte_eth_dev *dev)
+@@ -5703,12 +5712,15 @@ flow_hw_create_ctrl_port_pattern_template(struct rte_eth_dev *dev)
@@ -132 +134 @@
-@@ -6402,10 +6414,8 @@ flow_hw_create_tx_default_mreg_copy_pattern_template(struct rte_eth_dev *dev)
+@@ -5729,10 +5741,8 @@ flow_hw_create_tx_default_mreg_copy_pattern_template(struct rte_eth_dev *dev)
@@ -144 +146 @@
-@@ -6416,12 +6426,15 @@ flow_hw_create_tx_default_mreg_copy_pattern_template(struct rte_eth_dev *dev)
+@@ -5743,12 +5753,15 @@ flow_hw_create_tx_default_mreg_copy_pattern_template(struct rte_eth_dev *dev)
@@ -161 +163 @@
-@@ -6488,7 +6501,7 @@ flow_hw_create_ctrl_regc_jump_actions_template(struct rte_eth_dev *dev)
+@@ -5814,7 +5827,7 @@ flow_hw_create_ctrl_regc_jump_actions_template(struct rte_eth_dev *dev)
@@ -170 +172 @@
-@@ -6500,13 +6513,16 @@ flow_hw_create_ctrl_regc_jump_actions_template(struct rte_eth_dev *dev)
+@@ -5826,13 +5839,16 @@ flow_hw_create_ctrl_regc_jump_actions_template(struct rte_eth_dev *dev)
@@ -188 +190 @@
-@@ -6536,8 +6552,8 @@ flow_hw_create_ctrl_jump_actions_template(struct rte_eth_dev *dev,
+@@ -5862,8 +5878,8 @@ flow_hw_create_ctrl_jump_actions_template(struct rte_eth_dev *dev,
@@ -199 +201 @@
-@@ -6546,12 +6562,15 @@ flow_hw_create_ctrl_jump_actions_template(struct rte_eth_dev *dev,
+@@ -5872,12 +5888,15 @@ flow_hw_create_ctrl_jump_actions_template(struct rte_eth_dev *dev,
@@ -216 +218 @@
-@@ -6581,8 +6600,7 @@ flow_hw_create_ctrl_port_actions_template(struct rte_eth_dev *dev)
+@@ -5907,8 +5926,7 @@ flow_hw_create_ctrl_port_actions_template(struct rte_eth_dev *dev)
@@ -226 +228 @@
-@@ -6591,12 +6609,15 @@ flow_hw_create_ctrl_port_actions_template(struct rte_eth_dev *dev)
+@@ -5917,12 +5935,15 @@ flow_hw_create_ctrl_port_actions_template(struct rte_eth_dev *dev)
@@ -243 +245 @@
-@@ -6661,11 +6682,9 @@ flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev)
+@@ -5985,11 +6006,9 @@ flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev)
@@ -256 +258 @@
-@@ -6678,6 +6697,8 @@ flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev)
+@@ -6002,6 +6021,8 @@ flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev)
@@ -265 +267 @@
-@@ -6685,7 +6706,8 @@ flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev)
+@@ -6009,7 +6030,8 @@ flow_hw_create_tx_default_mreg_copy_actions_template(struct rte_eth_dev *dev)
@@ -275 +277 @@
-@@ -6702,7 +6724,7 @@ flow_hw_create_ctrl_sq_miss_root_table(struct rte_eth_dev *dev,
+@@ -6026,7 +6048,7 @@ flow_hw_create_ctrl_sq_miss_root_table(struct rte_eth_dev *dev,
@@ -284 +286 @@
-@@ -6716,6 +6738,8 @@ flow_hw_create_ctrl_sq_miss_root_table(struct rte_eth_dev *dev,
+@@ -6040,6 +6062,8 @@ flow_hw_create_ctrl_sq_miss_root_table(struct rte_eth_dev *dev,
@@ -293 +295 @@
-@@ -6723,7 +6747,8 @@ flow_hw_create_ctrl_sq_miss_root_table(struct rte_eth_dev *dev,
+@@ -6047,7 +6071,8 @@ flow_hw_create_ctrl_sq_miss_root_table(struct rte_eth_dev *dev,
@@ -303 +305 @@
-@@ -6740,7 +6765,7 @@ flow_hw_create_ctrl_sq_miss_table(struct rte_eth_dev *dev,
+@@ -6064,7 +6089,7 @@ flow_hw_create_ctrl_sq_miss_table(struct rte_eth_dev *dev,
@@ -312 +314 @@
-@@ -6752,6 +6777,8 @@ flow_hw_create_ctrl_sq_miss_table(struct rte_eth_dev *dev,
+@@ -6076,6 +6101,8 @@ flow_hw_create_ctrl_sq_miss_table(struct rte_eth_dev *dev,
@@ -321 +323 @@
-@@ -6759,7 +6786,8 @@ flow_hw_create_ctrl_sq_miss_table(struct rte_eth_dev *dev,
+@@ -6083,7 +6110,8 @@ flow_hw_create_ctrl_sq_miss_table(struct rte_eth_dev *dev,
@@ -331 +333 @@
-@@ -6773,14 +6801,8 @@ flow_hw_create_tx_default_mreg_copy_table(struct rte_eth_dev *dev,
+@@ -6097,14 +6125,8 @@ flow_hw_create_tx_default_mreg_copy_table(struct rte_eth_dev *dev,
@@ -347 +349 @@
-@@ -6793,6 +6815,8 @@ flow_hw_create_tx_default_mreg_copy_table(struct rte_eth_dev *dev,
+@@ -6117,6 +6139,8 @@ flow_hw_create_tx_default_mreg_copy_table(struct rte_eth_dev *dev,
@@ -356 +358 @@
-@@ -6800,7 +6824,8 @@ flow_hw_create_tx_default_mreg_copy_table(struct rte_eth_dev *dev,
+@@ -6124,7 +6148,8 @@ flow_hw_create_tx_default_mreg_copy_table(struct rte_eth_dev *dev,
@@ -366 +368 @@
-@@ -6817,7 +6842,7 @@ flow_hw_create_ctrl_jump_table(struct rte_eth_dev *dev,
+@@ -6141,7 +6166,7 @@ flow_hw_create_ctrl_jump_table(struct rte_eth_dev *dev,
@@ -375 +377 @@
-@@ -6826,12 +6851,14 @@ flow_hw_create_ctrl_jump_table(struct rte_eth_dev *dev,
+@@ -6150,12 +6175,14 @@ flow_hw_create_ctrl_jump_table(struct rte_eth_dev *dev,
@@ -392 +394 @@
-@@ -6844,96 +6871,107 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev)
+@@ -6168,96 +6195,107 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev)
@@ -526 +528 @@
-@@ -6962,7 +7000,7 @@ error:
+@@ -6286,7 +6324,7 @@ error:
@@ -535 +537 @@
-@@ -7835,11 +7873,9 @@ flow_hw_configure(struct rte_eth_dev *dev,
+@@ -6995,11 +7033,9 @@ flow_hw_configure(struct rte_eth_dev *dev,
@@ -547,2 +549,2 @@
- 	if (!priv->shared_host)
- 		flow_hw_create_send_to_kernel_actions(priv);
+ 	if (port_attr->nb_conn_tracks) {
+ 		mem_size = sizeof(struct mlx5_aso_sq) * nb_q_updated +

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix error set for age pool initialization' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (21 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/mlx5: fix error set in control tables create' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/mlx5: fix error in VLAN actions creation' " Xueming Li
                     ` (15 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=ab04a7f2da4eb590dd62b0d8498d61f2a3c32d8d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ab04a7f2da4eb590dd62b0d8498d61f2a3c32d8d Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Fri, 30 Jun 2023 13:26:49 +0300
Subject: [PATCH] net/mlx5: fix error set for age pool initialization
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e8c51fa3ab0c43801ab144c6a4d7837dc7ab1cc2 ]

The rte_flow_error needs to be set when the age pool initialization
has a failure. Or else the application will crash due to the access
of the invalid "message" field.

Fixes: 04a4de756e14 ("net/mlx5: support flow age action with HWS")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 3a1b3dfd06..5fe4cfa071 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -7072,8 +7072,11 @@ flow_hw_configure(struct rte_eth_dev *dev,
 			goto err;
 		}
 		ret = mlx5_hws_age_pool_init(dev, port_attr, nb_queue);
-		if (ret < 0)
+		if (ret < 0) {
+			rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+					   NULL, "Failed to init age pool.");
 			goto err;
+		}
 	}
 	ret = flow_hw_create_vlan(dev);
 	if (ret)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.136740400 +0800
+++ 0077-net-mlx5-fix-error-set-for-age-pool-initialization.patch	2023-08-09 21:51:18.234352000 +0800
@@ -1 +1 @@
-From e8c51fa3ab0c43801ab144c6a4d7837dc7ab1cc2 Mon Sep 17 00:00:00 2001
+From ab04a7f2da4eb590dd62b0d8498d61f2a3c32d8d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e8c51fa3ab0c43801ab144c6a4d7837dc7ab1cc2 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 94179ff747..0c72324617 100644
+index 3a1b3dfd06..5fe4cfa071 100644
@@ -23 +25 @@
-@@ -7914,8 +7914,11 @@ flow_hw_configure(struct rte_eth_dev *dev,
+@@ -7072,8 +7072,11 @@ flow_hw_configure(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix error in VLAN actions creation' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (22 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/mlx5: fix error set for age pool initialization' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'common/mlx5: fix obtaining IB device in LAG mode' " Xueming Li
                     ` (14 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=cd3b1b95407047a472742bf6606c71cbe34015a1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cd3b1b95407047a472742bf6606c71cbe34015a1 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Fri, 30 Jun 2023 14:02:05 +0300
Subject: [PATCH] net/mlx5: fix error in VLAN actions creation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 90923d80e22a80a2f97a1f11b340b15991a7c86a ]

When a failure occurs during the VLAN actions creating, the value
of "rte_errno" is already set by the mlx5dr_action_create*. The
value can be returned directly to reflect the actual reason.

In the meanwhile, the "rte_flow_error" structure should also be set
with clear message explicitly.

Fixes: 773ca0e91ba1 ("net/mlx5: support VLAN push/pop/modify with HWS")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 5fe4cfa071..a3fd87b16f 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -6447,27 +6447,28 @@ flow_hw_create_vlan(struct rte_eth_dev *dev)
 		MLX5DR_ACTION_FLAG_HWS_FDB
 	};
 
+	/* rte_errno is set in the mlx5dr_action* functions. */
 	for (i = MLX5DR_TABLE_TYPE_NIC_RX; i <= MLX5DR_TABLE_TYPE_NIC_TX; i++) {
 		priv->hw_pop_vlan[i] =
 			mlx5dr_action_create_pop_vlan(priv->dr_ctx, flags[i]);
 		if (!priv->hw_pop_vlan[i])
-			return -ENOENT;
+			return -rte_errno;
 		priv->hw_push_vlan[i] =
 			mlx5dr_action_create_push_vlan(priv->dr_ctx, flags[i]);
 		if (!priv->hw_pop_vlan[i])
-			return -ENOENT;
+			return -rte_errno;
 	}
 	if (priv->sh->config.dv_esw_en && priv->master) {
 		priv->hw_pop_vlan[MLX5DR_TABLE_TYPE_FDB] =
 			mlx5dr_action_create_pop_vlan
 				(priv->dr_ctx, MLX5DR_ACTION_FLAG_HWS_FDB);
 		if (!priv->hw_pop_vlan[MLX5DR_TABLE_TYPE_FDB])
-			return -ENOENT;
+			return -rte_errno;
 		priv->hw_push_vlan[MLX5DR_TABLE_TYPE_FDB] =
 			mlx5dr_action_create_push_vlan
 				(priv->dr_ctx, MLX5DR_ACTION_FLAG_HWS_FDB);
 		if (!priv->hw_pop_vlan[MLX5DR_TABLE_TYPE_FDB])
-			return -ENOENT;
+			return -rte_errno;
 	}
 	return 0;
 }
@@ -7079,8 +7080,11 @@ flow_hw_configure(struct rte_eth_dev *dev,
 		}
 	}
 	ret = flow_hw_create_vlan(dev);
-	if (ret)
+	if (ret) {
+		rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+				   NULL, "Failed to VLAN actions.");
 		goto err;
+	}
 	if (_queue_attr)
 		mlx5_free(_queue_attr);
 	if (port_attr->flags & RTE_FLOW_PORT_FLAG_STRICT_QUEUE)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.166302900 +0800
+++ 0078-net-mlx5-fix-error-in-VLAN-actions-creation.patch	2023-08-09 21:51:18.234352000 +0800
@@ -1 +1 @@
-From 90923d80e22a80a2f97a1f11b340b15991a7c86a Mon Sep 17 00:00:00 2001
+From cd3b1b95407047a472742bf6606c71cbe34015a1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 90923d80e22a80a2f97a1f11b340b15991a7c86a ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 0c72324617..cbdac2996c 100644
+index 5fe4cfa071..a3fd87b16f 100644
@@ -26 +28 @@
-@@ -7129,27 +7129,28 @@ flow_hw_create_vlan(struct rte_eth_dev *dev)
+@@ -6447,27 +6447,28 @@ flow_hw_create_vlan(struct rte_eth_dev *dev)
@@ -59 +61 @@
-@@ -7921,8 +7922,11 @@ flow_hw_configure(struct rte_eth_dev *dev,
+@@ -7079,8 +7080,11 @@ flow_hw_configure(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'common/mlx5: fix obtaining IB device in LAG mode' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (23 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/mlx5: fix error in VLAN actions creation' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:58   ` patch 'net/mlx5: fix profile check of meter mark' " Xueming Li
                     ` (13 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=0aafd35f651d58e0566eca43fe8cd9b93c5ff18b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0aafd35f651d58e0566eca43fe8cd9b93c5ff18b Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Fri, 30 Jun 2023 15:41:39 +0300
Subject: [PATCH] common/mlx5: fix obtaining IB device in LAG mode
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 37ca457d3fa69730714761a9dce8c673241d17d6 ]

In hardware LAG mode, both PFs are in the same E-Switch domain but
the VFs are in the other domains. Moreover, VF has its own dedicated
IB device.

When probing a VF created on the 1st PF, usually its PCIe address
is the same as the PF's except the function part. Then there would
be some wrong VF BDF match on the IB "bond" device due to incomplete
comparison (we do not compare the function part of BDF for bonding
devices to match all bonded PFs).

Adding one extra condition to check whether the current PCIe address
device is a VF will solve the incorrect IB device recognition. Thus
the full address comparison will be done.

Fixes: f956d3d4c33c ("net/mlx5: fix probing with secondary bonding member")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_common_os.c | 16 +++++++++-------
 drivers/common/mlx5/mlx5_common.h          |  2 +-
 drivers/common/mlx5/mlx5_common_pci.c      |  2 +-
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c
index aafff60eeb..2ebb8ac8b6 100644
--- a/drivers/common/mlx5/linux/mlx5_common_os.c
+++ b/drivers/common/mlx5/linux/mlx5_common_os.c
@@ -555,7 +555,7 @@ mlx5_os_pd_prepare(struct mlx5_common_device *cdev)
 }
 
 static struct ibv_device *
-mlx5_os_get_ibv_device(const struct rte_pci_addr *addr)
+mlx5_os_get_ibv_device(const struct rte_pci_device *pci_dev)
 {
 	int n;
 	struct ibv_device **ibv_list = mlx5_glue->get_device_list(&n);
@@ -564,6 +564,8 @@ mlx5_os_get_ibv_device(const struct rte_pci_addr *addr)
 	uint8_t guid2[32] = {0};
 	int ret1, ret2 = -1;
 	struct rte_pci_addr paddr;
+	const struct rte_pci_addr *addr = &pci_dev->addr;
+	bool is_vf_dev = mlx5_dev_is_vf_pci(pci_dev);
 
 	if (ibv_list == NULL || !n) {
 		rte_errno = ENOSYS;
@@ -579,11 +581,11 @@ mlx5_os_get_ibv_device(const struct rte_pci_addr *addr)
 		if (ret1 > 0)
 			ret2 = mlx5_get_device_guid(&paddr, guid2, sizeof(guid2));
 		/* Bond device can bond secondary PCIe */
-		if ((strstr(ibv_list[n]->name, "bond") &&
-		    ((ret1 > 0 && ret2 > 0 && !memcmp(guid1, guid2, sizeof(guid1))) ||
-		    (addr->domain == paddr.domain && addr->bus == paddr.bus &&
-		     addr->devid == paddr.devid))) ||
-		     !rte_pci_addr_cmp(addr, &paddr)) {
+		if ((strstr(ibv_list[n]->name, "bond") && !is_vf_dev &&
+		     ((ret1 > 0 && ret2 > 0 && !memcmp(guid1, guid2, sizeof(guid1))) ||
+		      (addr->domain == paddr.domain && addr->bus == paddr.bus &&
+		       addr->devid == paddr.devid))) ||
+		    !rte_pci_addr_cmp(addr, &paddr)) {
 			ibv_match = ibv_list[n];
 			break;
 		}
@@ -697,7 +699,7 @@ mlx5_os_get_ibv_dev(const struct rte_device *dev)
 	struct ibv_device *ibv;
 
 	if (mlx5_dev_is_pci(dev))
-		ibv = mlx5_os_get_ibv_device(&RTE_DEV_TO_PCI_CONST(dev)->addr);
+		ibv = mlx5_os_get_ibv_device(RTE_DEV_TO_PCI_CONST(dev));
 	else
 		ibv = mlx5_get_aux_ibv_device(RTE_DEV_TO_AUXILIARY_CONST(dev));
 	if (ibv == NULL) {
diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index 1ff91f81d4..02b5d54363 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -558,7 +558,7 @@ mlx5_dev_is_pci(const struct rte_device *dev);
  */
 __rte_internal
 bool
-mlx5_dev_is_vf_pci(struct rte_pci_device *pci_dev);
+mlx5_dev_is_vf_pci(const struct rte_pci_device *pci_dev);
 
 __rte_internal
 int
diff --git a/drivers/common/mlx5/mlx5_common_pci.c b/drivers/common/mlx5/mlx5_common_pci.c
index 73178ce0f3..fdf03f2a53 100644
--- a/drivers/common/mlx5/mlx5_common_pci.c
+++ b/drivers/common/mlx5/mlx5_common_pci.c
@@ -109,7 +109,7 @@ mlx5_dev_is_pci(const struct rte_device *dev)
 }
 
 bool
-mlx5_dev_is_vf_pci(struct rte_pci_device *pci_dev)
+mlx5_dev_is_vf_pci(const struct rte_pci_device *pci_dev)
 {
 	switch (pci_dev->id.device_id) {
 	case PCI_DEVICE_ID_MELLANOX_CONNECTX4VF:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.201823100 +0800
+++ 0079-common-mlx5-fix-obtaining-IB-device-in-LAG-mode.patch	2023-08-09 21:51:18.234352000 +0800
@@ -1 +1 @@
-From 37ca457d3fa69730714761a9dce8c673241d17d6 Mon Sep 17 00:00:00 2001
+From 0aafd35f651d58e0566eca43fe8cd9b93c5ff18b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 37ca457d3fa69730714761a9dce8c673241d17d6 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -80 +82 @@
-index 42d938776a..28f9f41528 100644
+index 1ff91f81d4..02b5d54363 100644
@@ -83 +85 @@
-@@ -600,7 +600,7 @@ mlx5_dev_is_pci(const struct rte_device *dev);
+@@ -558,7 +558,7 @@ mlx5_dev_is_pci(const struct rte_device *dev);
@@ -93 +95 @@
-index 5122c596bc..04aad0963c 100644
+index 73178ce0f3..fdf03f2a53 100644

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix profile check of meter mark' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (24 preceding siblings ...)
  2023-08-09 23:58   ` patch 'common/mlx5: fix obtaining IB device in LAG mode' " Xueming Li
@ 2023-08-09 23:58   ` Xueming Li
  2023-08-09 23:59   ` patch 'net/mlx5: reduce counter pool name length' " Xueming Li
                     ` (12 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:58 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=92c7aa6a22ca77263470c4caf6e17b32a5e7187d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 92c7aa6a22ca77263470c4caf6e17b32a5e7187d Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Fri, 30 Jun 2023 15:44:45 +0300
Subject: [PATCH] net/mlx5: fix profile check of meter mark
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c8957cc9d9750756eaa21e575781bf3b7d7277e6 ]

When creating a meter_mark action, the profile should be specified.
Or else there would be a crash if the pointer to the profile was not
set properly:
  1. creating an action template with only action mask set and using
     this template to create a table
  2. creating a flow rule without setting the profile if the action
     of meter_mark is not fixed

The check should be done inside the action allocation and an error
needs to be returned immediately.

Fixes: 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action with HWS")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index a3fd87b16f..102f67a925 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -1243,6 +1243,8 @@ flow_hw_meter_mark_alloc(struct rte_eth_dev *dev, uint32_t queue,
 	struct mlx5_flow_meter_info *fm;
 	uint32_t mtr_id;
 
+	if (meter_mark->profile == NULL)
+		return NULL;
 	aso_mtr = mlx5_ipool_malloc(priv->hws_mpool->idx_pool, &mtr_id);
 	if (!aso_mtr)
 		return NULL;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.236679500 +0800
+++ 0080-net-mlx5-fix-profile-check-of-meter-mark.patch	2023-08-09 21:51:18.244352000 +0800
@@ -1 +1 @@
-From c8957cc9d9750756eaa21e575781bf3b7d7277e6 Mon Sep 17 00:00:00 2001
+From 92c7aa6a22ca77263470c4caf6e17b32a5e7187d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c8957cc9d9750756eaa21e575781bf3b7d7277e6 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index cbdac2996c..330386df77 100644
+index a3fd87b16f..102f67a925 100644
@@ -30 +32 @@
-@@ -1325,6 +1325,8 @@ flow_hw_meter_mark_alloc(struct rte_eth_dev *dev, uint32_t queue,
+@@ -1243,6 +1243,8 @@ flow_hw_meter_mark_alloc(struct rte_eth_dev *dev, uint32_t queue,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: reduce counter pool name length' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (25 preceding siblings ...)
  2023-08-09 23:58   ` patch 'net/mlx5: fix profile check of meter mark' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  2023-08-09 23:59   ` patch 'net/mlx5: fix flow workspace destruction' " Xueming Li
                     ` (11 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=cdd4d9bca6dbb570c6286c46a7ca133259c02af1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cdd4d9bca6dbb570c6286c46a7ca133259c02af1 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Fri, 30 Jun 2023 15:57:30 +0300
Subject: [PATCH] net/mlx5: reduce counter pool name length
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1c955e4cf72287940c180c31e14ccfd1f90dac0f ]

The name size of a rte_ring is RTE_MEMZONE_NAMESIZE with the value 32
by default. When creating a HWS counter pool cache, the final string
format was "RG_MLX5_HWS_CNT_POOL_%u_cache/%u" and it could support
less than 1000 variants. For example, if the first %u representing
port id is 100 and it will take all the available characters then the
second %u for queues will be discarded. If there was more than one
rule creation queue, the rte_ring could not be created.

By reducing the fixed character number and using hexadecimal format,
the issue can be overcome with an assumption that not all the integer
fields for queue index is used.

Fixes: 13ea6bdcc7ee ("net/mlx5: support counters in cross port shared mode")
Fixes: 4d368e1da3a4 ("net/mlx5: support flow counter action for HWS")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_hws_cnt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c
index 51704ef754..8ccc6ab1f8 100644
--- a/drivers/net/mlx5/mlx5_hws_cnt.c
+++ b/drivers/net/mlx5/mlx5_hws_cnt.c
@@ -410,8 +410,7 @@ mlx5_hws_cnt_pool_init(struct mlx5_dev_ctx_shared *sh,
 		goto error;
 	}
 	for (qidx = 0; qidx < ccfg->q_num; qidx++) {
-		snprintf(mz_name, sizeof(mz_name), "%s_cache/%u", pcfg->name,
-				qidx);
+		snprintf(mz_name, sizeof(mz_name), "%s_qc/%x", pcfg->name, qidx);
 		cntp->cache->qcache[qidx] = rte_ring_create(mz_name, ccfg->size,
 				SOCKET_ID_ANY,
 				RING_F_SP_ENQ | RING_F_SC_DEQ |
@@ -634,7 +633,7 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
 			SOCKET_ID_ANY);
 	if (mp_name == NULL)
 		goto error;
-	snprintf(mp_name, RTE_MEMZONE_NAMESIZE, "MLX5_HWS_CNT_POOL_%u",
+	snprintf(mp_name, RTE_MEMZONE_NAMESIZE, "MLX5_HWS_CNT_P_%x",
 			dev->data->port_id);
 	pcfg.name = mp_name;
 	pcfg.request_num = pattr->nb_counters;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.280864400 +0800
+++ 0081-net-mlx5-reduce-counter-pool-name-length.patch	2023-08-09 21:51:18.244352000 +0800
@@ -1 +1 @@
-From 1c955e4cf72287940c180c31e14ccfd1f90dac0f Mon Sep 17 00:00:00 2001
+From cdd4d9bca6dbb570c6286c46a7ca133259c02af1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1c955e4cf72287940c180c31e14ccfd1f90dac0f ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -25,2 +27,2 @@
- drivers/net/mlx5/mlx5_hws_cnt.c | 9 +++------
- 1 file changed, 3 insertions(+), 6 deletions(-)
+ drivers/net/mlx5/mlx5_hws_cnt.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
@@ -29 +31 @@
-index d98df68f39..18d80f34ba 100644
+index 51704ef754..8ccc6ab1f8 100644
@@ -32 +34 @@
-@@ -419,8 +419,7 @@ mlx5_hws_cnt_pool_init(struct mlx5_dev_ctx_shared *sh,
+@@ -410,8 +410,7 @@ mlx5_hws_cnt_pool_init(struct mlx5_dev_ctx_shared *sh,
@@ -42,7 +44,2 @@
-@@ -612,12 +611,10 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
- 	int ret = 0;
- 	size_t sz;
- 
--	mp_name = mlx5_malloc(MLX5_MEM_ZERO, RTE_MEMZONE_NAMESIZE, 0,
--			SOCKET_ID_ANY);
-+	mp_name = mlx5_malloc(MLX5_MEM_ZERO, RTE_MEMZONE_NAMESIZE, 0, SOCKET_ID_ANY);
+@@ -634,7 +633,7 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
+ 			SOCKET_ID_ANY);
@@ -52,2 +49,2 @@
--			dev->data->port_id);
-+	snprintf(mp_name, RTE_MEMZONE_NAMESIZE, "MLX5_HWS_CNT_P_%x", dev->data->port_id);
++	snprintf(mp_name, RTE_MEMZONE_NAMESIZE, "MLX5_HWS_CNT_P_%x",
+ 			dev->data->port_id);
@@ -56 +52,0 @@
- 	pcfg.alloc_factor = HWS_CNT_ALLOC_FACTOR_DEFAULT;

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix flow workspace destruction' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (26 preceding siblings ...)
  2023-08-09 23:59   ` patch 'net/mlx5: reduce counter pool name length' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  2023-08-09 23:59   ` patch 'net/mlx5: forbid MPRQ restart' " Xueming Li
                     ` (10 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: David Marchand, Bing Zhao, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=68b7edcd1e6fb1cb855de0f6a98979d5bbdaba50

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 68b7edcd1e6fb1cb855de0f6a98979d5bbdaba50 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Mon, 3 Jul 2023 12:50:52 +0300
Subject: [PATCH] net/mlx5: fix flow workspace destruction
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit dc7c5e0aa905b675c56a66b2014b01b7f5ae8a1d ]

PMD uses pthread key to allocate and access per thread flow
workspace memory buffers.

PMD registered a key destructor function to clean up flow workspace
buffers. However, the key destructor was not called by the pthread
library.

The patch keeps track of per-thread flow workspaces in PMD.
Flow workspaces memory release is activated from PMD destructor.

In the meanwhile, workspace buffer and RSS queues array are allocated
in a single memory chunk with this patch. The maximal number of
queues RTE_ETH_RSS_RETA_SIZE_512 is chosen. Then the workspace
adjustment can be removed to reduce the software hiccup:
  1. realloc and content copy
  2. spinlock acquire and release

Bugzilla ID: 1255
Fixes: 5d55a494f4e6 ("net/mlx5: split multi-thread flow handling per OS")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_flow_os.c |  2 +-
 drivers/net/mlx5/mlx5.c               |  1 +
 drivers/net/mlx5/mlx5_flow.c          | 76 +++++++++++----------------
 drivers/net/mlx5/mlx5_flow.h          |  4 +-
 4 files changed, 36 insertions(+), 47 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_flow_os.c b/drivers/net/mlx5/linux/mlx5_flow_os.c
index 3c9a823edf..b139bb75b9 100644
--- a/drivers/net/mlx5/linux/mlx5_flow_os.c
+++ b/drivers/net/mlx5/linux/mlx5_flow_os.c
@@ -51,7 +51,7 @@ mlx5_flow_os_validate_item_esp(const struct rte_flow_item *item,
 int
 mlx5_flow_os_init_workspace_once(void)
 {
-	if (rte_thread_key_create(&key_workspace, flow_release_workspace)) {
+	if (rte_thread_key_create(&key_workspace, NULL)) {
 		DRV_LOG(ERR, "Can't create flow workspace data thread key.");
 		rte_errno = ENOMEM;
 		return -rte_errno;
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index b8643cebdd..79ccea5003 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1730,6 +1730,7 @@ mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh)
 	if (LIST_EMPTY(&mlx5_dev_ctx_list)) {
 		mlx5_os_net_cleanup();
 		mlx5_flow_os_release_workspace();
+		mlx5_flow_workspace_gc_release();
 	}
 	pthread_mutex_unlock(&mlx5_dev_ctx_list_mutex);
 	if (sh->flex_parsers_dv) {
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 54cab0ec05..a359f1e97c 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -6931,36 +6931,6 @@ flow_tunnel_from_rule(const struct mlx5_flow *flow)
 	return tunnel;
 }
 
-/**
- * Adjust flow RSS workspace if needed.
- *
- * @param wks
- *   Pointer to thread flow work space.
- * @param rss_desc
- *   Pointer to RSS descriptor.
- * @param[in] nrssq_num
- *   New RSS queue number.
- *
- * @return
- *   0 on success, -1 otherwise and rte_errno is set.
- */
-static int
-flow_rss_workspace_adjust(struct mlx5_flow_workspace *wks,
-			  struct mlx5_flow_rss_desc *rss_desc,
-			  uint32_t nrssq_num)
-{
-	if (likely(nrssq_num <= wks->rssq_num))
-		return 0;
-	rss_desc->queue = realloc(rss_desc->queue,
-			  sizeof(*rss_desc->queue) * RTE_ALIGN(nrssq_num, 2));
-	if (!rss_desc->queue) {
-		rte_errno = ENOMEM;
-		return -1;
-	}
-	wks->rssq_num = RTE_ALIGN(nrssq_num, 2);
-	return 0;
-}
-
 /**
  * Create a flow and add it to @p list.
  *
@@ -7079,8 +7049,7 @@ flow_list_create(struct rte_eth_dev *dev, enum mlx5_flow_type type,
 	if (attr->ingress)
 		rss = flow_get_rss_action(dev, p_actions_rx);
 	if (rss) {
-		if (flow_rss_workspace_adjust(wks, rss_desc, rss->queue_num))
-			return 0;
+		MLX5_ASSERT(rss->queue_num <= RTE_ETH_RSS_RETA_SIZE_512);
 		/*
 		 * The following information is required by
 		 * mlx5_flow_hashfields_adjust() in advance.
@@ -7568,12 +7537,34 @@ flow_release_workspace(void *data)
 
 	while (wks) {
 		next = wks->next;
-		free(wks->rss_desc.queue);
 		free(wks);
 		wks = next;
 	}
 }
 
+static struct mlx5_flow_workspace *gc_head;
+static rte_spinlock_t mlx5_flow_workspace_lock = RTE_SPINLOCK_INITIALIZER;
+
+static void
+mlx5_flow_workspace_gc_add(struct mlx5_flow_workspace *ws)
+{
+	rte_spinlock_lock(&mlx5_flow_workspace_lock);
+	ws->gc = gc_head;
+	gc_head = ws;
+	rte_spinlock_unlock(&mlx5_flow_workspace_lock);
+}
+
+void
+mlx5_flow_workspace_gc_release(void)
+{
+	while (gc_head) {
+		struct mlx5_flow_workspace *wks = gc_head;
+
+		gc_head = wks->gc;
+		flow_release_workspace(wks);
+	}
+}
+
 /**
  * Get thread specific current flow workspace.
  *
@@ -7599,23 +7590,17 @@ mlx5_flow_get_thread_workspace(void)
 static struct mlx5_flow_workspace*
 flow_alloc_thread_workspace(void)
 {
-	struct mlx5_flow_workspace *data = calloc(1, sizeof(*data));
+	size_t data_size = RTE_ALIGN(sizeof(struct mlx5_flow_workspace), sizeof(long));
+	size_t rss_queue_array_size = sizeof(uint16_t) * RTE_ETH_RSS_RETA_SIZE_512;
+	struct mlx5_flow_workspace *data = calloc(1, data_size +
+						     rss_queue_array_size);
 
 	if (!data) {
-		DRV_LOG(ERR, "Failed to allocate flow workspace "
-			"memory.");
+		DRV_LOG(ERR, "Failed to allocate flow workspace memory.");
 		return NULL;
 	}
-	data->rss_desc.queue = calloc(1,
-			sizeof(uint16_t) * MLX5_RSSQ_DEFAULT_NUM);
-	if (!data->rss_desc.queue)
-		goto err;
-	data->rssq_num = MLX5_RSSQ_DEFAULT_NUM;
+	data->rss_desc.queue = RTE_PTR_ADD(data, data_size);
 	return data;
-err:
-	free(data->rss_desc.queue);
-	free(data);
-	return NULL;
 }
 
 /**
@@ -7636,6 +7621,7 @@ mlx5_flow_push_thread_workspace(void)
 		data = flow_alloc_thread_workspace();
 		if (!data)
 			return NULL;
+		mlx5_flow_workspace_gc_add(data);
 	} else if (!curr->inuse) {
 		data = curr;
 	} else if (curr->next) {
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index f4eecbcb0a..9724b88996 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1437,10 +1437,10 @@ struct mlx5_flow_workspace {
 	/* If creating another flow in same thread, push new as stack. */
 	struct mlx5_flow_workspace *prev;
 	struct mlx5_flow_workspace *next;
+	struct mlx5_flow_workspace *gc;
 	uint32_t inuse; /* can't create new flow with current. */
 	struct mlx5_flow flows[MLX5_NUM_MAX_DEV_FLOWS];
 	struct mlx5_flow_rss_desc rss_desc;
-	uint32_t rssq_num; /* Allocated queue num in rss_desc. */
 	uint32_t flow_idx; /* Intermediate device flow index. */
 	struct mlx5_flow_meter_info *fm; /* Pointer to the meter in flow. */
 	struct mlx5_flow_meter_policy *policy;
@@ -1926,6 +1926,8 @@ struct mlx5_flow_driver_ops {
 struct mlx5_flow_workspace *mlx5_flow_push_thread_workspace(void);
 void mlx5_flow_pop_thread_workspace(void);
 struct mlx5_flow_workspace *mlx5_flow_get_thread_workspace(void);
+void mlx5_flow_workspace_gc_release(void);
+
 __extension__
 struct flow_grp_info {
 	uint64_t external:1;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.304573600 +0800
+++ 0082-net-mlx5-fix-flow-workspace-destruction.patch	2023-08-09 21:51:18.244352000 +0800
@@ -1 +1 @@
-From dc7c5e0aa905b675c56a66b2014b01b7f5ae8a1d Mon Sep 17 00:00:00 2001
+From 68b7edcd1e6fb1cb855de0f6a98979d5bbdaba50 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dc7c5e0aa905b675c56a66b2014b01b7f5ae8a1d ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org
@@ -52 +54 @@
-index 5f0aa296ba..fd9b76027d 100644
+index b8643cebdd..79ccea5003 100644
@@ -55 +57 @@
-@@ -1838,6 +1838,7 @@ mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh)
+@@ -1730,6 +1730,7 @@ mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh)
@@ -64 +66 @@
-index abb86241fc..1071ef0c3e 100644
+index 54cab0ec05..a359f1e97c 100644
@@ -67 +69 @@
-@@ -7155,36 +7155,6 @@ flow_tunnel_from_rule(const struct mlx5_flow *flow)
+@@ -6931,36 +6931,6 @@ flow_tunnel_from_rule(const struct mlx5_flow *flow)
@@ -104 +106 @@
-@@ -7303,8 +7273,7 @@ flow_list_create(struct rte_eth_dev *dev, enum mlx5_flow_type type,
+@@ -7079,8 +7049,7 @@ flow_list_create(struct rte_eth_dev *dev, enum mlx5_flow_type type,
@@ -114 +116 @@
-@@ -8072,12 +8041,34 @@ flow_release_workspace(void *data)
+@@ -7568,12 +7537,34 @@ flow_release_workspace(void *data)
@@ -150 +152 @@
-@@ -8103,23 +8094,17 @@ mlx5_flow_get_thread_workspace(void)
+@@ -7599,23 +7590,17 @@ mlx5_flow_get_thread_workspace(void)
@@ -180 +182 @@
-@@ -8140,6 +8125,7 @@ mlx5_flow_push_thread_workspace(void)
+@@ -7636,6 +7621,7 @@ mlx5_flow_push_thread_workspace(void)
@@ -189 +191 @@
-index 003e7da3a6..62789853ab 100644
+index f4eecbcb0a..9724b88996 100644
@@ -192 +194 @@
-@@ -1496,10 +1496,10 @@ struct mlx5_flow_workspace {
+@@ -1437,10 +1437,10 @@ struct mlx5_flow_workspace {
@@ -204 +206 @@
-@@ -2022,6 +2022,8 @@ struct mlx5_flow_driver_ops {
+@@ -1926,6 +1926,8 @@ struct mlx5_flow_driver_ops {

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: forbid MPRQ restart' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (27 preceding siblings ...)
  2023-08-09 23:59   ` patch 'net/mlx5: fix flow workspace destruction' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  2023-08-09 23:59   ` patch 'net/mlx5: fix RSS expansion inner buffer overflow' " Xueming Li
                     ` (9 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=f32ecbd872d16cd514117761a03e9614b911f846

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f32ecbd872d16cd514117761a03e9614b911f846 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Tue, 4 Jul 2023 00:22:24 +0300
Subject: [PATCH] net/mlx5: forbid MPRQ restart
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f0b2d50e2c6c02555b7fbe77f909bd7f1c6ac2e4 ]

The queue restart is only supported by the non-vectorized
single-packet receive queue today. Restarting MPRQ will
result in corrupted packets because of CQE and WQE mismatch.
Prevent this by not allowing the MPRQ Rx queue stop.

Fixes: 161d103b231c ("net/mlx5: add queue start and stop")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 81aa3f074a..a42c70f898 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -528,12 +528,12 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
 	 * synchronized, that might be broken on RQ restart
 	 * and cause Rx malfunction, so queue stopping is
 	 * not supported if vectorized Rx burst is engaged.
-	 * The routine pointer depends on the process
-	 * type, should perform check there.
+	 * The routine pointer depends on the process type,
+	 * should perform check there. MPRQ is not supported as well.
 	 */
-	if (pkt_burst == mlx5_rx_burst_vec) {
-		DRV_LOG(ERR, "Rx queue stop is not supported "
-			"for vectorized Rx");
+	if (pkt_burst != mlx5_rx_burst) {
+		DRV_LOG(ERR, "Rx queue stop is only supported "
+			"for non-vectorized single-packet Rx");
 		rte_errno = EINVAL;
 		return -EINVAL;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.343295400 +0800
+++ 0083-net-mlx5-forbid-MPRQ-restart.patch	2023-08-09 21:51:18.244352000 +0800
@@ -1 +1 @@
-From f0b2d50e2c6c02555b7fbe77f909bd7f1c6ac2e4 Mon Sep 17 00:00:00 2001
+From f32ecbd872d16cd514117761a03e9614b911f846 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f0b2d50e2c6c02555b7fbe77f909bd7f1c6ac2e4 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index ad8fd13cbe..b314c0482b 100644
+index 81aa3f074a..a42c70f898 100644
@@ -24 +26 @@
-@@ -531,12 +531,12 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
+@@ -528,12 +528,12 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix RSS expansion inner buffer overflow' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (28 preceding siblings ...)
  2023-08-09 23:59   ` patch 'net/mlx5: forbid MPRQ restart' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  2023-08-09 23:59   ` patch 'net/mlx5: fix query for NIC flow capability' " Xueming Li
                     ` (8 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Maayan Kashani; +Cc: Mário Kuka, Ori Kam, Raslan Darawsheh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=055858c3bcb4cb5f6e7e02e55139cd623f6312cc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 055858c3bcb4cb5f6e7e02e55139cd623f6312cc Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Thu, 6 Jul 2023 11:55:42 +0300
Subject: [PATCH] net/mlx5: fix RSS expansion inner buffer overflow
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit af72dd098cb1edb4de0e8ad2a2bac7d8d2447f98 ]

The stack which used for RSS expansion was overflowed and
trashed RSS expansion data.
	(buf->entry[MLX5_RSS_EXP_ELT_N])

Due to this overflow, packets such as ARP or LACP with overwritten
RSS types due to the overflow will be dropped.

This increases the buffer size to avoid such overflows and adds relevant
ASSERT for the future.

Bugzilla ID: 1173
Fixes: 18ca4a4ec73a ("net/mlx5: support ESP SPI match and RSS hash")

Reported-by: Mário Kuka <kuka@cesnet.cz>
Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Reviewed-by: Raslan Darawsheh <rasland@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index a359f1e97c..b98dc9ffb2 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -364,7 +364,7 @@ mlx5_flow_expand_rss_skip_explicit(const struct mlx5_flow_expand_node graph[],
 	return next;
 }
 
-#define MLX5_RSS_EXP_ELT_N 16
+#define MLX5_RSS_EXP_ELT_N 32
 
 /**
  * Expand RSS flows into several possible flows according to the RSS hash
@@ -529,6 +529,7 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
 			if (lsize > size)
 				return -EINVAL;
 			n = elt * sizeof(*item);
+			MLX5_ASSERT((buf->entries) < MLX5_RSS_EXP_ELT_N);
 			buf->entry[buf->entries].priority =
 				stack_pos + 1 + missed;
 			buf->entry[buf->entries].pattern = addr;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.367652000 +0800
+++ 0084-net-mlx5-fix-RSS-expansion-inner-buffer-overflow.patch	2023-08-09 21:51:18.254352000 +0800
@@ -1 +1 @@
-From af72dd098cb1edb4de0e8ad2a2bac7d8d2447f98 Mon Sep 17 00:00:00 2001
+From 055858c3bcb4cb5f6e7e02e55139cd623f6312cc Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit af72dd098cb1edb4de0e8ad2a2bac7d8d2447f98 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 1071ef0c3e..df0f1dfe52 100644
+index a359f1e97c..b98dc9ffb2 100644
@@ -35 +37 @@
-@@ -374,7 +374,7 @@ mlx5_flow_expand_rss_skip_explicit(const struct mlx5_flow_expand_node graph[],
+@@ -364,7 +364,7 @@ mlx5_flow_expand_rss_skip_explicit(const struct mlx5_flow_expand_node graph[],
@@ -44 +46 @@
-@@ -539,6 +539,7 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
+@@ -529,6 +529,7 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix query for NIC flow capability' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (29 preceding siblings ...)
  2023-08-09 23:59   ` patch 'net/mlx5: fix RSS expansion inner buffer overflow' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  2023-08-09 23:59   ` patch 'net/ice: fix VLAN mode parser' " Xueming Li
                     ` (7 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Ori Kam; +Cc: Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=1fa1c1ff1a926a606f533723626496b4574694a1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1fa1c1ff1a926a606f533723626496b4574694a1 Mon Sep 17 00:00:00 2001
From: Ori Kam <orika@nvidia.com>
Date: Thu, 6 Jul 2023 15:36:15 +0300
Subject: [PATCH] net/mlx5: fix query for NIC flow capability
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c83ee609708e9d2122c0d29a2ebc40a026b6f72b ]

Add query for NIC flow table support bit.

Fixes: 5f44fb1958e5 ("common/mlx5: query capability of registers")

Signed-off-by: Ori Kam <orika@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index e3a4927d0f..5742f9e831 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1002,6 +1002,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 					 general_obj_types) &
 			      MLX5_GENERAL_OBJ_TYPES_CAP_CONN_TRACK_OFFLOAD);
 	attr->rq_delay_drop = MLX5_GET(cmd_hca_cap, hcattr, rq_delay_drop);
+	attr->nic_flow_table = MLX5_GET(cmd_hca_cap, hcattr, nic_flow_table);
 	attr->max_flow_counter_15_0 = MLX5_GET(cmd_hca_cap, hcattr,
 			max_flow_counter_15_0);
 	attr->max_flow_counter_31_16 = MLX5_GET(cmd_hca_cap, hcattr,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.397448000 +0800
+++ 0085-net-mlx5-fix-query-for-NIC-flow-capability.patch	2023-08-09 21:51:18.254352000 +0800
@@ -1 +1 @@
-From c83ee609708e9d2122c0d29a2ebc40a026b6f72b Mon Sep 17 00:00:00 2001
+From 1fa1c1ff1a926a606f533723626496b4574694a1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c83ee609708e9d2122c0d29a2ebc40a026b6f72b ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index ef87862a6d..66a77159a0 100644
+index e3a4927d0f..5742f9e831 100644
@@ -21 +23 @@
-@@ -1078,6 +1078,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
+@@ -1002,6 +1002,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
@@ -26,3 +28,3 @@
- 	attr->striding_rq = MLX5_GET(cmd_hca_cap, hcattr, striding_rq);
- 	attr->ext_stride_num_range =
- 		MLX5_GET(cmd_hca_cap, hcattr, ext_stride_num_range);
+ 	attr->max_flow_counter_15_0 = MLX5_GET(cmd_hca_cap, hcattr,
+ 			max_flow_counter_15_0);
+ 	attr->max_flow_counter_31_16 = MLX5_GET(cmd_hca_cap, hcattr,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/ice: fix VLAN mode parser' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (30 preceding siblings ...)
  2023-08-09 23:59   ` patch 'net/mlx5: fix query for NIC flow capability' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  2023-08-09 23:59   ` patch 'net/iavf: fix VLAN insertion in vector path' " Xueming Li
                     ` (6 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=218543322877193c0d658410b2fb73e2803ad307

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 218543322877193c0d658410b2fb73e2803ad307 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Sun, 25 Jun 2023 08:23:08 +0000
Subject: [PATCH] net/ice: fix VLAN mode parser
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ac1926f641812d4033e320157d0c458f8fbee372 ]

Parser will not be created if raw packet filter is not support.
This patch add NULL pointer check for parser structure when VLAN
mode configure.

Fixes: 6e753d777ffc ("net/ice: initialize parser for double VLAN")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index ed3075d555..91bf1d6fcb 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1836,10 +1836,12 @@ ice_flow_init(struct ice_adapter *ad)
 	if (ice_parser_create(&ad->hw, &ad->psr) != ICE_SUCCESS)
 		PMD_INIT_LOG(WARNING, "Failed to initialize DDP parser, raw packet filter will not be supported");
 
-	if (ice_is_dvm_ena(&ad->hw))
-		ice_parser_dvm_set(ad->psr, true);
-	else
-		ice_parser_dvm_set(ad->psr, false);
+	if (ad->psr) {
+		if (ice_is_dvm_ena(&ad->hw))
+			ice_parser_dvm_set(ad->psr, true);
+		else
+			ice_parser_dvm_set(ad->psr, false);
+	}
 
 	RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {
 		if (engine->init == NULL) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.420806100 +0800
+++ 0086-net-ice-fix-VLAN-mode-parser.patch	2023-08-09 21:51:18.254352000 +0800
@@ -1 +1 @@
-From ac1926f641812d4033e320157d0c458f8fbee372 Mon Sep 17 00:00:00 2001
+From 218543322877193c0d658410b2fb73e2803ad307 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ac1926f641812d4033e320157d0c458f8fbee372 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/iavf: fix VLAN insertion in vector path' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (31 preceding siblings ...)
  2023-08-09 23:59   ` patch 'net/ice: fix VLAN mode parser' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  2023-08-09 23:59   ` patch 'net/ice: fix 32-bit build' " Xueming Li
                     ` (5 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=5c23daed42046e8ef4e82cdb6c134c6ff817fe80

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5c23daed42046e8ef4e82cdb6c134c6ff817fe80 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Mon, 3 Jul 2023 10:22:00 +0800
Subject: [PATCH] net/iavf: fix VLAN insertion in vector path
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit efe1b63775e8369b867f411d7bf8f61e97bd446b ]

As the VLAN insertion is partially supported in vector path,
the behavior is different in scalar and vector path.
For a VLAN packet, if using scalar path, the new VLAN tag will
be inserted after the original VLAN tag. If using vector path,
the new VLAN tag is inserted before the original VLAN tag.
To avoid any misleading, disable VLAN insertion in vector path.

Fixes: 059f18ae2aec ("net/iavf: add offload path for Tx AVX512")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 doc/guides/nics/features/iavf.ini | 2 +-
 drivers/net/iavf/iavf_rxtx.h      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/nics/features/iavf.ini b/doc/guides/nics/features/iavf.ini
index 9db2865b71..5cdf0ddee6 100644
--- a/doc/guides/nics/features/iavf.ini
+++ b/doc/guides/nics/features/iavf.ini
@@ -21,7 +21,7 @@ RSS key update       = Y
 RSS reta update      = Y
 VLAN filter          = Y
 CRC offload          = Y
-VLAN offload         = Y
+VLAN offload         = P
 L3 checksum offload  = P
 L4 checksum offload  = P
 Timestamp offload    = P
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index 2c4d8e2700..354326c235 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -27,6 +27,8 @@
 #define IAVF_VPMD_TX_MAX_FREE_BUF 64
 
 #define IAVF_TX_NO_VECTOR_FLAGS (				 \
+		RTE_ETH_TX_OFFLOAD_VLAN_INSERT |		 \
+		RTE_ETH_TX_OFFLOAD_QINQ_INSERT |		 \
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		 \
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |		 \
 		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |    \
@@ -34,8 +36,6 @@
 		RTE_ETH_TX_OFFLOAD_SECURITY)
 
 #define IAVF_TX_VECTOR_OFFLOAD (				 \
-		RTE_ETH_TX_OFFLOAD_VLAN_INSERT |		 \
-		RTE_ETH_TX_OFFLOAD_QINQ_INSERT |		 \
 		RTE_ETH_TX_OFFLOAD_IPV4_CKSUM |		 \
 		RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |		 \
 		RTE_ETH_TX_OFFLOAD_UDP_CKSUM |		 \
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.445710000 +0800
+++ 0087-net-iavf-fix-VLAN-insertion-in-vector-path.patch	2023-08-09 21:51:18.254352000 +0800
@@ -1 +1 @@
-From efe1b63775e8369b867f411d7bf8f61e97bd446b Mon Sep 17 00:00:00 2001
+From 5c23daed42046e8ef4e82cdb6c134c6ff817fe80 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit efe1b63775e8369b867f411d7bf8f61e97bd446b ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index fbb5b7df32..55a02165a0 100644
+index 9db2865b71..5cdf0ddee6 100644
@@ -27 +29 @@
-@@ -24,7 +24,7 @@ RSS key update       = Y
+@@ -21,7 +21,7 @@ RSS key update       = Y
@@ -33,2 +35,2 @@
- L3 checksum offload  = Y
- L4 checksum offload  = Y
+ L3 checksum offload  = P
+ L4 checksum offload  = P
@@ -37 +39 @@
-index 2bf2e3252a..8d4a77271a 100644
+index 2c4d8e2700..354326c235 100644
@@ -40 +42 @@
-@@ -27,13 +27,13 @@
+@@ -27,6 +27,8 @@
@@ -47,0 +50,2 @@
+ 		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |    \
+@@ -34,8 +36,6 @@

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/ice: fix 32-bit build' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (32 preceding siblings ...)
  2023-08-09 23:59   ` patch 'net/iavf: fix VLAN insertion in vector path' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  2023-08-09 23:59   ` patch 'net/iavf: fix tunnel TSO path selection' " Xueming Li
                     ` (4 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Yiding Zhou; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=ff90936e0f1fe1c5bea716fd4d0e3fcc6b07f9cf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ff90936e0f1fe1c5bea716fd4d0e3fcc6b07f9cf Mon Sep 17 00:00:00 2001
From: Yiding Zhou <yidingx.zhou@intel.com>
Date: Wed, 5 Jul 2023 15:32:10 +0800
Subject: [PATCH] net/ice: fix 32-bit build
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 910507de1164d1cb7051ddb84ac742bf088f4711 ]

Replace 'rte_memcpy' with 'memcpy' like other PMD code to avoid errors when
compiling with GCC-12 on 32-bit configure.

Compiler reports the follow error:

error: array subscript 8 is outside array bounds of "struct rte_mbuf *[32]"
[-Werror=array-bounds]

Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
Tested-by: Luca Boccassi <bluca@debian.org>
---
 drivers/net/ice/ice_rxtx_vec_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index eec6ea2134..55840cf170 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -72,7 +72,7 @@ ice_rx_reassemble_packets(struct ice_rx_queue *rxq, struct rte_mbuf **rx_bufs,
 	/* save the partial packet for next time */
 	rxq->pkt_first_seg = start;
 	rxq->pkt_last_seg = end;
-	rte_memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
+	memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
 	return pkt_idx;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.467057300 +0800
+++ 0088-net-ice-fix-32-bit-build.patch	2023-08-09 21:51:18.254352000 +0800
@@ -1 +1 @@
-From 910507de1164d1cb7051ddb84ac742bf088f4711 Mon Sep 17 00:00:00 2001
+From ff90936e0f1fe1c5bea716fd4d0e3fcc6b07f9cf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 910507de1164d1cb7051ddb84ac742bf088f4711 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/iavf: fix tunnel TSO path selection' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (33 preceding siblings ...)
  2023-08-09 23:59   ` patch 'net/ice: fix 32-bit build' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  2023-08-09 23:59   ` patch 'net/ice: fix RSS hash key generation' " Xueming Li
                     ` (3 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Ke Xu; +Cc: Zhichao Zeng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=e7c69c450ba135ea52da529e92d46546a4ba0fbe

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e7c69c450ba135ea52da529e92d46546a4ba0fbe Mon Sep 17 00:00:00 2001
From: Ke Xu <ke1.xu@intel.com>
Date: Thu, 6 Jul 2023 02:45:26 +0000
Subject: [PATCH] net/iavf: fix tunnel TSO path selection
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ca34627be5d6dae10c2ffe95d8c5782d6fec39e9 ]

IAVF currently supports TSO and Tunnel TSO. Both these two features
are implemented in scalar path. As there are missed flags for Tunnel
TSO, it selects vector paths wrongly when only Tunnel TSO is enabled
after introducing the patch "net/iavf: add offload path for Tx AVX512".

This patch added the missed flags to fix the Tunnel TSO path selecting.

Fixes: 059f18ae2aec ("net/iavf: add offload path for Tx AVX512")

Signed-off-by: Ke Xu <ke1.xu@intel.com>
Acked-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 drivers/net/iavf/iavf_rxtx.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index 354326c235..75d3f6b3be 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -31,8 +31,10 @@
 		RTE_ETH_TX_OFFLOAD_QINQ_INSERT |		 \
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		 \
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |		 \
-		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |    \
-		RTE_ETH_TX_OFFLOAD_OUTER_UDP_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_SECURITY)
 
 #define IAVF_TX_VECTOR_OFFLOAD (				 \
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.487985200 +0800
+++ 0089-net-iavf-fix-tunnel-TSO-path-selection.patch	2023-08-09 21:51:18.254352000 +0800
@@ -1 +1 @@
-From ca34627be5d6dae10c2ffe95d8c5782d6fec39e9 Mon Sep 17 00:00:00 2001
+From e7c69c450ba135ea52da529e92d46546a4ba0fbe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ca34627be5d6dae10c2ffe95d8c5782d6fec39e9 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -19,2 +21,2 @@
- drivers/net/iavf/iavf_rxtx.h | 4 ++++
- 1 file changed, 4 insertions(+)
+ drivers/net/iavf/iavf_rxtx.h | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
@@ -23 +25 @@
-index 8d4a77271a..605ea3f824 100644
+index 354326c235..75d3f6b3be 100644
@@ -26 +28 @@
-@@ -31,6 +31,10 @@
+@@ -31,8 +31,10 @@
@@ -29,0 +32,2 @@
+-		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |    \
+-		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |	\

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/ice: fix RSS hash key generation' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (34 preceding siblings ...)
  2023-08-09 23:59   ` patch 'net/iavf: fix tunnel TSO path selection' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  2023-08-09 23:59   ` patch 'baseband/fpga_5gnr_fec: fix possible division by zero' " Xueming Li
                     ` (2 subsequent siblings)
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Yuying Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=9b95d1a0f8d7dbb03fdaa27f2bb1ccc5c10a8f3a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9b95d1a0f8d7dbb03fdaa27f2bb1ccc5c10a8f3a Mon Sep 17 00:00:00 2001
From: Yuying Zhang <yuying.zhang@intel.com>
Date: Fri, 7 Jul 2023 02:10:46 +0000
Subject: [PATCH] net/ice: fix RSS hash key generation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b9f28be1bf72e120041416b461325941fd97cac0 ]

Current code just generated 40 bytes standard rss
hash key of ice driver. The extended 12 bytes
were filled by hardware and were invalid for users.
This patch generate 52 bytes rss hash key for ice
driver just as other drivers.

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Fixes: 20d6a017e148 ("net/ice: fix build with GCC 12")

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index c004aa42ee..bba2715b1d 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3312,7 +3312,8 @@ static int ice_init_rss(struct ice_pf *pf)
 
 	rss_conf = &dev_data->dev_conf.rx_adv_conf.rss_conf;
 	nb_q = dev_data->nb_rx_queues;
-	vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE;
+	vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE +
+			    ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE;
 	vsi->rss_lut_size = pf->hash_lut_size;
 
 	if (nb_q == 0) {
@@ -3353,7 +3354,10 @@ static int ice_init_rss(struct ice_pf *pf)
 				   vsi->rss_key_size));
 
 	rte_memcpy(key.standard_rss_key, vsi->rss_key,
-		RTE_MIN(sizeof(key.standard_rss_key), vsi->rss_key_size));
+		ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE);
+	rte_memcpy(key.extended_hash_key,
+		&vsi->rss_key[ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE],
+		ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE);
 	ret = ice_aq_set_rss_key(hw, vsi->idx, &key);
 	if (ret)
 		goto out;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.514920400 +0800
+++ 0090-net-ice-fix-RSS-hash-key-generation.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From b9f28be1bf72e120041416b461325941fd97cac0 Mon Sep 17 00:00:00 2001
+From 9b95d1a0f8d7dbb03fdaa27f2bb1ccc5c10a8f3a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b9f28be1bf72e120041416b461325941fd97cac0 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 949b13324f..4bad39c2c1 100644
+index c004aa42ee..bba2715b1d 100644
@@ -26 +28 @@
-@@ -3350,7 +3350,8 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -3312,7 +3312,8 @@ static int ice_init_rss(struct ice_pf *pf)
@@ -36 +38 @@
-@@ -3391,7 +3392,10 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -3353,7 +3354,10 @@ static int ice_init_rss(struct ice_pf *pf)

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'baseband/fpga_5gnr_fec: fix possible division by zero' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (35 preceding siblings ...)
  2023-08-09 23:59   ` patch 'net/ice: fix RSS hash key generation' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  2023-08-09 23:59   ` patch 'baseband/fpga_5gnr_fec: fix starting unconfigured queue' " Xueming Li
  2023-08-09 23:59   ` patch 'crypto/qat: fix null algorithm digest placement' " Xueming Li
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=e1c685e274757912989646fe242eff126d7623ce

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e1c685e274757912989646fe242eff126d7623ce Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Thu, 25 May 2023 11:28:07 -0700
Subject: [PATCH] baseband/fpga_5gnr_fec: fix possible division by zero
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8b087b96eaa9df8d09fcea9a2a690e2c422058a5 ]

Add fix to have an early exit when z_c is zero to prevent a possible
division by zero.

Fixes: 44dc6faa796f ("baseband/fpga_5gnr_fec: add LDPC processing functions")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index d520d5238f..ffd4334541 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -887,9 +887,11 @@ check_desc_error(uint32_t error_code) {
 static inline uint16_t
 get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index)
 {
+	uint16_t n = (bg == 1 ? N_ZC_1 : N_ZC_2) * z_c;
 	if (rv_index == 0)
 		return 0;
-	uint16_t n = (bg == 1 ? N_ZC_1 : N_ZC_2) * z_c;
+	if (z_c == 0)
+		return 0;
 	if (n_cb == n) {
 		if (rv_index == 1)
 			return (bg == 1 ? K0_1_1 : K0_1_2) * z_c;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.544177800 +0800
+++ 0091-baseband-fpga_5gnr_fec-fix-possible-division-by-zero.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From 8b087b96eaa9df8d09fcea9a2a690e2c422058a5 Mon Sep 17 00:00:00 2001
+From e1c685e274757912989646fe242eff126d7623ce Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8b087b96eaa9df8d09fcea9a2a690e2c422058a5 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index f29565af8c..99390c4816 100644
+index d520d5238f..ffd4334541 100644
@@ -22 +24 @@
-@@ -877,9 +877,11 @@ check_desc_error(uint32_t error_code) {
+@@ -887,9 +887,11 @@ check_desc_error(uint32_t error_code) {

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'baseband/fpga_5gnr_fec: fix starting unconfigured queue' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (36 preceding siblings ...)
  2023-08-09 23:59   ` patch 'baseband/fpga_5gnr_fec: fix possible division by zero' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  2023-08-09 23:59   ` patch 'crypto/qat: fix null algorithm digest placement' " Xueming Li
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=be74d3fef7f2767b7bcd21f592d922571b75bc35

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From be74d3fef7f2767b7bcd21f592d922571b75bc35 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Thu, 25 May 2023 11:28:08 -0700
Subject: [PATCH] baseband/fpga_5gnr_fec: fix starting unconfigured queue
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 490501e6cbe48503aeadb20f89915a3949b70aa8 ]

Adding exception to prevent segmentation fault in case a queue is
started which was not configured earlier.

Fixes: c58109a8871d ("baseband/fpga_5gnr_fec: add queue configuration")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index ffd4334541..0dfeba08e1 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -569,17 +569,21 @@ static int
 fpga_queue_start(struct rte_bbdev *dev, uint16_t queue_id)
 {
 	struct fpga_5gnr_fec_device *d = dev->data->dev_private;
+	struct fpga_queue *q = dev->data->queues[queue_id].queue_private;
+	uint32_t offset = FPGA_5GNR_FEC_RING_CTRL_REGS +
+			(sizeof(struct fpga_ring_ctrl_reg) * q->q_idx);
+	uint8_t enable = 0x01;
+	uint16_t zero = 0x0000;
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 	if (d == NULL) {
 		rte_bbdev_log(ERR, "Invalid device pointer");
 		return -1;
 	}
 #endif
-	struct fpga_queue *q = dev->data->queues[queue_id].queue_private;
-	uint32_t offset = FPGA_5GNR_FEC_RING_CTRL_REGS +
-			(sizeof(struct fpga_ring_ctrl_reg) * q->q_idx);
-	uint8_t enable = 0x01;
-	uint16_t zero = 0x0000;
+	if (dev->data->queues[queue_id].queue_private == NULL) {
+		rte_bbdev_log(ERR, "Cannot start invalid queue %d", queue_id);
+		return -1;
+	}
 
 	/* Clear queue head and tail variables */
 	q->tail = q->head_free_desc = 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.565968300 +0800
+++ 0092-baseband-fpga_5gnr_fec-fix-starting-unconfigured-que.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From 490501e6cbe48503aeadb20f89915a3949b70aa8 Mon Sep 17 00:00:00 2001
+From be74d3fef7f2767b7bcd21f592d922571b75bc35 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 490501e6cbe48503aeadb20f89915a3949b70aa8 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 99390c4816..6b0644ffc5 100644
+index ffd4334541..0dfeba08e1 100644
@@ -22 +24 @@
-@@ -567,17 +567,21 @@ static int
+@@ -569,17 +569,21 @@ static int

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'crypto/qat: fix null algorithm digest placement' has been queued to stable release 22.11.3
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
                     ` (37 preceding siblings ...)
  2023-08-09 23:59   ` patch 'baseband/fpga_5gnr_fec: fix starting unconfigured queue' " Xueming Li
@ 2023-08-09 23:59   ` Xueming Li
  38 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-09 23:59 UTC (permalink / raw)
  To: Ciara Power; +Cc: Arkadiusz Kusztal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=60c1ca4fdefaca36eecba34e7b15ba907426543f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 60c1ca4fdefaca36eecba34e7b15ba907426543f Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 23 Jun 2023 13:51:04 +0000
Subject: [PATCH] crypto/qat: fix null algorithm digest placement
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8b4618a7b453dec02ca8ea40871fb124100f98f4 ]

QAT HW generates bytes of 0x00 digest, even when a digest of len 0 is
requested for NULL. This caused test failures when the test vector had
digest len 0, as the buffer has unexpected changed bytes.

By placing the digest into the cookie for NULL authentication,
the buffer remains unchanged as expected, and the digest
is placed to the side, as it won't be used anyway.

Fixes: db0e952a5c01 ("crypto/qat: add NULL capability")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c |  2 +-
 drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 18 ++++++++++++++----
 drivers/crypto/qat/dev/qat_sym_pmd_gen1.c    |  4 ++--
 drivers/crypto/qat/qat_sym.c                 |  5 +++++
 drivers/crypto/qat/qat_sym.h                 |  2 ++
 5 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
index 2a0ddab8af..1f6f63c831 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
@@ -407,7 +407,7 @@ qat_sym_build_op_auth_gen3(void *in_op, struct qat_sym_session *ctx,
 	rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
 
 	ofs.raw = qat_sym_convert_op_to_vec_auth(op, ctx, &in_sgl, &out_sgl,
-			NULL, &auth_iv, &digest);
+			NULL, &auth_iv, &digest, op_cookie);
 	if (unlikely(ofs.raw == UINT64_MAX)) {
 		op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
 		return -EINVAL;
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 092265631b..7972c7cfeb 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -290,7 +290,8 @@ qat_sym_convert_op_to_vec_auth(struct rte_crypto_op *op,
 		struct rte_crypto_sgl *in_sgl, struct rte_crypto_sgl *out_sgl,
 		struct rte_crypto_va_iova_ptr *cipher_iv __rte_unused,
 		struct rte_crypto_va_iova_ptr *auth_iv,
-		struct rte_crypto_va_iova_ptr *digest)
+		struct rte_crypto_va_iova_ptr *digest,
+		struct qat_sym_op_cookie *cookie)
 {
 	uint32_t auth_ofs = 0, auth_len = 0;
 	int n_src, ret;
@@ -355,7 +356,11 @@ qat_sym_convert_op_to_vec_auth(struct rte_crypto_op *op,
 		out_sgl->num = 0;
 
 	digest->va = (void *)op->sym->auth.digest.data;
-	digest->iova = op->sym->auth.digest.phys_addr;
+
+	if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL)
+		digest->iova = cookie->digest_null_phys_addr;
+	else
+		digest->iova = op->sym->auth.digest.phys_addr;
 
 	return 0;
 }
@@ -366,7 +371,8 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
 		struct rte_crypto_sgl *in_sgl, struct rte_crypto_sgl *out_sgl,
 		struct rte_crypto_va_iova_ptr *cipher_iv,
 		struct rte_crypto_va_iova_ptr *auth_iv_or_aad,
-		struct rte_crypto_va_iova_ptr *digest)
+		struct rte_crypto_va_iova_ptr *digest,
+		struct qat_sym_op_cookie *cookie)
 {
 	union rte_crypto_sym_ofs ofs;
 	uint32_t max_len = 0;
@@ -390,7 +396,11 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
 	auth_iv_or_aad->iova = rte_crypto_op_ctophys_offset(op,
 			ctx->auth_iv.offset);
 	digest->va = (void *)op->sym->auth.digest.data;
-	digest->iova = op->sym->auth.digest.phys_addr;
+
+	if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL)
+		digest->iova = cookie->digest_null_phys_addr;
+	else
+		digest->iova = op->sym->auth.digest.phys_addr;
 
 	ret = qat_cipher_is_len_in_bits(ctx, op);
 	switch (ret) {
diff --git a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
index 91d5cfa71d..2709b0ab04 100644
--- a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
+++ b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
@@ -274,7 +274,7 @@ qat_sym_build_op_auth_gen1(void *in_op, struct qat_sym_session *ctx,
 	rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
 
 	ofs.raw = qat_sym_convert_op_to_vec_auth(op, ctx, &in_sgl, &out_sgl,
-			NULL, &auth_iv, &digest);
+			NULL, &auth_iv, &digest, op_cookie);
 	if (unlikely(ofs.raw == UINT64_MAX)) {
 		op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
 		return -EINVAL;
@@ -368,7 +368,7 @@ qat_sym_build_op_chain_gen1(void *in_op, struct qat_sym_session *ctx,
 	rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
 
 	ofs.raw = qat_sym_convert_op_to_vec_chain(op, ctx, &in_sgl, &out_sgl,
-			&cipher_iv, &auth_iv, &digest);
+			&cipher_iv, &auth_iv, &digest, cookie);
 	if (unlikely(ofs.raw == UINT64_MAX)) {
 		op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
 		return -EINVAL;
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 2450f042c8..18f99089e8 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -51,6 +51,11 @@ qat_sym_init_op_cookie(void *op_cookie)
 			rte_mempool_virt2iova(cookie) +
 			offsetof(struct qat_sym_op_cookie,
 			opt.spc_gmac.cd_cipher);
+
+	cookie->digest_null_phys_addr =
+			rte_mempool_virt2iova(cookie) +
+			offsetof(struct qat_sym_op_cookie,
+			digest_null);
 }
 
 static __rte_always_inline int
diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h
index 9a4251e08b..a45bddf848 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -116,6 +116,8 @@ struct qat_sym_op_cookie {
 			phys_addr_t cd_phys_addr;
 		} spc_gmac;
 	} opt;
+	uint8_t digest_null[4];
+	phys_addr_t digest_null_phys_addr;
 };
 
 struct qat_sym_dp_ctx {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.586620100 +0800
+++ 0093-crypto-qat-fix-null-algorithm-digest-placement.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From 8b4618a7b453dec02ca8ea40871fb124100f98f4 Mon Sep 17 00:00:00 2001
+From 60c1ca4fdefaca36eecba34e7b15ba907426543f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8b4618a7b453dec02ca8ea40871fb124100f98f4 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index aeca1db4b8..bc71665a50 100644
+index 2a0ddab8af..1f6f63c831 100644
@@ -31 +33 @@
-@@ -444,7 +444,7 @@ qat_sym_build_op_auth_gen3(void *in_op, struct qat_sym_session *ctx,
+@@ -407,7 +407,7 @@ qat_sym_build_op_auth_gen3(void *in_op, struct qat_sym_session *ctx,
@@ -41 +43 @@
-index 1bafeb4a53..cab7e214c0 100644
+index 092265631b..7972c7cfeb 100644
@@ -44 +46 @@
-@@ -300,7 +300,8 @@ qat_sym_convert_op_to_vec_auth(struct rte_crypto_op *op,
+@@ -290,7 +290,8 @@ qat_sym_convert_op_to_vec_auth(struct rte_crypto_op *op,
@@ -54 +56 @@
-@@ -365,7 +366,11 @@ qat_sym_convert_op_to_vec_auth(struct rte_crypto_op *op,
+@@ -355,7 +356,11 @@ qat_sym_convert_op_to_vec_auth(struct rte_crypto_op *op,
@@ -67 +69 @@
-@@ -376,7 +381,8 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -366,7 +371,8 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -77 +79 @@
-@@ -401,7 +407,11 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -390,7 +396,11 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -91 +93 @@
-index 580c245482..70938ba508 100644
+index 91d5cfa71d..2709b0ab04 100644
@@ -94 +96 @@
-@@ -278,7 +278,7 @@ qat_sym_build_op_auth_gen1(void *in_op, struct qat_sym_session *ctx,
+@@ -274,7 +274,7 @@ qat_sym_build_op_auth_gen1(void *in_op, struct qat_sym_session *ctx,
@@ -113 +115 @@
-index 5c3cdd8183..936c2615e4 100644
+index 2450f042c8..18f99089e8 100644
@@ -129 +131 @@
-index 193281cd91..d19cadde86 100644
+index 9a4251e08b..a45bddf848 100644
@@ -132 +134 @@
-@@ -113,6 +113,8 @@ struct qat_sym_op_cookie {
+@@ -116,6 +116,8 @@ struct qat_sym_op_cookie {

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'crypto/qat: fix null algorithm digest placement' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (127 preceding siblings ...)
  2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
@ 2023-08-10  0:06 ` Xueming Li
  2023-08-10  0:06   ` patch 'common/qat: detach crypto from compress build' " Xueming Li
                     ` (9 more replies)
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
  129 siblings, 10 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:06 UTC (permalink / raw)
  To: Ciara Power; +Cc: Arkadiusz Kusztal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=60c1ca4fdefaca36eecba34e7b15ba907426543f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 60c1ca4fdefaca36eecba34e7b15ba907426543f Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 23 Jun 2023 13:51:04 +0000
Subject: [PATCH] crypto/qat: fix null algorithm digest placement
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8b4618a7b453dec02ca8ea40871fb124100f98f4 ]

QAT HW generates bytes of 0x00 digest, even when a digest of len 0 is
requested for NULL. This caused test failures when the test vector had
digest len 0, as the buffer has unexpected changed bytes.

By placing the digest into the cookie for NULL authentication,
the buffer remains unchanged as expected, and the digest
is placed to the side, as it won't be used anyway.

Fixes: db0e952a5c01 ("crypto/qat: add NULL capability")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c |  2 +-
 drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 18 ++++++++++++++----
 drivers/crypto/qat/dev/qat_sym_pmd_gen1.c    |  4 ++--
 drivers/crypto/qat/qat_sym.c                 |  5 +++++
 drivers/crypto/qat/qat_sym.h                 |  2 ++
 5 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
index 2a0ddab8af..1f6f63c831 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
@@ -407,7 +407,7 @@ qat_sym_build_op_auth_gen3(void *in_op, struct qat_sym_session *ctx,
 	rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
 
 	ofs.raw = qat_sym_convert_op_to_vec_auth(op, ctx, &in_sgl, &out_sgl,
-			NULL, &auth_iv, &digest);
+			NULL, &auth_iv, &digest, op_cookie);
 	if (unlikely(ofs.raw == UINT64_MAX)) {
 		op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
 		return -EINVAL;
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 092265631b..7972c7cfeb 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -290,7 +290,8 @@ qat_sym_convert_op_to_vec_auth(struct rte_crypto_op *op,
 		struct rte_crypto_sgl *in_sgl, struct rte_crypto_sgl *out_sgl,
 		struct rte_crypto_va_iova_ptr *cipher_iv __rte_unused,
 		struct rte_crypto_va_iova_ptr *auth_iv,
-		struct rte_crypto_va_iova_ptr *digest)
+		struct rte_crypto_va_iova_ptr *digest,
+		struct qat_sym_op_cookie *cookie)
 {
 	uint32_t auth_ofs = 0, auth_len = 0;
 	int n_src, ret;
@@ -355,7 +356,11 @@ qat_sym_convert_op_to_vec_auth(struct rte_crypto_op *op,
 		out_sgl->num = 0;
 
 	digest->va = (void *)op->sym->auth.digest.data;
-	digest->iova = op->sym->auth.digest.phys_addr;
+
+	if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL)
+		digest->iova = cookie->digest_null_phys_addr;
+	else
+		digest->iova = op->sym->auth.digest.phys_addr;
 
 	return 0;
 }
@@ -366,7 +371,8 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
 		struct rte_crypto_sgl *in_sgl, struct rte_crypto_sgl *out_sgl,
 		struct rte_crypto_va_iova_ptr *cipher_iv,
 		struct rte_crypto_va_iova_ptr *auth_iv_or_aad,
-		struct rte_crypto_va_iova_ptr *digest)
+		struct rte_crypto_va_iova_ptr *digest,
+		struct qat_sym_op_cookie *cookie)
 {
 	union rte_crypto_sym_ofs ofs;
 	uint32_t max_len = 0;
@@ -390,7 +396,11 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
 	auth_iv_or_aad->iova = rte_crypto_op_ctophys_offset(op,
 			ctx->auth_iv.offset);
 	digest->va = (void *)op->sym->auth.digest.data;
-	digest->iova = op->sym->auth.digest.phys_addr;
+
+	if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL)
+		digest->iova = cookie->digest_null_phys_addr;
+	else
+		digest->iova = op->sym->auth.digest.phys_addr;
 
 	ret = qat_cipher_is_len_in_bits(ctx, op);
 	switch (ret) {
diff --git a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
index 91d5cfa71d..2709b0ab04 100644
--- a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
+++ b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
@@ -274,7 +274,7 @@ qat_sym_build_op_auth_gen1(void *in_op, struct qat_sym_session *ctx,
 	rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
 
 	ofs.raw = qat_sym_convert_op_to_vec_auth(op, ctx, &in_sgl, &out_sgl,
-			NULL, &auth_iv, &digest);
+			NULL, &auth_iv, &digest, op_cookie);
 	if (unlikely(ofs.raw == UINT64_MAX)) {
 		op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
 		return -EINVAL;
@@ -368,7 +368,7 @@ qat_sym_build_op_chain_gen1(void *in_op, struct qat_sym_session *ctx,
 	rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
 
 	ofs.raw = qat_sym_convert_op_to_vec_chain(op, ctx, &in_sgl, &out_sgl,
-			&cipher_iv, &auth_iv, &digest);
+			&cipher_iv, &auth_iv, &digest, cookie);
 	if (unlikely(ofs.raw == UINT64_MAX)) {
 		op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
 		return -EINVAL;
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 2450f042c8..18f99089e8 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -51,6 +51,11 @@ qat_sym_init_op_cookie(void *op_cookie)
 			rte_mempool_virt2iova(cookie) +
 			offsetof(struct qat_sym_op_cookie,
 			opt.spc_gmac.cd_cipher);
+
+	cookie->digest_null_phys_addr =
+			rte_mempool_virt2iova(cookie) +
+			offsetof(struct qat_sym_op_cookie,
+			digest_null);
 }
 
 static __rte_always_inline int
diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h
index 9a4251e08b..a45bddf848 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -116,6 +116,8 @@ struct qat_sym_op_cookie {
 			phys_addr_t cd_phys_addr;
 		} spc_gmac;
 	} opt;
+	uint8_t digest_null[4];
+	phys_addr_t digest_null_phys_addr;
 };
 
 struct qat_sym_dp_ctx {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.586620100 +0800
+++ 0093-crypto-qat-fix-null-algorithm-digest-placement.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From 8b4618a7b453dec02ca8ea40871fb124100f98f4 Mon Sep 17 00:00:00 2001
+From 60c1ca4fdefaca36eecba34e7b15ba907426543f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8b4618a7b453dec02ca8ea40871fb124100f98f4 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index aeca1db4b8..bc71665a50 100644
+index 2a0ddab8af..1f6f63c831 100644
@@ -31 +33 @@
-@@ -444,7 +444,7 @@ qat_sym_build_op_auth_gen3(void *in_op, struct qat_sym_session *ctx,
+@@ -407,7 +407,7 @@ qat_sym_build_op_auth_gen3(void *in_op, struct qat_sym_session *ctx,
@@ -41 +43 @@
-index 1bafeb4a53..cab7e214c0 100644
+index 092265631b..7972c7cfeb 100644
@@ -44 +46 @@
-@@ -300,7 +300,8 @@ qat_sym_convert_op_to_vec_auth(struct rte_crypto_op *op,
+@@ -290,7 +290,8 @@ qat_sym_convert_op_to_vec_auth(struct rte_crypto_op *op,
@@ -54 +56 @@
-@@ -365,7 +366,11 @@ qat_sym_convert_op_to_vec_auth(struct rte_crypto_op *op,
+@@ -355,7 +356,11 @@ qat_sym_convert_op_to_vec_auth(struct rte_crypto_op *op,
@@ -67 +69 @@
-@@ -376,7 +381,8 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -366,7 +371,8 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -77 +79 @@
-@@ -401,7 +407,11 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -390,7 +396,11 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -91 +93 @@
-index 580c245482..70938ba508 100644
+index 91d5cfa71d..2709b0ab04 100644
@@ -94 +96 @@
-@@ -278,7 +278,7 @@ qat_sym_build_op_auth_gen1(void *in_op, struct qat_sym_session *ctx,
+@@ -274,7 +274,7 @@ qat_sym_build_op_auth_gen1(void *in_op, struct qat_sym_session *ctx,
@@ -113 +115 @@
-index 5c3cdd8183..936c2615e4 100644
+index 2450f042c8..18f99089e8 100644
@@ -129 +131 @@
-index 193281cd91..d19cadde86 100644
+index 9a4251e08b..a45bddf848 100644
@@ -132 +134 @@
-@@ -113,6 +113,8 @@ struct qat_sym_op_cookie {
+@@ -116,6 +116,8 @@ struct qat_sym_op_cookie {

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'common/qat: detach crypto from compress build' has been queued to stable release 22.11.3
  2023-08-10  0:06 ` Xueming Li
@ 2023-08-10  0:06   ` Xueming Li
  2023-08-10  0:06   ` patch 'test/crypto: fix PDCP-SDAP test vectors' " Xueming Li
                     ` (8 subsequent siblings)
  9 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:06 UTC (permalink / raw)
  To: Vikash Poddar; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=dc3ba9b6f98bca6cdef64d3660ac48f4bdbd2e7c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dc3ba9b6f98bca6cdef64d3660ac48f4bdbd2e7c Mon Sep 17 00:00:00 2001
From: Vikash Poddar <vikash.chandrax.poddar@intel.com>
Date: Mon, 26 Jun 2023 11:29:06 +0000
Subject: [PATCH] common/qat: detach crypto from compress build
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7cb939f6485ea8e4d6b1e8e82924fe2fcec96d60 ]

qat_qp.c is a common file for QAT crypto and
compress. Moved compress function from common
file to compress QAT file qat_comp.c

Bugzilla ID: 1237
Fixes: 2ca75c65af4c ("common/qat: build drivers from common folder")

Signed-off-by: Vikash Poddar <vikash.chandrax.poddar@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 drivers/common/qat/meson.build  |   8 --
 drivers/common/qat/qat_qp.c     | 187 --------------------------------
 drivers/common/qat/qat_qp.h     |  20 +++-
 drivers/compress/qat/qat_comp.c | 182 +++++++++++++++++++++++++++++++
 drivers/compress/qat/qat_comp.h |   3 +
 5 files changed, 201 insertions(+), 199 deletions(-)

diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
index b84e5b3c6c..95b52b78c3 100644
--- a/drivers/common/qat/meson.build
+++ b/drivers/common/qat/meson.build
@@ -54,14 +54,6 @@ if libipsecmb.found() and libcrypto_3.found()
     endif
 endif
 
-# The driver should not build if both compression and crypto are disabled
-#FIXME common code depends on compression files so check only compress!
-if not qat_compress # and not qat_crypto
-    build = false
-    reason = '' # rely on reason for compress/crypto above
-    subdir_done()
-endif
-
 deps += ['bus_pci', 'cryptodev', 'net', 'compressdev']
 sources += files(
         'qat_common.c',
diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index 9cbd19a481..e95df292e8 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -449,20 +449,6 @@ adf_configure_queues(struct qat_qp *qp, enum qat_device_gen qat_dev_gen)
 	return 0;
 }
 
-static inline void
-txq_write_tail(enum qat_device_gen qat_dev_gen,
-		struct qat_qp *qp, struct qat_queue *q)
-{
-	struct qat_qp_hw_spec_funcs *ops =
-		qat_qp_hw_spec[qat_dev_gen];
-
-	/*
-	 * Pointer check should be done during
-	 * initialization
-	 */
-	ops->qat_qp_csr_write_tail(qp, q);
-}
-
 static inline void
 qat_qp_csr_write_head(enum qat_device_gen qat_dev_gen, struct qat_qp *qp,
 			struct qat_queue *q, uint32_t new_head)
@@ -631,179 +617,6 @@ kick_tail:
 	return nb_ops_sent;
 }
 
-/* Use this for compression only - but keep consistent with above common
- * function as much as possible.
- */
-uint16_t
-qat_enqueue_comp_op_burst(void *qp, void **ops, uint16_t nb_ops)
-{
-	register struct qat_queue *queue;
-	struct qat_qp *tmp_qp = (struct qat_qp *)qp;
-	register uint32_t nb_ops_sent = 0;
-	register int nb_desc_to_build;
-	uint16_t nb_ops_possible = nb_ops;
-	register uint8_t *base_addr;
-	register uint32_t tail;
-
-	int descriptors_built, total_descriptors_built = 0;
-	int nb_remaining_descriptors;
-	int overflow = 0;
-
-	if (unlikely(nb_ops == 0))
-		return 0;
-
-	/* read params used a lot in main loop into registers */
-	queue = &(tmp_qp->tx_q);
-	base_addr = (uint8_t *)queue->base_addr;
-	tail = queue->tail;
-
-	/* Find how many can actually fit on the ring */
-	{
-		/* dequeued can only be written by one thread, but it may not
-		 * be this thread. As it's 4-byte aligned it will be read
-		 * atomically here by any Intel CPU.
-		 * enqueued can wrap before dequeued, but cannot
-		 * lap it as var size of enq/deq (uint32_t) > var size of
-		 * max_inflights (uint16_t). In reality inflights is never
-		 * even as big as max uint16_t, as it's <= ADF_MAX_DESC.
-		 * On wrapping, the calculation still returns the correct
-		 * positive value as all three vars are unsigned.
-		 */
-		uint32_t inflights =
-			tmp_qp->enqueued - tmp_qp->dequeued;
-
-		/* Find how many can actually fit on the ring */
-		overflow = (inflights + nb_ops) - tmp_qp->max_inflights;
-		if (overflow > 0) {
-			nb_ops_possible = nb_ops - overflow;
-			if (nb_ops_possible == 0)
-				return 0;
-		}
-
-		/* QAT has plenty of work queued already, so don't waste cycles
-		 * enqueueing, wait til the application has gathered a bigger
-		 * burst or some completed ops have been dequeued
-		 */
-		if (tmp_qp->min_enq_burst_threshold && inflights >
-				QAT_QP_MIN_INFL_THRESHOLD && nb_ops_possible <
-				tmp_qp->min_enq_burst_threshold) {
-			tmp_qp->stats.threshold_hit_count++;
-			return 0;
-		}
-	}
-
-	/* At this point nb_ops_possible is assuming a 1:1 mapping
-	 * between ops and descriptors.
-	 * Fewer may be sent if some ops have to be split.
-	 * nb_ops_possible is <= burst size.
-	 * Find out how many spaces are actually available on the qp in case
-	 * more are needed.
-	 */
-	nb_remaining_descriptors = nb_ops_possible
-			 + ((overflow >= 0) ? 0 : overflow * (-1));
-	QAT_DP_LOG(DEBUG, "Nb ops requested %d, nb descriptors remaining %d",
-			nb_ops, nb_remaining_descriptors);
-
-	while (nb_ops_sent != nb_ops_possible &&
-				nb_remaining_descriptors > 0) {
-		struct qat_comp_op_cookie *cookie =
-				tmp_qp->op_cookies[tail >> queue->trailz];
-
-		descriptors_built = 0;
-
-		QAT_DP_LOG(DEBUG, "--- data length: %u",
-			   ((struct rte_comp_op *)*ops)->src.length);
-
-		nb_desc_to_build = qat_comp_build_request(*ops,
-				base_addr + tail, cookie, tmp_qp->qat_dev_gen);
-		QAT_DP_LOG(DEBUG, "%d descriptors built, %d remaining, "
-			"%d ops sent, %d descriptors needed",
-			total_descriptors_built, nb_remaining_descriptors,
-			nb_ops_sent, nb_desc_to_build);
-
-		if (unlikely(nb_desc_to_build < 0)) {
-			/* this message cannot be enqueued */
-			tmp_qp->stats.enqueue_err_count++;
-			if (nb_ops_sent == 0)
-				return 0;
-			goto kick_tail;
-		} else if (unlikely(nb_desc_to_build > 1)) {
-			/* this op is too big and must be split - get more
-			 * descriptors and retry
-			 */
-
-			QAT_DP_LOG(DEBUG, "Build %d descriptors for this op",
-					nb_desc_to_build);
-
-			nb_remaining_descriptors -= nb_desc_to_build;
-			if (nb_remaining_descriptors >= 0) {
-				/* There are enough remaining descriptors
-				 * so retry
-				 */
-				int ret2 = qat_comp_build_multiple_requests(
-						*ops, tmp_qp, tail,
-						nb_desc_to_build);
-
-				if (unlikely(ret2 < 1)) {
-					QAT_DP_LOG(DEBUG,
-							"Failed to build (%d) descriptors, status %d",
-							nb_desc_to_build, ret2);
-
-					qat_comp_free_split_op_memzones(cookie,
-							nb_desc_to_build - 1);
-
-					tmp_qp->stats.enqueue_err_count++;
-
-					/* This message cannot be enqueued */
-					if (nb_ops_sent == 0)
-						return 0;
-					goto kick_tail;
-				} else {
-					descriptors_built = ret2;
-					total_descriptors_built +=
-							descriptors_built;
-					nb_remaining_descriptors -=
-							descriptors_built;
-					QAT_DP_LOG(DEBUG,
-							"Multiple descriptors (%d) built ok",
-							descriptors_built);
-				}
-			} else {
-				QAT_DP_LOG(ERR, "For the current op, number of requested descriptors (%d) "
-						"exceeds number of available descriptors (%d)",
-						nb_desc_to_build,
-						nb_remaining_descriptors +
-							nb_desc_to_build);
-
-				qat_comp_free_split_op_memzones(cookie,
-						nb_desc_to_build - 1);
-
-				/* Not enough extra descriptors */
-				if (nb_ops_sent == 0)
-					return 0;
-				goto kick_tail;
-			}
-		} else {
-			descriptors_built = 1;
-			total_descriptors_built++;
-			nb_remaining_descriptors--;
-			QAT_DP_LOG(DEBUG, "Single descriptor built ok");
-		}
-
-		tail = adf_modulo(tail + (queue->msg_size * descriptors_built),
-				  queue->modulo_mask);
-		ops++;
-		nb_ops_sent++;
-	}
-
-kick_tail:
-	queue->tail = tail;
-	tmp_qp->enqueued += total_descriptors_built;
-	tmp_qp->stats.enqueued_count += nb_ops_sent;
-	txq_write_tail(tmp_qp->qat_dev_gen, tmp_qp, queue);
-	return nb_ops_sent;
-}
-
 uint16_t
 qat_dequeue_op_burst(void *qp, void **ops,
 		qat_op_dequeue_t qat_dequeue_process_response, uint16_t nb_ops)
diff --git a/drivers/common/qat/qat_qp.h b/drivers/common/qat/qat_qp.h
index 66f00943a5..f911125e86 100644
--- a/drivers/common/qat/qat_qp.h
+++ b/drivers/common/qat/qat_qp.h
@@ -127,9 +127,6 @@ uint16_t
 qat_enqueue_op_burst(void *qp, qat_op_build_request_t op_build_request,
 		void **ops, uint16_t nb_ops);
 
-uint16_t
-qat_enqueue_comp_op_burst(void *qp, void **ops, uint16_t nb_ops);
-
 uint16_t
 qat_dequeue_op_burst(void *qp, void **ops,
 		qat_op_dequeue_t qat_dequeue_process_response, uint16_t nb_ops);
@@ -201,6 +198,21 @@ struct qat_qp_hw_spec_funcs {
 	qat_qp_get_hw_data_t		qat_qp_get_hw_data;
 };
 
-extern struct qat_qp_hw_spec_funcs *qat_qp_hw_spec[];
+extern struct qat_qp_hw_spec_funcs*
+	qat_qp_hw_spec[];
+
+static inline void
+txq_write_tail(enum qat_device_gen qat_dev_gen,
+		struct qat_qp *qp, struct qat_queue *q)
+{
+	struct qat_qp_hw_spec_funcs *ops =
+		qat_qp_hw_spec[qat_dev_gen];
+
+	/*
+	 * Pointer check should be done during
+	 * initialization
+	 */
+	ops->qat_qp_csr_write_tail(qp, q);
+}
 
 #endif /* _QAT_QP_H_ */
diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index fe4a4999c6..559948a46a 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -1144,3 +1144,185 @@ qat_comp_stream_free(struct rte_compressdev *dev, void *stream)
 	}
 	return -EINVAL;
 }
+
+/**
+ * Enqueue packets for processing on queue pair of a device
+ *
+ * @param qp
+ *   qat queue pair
+ * @param ops
+ *   Compressdev operation
+ * @param nb_ops
+ *   number of operations
+ * @return
+ *  - nb_ops_sent if successful
+ */
+uint16_t
+qat_enqueue_comp_op_burst(void *qp, void **ops, uint16_t nb_ops)
+{
+	register struct qat_queue *queue;
+	struct qat_qp *tmp_qp = (struct qat_qp *)qp;
+	register uint32_t nb_ops_sent = 0;
+	register int nb_desc_to_build;
+	uint16_t nb_ops_possible = nb_ops;
+	register uint8_t *base_addr;
+	register uint32_t tail;
+
+	int descriptors_built, total_descriptors_built = 0;
+	int nb_remaining_descriptors;
+	int overflow = 0;
+
+	if (unlikely(nb_ops == 0))
+		return 0;
+
+	/* read params used a lot in main loop into registers */
+	queue = &(tmp_qp->tx_q);
+	base_addr = (uint8_t *)queue->base_addr;
+	tail = queue->tail;
+
+	/* Find how many can actually fit on the ring */
+	{
+		/* dequeued can only be written by one thread, but it may not
+		 * be this thread. As it's 4-byte aligned it will be read
+		 * atomically here by any Intel CPU.
+		 * enqueued can wrap before dequeued, but cannot
+		 * lap it as var size of enq/deq (uint32_t) > var size of
+		 * max_inflights (uint16_t). In reality inflights is never
+		 * even as big as max uint16_t, as it's <= ADF_MAX_DESC.
+		 * On wrapping, the calculation still returns the correct
+		 * positive value as all three vars are unsigned.
+		 */
+		uint32_t inflights =
+			tmp_qp->enqueued - tmp_qp->dequeued;
+
+		/* Find how many can actually fit on the ring */
+		overflow = (inflights + nb_ops) - tmp_qp->max_inflights;
+		if (overflow > 0) {
+			nb_ops_possible = nb_ops - overflow;
+			if (nb_ops_possible == 0)
+				return 0;
+		}
+
+		/* QAT has plenty of work queued already, so don't waste cycles
+		 * enqueueing, wait til the application has gathered a bigger
+		 * burst or some completed ops have been dequeued
+		 */
+		if (tmp_qp->min_enq_burst_threshold && inflights >
+				QAT_QP_MIN_INFL_THRESHOLD && nb_ops_possible <
+				tmp_qp->min_enq_burst_threshold) {
+			tmp_qp->stats.threshold_hit_count++;
+			return 0;
+		}
+	}
+
+	/* At this point nb_ops_possible is assuming a 1:1 mapping
+	 * between ops and descriptors.
+	 * Fewer may be sent if some ops have to be split.
+	 * nb_ops_possible is <= burst size.
+	 * Find out how many spaces are actually available on the qp in case
+	 * more are needed.
+	 */
+	nb_remaining_descriptors = nb_ops_possible
+			 + ((overflow >= 0) ? 0 : overflow * (-1));
+	QAT_DP_LOG(DEBUG, "Nb ops requested %d, nb descriptors remaining %d",
+			nb_ops, nb_remaining_descriptors);
+
+	while (nb_ops_sent != nb_ops_possible &&
+				nb_remaining_descriptors > 0) {
+		struct qat_comp_op_cookie *cookie =
+				tmp_qp->op_cookies[tail >> queue->trailz];
+
+		descriptors_built = 0;
+
+		QAT_DP_LOG(DEBUG, "--- data length: %u",
+			   ((struct rte_comp_op *)*ops)->src.length);
+
+		nb_desc_to_build = qat_comp_build_request(*ops,
+				base_addr + tail, cookie, tmp_qp->qat_dev_gen);
+		QAT_DP_LOG(DEBUG, "%d descriptors built, %d remaining, "
+			"%d ops sent, %d descriptors needed",
+			total_descriptors_built, nb_remaining_descriptors,
+			nb_ops_sent, nb_desc_to_build);
+
+		if (unlikely(nb_desc_to_build < 0)) {
+			/* this message cannot be enqueued */
+			tmp_qp->stats.enqueue_err_count++;
+			if (nb_ops_sent == 0)
+				return 0;
+			goto kick_tail;
+		} else if (unlikely(nb_desc_to_build > 1)) {
+			/* this op is too big and must be split - get more
+			 * descriptors and retry
+			 */
+
+			QAT_DP_LOG(DEBUG, "Build %d descriptors for this op",
+					nb_desc_to_build);
+
+			nb_remaining_descriptors -= nb_desc_to_build;
+			if (nb_remaining_descriptors >= 0) {
+				/* There are enough remaining descriptors
+				 * so retry
+				 */
+				int ret2 = qat_comp_build_multiple_requests(
+						*ops, tmp_qp, tail,
+						nb_desc_to_build);
+
+				if (unlikely(ret2 < 1)) {
+					QAT_DP_LOG(DEBUG,
+							"Failed to build (%d) descriptors, status %d",
+							nb_desc_to_build, ret2);
+
+					qat_comp_free_split_op_memzones(cookie,
+							nb_desc_to_build - 1);
+
+					tmp_qp->stats.enqueue_err_count++;
+
+					/* This message cannot be enqueued */
+					if (nb_ops_sent == 0)
+						return 0;
+					goto kick_tail;
+				} else {
+					descriptors_built = ret2;
+					total_descriptors_built +=
+							descriptors_built;
+					nb_remaining_descriptors -=
+							descriptors_built;
+					QAT_DP_LOG(DEBUG,
+							"Multiple descriptors (%d) built ok",
+							descriptors_built);
+				}
+			} else {
+				QAT_DP_LOG(ERR, "For the current op, number of requested descriptors (%d) "
+						"exceeds number of available descriptors (%d)",
+						nb_desc_to_build,
+						nb_remaining_descriptors +
+							nb_desc_to_build);
+
+				qat_comp_free_split_op_memzones(cookie,
+						nb_desc_to_build - 1);
+
+				/* Not enough extra descriptors */
+				if (nb_ops_sent == 0)
+					return 0;
+				goto kick_tail;
+			}
+		} else {
+			descriptors_built = 1;
+			total_descriptors_built++;
+			nb_remaining_descriptors--;
+			QAT_DP_LOG(DEBUG, "Single descriptor built ok");
+		}
+
+		tail = adf_modulo(tail + (queue->msg_size * descriptors_built),
+				  queue->modulo_mask);
+		ops++;
+		nb_ops_sent++;
+	}
+
+kick_tail:
+	queue->tail = tail;
+	tmp_qp->enqueued += total_descriptors_built;
+	tmp_qp->stats.enqueued_count += nb_ops_sent;
+	txq_write_tail(tmp_qp->qat_dev_gen, tmp_qp, queue);
+	return nb_ops_sent;
+}
diff --git a/drivers/compress/qat/qat_comp.h b/drivers/compress/qat/qat_comp.h
index da7b9a6eec..dc220cd6e3 100644
--- a/drivers/compress/qat/qat_comp.h
+++ b/drivers/compress/qat/qat_comp.h
@@ -141,5 +141,8 @@ qat_comp_stream_create(struct rte_compressdev *dev,
 int
 qat_comp_stream_free(struct rte_compressdev *dev, void *stream);
 
+uint16_t
+qat_enqueue_comp_op_burst(void *qp, void **ops, uint16_t nb_ops);
+
 #endif
 #endif
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.611652600 +0800
+++ 0094-common-qat-detach-crypto-from-compress-build.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From 7cb939f6485ea8e4d6b1e8e82924fe2fcec96d60 Mon Sep 17 00:00:00 2001
+From dc3ba9b6f98bca6cdef64d3660ac48f4bdbd2e7c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7cb939f6485ea8e4d6b1e8e82924fe2fcec96d60 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 0f72b6959b..edc793ba95 100644
+index b84e5b3c6c..95b52b78c3 100644
@@ -28 +30 @@
-@@ -70,14 +70,6 @@ else
+@@ -54,14 +54,6 @@ if libipsecmb.found() and libcrypto_3.found()
@@ -44 +46 @@
-index 0ba26d8580..094d684abc 100644
+index 9cbd19a481..e95df292e8 100644
@@ -47 +49 @@
-@@ -490,20 +490,6 @@ adf_configure_queues(struct qat_qp *qp, enum qat_device_gen qat_dev_gen)
+@@ -449,20 +449,6 @@ adf_configure_queues(struct qat_qp *qp, enum qat_device_gen qat_dev_gen)
@@ -68 +70 @@
-@@ -670,179 +656,6 @@ kick_tail:
+@@ -631,179 +617,6 @@ kick_tail:
@@ -249 +251 @@
-index d19fc387e4..ae18fb942e 100644
+index 66f00943a5..f911125e86 100644
@@ -262 +264 @@
-@@ -206,6 +203,21 @@ struct qat_qp_hw_spec_funcs {
+@@ -201,6 +198,21 @@ struct qat_qp_hw_spec_funcs {

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'test/crypto: fix PDCP-SDAP test vectors' has been queued to stable release 22.11.3
  2023-08-10  0:06 ` Xueming Li
  2023-08-10  0:06   ` patch 'common/qat: detach crypto from compress build' " Xueming Li
@ 2023-08-10  0:06   ` Xueming Li
  2023-08-10  0:06   ` patch 'examples/fips_validation: fix digest length in AES-GCM' " Xueming Li
                     ` (7 subsequent siblings)
  9 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:06 UTC (permalink / raw)
  To: Aakash Sasidharan; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=862e2a555ee18b9ad691c2f1f1f14c7e514189bd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 862e2a555ee18b9ad691c2f1f1f14c7e514189bd Mon Sep 17 00:00:00 2001
From: Aakash Sasidharan <asasidharan@marvell.com>
Date: Wed, 28 Jun 2023 13:50:20 +0530
Subject: [PATCH] test/crypto: fix PDCP-SDAP test vectors
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2c34aae94dd79be9ca81875c8b24ec3a1e897861 ]

Fix incorrect fields in PDCP Header.
1. Only Data PDUs should be ciphered and authenticated.
   Here the vectors are control PDUs which should not be crypto
   processed. Change the D/C bit to make the vector as Data PDU
2. Reserved fields must be set to 0.

Updated the vectors and MAC-I values to handle above cases.

Fixes: 003afde411e7 ("test/crypto: add test vectors for PDCP-SDAP")

Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 ...ryptodev_security_pdcp_sdap_test_vectors.h | 252 +++++++++---------
 1 file changed, 126 insertions(+), 126 deletions(-)

diff --git a/app/test/test_cryptodev_security_pdcp_sdap_test_vectors.h b/app/test/test_cryptodev_security_pdcp_sdap_test_vectors.h
index f43f693edb..b0fa0ec458 100644
--- a/app/test/test_cryptodev_security_pdcp_sdap_test_vectors.h
+++ b/app/test/test_cryptodev_security_pdcp_sdap_test_vectors.h
@@ -769,7 +769,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -781,7 +781,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x69, 0xf2, 0x5d, 0xd7,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x69, 0xf2, 0x5d, 0xd7,
 				     0xf5, 0xc1, 0xf7, 0x1e, 0x47, 0x5d, 0xce,
 				     0xbe, 0x48, 0xb5, 0x0b, 0x6a, 0x73, 0x9a,
 				     0x5a, 0xa3, 0x06, 0x47, 0x40, 0x96, 0xcf,
@@ -790,7 +790,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xc9, 0x7f, 0x11, 0x79, 0x24, 0x44, 0xe8,
 				     0x39, 0x11, 0x03, 0x0a, 0x9d, 0x4f, 0xe2,
 				     0x95, 0x9f, 0x47, 0x73, 0x37, 0x83, 0x8c,
-				     0x23, 0xfa, 0x16, 0x39, 0xf7, 0x15, 0x11 },
+				     0x23, 0xfa, 0x16, 0xb2, 0xb0, 0x17, 0x4a },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -817,7 +817,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -829,7 +829,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x22, 0x2a, 0x8f, 0x86,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x22, 0x2a, 0x8f, 0x86,
 				     0x25, 0x92, 0xcd, 0xa9, 0xa1, 0xa0, 0xf5,
 				     0x86, 0x0d, 0xe8, 0xe4, 0xef, 0xe0, 0x78,
 				     0x45, 0x7c, 0x0c, 0x41, 0x5c, 0x8f, 0x07,
@@ -838,7 +838,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x35, 0xff, 0x7a, 0x42, 0xac, 0x94, 0x21,
 				     0x60, 0x1c, 0x13, 0xcc, 0x7e, 0x6b, 0x2f,
 				     0x6f, 0x91, 0x89, 0xc6, 0xd4, 0xe6, 0x17,
-				     0xae, 0xde, 0xfb, 0x90, 0x62, 0x59, 0xcb },
+				     0xae, 0xde, 0xfb, 0x19, 0xDa, 0x9a, 0xc2 },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -865,7 +865,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -877,7 +877,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x69, 0xf2, 0x5d, 0xd7,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x69, 0xf2, 0x5d, 0xd7,
 				     0xf5, 0xc1, 0xf7, 0x1e, 0x47, 0x5d, 0xce,
 				     0xbe, 0x48, 0xb5, 0x0b, 0x6a, 0x73, 0x9a,
 				     0x5a, 0xa3, 0x06, 0x47, 0x40, 0x96, 0xcf,
@@ -886,7 +886,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xc9, 0x7f, 0x11, 0x79, 0x24, 0x44, 0xe8,
 				     0x39, 0x11, 0x03, 0x0a, 0x9d, 0x4f, 0xe2,
 				     0x95, 0x9f, 0x47, 0x73, 0x37, 0x83, 0x8c,
-				     0x23, 0xfa, 0x16, 0x72, 0x3e, 0x14, 0xa9 },
+				     0x23, 0xfa, 0x16, 0x6c, 0xcb, 0x92, 0xdf },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -913,7 +913,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -925,7 +925,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x22, 0x2a, 0x8f, 0x86,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x22, 0x2a, 0x8f, 0x86,
 				     0x25, 0x92, 0xcd, 0xa9, 0xa1, 0xa0, 0xf5,
 				     0x86, 0x0d, 0xe8, 0xe4, 0xef, 0xe0, 0x78,
 				     0x45, 0x7c, 0x0c, 0x41, 0x5c, 0x8f, 0x07,
@@ -934,7 +934,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x35, 0xff, 0x7a, 0x42, 0xac, 0x94, 0x21,
 				     0x60, 0x1c, 0x13, 0xcc, 0x7e, 0x6b, 0x2f,
 				     0x6f, 0x91, 0x89, 0xc6, 0xd4, 0xe6, 0x17,
-				     0xae, 0xde, 0xfb, 0x3f, 0x47, 0xaa, 0x9b },
+				     0xae, 0xde, 0xfb, 0x5b, 0xc2, 0x9f, 0x29 },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -961,7 +961,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -974,7 +974,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
 			(uint8_t[]){
-				0x50, 0x01, 0x86, 0x69, 0xf2, 0x5d, 0xd7, 0xf5,
+				0x80, 0x01, 0x86, 0x69, 0xf2, 0x5d, 0xd7, 0xf5,
 				0xc1, 0xf7, 0x1e, 0x47, 0x5d, 0xce, 0xbe, 0x48,
 				0xb5, 0x0b, 0x6a, 0x73, 0x9a, 0x5a, 0xa3, 0x06,
 				0x47, 0x40, 0x96, 0xcf, 0x86, 0x98, 0x3d, 0x6f,
@@ -982,7 +982,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				0xa6, 0x24, 0xc9, 0x7f, 0x11, 0x79, 0x24, 0x44,
 				0xe8, 0x39, 0x11, 0x03, 0x0a, 0x9d, 0x4f, 0xe2,
 				0x95, 0x9f, 0x47, 0x73, 0x37, 0x83, 0x8c, 0x23,
-				0xfa, 0x16, 0x52, 0x69, 0x16, 0xfc,
+				0xfa, 0x16, 0x5d, 0x83, 0x73, 0x34,
 			},
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1010,7 +1010,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1022,7 +1022,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x22, 0x2a, 0x8f, 0x86,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x22, 0x2a, 0x8f, 0x86,
 				     0x25, 0x92, 0xcd, 0xa9, 0xa1, 0xa0, 0xf5,
 				     0x86, 0x0d, 0xe8, 0xe4, 0xef, 0xe0, 0x78,
 				     0x45, 0x7c, 0x0c, 0x41, 0x5c, 0x8f, 0x07,
@@ -1031,7 +1031,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x35, 0xff, 0x7a, 0x42, 0xac, 0x94, 0x21,
 				     0x60, 0x1c, 0x13, 0xcc, 0x7e, 0x6b, 0x2f,
 				     0x6f, 0x91, 0x89, 0xc6, 0xd4, 0xe6, 0x17,
-				     0xae, 0xde, 0xfb, 0xf5, 0xda, 0x73, 0xa7 },
+				     0xae, 0xde, 0xfb, 0xff, 0xf9, 0xef, 0xff },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -1154,7 +1154,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1166,7 +1166,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xe8, 0x8c, 0x96, 0x38,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xe8, 0x8c, 0x96, 0x38,
 				     0x6e, 0xe4, 0x1f, 0xb9, 0x85, 0x61, 0x2e,
 				     0x64, 0x31, 0x22, 0x97, 0x5b, 0xf6, 0x40,
 				     0x08, 0x65, 0xc3, 0xfa, 0x72, 0xd2, 0x22,
@@ -1175,7 +1175,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x23, 0x80, 0xcc, 0x5f, 0xfd, 0x74, 0xb1,
 				     0xfb, 0xe1, 0xea, 0x6f, 0xf9, 0x9d, 0xf3,
 				     0x90, 0x02, 0x6e, 0xf1, 0xf8, 0x95, 0x97,
-				     0xbd, 0xba, 0x08, 0x39, 0x63, 0x21, 0x82 },
+				     0xbd, 0xba, 0x08, 0xb2, 0x24, 0x23, 0xd9 },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -1202,7 +1202,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1214,7 +1214,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xd2, 0xc0, 0x3a, 0x41,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xd2, 0xc0, 0x3a, 0x41,
 				     0xbc, 0x0b, 0x95, 0xa4, 0x57, 0x3e, 0x36,
 				     0x10, 0xb2, 0xff, 0x48, 0x1f, 0x10, 0xa8,
 				     0x06, 0x42, 0xc5, 0xa2, 0x33, 0xed, 0x2e,
@@ -1223,7 +1223,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x35, 0xd2, 0x31, 0x1a, 0xb8, 0x33, 0xc7,
 				     0x9c, 0xa4, 0xa4, 0x9b, 0x20, 0xc6, 0x47,
 				     0xdd, 0xe5, 0xa3, 0x4b, 0x9e, 0x66, 0xde,
-				     0xc9, 0x0a, 0x64, 0x8e, 0x79, 0xde, 0xaa },
+				     0xc9, 0x0a, 0x64, 0x07, 0xc1, 0x1d, 0xa3 },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -1250,7 +1250,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1262,7 +1262,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xe8, 0x8c, 0x96, 0x38,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xe8, 0x8c, 0x96, 0x38,
 				     0x6e, 0xe4, 0x1f, 0xb9, 0x85, 0x61, 0x2e,
 				     0x64, 0x31, 0x22, 0x97, 0x5b, 0xf6, 0x40,
 				     0x08, 0x65, 0xc3, 0xfa, 0x72, 0xd2, 0x22,
@@ -1271,7 +1271,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x23, 0x80, 0xcc, 0x5f, 0xfd, 0x74, 0xb1,
 				     0xfb, 0xe1, 0xea, 0x6f, 0xf9, 0x9d, 0xf3,
 				     0x90, 0x02, 0x6e, 0xf1, 0xf8, 0x95, 0x97,
-				     0xbd, 0xba, 0x08, 0x72, 0xaa, 0x20, 0x3a },
+				     0xbd, 0xba, 0x08, 0x6c, 0x5f, 0xa6, 0x4c },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -1298,7 +1298,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1310,7 +1310,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xd2, 0xc0, 0x3a, 0x41,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xd2, 0xc0, 0x3a, 0x41,
 				     0xbc, 0x0b, 0x95, 0xa4, 0x57, 0x3e, 0x36,
 				     0x10, 0xb2, 0xff, 0x48, 0x1f, 0x10, 0xa8,
 				     0x06, 0x42, 0xc5, 0xa2, 0x33, 0xed, 0x2e,
@@ -1319,7 +1319,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x35, 0xd2, 0x31, 0x1a, 0xb8, 0x33, 0xc7,
 				     0x9c, 0xa4, 0xa4, 0x9b, 0x20, 0xc6, 0x47,
 				     0xdd, 0xe5, 0xa3, 0x4b, 0x9e, 0x66, 0xde,
-				     0xc9, 0x0a, 0x64, 0x21, 0x5c, 0x2d, 0xfa },
+				     0xc9, 0x0a, 0x64, 0x45, 0xd9, 0x18, 0x48 },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -1346,7 +1346,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1358,7 +1358,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xe8, 0x8c, 0x96, 0x38,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xe8, 0x8c, 0x96, 0x38,
 				     0x6e, 0xe4, 0x1f, 0xb9, 0x85, 0x61, 0x2e,
 				     0x64, 0x31, 0x22, 0x97, 0x5b, 0xf6, 0x40,
 				     0x08, 0x65, 0xc3, 0xfa, 0x72, 0xd2, 0x22,
@@ -1367,7 +1367,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x23, 0x80, 0xcc, 0x5f, 0xfd, 0x74, 0xb1,
 				     0xfb, 0xe1, 0xea, 0x6f, 0xf9, 0x9d, 0xf3,
 				     0x90, 0x02, 0x6e, 0xf1, 0xf8, 0x95, 0x97,
-				     0xbd, 0xba, 0x08, 0x52, 0xfd, 0x22, 0x6f },
+				     0xbd, 0xba, 0x08, 0x5d, 0x17, 0x47, 0xa7 },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -1394,7 +1394,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1406,7 +1406,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xd2, 0xc0, 0x3a, 0x41,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xd2, 0xc0, 0x3a, 0x41,
 				     0xbc, 0x0b, 0x95, 0xa4, 0x57, 0x3e, 0x36,
 				     0x10, 0xb2, 0xff, 0x48, 0x1f, 0x10, 0xa8,
 				     0x06, 0x42, 0xc5, 0xa2, 0x33, 0xed, 0x2e,
@@ -1415,7 +1415,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x35, 0xd2, 0x31, 0x1a, 0xb8, 0x33, 0xc7,
 				     0x9c, 0xa4, 0xa4, 0x9b, 0x20, 0xc6, 0x47,
 				     0xdd, 0xe5, 0xa3, 0x4b, 0x9e, 0x66, 0xde,
-				     0xc9, 0x0a, 0x64, 0xeb, 0xc1, 0xf4, 0xc6 },
+				     0xc9, 0x0a, 0x64, 0xe1, 0xe2, 0x68, 0x9e },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -1538,7 +1538,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1550,7 +1550,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x79, 0xdb, 0x02, 0x27,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x79, 0xdb, 0x02, 0x27,
 				     0xa0, 0x85, 0x82, 0x87, 0x6b, 0x35, 0x2b,
 				     0xe1, 0x96, 0x5b, 0xfd, 0x67, 0xe1, 0x67,
 				     0x69, 0x17, 0x5b, 0x0a, 0x8f, 0xb8, 0x37,
@@ -1559,7 +1559,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xda, 0x94, 0x61, 0x8e, 0x2d, 0x7a, 0x5d,
 				     0x64, 0x0f, 0x4a, 0xc7, 0x7c, 0x9d, 0x56,
 				     0x5a, 0x2a, 0xcb, 0xff, 0x79, 0x07, 0xa5,
-				     0xaf, 0x96, 0x5c, 0xb6, 0x6c, 0xeb, 0x14 },
+				     0xaf, 0x96, 0x5c, 0x3d, 0x2b, 0xe9, 0x4f },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -1586,7 +1586,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1598,7 +1598,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x2c, 0x0f, 0xc1, 0x08,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x2c, 0x0f, 0xc1, 0x08,
 				     0x2e, 0xa7, 0x97, 0xd2, 0x6c, 0x17, 0x8f,
 				     0x22, 0x1f, 0x99, 0x1b, 0x48, 0x04, 0x29,
 				     0x54, 0x3f, 0x07, 0x01, 0xda, 0x19, 0x59,
@@ -1607,7 +1607,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x04, 0xf4, 0xfe, 0xe6, 0xf7, 0x53, 0x51,
 				     0x70, 0x10, 0x56, 0x83, 0x59, 0xb5, 0x64,
 				     0x0b, 0xa6, 0x2e, 0xa5, 0x03, 0x62, 0x13,
-				     0x91, 0xaf, 0x24, 0xb2, 0x82, 0xfb, 0x27 },
+				     0x91, 0xaf, 0x24, 0x3b, 0x3a, 0x38, 0x2e },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -1634,7 +1634,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1646,7 +1646,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x79, 0xdb, 0x02, 0x27,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x79, 0xdb, 0x02, 0x27,
 				     0xa0, 0x85, 0x82, 0x87, 0x6b, 0x35, 0x2b,
 				     0xe1, 0x96, 0x5b, 0xfd, 0x67, 0xe1, 0x67,
 				     0x69, 0x17, 0x5b, 0x0a, 0x8f, 0xb8, 0x37,
@@ -1655,7 +1655,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xda, 0x94, 0x61, 0x8e, 0x2d, 0x7a, 0x5d,
 				     0x64, 0x0f, 0x4a, 0xc7, 0x7c, 0x9d, 0x56,
 				     0x5a, 0x2a, 0xcb, 0xff, 0x79, 0x07, 0xa5,
-				     0xaf, 0x96, 0x5c, 0xfd, 0xa5, 0xea, 0xac },
+				     0xaf, 0x96, 0x5c, 0xe3, 0x50, 0x6c, 0xda },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -1682,7 +1682,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1694,7 +1694,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x2c, 0x0f, 0xc1, 0x08,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x2c, 0x0f, 0xc1, 0x08,
 				     0x2e, 0xa7, 0x97, 0xd2, 0x6c, 0x17, 0x8f,
 				     0x22, 0x1f, 0x99, 0x1b, 0x48, 0x04, 0x29,
 				     0x54, 0x3f, 0x07, 0x01, 0xda, 0x19, 0x59,
@@ -1703,7 +1703,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x04, 0xf4, 0xfe, 0xe6, 0xf7, 0x53, 0x51,
 				     0x70, 0x10, 0x56, 0x83, 0x59, 0xb5, 0x64,
 				     0x0b, 0xa6, 0x2e, 0xa5, 0x03, 0x62, 0x13,
-				     0x91, 0xaf, 0x24, 0x1d, 0xa7, 0x08, 0x77 },
+				     0x91, 0xaf, 0x24, 0x79, 0x22, 0x3d, 0xc5 },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -1730,7 +1730,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1742,7 +1742,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x79, 0xdb, 0x02, 0x27,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x79, 0xdb, 0x02, 0x27,
 				     0xa0, 0x85, 0x82, 0x87, 0x6b, 0x35, 0x2b,
 				     0xe1, 0x96, 0x5b, 0xfd, 0x67, 0xe1, 0x67,
 				     0x69, 0x17, 0x5b, 0x0a, 0x8f, 0xb8, 0x37,
@@ -1751,7 +1751,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xda, 0x94, 0x61, 0x8e, 0x2d, 0x7a, 0x5d,
 				     0x64, 0x0f, 0x4a, 0xc7, 0x7c, 0x9d, 0x56,
 				     0x5a, 0x2a, 0xcb, 0xff, 0x79, 0x07, 0xa5,
-				     0xaf, 0x96, 0x5c, 0xdd, 0xf2, 0xe8, 0xf9 },
+				     0xaf, 0x96, 0x5c, 0xd2, 0x18, 0x8d, 0x31 },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -1778,7 +1778,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x0a, 0x98, 0xc1, 0x3c, 0x98, 0x82,
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
 				     0xeb, 0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf,
@@ -1790,7 +1790,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0xf9, 0xdd },
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x2c, 0x0f, 0xc1, 0x08,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x2c, 0x0f, 0xc1, 0x08,
 				     0x2e, 0xa7, 0x97, 0xd2, 0x6c, 0x17, 0x8f,
 				     0x22, 0x1f, 0x99, 0x1b, 0x48, 0x04, 0x29,
 				     0x54, 0x3f, 0x07, 0x01, 0xda, 0x19, 0x59,
@@ -1799,7 +1799,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x04, 0xf4, 0xfe, 0xe6, 0xf7, 0x53, 0x51,
 				     0x70, 0x10, 0x56, 0x83, 0x59, 0xb5, 0x64,
 				     0x0b, 0xa6, 0x2e, 0xa5, 0x03, 0x62, 0x13,
-				     0x91, 0xaf, 0x24, 0xd7, 0x3a, 0xd1, 0x4b },
+				     0x91, 0xaf, 0x24, 0xdd, 0x19, 0x4d, 0x13 },
 		.sn_size = 12,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -2556,7 +2556,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -2568,7 +2568,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x78, 0xee, 0x01,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x78, 0xee, 0x01,
 				     0x4c, 0x79, 0xc7, 0x14, 0x79, 0x2c, 0x1b,
 				     0x8a, 0xd0, 0x17, 0xb4, 0xb4, 0xfe, 0xa7,
 				     0x17, 0x9a, 0x93, 0x5d, 0xad, 0x27, 0x8a,
@@ -2577,8 +2577,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x37, 0xfb, 0x98, 0x1b, 0x06, 0x1a, 0x76,
 				     0xf8, 0x07, 0x72, 0xe9, 0xa2, 0x89, 0x47,
 				     0x95, 0x8f, 0x8f, 0x4e, 0x45, 0x55, 0xd6,
-				     0x0e, 0xf4, 0xe7, 0xe8, 0x78, 0xdd, 0xc1,
-				     0x92 },
+				     0x0e, 0xf4, 0xe7, 0xe8, 0xc0, 0x48, 0x6a,
+				     0x7c },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -2605,7 +2605,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -2617,7 +2617,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xbf, 0x21, 0xc9,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xbf, 0x21, 0xc9,
 				     0x7d, 0x02, 0x8d, 0xf7, 0xf7, 0x80, 0x50,
 				     0x60, 0x32, 0x09, 0xb8, 0x69, 0x48, 0xab,
 				     0x58, 0xf0, 0xd9, 0x63, 0x63, 0x36, 0x01,
@@ -2626,8 +2626,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x4c, 0x00, 0xd0, 0x0e, 0x31, 0x1c, 0x87,
 				     0xee, 0x1c, 0xc3, 0x81, 0xb4, 0xb6, 0x09,
 				     0xb5, 0x3c, 0x85, 0xb9, 0xcc, 0x2d, 0x2e,
-				     0x9c, 0x85, 0x0b, 0xf7, 0xb1, 0x80, 0x30,
-				     0xa5 },
+				     0x9c, 0x85, 0x0b, 0xf7, 0x17, 0x28, 0x0f,
+				     0x7d },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -2654,7 +2654,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -2666,7 +2666,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x78, 0xee, 0x01,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x78, 0xee, 0x01,
 				     0x4c, 0x79, 0xc7, 0x14, 0x79, 0x2c, 0x1b,
 				     0x8a, 0xd0, 0x17, 0xb4, 0xb4, 0xfe, 0xa7,
 				     0x17, 0x9a, 0x93, 0x5d, 0xad, 0x27, 0x8a,
@@ -2675,8 +2675,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x37, 0xfb, 0x98, 0x1b, 0x06, 0x1a, 0x76,
 				     0xf8, 0x07, 0x72, 0xe9, 0xa2, 0x89, 0x47,
 				     0x95, 0x8f, 0x8f, 0x4e, 0x45, 0x55, 0xd6,
-				     0x0e, 0xf4, 0xe7, 0xe8, 0x08, 0xa6, 0xdb,
-				     0x19 },
+				     0x0e, 0xf4, 0xe7, 0xe8, 0x8e, 0x76, 0x4a,
+				     0x4e },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -2703,7 +2703,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -2715,7 +2715,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xbf, 0x21, 0xc9,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xbf, 0x21, 0xc9,
 				     0x7d, 0x02, 0x8d, 0xf7, 0xf7, 0x80, 0x50,
 				     0x60, 0x32, 0x09, 0xb8, 0x69, 0x48, 0xab,
 				     0x58, 0xf0, 0xd9, 0x63, 0x63, 0x36, 0x01,
@@ -2724,8 +2724,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x4c, 0x00, 0xd0, 0x0e, 0x31, 0x1c, 0x87,
 				     0xee, 0x1c, 0xc3, 0x81, 0xb4, 0xb6, 0x09,
 				     0xb5, 0x3c, 0x85, 0xb9, 0xcc, 0x2d, 0x2e,
-				     0x9c, 0x85, 0x0b, 0xf7, 0x97, 0x5a, 0x56,
-				     0xab },
+				     0x9c, 0x85, 0x0b, 0xf7, 0xc1, 0x27, 0x82,
+				     0xc3 },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -2752,7 +2752,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -2764,7 +2764,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x78, 0xee, 0x01,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x78, 0xee, 0x01,
 				     0x4c, 0x79, 0xc7, 0x14, 0x79, 0x2c, 0x1b,
 				     0x8a, 0xd0, 0x17, 0xb4, 0xb4, 0xfe, 0xa7,
 				     0x17, 0x9a, 0x93, 0x5d, 0xad, 0x27, 0x8a,
@@ -2773,8 +2773,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x37, 0xfb, 0x98, 0x1b, 0x06, 0x1a, 0x76,
 				     0xf8, 0x07, 0x72, 0xe9, 0xa2, 0x89, 0x47,
 				     0x95, 0x8f, 0x8f, 0x4e, 0x45, 0x55, 0xd6,
-				     0x0e, 0xf4, 0xe7, 0xe8, 0x08, 0x68, 0xff,
-				     0x7c },
+				     0x0e, 0xf4, 0xe7, 0xe8, 0x97, 0x76, 0xce,
+				     0xac },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -2801,7 +2801,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -2813,7 +2813,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xbf, 0x21, 0xc9,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xbf, 0x21, 0xc9,
 				     0x7d, 0x02, 0x8d, 0xf7, 0xf7, 0x80, 0x50,
 				     0x60, 0x32, 0x09, 0xb8, 0x69, 0x48, 0xab,
 				     0x58, 0xf0, 0xd9, 0x63, 0x63, 0x36, 0x01,
@@ -2822,8 +2822,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x4c, 0x00, 0xd0, 0x0e, 0x31, 0x1c, 0x87,
 				     0xee, 0x1c, 0xc3, 0x81, 0xb4, 0xb6, 0x09,
 				     0xb5, 0x3c, 0x85, 0xb9, 0xcc, 0x2d, 0x2e,
-				     0x9c, 0x85, 0x0b, 0xf7, 0x41, 0xdd, 0x19,
-				     0x32 },
+				     0x9c, 0x85, 0x0b, 0xf7, 0x69, 0x56, 0x6f,
+				     0xaf },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -2948,7 +2948,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -2960,7 +2960,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x0c, 0xa8, 0x9d,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x0c, 0xa8, 0x9d,
 				     0x9e, 0xcc, 0xf0, 0x1a, 0xc0, 0xf2, 0x9f,
 				     0x8c, 0xc9, 0x57, 0xc7, 0x99, 0x4d, 0xde,
 				     0xc5, 0x19, 0x69, 0x58, 0x5b, 0x1a, 0x51,
@@ -2969,8 +2969,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xb3, 0x24, 0x88, 0x68, 0x5f, 0x78, 0x3a,
 				     0xd2, 0x6c, 0xcc, 0xa0, 0xb5, 0xf0, 0x95,
 				     0x3e, 0xf1, 0xf4, 0x3e, 0x43, 0x8f, 0x6c,
-				     0xae, 0x22, 0x59, 0x11, 0xf6, 0x97, 0x0b,
-				     0x7b },
+				     0xae, 0x22, 0x59, 0x11, 0x4e, 0x02, 0xa0,
+				     0x95 },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -2997,7 +2997,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -3009,7 +3009,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x5a, 0xa9, 0xb5,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x5a, 0xa9, 0xb5,
 				     0x61, 0x8b, 0x8a, 0xb7, 0x6a, 0x98, 0x30,
 				     0x6c, 0xed, 0x84, 0x69, 0xff, 0x6b, 0x7e,
 				     0x30, 0x59, 0x55, 0x80, 0x32, 0xd0, 0x0f,
@@ -3018,8 +3018,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x0e, 0x2e, 0x33, 0xe6, 0xa4, 0xea, 0x17,
 				     0xd6, 0x56, 0xa2, 0x3b, 0x5f, 0x56, 0x3a,
 				     0xa7, 0x6f, 0x4c, 0xc1, 0xca, 0xbd, 0x5f,
-				     0xad, 0x3d, 0x99, 0x4a, 0xa3, 0xab, 0xd5,
-				     0x7c },
+				     0xad, 0x3d, 0x99, 0x4a, 0x05, 0x03, 0xea,
+				     0xa4 },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -3046,7 +3046,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -3058,7 +3058,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x0c, 0xa8, 0x9d,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x0c, 0xa8, 0x9d,
 				     0x9e, 0xcc, 0xf0, 0x1a, 0xc0, 0xf2, 0x9f,
 				     0x8c, 0xc9, 0x57, 0xc7, 0x99, 0x4d, 0xde,
 				     0xc5, 0x19, 0x69, 0x58, 0x5b, 0x1a, 0x51,
@@ -3067,8 +3067,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xb3, 0x24, 0x88, 0x68, 0x5f, 0x78, 0x3a,
 				     0xd2, 0x6c, 0xcc, 0xa0, 0xb5, 0xf0, 0x95,
 				     0x3e, 0xf1, 0xf4, 0x3e, 0x43, 0x8f, 0x6c,
-				     0xae, 0x22, 0x59, 0x11, 0x86, 0xec, 0x11,
-				     0xf0 },
+				     0xae, 0x22, 0x59, 0x11, 0x00, 0x3c, 0x80,
+				     0xa7 },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -3095,7 +3095,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -3107,7 +3107,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x5a, 0xa9, 0xb5,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x5a, 0xa9, 0xb5,
 				     0x61, 0x8b, 0x8a, 0xb7, 0x6a, 0x98, 0x30,
 				     0x6c, 0xed, 0x84, 0x69, 0xff, 0x6b, 0x7e,
 				     0x30, 0x59, 0x55, 0x80, 0x32, 0xd0, 0x0f,
@@ -3116,8 +3116,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x0e, 0x2e, 0x33, 0xe6, 0xa4, 0xea, 0x17,
 				     0xd6, 0x56, 0xa2, 0x3b, 0x5f, 0x56, 0x3a,
 				     0xa7, 0x6f, 0x4c, 0xc1, 0xca, 0xbd, 0x5f,
-				     0xad, 0x3d, 0x99, 0x4a, 0x85, 0x71, 0xb3,
-				     0x72 },
+				     0xad, 0x3d, 0x99, 0x4a, 0xd3, 0x0c, 0x67,
+				     0x1a },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -3144,7 +3144,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -3156,7 +3156,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x0c, 0xa8, 0x9d,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x0c, 0xa8, 0x9d,
 				     0x9e, 0xcc, 0xf0, 0x1a, 0xc0, 0xf2, 0x9f,
 				     0x8c, 0xc9, 0x57, 0xc7, 0x99, 0x4d, 0xde,
 				     0xc5, 0x19, 0x69, 0x58, 0x5b, 0x1a, 0x51,
@@ -3165,8 +3165,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xb3, 0x24, 0x88, 0x68, 0x5f, 0x78, 0x3a,
 				     0xd2, 0x6c, 0xcc, 0xa0, 0xb5, 0xf0, 0x95,
 				     0x3e, 0xf1, 0xf4, 0x3e, 0x43, 0x8f, 0x6c,
-				     0xae, 0x22, 0x59, 0x11, 0x86, 0x22, 0x35,
-				     0x95 },
+				     0xae, 0x22, 0x59, 0x11, 0x19, 0x3c, 0x04,
+				     0x45 },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -3193,7 +3193,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -3205,7 +3205,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x5a, 0xa9, 0xb5,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x5a, 0xa9, 0xb5,
 				     0x61, 0x8b, 0x8a, 0xb7, 0x6a, 0x98, 0x30,
 				     0x6c, 0xed, 0x84, 0x69, 0xff, 0x6b, 0x7e,
 				     0x30, 0x59, 0x55, 0x80, 0x32, 0xd0, 0x0f,
@@ -3214,8 +3214,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x0e, 0x2e, 0x33, 0xe6, 0xa4, 0xea, 0x17,
 				     0xd6, 0x56, 0xa2, 0x3b, 0x5f, 0x56, 0x3a,
 				     0xa7, 0x6f, 0x4c, 0xc1, 0xca, 0xbd, 0x5f,
-				     0xad, 0x3d, 0x99, 0x4a, 0x53, 0xf6, 0xfc,
-				     0xeb },
+				     0xad, 0x3d, 0x99, 0x4a, 0x7b, 0x7d, 0x8a,
+				     0x76 },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -3340,7 +3340,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -3352,7 +3352,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x9b, 0x9c, 0xde,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x9b, 0x9c, 0xde,
 				     0xa1, 0x69, 0x9b, 0x27, 0xd3, 0x38, 0x93,
 				     0xf2, 0x12, 0xb1, 0xc6, 0x60, 0xac, 0xb7,
 				     0xf2, 0x37, 0xf3, 0x72, 0xaf, 0x50, 0x9d,
@@ -3361,8 +3361,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xbb, 0x15, 0xf3, 0x6a, 0x5d, 0x61, 0x12,
 				     0x6e, 0x6d, 0x1b, 0x92, 0xd8, 0x42, 0x60,
 				     0x3e, 0x1f, 0xe0, 0x6c, 0x28, 0x89, 0xf7,
-				     0x0c, 0x61, 0x76, 0xdc, 0x25, 0x8a, 0x31,
-				     0xed },
+				     0x0c, 0x61, 0x76, 0xdc, 0x9d, 0x1f, 0x9a,
+				     0x03 },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -3389,7 +3389,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -3401,7 +3401,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x0c, 0xef, 0x82,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x0c, 0xef, 0x82,
 				     0x59, 0x6b, 0x6b, 0x61, 0xbe, 0x54, 0x23,
 				     0x7d, 0x29, 0x6d, 0xa7, 0xd2, 0xfa, 0x26,
 				     0xcc, 0x1d, 0x18, 0x39, 0x99, 0xea, 0xac,
@@ -3410,8 +3410,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0x8a, 0xe5, 0x00, 0x35, 0x4d, 0x0e,
 				     0x69, 0x9f, 0x4b, 0x72, 0x94, 0x8a, 0x25,
 				     0x69, 0x43, 0x28, 0xdc, 0x40, 0x60, 0x4f,
-				     0x6c, 0xed, 0x6a, 0x50, 0xf3, 0x5e, 0x90,
-				     0x42 },
+				     0x6c, 0xed, 0x6a, 0x50, 0x55, 0xf6, 0xaf,
+				     0x9a },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -3438,7 +3438,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -3450,7 +3450,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x9b, 0x9c, 0xde,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x9b, 0x9c, 0xde,
 				     0xa1, 0x69, 0x9b, 0x27, 0xd3, 0x38, 0x93,
 				     0xf2, 0x12, 0xb1, 0xc6, 0x60, 0xac, 0xb7,
 				     0xf2, 0x37, 0xf3, 0x72, 0xaf, 0x50, 0x9d,
@@ -3459,8 +3459,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xbb, 0x15, 0xf3, 0x6a, 0x5d, 0x61, 0x12,
 				     0x6e, 0x6d, 0x1b, 0x92, 0xd8, 0x42, 0x60,
 				     0x3e, 0x1f, 0xe0, 0x6c, 0x28, 0x89, 0xf7,
-				     0x0c, 0x61, 0x76, 0xdc, 0x55, 0xf1, 0x2b,
-				     0x66 },
+				     0x0c, 0x61, 0x76, 0xdc, 0xd3, 0x21, 0xba,
+				     0x31 },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -3487,7 +3487,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -3499,7 +3499,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x0c, 0xef, 0x82,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x0c, 0xef, 0x82,
 				     0x59, 0x6b, 0x6b, 0x61, 0xbe, 0x54, 0x23,
 				     0x7d, 0x29, 0x6d, 0xa7, 0xd2, 0xfa, 0x26,
 				     0xcc, 0x1d, 0x18, 0x39, 0x99, 0xea, 0xac,
@@ -3508,8 +3508,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0x8a, 0xe5, 0x00, 0x35, 0x4d, 0x0e,
 				     0x69, 0x9f, 0x4b, 0x72, 0x94, 0x8a, 0x25,
 				     0x69, 0x43, 0x28, 0xdc, 0x40, 0x60, 0x4f,
-				     0x6c, 0xed, 0x6a, 0x50, 0xd5, 0x84, 0xf6,
-				     0x4c },
+				     0x6c, 0xed, 0x6a, 0x50, 0x83, 0xf9, 0x22,
+				     0x24 },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -3536,7 +3536,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -3548,7 +3548,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x9b, 0x9c, 0xde,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x9b, 0x9c, 0xde,
 				     0xa1, 0x69, 0x9b, 0x27, 0xd3, 0x38, 0x93,
 				     0xf2, 0x12, 0xb1, 0xc6, 0x60, 0xac, 0xb7,
 				     0xf2, 0x37, 0xf3, 0x72, 0xaf, 0x50, 0x9d,
@@ -3557,8 +3557,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xbb, 0x15, 0xf3, 0x6a, 0x5d, 0x61, 0x12,
 				     0x6e, 0x6d, 0x1b, 0x92, 0xd8, 0x42, 0x60,
 				     0x3e, 0x1f, 0xe0, 0x6c, 0x28, 0x89, 0xf7,
-				     0x0c, 0x61, 0x76, 0xdc, 0x55, 0x3f, 0x0f,
-				     0x03 },
+				     0x0c, 0x61, 0x76, 0xdc, 0xca, 0x21, 0x3e,
+				     0xd3 },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
@@ -3585,7 +3585,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x4b, 0x32, 0x87, 0xf9, 0xdb, 0xe0,
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
 				     0x35, 0xf3, 0x64, 0xd3, 0x5e, 0xaf, 0x3f,
@@ -3597,7 +3597,7 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf9, 0xdd, 0xcc, 0x69 },
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x0c, 0xef, 0x82,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x0c, 0xef, 0x82,
 				     0x59, 0x6b, 0x6b, 0x61, 0xbe, 0x54, 0x23,
 				     0x7d, 0x29, 0x6d, 0xa7, 0xd2, 0xfa, 0x26,
 				     0xcc, 0x1d, 0x18, 0x39, 0x99, 0xea, 0xac,
@@ -3606,8 +3606,8 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x7a, 0x8a, 0xe5, 0x00, 0x35, 0x4d, 0x0e,
 				     0x69, 0x9f, 0x4b, 0x72, 0x94, 0x8a, 0x25,
 				     0x69, 0x43, 0x28, 0xdc, 0x40, 0x60, 0x4f,
-				     0x6c, 0xed, 0x6a, 0x50, 0x03, 0x03, 0xb9,
-				     0xd5 },
+				     0x6c, 0xed, 0x6a, 0x50, 0x2b, 0x88, 0xcf,
+				     0x48 },
 		.sn_size = 18,
 		.hfn = 0x1,
 		.hfn_threshold = 0xfa558,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.635132600 +0800
+++ 0095-test-crypto-fix-PDCP-SDAP-test-vectors.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From 2c34aae94dd79be9ca81875c8b24ec3a1e897861 Mon Sep 17 00:00:00 2001
+From 862e2a555ee18b9ad691c2f1f1f14c7e514189bd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2c34aae94dd79be9ca81875c8b24ec3a1e897861 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'examples/fips_validation: fix digest length in AES-GCM' has been queued to stable release 22.11.3
  2023-08-10  0:06 ` Xueming Li
  2023-08-10  0:06   ` patch 'common/qat: detach crypto from compress build' " Xueming Li
  2023-08-10  0:06   ` patch 'test/crypto: fix PDCP-SDAP test vectors' " Xueming Li
@ 2023-08-10  0:06   ` Xueming Li
  2023-08-10  0:06   ` patch 'cryptodev: fix device socket ID type' " Xueming Li
                     ` (6 subsequent siblings)
  9 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:06 UTC (permalink / raw)
  To: Samina Arshad; +Cc: Brian Dooley, Gowrishankar Muthukrishnan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=4f0797667320f33ed105b2d0bab02a7f58212210

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4f0797667320f33ed105b2d0bab02a7f58212210 Mon Sep 17 00:00:00 2001
From: Samina Arshad <samina.arshad@intel.com>
Date: Wed, 28 Jun 2023 14:38:36 +0000
Subject: [PATCH] examples/fips_validation: fix digest length in AES-GCM
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 94dfc563b620b2f04db7c59b6fdee458a9e1d481 ]

For AES GCM non JSON decrypt test cases the digest length
is being set incorrectly.The digest length is not being
cleared after test cases, causing an issue when running
tests individually without the --path-is-folder flag.
This fix adds the digest length correctly to the decrypt
cases and clears the digest length after each test file.

Fixes: 4aaad2995e13 ("examples/fips_validation: support GCM parsing")

Signed-off-by: Samina Arshad <samina.arshad@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 examples/fips_validation/main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index cc585e8418..cc68a1620b 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -834,7 +834,7 @@ prepare_aead_op(void)
 			RTE_LOG(ERR, USER1, "Not enough memory\n");
 			return -ENOMEM;
 		}
-		env.digest_len = vec.cipher_auth.digest.len;
+		env.digest_len = vec.aead.digest.len;
 
 		sym->aead.data.length = vec.pt.len;
 		sym->aead.digest.data = env.digest;
@@ -843,7 +843,7 @@ prepare_aead_op(void)
 		ret = prepare_data_mbufs(&vec.ct);
 		if (ret < 0)
 			return ret;
-
+		env.digest_len = vec.aead.digest.len;
 		sym->aead.data.length = vec.ct.len;
 		sym->aead.digest.data = vec.aead.digest.val;
 		sym->aead.digest.phys_addr = rte_malloc_virt2iova(
@@ -2525,6 +2525,7 @@ error_one_case:
 	if (env.digest) {
 		rte_free(env.digest);
 		env.digest = NULL;
+		env.digest_len = 0;
 	}
 	rte_pktmbuf_free(env.mbuf);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.656982800 +0800
+++ 0096-examples-fips_validation-fix-digest-length-in-AES-GC.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From 94dfc563b620b2f04db7c59b6fdee458a9e1d481 Mon Sep 17 00:00:00 2001
+From 4f0797667320f33ed105b2d0bab02a7f58212210 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 94dfc563b620b2f04db7c59b6fdee458a9e1d481 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 4237224d9d..6518c959c4 100644
+index cc585e8418..cc68a1620b 100644
@@ -45 +47 @@
-@@ -2618,6 +2618,7 @@ error_one_case:
+@@ -2525,6 +2525,7 @@ error_one_case:

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'cryptodev: fix device socket ID type' has been queued to stable release 22.11.3
  2023-08-10  0:06 ` Xueming Li
                     ` (2 preceding siblings ...)
  2023-08-10  0:06   ` patch 'examples/fips_validation: fix digest length in AES-GCM' " Xueming Li
@ 2023-08-10  0:06   ` Xueming Li
  2023-08-10  0:06   ` patch 'app/crypto-perf: fix socket ID default value' " Xueming Li
                     ` (5 subsequent siblings)
  9 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:06 UTC (permalink / raw)
  To: Ciara Power
  Cc: Morten Brørup, Kai Ji, Konstantin Ananyev, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=330800b7d5d592c28c783de929b2631e8b8a62a6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 330800b7d5d592c28c783de929b2631e8b8a62a6 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 5 Jul 2023 10:36:30 +0000
Subject: [PATCH] cryptodev: fix device socket ID type
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f31af82a8bc130712188668bc2b7cd395ef8920d ]

The socket ID field for a cryptodev device data was unsigned int.
Due to recent changes to the default device socket ID,
this caused an issue when the socket ID was unknown and set to -1.
The device socket ID wrapped around to 255,
and caused errors when allocating memory.

Changing this field type to int fixes the issue, as it now takes the
correct -1 value.

Fixes: 7dcd73e37965 ("drivers/bus: set device NUMA node to unknown by default")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 lib/cryptodev/cryptodev_pmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 0020102eb7..8c1467037e 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -65,7 +65,7 @@ struct rte_cryptodev_data {
 	/** Device ID for this instance */
 	uint8_t dev_id;
 	/** Socket ID where memory is allocated */
-	uint8_t socket_id;
+	int socket_id;
 	/** Unique identifier name */
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.678746100 +0800
+++ 0097-cryptodev-fix-device-socket-ID-type.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From f31af82a8bc130712188668bc2b7cd395ef8920d Mon Sep 17 00:00:00 2001
+From 330800b7d5d592c28c783de929b2631e8b8a62a6 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f31af82a8bc130712188668bc2b7cd395ef8920d ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index 8710ed7558..4c98cedca6 100644
+index 0020102eb7..8c1467037e 100644

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'app/crypto-perf: fix socket ID default value' has been queued to stable release 22.11.3
  2023-08-10  0:06 ` Xueming Li
                     ` (3 preceding siblings ...)
  2023-08-10  0:06   ` patch 'cryptodev: fix device socket ID type' " Xueming Li
@ 2023-08-10  0:06   ` Xueming Li
  2023-08-10  0:06   ` patch 'examples/ipsec-secgw: " Xueming Li
                     ` (4 subsequent siblings)
  9 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:06 UTC (permalink / raw)
  To: Ciara Power; +Cc: Kai Ji, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=bf0053c25c6cb2ed1a2cc0f237570219ec6650e0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bf0053c25c6cb2ed1a2cc0f237570219ec6650e0 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 6 Jul 2023 10:51:51 +0000
Subject: [PATCH] app/crypto-perf: fix socket ID default value
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a23b5064d9d01079f5578b83151e03b1f6baa844 ]

Due to recent changes to the default device socket ID,
before being used as an index for session mempool list,
the socket ID should be set to 0 if unknown (-1).

Fixes: 7dcd73e37965 ("drivers/bus: set device NUMA node to unknown by default")
Fixes: 64c469b9e7d8 ("app/crypto-perf: check range of socket id")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test-crypto-perf/main.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index af5bd0d23b..bc1f0f9659 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -193,11 +193,10 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs)
 #endif
 
 		struct rte_cryptodev_info cdev_info;
-		uint8_t socket_id = rte_cryptodev_socket_id(cdev_id);
-		/* range check the socket_id - negative values become big
-		 * positive ones due to use of unsigned value
-		 */
-		if (socket_id >= RTE_MAX_NUMA_NODES)
+		int socket_id = rte_cryptodev_socket_id(cdev_id);
+
+		/* Use the first socket if SOCKET_ID_ANY is returned. */
+		if (socket_id == SOCKET_ID_ANY)
 			socket_id = 0;
 
 		rte_cryptodev_info_get(cdev_id, &cdev_info);
@@ -650,7 +649,11 @@ main(int argc, char **argv)
 
 		cdev_id = enabled_cdevs[cdev_index];
 
-		uint8_t socket_id = rte_cryptodev_socket_id(cdev_id);
+		int socket_id = rte_cryptodev_socket_id(cdev_id);
+
+		/* Use the first socket if SOCKET_ID_ANY is returned. */
+		if (socket_id == SOCKET_ID_ANY)
+			socket_id = 0;
 
 		ctx[i] = cperf_testmap[opts.test].constructor(
 				session_pool_socket[socket_id].sess_mp,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.700327400 +0800
+++ 0098-app-crypto-perf-fix-socket-ID-default-value.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From a23b5064d9d01079f5578b83151e03b1f6baa844 Mon Sep 17 00:00:00 2001
+From bf0053c25c6cb2ed1a2cc0f237570219ec6650e0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a23b5064d9d01079f5578b83151e03b1f6baa844 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'examples/ipsec-secgw: fix socket ID default value' has been queued to stable release 22.11.3
  2023-08-10  0:06 ` Xueming Li
                     ` (4 preceding siblings ...)
  2023-08-10  0:06   ` patch 'app/crypto-perf: fix socket ID default value' " Xueming Li
@ 2023-08-10  0:06   ` Xueming Li
  2023-08-10  0:06   ` patch 'examples/ipsec-secgw: fix TAP default MAC address' " Xueming Li
                     ` (3 subsequent siblings)
  9 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:06 UTC (permalink / raw)
  To: Kai Ji; +Cc: Ciara Power, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=a7c9ea561887851f35ee445836b8eb6e77664389

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a7c9ea561887851f35ee445836b8eb6e77664389 Mon Sep 17 00:00:00 2001
From: Kai Ji <kai.ji@intel.com>
Date: Thu, 6 Jul 2023 11:00:34 +0000
Subject: [PATCH] examples/ipsec-secgw: fix socket ID default value
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 11fa58505d34c1139450b735c59ee67934310bcb ]

Due to recent changes to the default device socket ID, before
being used as an index for session mempool list,
set socket ID to 0 if unknown (-1).

Fixes: 7dcd73e37965 ("drivers/bus: set device NUMA node to unknown by default")

Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index ea662797a8..82a4916fb2 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1699,6 +1699,9 @@ cryptodevs_init(enum eh_pkt_transfer_mode mode)
 
 		total_nb_qps += qp;
 		dev_conf.socket_id = rte_cryptodev_socket_id(cdev_id);
+		/* Use the first socket if SOCKET_ID_ANY is returned. */
+		if (dev_conf.socket_id == SOCKET_ID_ANY)
+			dev_conf.socket_id = 0;
 		dev_conf.nb_queue_pairs = qp;
 		dev_conf.ff_disable = RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.734941800 +0800
+++ 0099-examples-ipsec-secgw-fix-socket-ID-default-value.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From 11fa58505d34c1139450b735c59ee67934310bcb Mon Sep 17 00:00:00 2001
+From a7c9ea561887851f35ee445836b8eb6e77664389 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 11fa58505d34c1139450b735c59ee67934310bcb ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 029749e522..72b3bfba9e 100644
+index ea662797a8..82a4916fb2 100644

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'examples/ipsec-secgw: fix TAP default MAC address' has been queued to stable release 22.11.3
  2023-08-10  0:06 ` Xueming Li
                     ` (5 preceding siblings ...)
  2023-08-10  0:06   ` patch 'examples/ipsec-secgw: " Xueming Li
@ 2023-08-10  0:06   ` Xueming Li
  2023-08-10  0:06   ` patch 'ipsec: fix NAT-T header length' " Xueming Li
                     ` (2 subsequent siblings)
  9 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:06 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=16c0503d2d22e42a10ca5341115917f3a69a657c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 16c0503d2d22e42a10ca5341115917f3a69a657c Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Wed, 28 Jun 2023 19:12:35 +0000
Subject: [PATCH] examples/ipsec-secgw: fix TAP default MAC address
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2d7a5922aecadb9eee7de7f314a6dee36f3b1aa3 ]

Default TAP mac address was changed in below commit.
Hence, updated IPsec test script to reflect changes.

Fixes: c3006be2acab ("net/tap: set locally administered bit for fixed MAC address")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 examples/ipsec-secgw/test/common_defs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/test/common_defs.sh b/examples/ipsec-secgw/test/common_defs.sh
index 3ef06bc761..6e04ffc1a6 100644
--- a/examples/ipsec-secgw/test/common_defs.sh
+++ b/examples/ipsec-secgw/test/common_defs.sh
@@ -26,7 +26,7 @@ fi
 
 LOCAL_IFACE=dtap0
 
-LOCAL_MAC="00:64:74:61:70:30"
+LOCAL_MAC="02:64:74:61:70:30"
 
 REMOTE_IPV4=192.168.31.14
 LOCAL_IPV4=192.168.31.92
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.756587800 +0800
+++ 0100-examples-ipsec-secgw-fix-TAP-default-MAC-address.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From 2d7a5922aecadb9eee7de7f314a6dee36f3b1aa3 Mon Sep 17 00:00:00 2001
+From 16c0503d2d22e42a10ca5341115917f3a69a657c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2d7a5922aecadb9eee7de7f314a6dee36f3b1aa3 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'ipsec: fix NAT-T header length' has been queued to stable release 22.11.3
  2023-08-10  0:06 ` Xueming Li
                     ` (6 preceding siblings ...)
  2023-08-10  0:06   ` patch 'examples/ipsec-secgw: fix TAP default MAC address' " Xueming Li
@ 2023-08-10  0:06   ` Xueming Li
  2023-08-10  0:06   ` patch 'examples/l3fwd: fix duplicate expression for default nexthop' " Xueming Li
  2023-08-10  0:06   ` patch 'kni: fix build with Linux 6.5' " Xueming Li
  9 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:06 UTC (permalink / raw)
  To: Xiao Liang; +Cc: Konstantin Ananyev, Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=06ba23cad245de70f98e374ef19a5191e81a2ead

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 06ba23cad245de70f98e374ef19a5191e81a2ead Mon Sep 17 00:00:00 2001
From: Xiao Liang <shaw.leon@gmail.com>
Date: Tue, 11 Jul 2023 10:18:47 +0800
Subject: [PATCH] ipsec: fix NAT-T header length
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5d89d22e9e49771059ecc6383aa4313394fc72f7 ]

UDP header and L2 header (if any) length is included in sa->hdr_len.
Take care of that in L3 header and packet length calculation.

Fixes: 01eef5907fc3 ("ipsec: support NAT-T")

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 lib/ipsec/esp_outb.c | 2 +-
 lib/ipsec/sa.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ipsec/esp_outb.c b/lib/ipsec/esp_outb.c
index 9cbd9202f6..ec87b1dce2 100644
--- a/lib/ipsec/esp_outb.c
+++ b/lib/ipsec/esp_outb.c
@@ -198,7 +198,7 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
 		struct rte_udp_hdr *udph = (struct rte_udp_hdr *)
 			(ph + sa->hdr_len - sizeof(struct rte_udp_hdr));
 		udph->dgram_len = rte_cpu_to_be_16(mb->pkt_len - sqh_len -
-				sa->hdr_l3_off - sa->hdr_len);
+				sa->hdr_len + sizeof(struct rte_udp_hdr));
 	}
 
 	/* update original and new ip header fields */
diff --git a/lib/ipsec/sa.c b/lib/ipsec/sa.c
index 59a547637d..2297bd6d72 100644
--- a/lib/ipsec/sa.c
+++ b/lib/ipsec/sa.c
@@ -371,7 +371,7 @@ esp_outb_tun_init(struct rte_ipsec_sa *sa, const struct rte_ipsec_sa_prm *prm)
 
 	/* update l2_len and l3_len fields for outbound mbuf */
 	sa->tx_offload.val = rte_mbuf_tx_offload(sa->hdr_l3_off,
-		sa->hdr_len - sa->hdr_l3_off, 0, 0, 0, 0, 0);
+		prm->tun.hdr_len - sa->hdr_l3_off, 0, 0, 0, 0, 0);
 
 	esp_outb_init(sa, sa->hdr_len, prm->ipsec_xform.esn.value);
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.777722800 +0800
+++ 0101-ipsec-fix-NAT-T-header-length.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From 5d89d22e9e49771059ecc6383aa4313394fc72f7 Mon Sep 17 00:00:00 2001
+From 06ba23cad245de70f98e374ef19a5191e81a2ead Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5d89d22e9e49771059ecc6383aa4313394fc72f7 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'examples/l3fwd: fix duplicate expression for default nexthop' has been queued to stable release 22.11.3
  2023-08-10  0:06 ` Xueming Li
                     ` (7 preceding siblings ...)
  2023-08-10  0:06   ` patch 'ipsec: fix NAT-T header length' " Xueming Li
@ 2023-08-10  0:06   ` Xueming Li
  2023-08-10  0:06   ` patch 'kni: fix build with Linux 6.5' " Xueming Li
  9 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:06 UTC (permalink / raw)
  To: Mohammad Iqbal Ahmad; +Cc: Conor Walsh, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=9f9ea16ee2e6c799f56399aaa4dd7f64437ace72

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9f9ea16ee2e6c799f56399aaa4dd7f64437ace72 Mon Sep 17 00:00:00 2001
From: Mohammad Iqbal Ahmad <mahmad@marvell.com>
Date: Tue, 10 Jan 2023 20:26:13 +0530
Subject: [PATCH] examples/l3fwd: fix duplicate expression for default nexthop
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9a518054b5551576745a89c1cf60301655c03a9b ]

This patch fixes (Logically dead code) coverity issue.
This patch also fixes (Uninitialized scalar variable) coverity issue.

Coverity issue: 381687, 381686
Fixes: 6a094e328598 ("examples/l3fwd: implement FIB lookup method")

Signed-off-by: Mohammad Iqbal Ahmad <mahmad@marvell.com>
Acked-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 examples/l3fwd/l3fwd_fib.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c
index edc0dd69b9..18398492ae 100644
--- a/examples/l3fwd/l3fwd_fib.c
+++ b/examples/l3fwd/l3fwd_fib.c
@@ -359,10 +359,10 @@ fib_event_loop(struct l3fwd_event_resources *evt_rsrc,
 				nh = (uint16_t)hopsv4[ipv4_arr_assem++];
 			else
 				nh = (uint16_t)hopsv6[ipv6_arr_assem++];
-			if (nh != FIB_DEFAULT_HOP)
-				hops[i] = nh != FIB_DEFAULT_HOP ?
-						  nh :
-						  events[i].mbuf->port;
+
+			hops[i] = nh != FIB_DEFAULT_HOP ?
+				  nh :
+				  events[i].mbuf->port;
 			process_packet(events[i].mbuf, &hops[i]);
 			events[i].mbuf->port = hops[i] != BAD_PORT ?
 						       hops[i] :
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.797561100 +0800
+++ 0102-examples-l3fwd-fix-duplicate-expression-for-default-.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From 9a518054b5551576745a89c1cf60301655c03a9b Mon Sep 17 00:00:00 2001
+From 9f9ea16ee2e6c799f56399aaa4dd7f64437ace72 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9a518054b5551576745a89c1cf60301655c03a9b ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'kni: fix build with Linux 6.5' has been queued to stable release 22.11.3
  2023-08-10  0:06 ` Xueming Li
                     ` (8 preceding siblings ...)
  2023-08-10  0:06   ` patch 'examples/l3fwd: fix duplicate expression for default nexthop' " Xueming Li
@ 2023-08-10  0:06   ` Xueming Li
  9 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:06 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=b9a44572feac5bce05a44eb4b09de640dee31546

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b9a44572feac5bce05a44eb4b09de640dee31546 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Tue, 11 Jul 2023 11:09:41 +0100
Subject: [PATCH] kni: fix build with Linux 6.5
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit dd33d53b9a032d7376aa04a28a1235338e1fd78f ]

The get_user_pages_remote() API has been modified in Linux kernel v6.5
[1], "struct vm_area_struct **vmas" parameter removed from the API.

To fix KNI build with Linux kernel v6.5, version check added around the
get_user_pages_remote() API.

[1]
ca5e863233e8 ("mm/gup: remove vmas parameter from get_user_pages_remote()")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 kernel/linux/kni/compat.h  | 4 ++++
 kernel/linux/kni/kni_dev.h | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 7aa6cd9fca..8beb670465 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -151,3 +151,7 @@
 	 RHEL_RELEASE_VERSION(9, 1) <= RHEL_RELEASE_CODE))
 #define HAVE_NETIF_RX_NI
 #endif
+
+#if KERNEL_VERSION(6, 5, 0) > LINUX_VERSION_CODE
+#define HAVE_VMA_IN_GUP
+#endif
diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
index 21bfb6890e..975379825b 100644
--- a/kernel/linux/kni/kni_dev.h
+++ b/kernel/linux/kni/kni_dev.h
@@ -107,7 +107,11 @@ static inline phys_addr_t iova_to_phys(struct task_struct *tsk,
 #ifdef HAVE_TSK_IN_GUP
 	ret = get_user_pages_remote(tsk, tsk->mm, iova, 1, 0, &page, NULL, NULL);
 #else
+  #ifdef HAVE_VMA_IN_GUP
 	ret = get_user_pages_remote(tsk->mm, iova, 1, 0, &page, NULL, NULL);
+  #else
+	ret = get_user_pages_remote(tsk->mm, iova, 1, 0, &page, NULL);
+  #endif
 #endif
 	if (ret < 0)
 		return 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.818176000 +0800
+++ 0103-kni-fix-build-with-Linux-6.5.patch	2023-08-09 21:51:18.274352000 +0800
@@ -1 +1 @@
-From dd33d53b9a032d7376aa04a28a1235338e1fd78f Mon Sep 17 00:00:00 2001
+From b9a44572feac5bce05a44eb4b09de640dee31546 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dd33d53b9a032d7376aa04a28a1235338e1fd78f ]
@@ -14,2 +16,0 @@
-
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'devtools: fix bashism in mailmap check' has been queued to stable release 22.11.3
  2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
                   ` (128 preceding siblings ...)
  2023-08-10  0:06 ` Xueming Li
@ 2023-08-10  0:10 ` Xueming Li
  2023-08-10  0:10   ` patch 'doc: fix typos and wording in flow API guide' " Xueming Li
                     ` (23 more replies)
  129 siblings, 24 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=e3f30fa9c8c59532071252954c7f00567ec17e58

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e3f30fa9c8c59532071252954c7f00567ec17e58 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@nvidia.com>
Date: Tue, 11 Jul 2023 10:16:19 +0300
Subject: [PATCH] devtools: fix bashism in mailmap check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8aec1d8f498e7f87ee65a4b31df9a205084cb39e ]

When running check-git-log, it showed a "Bad substitution",
because of a bash syntax.

It is fixed by using sed to escape the open parenthesis.

Fixes: 6fd14c1b58e6 ("devtools: fix mailmap check for parentheses")

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/check-git-log.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index 89544a2cc5..2ee7f2db64 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -264,7 +264,7 @@ names=$(git log --format='From: %an <%ae>%n%b' --reverse $range |
 	sed -rn 's,.*: (.*<.*@.*>),\1,p' |
 	sort -u)
 bad=$(for contributor in $names ; do
-	contributor=${contributor//(/\\(}
+	contributor=$(echo $contributor | sed 's,(,\\(,')
 	! grep -qE "^$contributor($| <)" $selfdir/../.mailmap || continue
 	name=${contributor%% <*}
 	if grep -q "^$name <" $selfdir/../.mailmap ; then
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.837240600 +0800
+++ 0104-devtools-fix-bashism-in-mailmap-check.patch	2023-08-09 21:51:18.274352000 +0800
@@ -1 +1 @@
-From 8aec1d8f498e7f87ee65a4b31df9a205084cb39e Mon Sep 17 00:00:00 2001
+From e3f30fa9c8c59532071252954c7f00567ec17e58 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8aec1d8f498e7f87ee65a4b31df9a205084cb39e ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'doc: fix typos and wording in flow API guide' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/i40e: fix comments' " Xueming Li
                     ` (22 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Ali Alnubani; +Cc: John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=759c53365ac959eeb4fc9f6dd7c5effdec8de716

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 759c53365ac959eeb4fc9f6dd7c5effdec8de716 Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@nvidia.com>
Date: Sun, 16 Jul 2023 09:58:26 +0300
Subject: [PATCH] doc: fix typos and wording in flow API guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d9f1751090ce1055a64f1d9a5f43758acae2c5ac ]

This fixes typos, punctuation and wording in the rte flow API guide.

Fixes: 2f82d143fb31 ("ethdev: add group jump action")

Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/prog_guide/rte_flow.rst | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index e98f1fdd52..d0b7833a2f 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -148,14 +148,15 @@ Attribute: Group
 Flow rules can be grouped by assigning them a common group number. Groups
 allow a logical hierarchy of flow rule groups (tables) to be defined. These
 groups can be supported virtually in the PMD or in the physical device.
-Group 0 is the default group and this is the only group which flows are
-guarantee to matched against, all subsequent groups can only be reached by
-way of the JUMP action from a matched flow rule.
+Group 0 is the default group and is the only group that
+flows are guaranteed to be matched against.
+All subsequent groups can only be reached by using a JUMP action
+from a matched flow rule.
 
 Although optional, applications are encouraged to group similar rules as
 much as possible to fully take advantage of hardware capabilities
 (e.g. optimized matching) and work around limitations (e.g. a single pattern
-type possibly allowed in a given group), while being aware that the groups
+type possibly allowed in a given group), while being aware that the groups'
 hierarchies must be programmed explicitly.
 
 Note that support for more than a single group is not guaranteed.
@@ -170,7 +171,7 @@ Priority levels are arbitrary and up to the application, they do
 not need to be contiguous nor start from 0, however the maximum number
 varies between devices and may be affected by existing flow rules.
 
-A flow which matches multiple rules in the same group will always matched by
+A flow which matches multiple rules in the same group will always be matched by
 the rule with the highest priority in that group.
 
 If a packet is matched by several rules of a given group for a given
@@ -1741,12 +1742,12 @@ flow group/tables on the device, this action redirects the matched flow to
 the specified group on that device.
 
 If a matched flow is redirected to a table which doesn't contain a matching
-rule for that flow then the behavior is undefined and the resulting behavior
-is up to the specific device. Best practice when using groups would be define
+rule for that flow, then the behavior is undefined and the resulting behavior
+is up to the specific device. Best practice when using groups would be to define
 a default flow rule for each group which a defines the default actions in that
 group so a consistent behavior is defined.
 
-Defining an action for matched flow in a group to jump to a group which is
+Defining an action for a matched flow in a group to jump to a group which is
 higher in the group hierarchy may not be supported by physical devices,
 depending on how groups are mapped to the physical devices. In the
 definitions of jump actions, applications should be aware that it may be
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.860326600 +0800
+++ 0105-doc-fix-typos-and-wording-in-flow-API-guide.patch	2023-08-09 21:51:18.274352000 +0800
@@ -1 +1 @@
-From d9f1751090ce1055a64f1d9a5f43758acae2c5ac Mon Sep 17 00:00:00 2001
+From 759c53365ac959eeb4fc9f6dd7c5effdec8de716 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d9f1751090ce1055a64f1d9a5f43758acae2c5ac ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 28d09c58d5..5bc998a433 100644
+index e98f1fdd52..d0b7833a2f 100644
@@ -50 +52 @@
-@@ -1769,12 +1770,12 @@ flow group/tables on the device, this action redirects the matched flow to
+@@ -1741,12 +1742,12 @@ flow group/tables on the device, this action redirects the matched flow to

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/i40e: fix comments' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
  2023-08-10  0:10   ` patch 'doc: fix typos and wording in flow API guide' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/iavf: fix stop ordering' " Xueming Li
                     ` (21 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Jieqiang Wang; +Cc: Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=c9092597017b397ec4a0b206ac24032312a2b287

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c9092597017b397ec4a0b206ac24032312a2b287 Mon Sep 17 00:00:00 2001
From: Jieqiang Wang <jieqiang.wang@arm.com>
Date: Wed, 12 Jul 2023 18:07:32 +0800
Subject: [PATCH] net/i40e: fix comments
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5267a2ae78e873d3a7e175944dcedffdadab6483 ]

The limitation of burst size in i40e vector rx has been removed, but the
comment lines have not been updated to reflect the code changes. Remove
those lines to avoid confusion. Additionally, fix a typo in
i40e_tx_queue.

Fixes: 9e27f00f3a61 ("net/i40e: fix vector Rx")

Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 .mailmap                                 | 1 +
 drivers/net/i40e/i40e_rxtx.h             | 2 +-
 drivers/net/i40e/i40e_rxtx_vec_altivec.c | 2 --
 drivers/net/i40e/i40e_rxtx_vec_neon.c    | 2 --
 drivers/net/i40e/i40e_rxtx_vec_sse.c     | 2 --
 5 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/.mailmap b/.mailmap
index a20c942643..e74bf83b77 100644
--- a/.mailmap
+++ b/.mailmap
@@ -610,6 +610,7 @@ Jie Liu <jie2.liu@hxt-semitech.com>
 Jie Pan <panjie5@jd.com>
 Jie Wang <jie1x.wang@intel.com>
 Jie Zhou <jizh@linux.microsoft.com> <jizh@microsoft.com>
+Jieqiang Wang <jieqiang.wang@arm.com>
 Jijiang Liu <jijiang.liu@intel.com>
 Jilei Chen <chenjilei@cmss.chinamobile.com>
 Jim Harris <james.r.harris@intel.com>
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 0376c219be..a8686224e5 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -169,7 +169,7 @@ struct i40e_tx_queue {
 	bool q_set; /**< indicate if tx queue has been configured */
 	bool tx_deferred_start; /**< don't start this queue in dev start */
 	uint8_t dcb_tc;         /**< Traffic class of tx queue */
-	uint64_t offloads; /**< Tx offload flags of RTE_ETH_RX_OFFLOAD_* */
+	uint64_t offloads; /**< Tx offload flags of RTE_ETH_TX_OFFLOAD_* */
 	const struct rte_memzone *mz;
 };
 
diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
index 2dfa04599c..da4a1bc03b 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
@@ -448,8 +448,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 
  /* Notice:
   * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet
-  * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST
-  *   numbers of DD bits
   */
 uint16_t
 i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index 12e6f1cbcb..90e388ae27 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -573,8 +573,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
  /*
  * Notice:
  * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST
- *   numbers of DD bits
  */
 uint16_t
 i40e_recv_pkts_vec(void *__rte_restrict rx_queue,
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index bdc979a839..79029ab433 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -595,8 +595,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
  /*
  * Notice:
  * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST
- *   numbers of DD bits
  */
 uint16_t
 i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.881693800 +0800
+++ 0106-net-i40e-fix-comments.patch	2023-08-09 21:51:18.274352000 +0800
@@ -1 +1 @@
-From 5267a2ae78e873d3a7e175944dcedffdadab6483 Mon Sep 17 00:00:00 2001
+From c9092597017b397ec4a0b206ac24032312a2b287 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5267a2ae78e873d3a7e175944dcedffdadab6483 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 6eccf0c555..670d312f84 100644
+index a20c942643..e74bf83b77 100644
@@ -28 +30 @@
-@@ -628,6 +628,7 @@ Jie Liu <jie2.liu@hxt-semitech.com>
+@@ -610,6 +610,7 @@ Jie Liu <jie2.liu@hxt-semitech.com>
@@ -50 +52 @@
-index 8672ad1c41..4cd78f4e58 100644
+index 2dfa04599c..da4a1bc03b 100644
@@ -53 +55 @@
-@@ -449,8 +449,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
+@@ -448,8 +448,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -63 +65 @@
-index 49391fe4c7..d873e30972 100644
+index 12e6f1cbcb..90e388ae27 100644
@@ -66 +68 @@
-@@ -574,8 +574,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
+@@ -573,8 +573,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
@@ -76 +78 @@
-index baf83cb3df..b94c37cbb8 100644
+index bdc979a839..79029ab433 100644
@@ -79 +81 @@
-@@ -596,8 +596,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
+@@ -595,8 +595,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/iavf: fix stop ordering' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
  2023-08-10  0:10   ` patch 'doc: fix typos and wording in flow API guide' " Xueming Li
  2023-08-10  0:10   ` patch 'net/i40e: fix comments' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'common/iavf: fix MAC type for 710 NIC' " Xueming Li
                     ` (20 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Zhichao Zeng; +Cc: Bartosz Staszewski, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=eebdd516b374c17c622dc65a54f2acbe78218244

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eebdd516b374c17c622dc65a54f2acbe78218244 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Wed, 12 Jul 2023 13:35:37 +0800
Subject: [PATCH] net/iavf: fix stop ordering
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 87b2afdea3aae6095aa80956ae2e15f602594185 ]

The current implementation stops queue before disabling the Rx interrupt,
and when there are still unprocessed packets remaining in the queue,
this may cause the Rx ring to timeout, leading to IOMMU fault.

This patch disables the Rx interrupt before stopping the queue, ensuring
that no packets received when disabling the queues.

Fixes: 02d212ca3125 ("net/iavf: rename remaining avf strings")

Signed-off-by: Bartosz Staszewski <bartoszx.staszewski@intel.com>
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 .mailmap                       | 1 +
 drivers/net/iavf/iavf_ethdev.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index e74bf83b77..f483c8cd69 100644
--- a/.mailmap
+++ b/.mailmap
@@ -144,6 +144,7 @@ Balazs Nemeth <bnemeth@redhat.com> <balazs.nemeth@intel.com>
 Bao-Long Tran <longtb5@viettel.com.vn>
 Barak Enat <barak@saguna.net>
 Barry Cao <barry.cao@nxp.com>
+Bartosz Staszewski <bartoszx.staszewski@intel.com>
 Baruch Siach <baruch@tkos.co.il>
 Bassam Zaid AlKilani <bzalkilani@nvidia.com>
 Beilei Xing <beilei.xing@intel.com>
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 9b3cbee7d4..610547502b 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1078,8 +1078,6 @@ iavf_dev_stop(struct rte_eth_dev *dev)
 	if (adapter->stopped == 1)
 		return 0;
 
-	iavf_stop_queues(dev);
-
 	/* Disable the interrupt for Rx */
 	rte_intr_efd_disable(intr_handle);
 	/* Rx interrupt vector mapping free */
@@ -1092,6 +1090,8 @@ iavf_dev_stop(struct rte_eth_dev *dev)
 	iavf_add_del_mc_addr_list(adapter, vf->mc_addrs, vf->mc_addrs_num,
 				  false);
 
+	iavf_stop_queues(dev);
+
 	adapter->stopped = 1;
 	dev->data->dev_started = 0;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.907040800 +0800
+++ 0107-net-iavf-fix-stop-ordering.patch	2023-08-09 21:51:18.274352000 +0800
@@ -1 +1 @@
-From 87b2afdea3aae6095aa80956ae2e15f602594185 Mon Sep 17 00:00:00 2001
+From eebdd516b374c17c622dc65a54f2acbe78218244 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 87b2afdea3aae6095aa80956ae2e15f602594185 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 670d312f84..9ce554451b 100644
+index e74bf83b77..f483c8cd69 100644
@@ -28,2 +30,2 @@
-@@ -151,6 +151,7 @@ Bao-Long Tran <longtb5@viettel.com.vn>
- Bar Neuman <bneuman@nvidia.com>
+@@ -144,6 +144,7 @@ Balazs Nemeth <bnemeth@redhat.com> <balazs.nemeth@intel.com>
+ Bao-Long Tran <longtb5@viettel.com.vn>
@@ -37 +39 @@
-index ac7154d720..f2fc5a5621 100644
+index 9b3cbee7d4..610547502b 100644
@@ -40 +42 @@
-@@ -1087,8 +1087,6 @@ iavf_dev_stop(struct rte_eth_dev *dev)
+@@ -1078,8 +1078,6 @@ iavf_dev_stop(struct rte_eth_dev *dev)
@@ -49 +51 @@
-@@ -1101,6 +1099,8 @@ iavf_dev_stop(struct rte_eth_dev *dev)
+@@ -1092,6 +1090,8 @@ iavf_dev_stop(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'common/iavf: fix MAC type for 710 NIC' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (2 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/iavf: fix stop ordering' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/ixgbe: fix Rx and Tx queue status' " Xueming Li
                     ` (19 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Wenjing Qiao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=12b52c01c99776d8e4d475fbb5e34be643e5533c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 12b52c01c99776d8e4d475fbb5e34be643e5533c Mon Sep 17 00:00:00 2001
From: Wenjing Qiao <wenjing.qiao@intel.com>
Date: Wed, 12 Jul 2023 07:38:13 +0000
Subject: [PATCH] common/iavf: fix MAC type for 710 NIC
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 03b7b90ac2bbda4eb0366898dd4284fb88310734 ]

Fix MAC type according to PCI ID list.

Fixes: eb385183edac ("net/iavf/base: update device IDs")

Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/common/iavf/iavf_common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/common/iavf/iavf_common.c b/drivers/common/iavf/iavf_common.c
index 855a0ab2f5..dc7662bc1b 100644
--- a/drivers/common/iavf/iavf_common.c
+++ b/drivers/common/iavf/iavf_common.c
@@ -27,6 +27,8 @@ enum iavf_status iavf_set_mac_type(struct iavf_hw *hw)
 			break;
 		case IAVF_DEV_ID_VF:
 		case IAVF_DEV_ID_VF_HV:
+			hw->mac.type = IAVF_MAC_XL710;
+			break;
 		case IAVF_DEV_ID_ADAPTIVE_VF:
 			hw->mac.type = IAVF_MAC_VF;
 			break;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.930761900 +0800
+++ 0108-common-iavf-fix-MAC-type-for-710-NIC.patch	2023-08-09 21:51:18.274352000 +0800
@@ -1 +1 @@
-From 03b7b90ac2bbda4eb0366898dd4284fb88310734 Mon Sep 17 00:00:00 2001
+From 12b52c01c99776d8e4d475fbb5e34be643e5533c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 03b7b90ac2bbda4eb0366898dd4284fb88310734 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/ixgbe: fix Rx and Tx queue status' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (3 preceding siblings ...)
  2023-08-10  0:10   ` patch 'common/iavf: fix MAC type for 710 NIC' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/igc: " Xueming Li
                     ` (18 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Jie Hai, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=995e54d4d673d9b395da894758b33efed1ad00a2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 995e54d4d673d9b395da894758b33efed1ad00a2 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Wed, 12 Jul 2023 08:31:51 +0000
Subject: [PATCH] net/ixgbe: fix Rx and Tx queue status
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4a8490075692c32797be4280aea33772a5865038 ]

Ixgbevf driver don't enable queue start/stop functions, queue status is not
updated when the HW queue enabled or disabled. It caused application can't
get correct queue status.
This patch fixes the issue by updating the queue states when the queue is
disabled or enabled.

Fixes: 429c6d86b371 ("ixgbe: prepare for vector pmd")
Fixes: f0c50e5f56fa ("ixgbe: move PMD specific fields out of base driver")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index dd07f0961e..a3a7c68806 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -3379,6 +3379,7 @@ ixgbe_dev_clear_queues(struct rte_eth_dev *dev)
 		if (txq != NULL) {
 			txq->ops->release_mbufs(txq);
 			txq->ops->reset(txq);
+			dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
 		}
 	}
 
@@ -3388,6 +3389,7 @@ ixgbe_dev_clear_queues(struct rte_eth_dev *dev)
 		if (rxq != NULL) {
 			ixgbe_rx_queue_release_mbufs(rxq);
 			ixgbe_reset_rx_queue(adapter, rxq);
+			dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
 		}
 	}
 	/* If loopback mode was enabled, reconfigure the link accordingly */
@@ -5825,6 +5827,8 @@ ixgbevf_dev_rxtx_start(struct rte_eth_dev *dev)
 		} while (--poll_ms && !(txdctl & IXGBE_TXDCTL_ENABLE));
 		if (!poll_ms)
 			PMD_INIT_LOG(ERR, "Could not enable Tx Queue %d", i);
+		else
+			dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
 	}
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
 
@@ -5842,6 +5846,8 @@ ixgbevf_dev_rxtx_start(struct rte_eth_dev *dev)
 		} while (--poll_ms && !(rxdctl & IXGBE_RXDCTL_ENABLE));
 		if (!poll_ms)
 			PMD_INIT_LOG(ERR, "Could not enable Rx Queue %d", i);
+		else
+			dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
 		rte_wmb();
 		IXGBE_WRITE_REG(hw, IXGBE_VFRDT(i), rxq->nb_rx_desc - 1);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.952400200 +0800
+++ 0109-net-ixgbe-fix-Rx-and-Tx-queue-status.patch	2023-08-09 21:51:18.274352000 +0800
@@ -1 +1 @@
-From 4a8490075692c32797be4280aea33772a5865038 Mon Sep 17 00:00:00 2001
+From 995e54d4d673d9b395da894758b33efed1ad00a2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4a8490075692c32797be4280aea33772a5865038 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 61f17cd90b..954ef241a0 100644
+index dd07f0961e..a3a7c68806 100644
@@ -27 +29 @@
-@@ -3378,6 +3378,7 @@ ixgbe_dev_clear_queues(struct rte_eth_dev *dev)
+@@ -3379,6 +3379,7 @@ ixgbe_dev_clear_queues(struct rte_eth_dev *dev)
@@ -35 +37 @@
-@@ -3387,6 +3388,7 @@ ixgbe_dev_clear_queues(struct rte_eth_dev *dev)
+@@ -3388,6 +3389,7 @@ ixgbe_dev_clear_queues(struct rte_eth_dev *dev)
@@ -43 +45 @@
-@@ -5896,6 +5898,8 @@ ixgbevf_dev_rxtx_start(struct rte_eth_dev *dev)
+@@ -5825,6 +5827,8 @@ ixgbevf_dev_rxtx_start(struct rte_eth_dev *dev)
@@ -52 +54 @@
-@@ -5913,6 +5917,8 @@ ixgbevf_dev_rxtx_start(struct rte_eth_dev *dev)
+@@ -5842,6 +5846,8 @@ ixgbevf_dev_rxtx_start(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/igc: fix Rx and Tx queue status' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (4 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/ixgbe: fix Rx and Tx queue status' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/e1000: " Xueming Li
                     ` (17 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Mingjin Ye, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=c4b93c61288a69bcd84625d348e446359549641c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c4b93c61288a69bcd84625d348e446359549641c Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Wed, 12 Jul 2023 08:31:52 +0000
Subject: [PATCH] net/igc: fix Rx and Tx queue status
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 921ff14280ed8ba7b9d0a898046cf5eadf3d4c8e ]

Igc driver don't enable queue start/stop functions, queue status is not
updated when the HW queue enabled or disabled. It caused application can't
get correct queue status.
This patch fixes the issue by updating the queue states when the queue is
disabled or enabled.

Fixes: a5aeb2b9e225 ("net/igc: support Rx and Tx")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/igc/igc_txrx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c
index ffd219b0df..160865e911 100644
--- a/drivers/net/igc/igc_txrx.c
+++ b/drivers/net/igc/igc_txrx.c
@@ -1291,6 +1291,7 @@ igc_rx_init(struct rte_eth_dev *dev)
 			dvmolr |= IGC_DVMOLR_STRCRC;
 
 		IGC_WRITE_REG(hw, IGC_DVMOLR(rxq->reg_idx), dvmolr);
+		dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
 	}
 
 	return 0;
@@ -1934,6 +1935,7 @@ igc_dev_clear_queues(struct rte_eth_dev *dev)
 		if (txq != NULL) {
 			igc_tx_queue_release_mbufs(txq);
 			igc_reset_tx_queue(txq);
+			dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
 		}
 	}
 
@@ -1942,6 +1944,7 @@ igc_dev_clear_queues(struct rte_eth_dev *dev)
 		if (rxq != NULL) {
 			igc_rx_queue_release_mbufs(rxq);
 			igc_reset_rx_queue(rxq);
+			dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
 		}
 	}
 }
@@ -2187,6 +2190,7 @@ igc_tx_init(struct rte_eth_dev *dev)
 				IGC_TXDCTL_WTHRESH_MSK;
 		txdctl |= IGC_TXDCTL_QUEUE_ENABLE;
 		IGC_WRITE_REG(hw, IGC_TXDCTL(txq->reg_idx), txdctl);
+		dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
 	}
 
 	igc_config_collision_dist(hw);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.978064900 +0800
+++ 0110-net-igc-fix-Rx-and-Tx-queue-status.patch	2023-08-09 21:51:18.274352000 +0800
@@ -1 +1 @@
-From 921ff14280ed8ba7b9d0a898046cf5eadf3d4c8e Mon Sep 17 00:00:00 2001
+From c4b93c61288a69bcd84625d348e446359549641c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 921ff14280ed8ba7b9d0a898046cf5eadf3d4c8e ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index c11b6f7f25..5c60e3e997 100644
+index ffd219b0df..160865e911 100644
@@ -26 +28 @@
-@@ -1215,6 +1215,7 @@ igc_rx_init(struct rte_eth_dev *dev)
+@@ -1291,6 +1291,7 @@ igc_rx_init(struct rte_eth_dev *dev)
@@ -34 +36 @@
-@@ -1888,6 +1889,7 @@ igc_dev_clear_queues(struct rte_eth_dev *dev)
+@@ -1934,6 +1935,7 @@ igc_dev_clear_queues(struct rte_eth_dev *dev)
@@ -42 +44 @@
-@@ -1896,6 +1898,7 @@ igc_dev_clear_queues(struct rte_eth_dev *dev)
+@@ -1942,6 +1944,7 @@ igc_dev_clear_queues(struct rte_eth_dev *dev)
@@ -50 +52 @@
-@@ -2143,6 +2146,7 @@ igc_tx_init(struct rte_eth_dev *dev)
+@@ -2187,6 +2190,7 @@ igc_tx_init(struct rte_eth_dev *dev)
@@ -57 +59 @@
- 	if (offloads & RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP) {
+ 	igc_config_collision_dist(hw);

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/e1000: fix Rx and Tx queue status' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (5 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/igc: " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/mlx5: fix drop action memory leak' " Xueming Li
                     ` (16 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Mingjin Ye, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=1622bab08e5c565d3fda6b0a57176b649c96ff54

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1622bab08e5c565d3fda6b0a57176b649c96ff54 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Wed, 12 Jul 2023 08:31:53 +0000
Subject: [PATCH] net/e1000: fix Rx and Tx queue status
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b2a0271188f3428ad5dc1ea600e1e2254b9d6781 ]

Igb driver don't enable queue start/stop functions, queue status is not
updated when the HW queue enabled or disabled. It caused application can't
get correct queue status.
This patch fixes the issue by updating the queue states when the queue is
disabled or enabled.

Fixes: be2d648a2dd3 ("igb: add PF support")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/e1000/igb_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index f32dee46df..1d23e081b6 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1853,6 +1853,7 @@ igb_dev_clear_queues(struct rte_eth_dev *dev)
 		if (txq != NULL) {
 			igb_tx_queue_release_mbufs(txq);
 			igb_reset_tx_queue(txq, dev);
+			dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
 		}
 	}
 
@@ -1861,6 +1862,7 @@ igb_dev_clear_queues(struct rte_eth_dev *dev)
 		if (rxq != NULL) {
 			igb_rx_queue_release_mbufs(rxq);
 			igb_reset_rx_queue(rxq);
+			dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
 		}
 	}
 }
@@ -2441,6 +2443,7 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
 		rxdctl |= ((rxq->hthresh & 0x1F) << 8);
 		rxdctl |= ((rxq->wthresh & 0x1F) << 16);
 		E1000_WRITE_REG(hw, E1000_RXDCTL(rxq->reg_idx), rxdctl);
+		dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
 	}
 
 	if (dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_SCATTER) {
@@ -2605,6 +2608,7 @@ eth_igb_tx_init(struct rte_eth_dev *dev)
 		txdctl |= ((txq->wthresh & 0x1F) << 16);
 		txdctl |= E1000_TXDCTL_QUEUE_ENABLE;
 		E1000_WRITE_REG(hw, E1000_TXDCTL(txq->reg_idx), txdctl);
+		dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
 	}
 
 	/* Program the Transmit Control Register. */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.999248200 +0800
+++ 0111-net-e1000-fix-Rx-and-Tx-queue-status.patch	2023-08-09 21:51:18.274352000 +0800
@@ -1 +1 @@
-From b2a0271188f3428ad5dc1ea600e1e2254b9d6781 Mon Sep 17 00:00:00 2001
+From 1622bab08e5c565d3fda6b0a57176b649c96ff54 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b2a0271188f3428ad5dc1ea600e1e2254b9d6781 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 25ad9eb4e5..61c6394310 100644
+index f32dee46df..1d23e081b6 100644
@@ -26 +28 @@
-@@ -1854,6 +1854,7 @@ igb_dev_clear_queues(struct rte_eth_dev *dev)
+@@ -1853,6 +1853,7 @@ igb_dev_clear_queues(struct rte_eth_dev *dev)
@@ -34 +36 @@
-@@ -1862,6 +1863,7 @@ igb_dev_clear_queues(struct rte_eth_dev *dev)
+@@ -1861,6 +1862,7 @@ igb_dev_clear_queues(struct rte_eth_dev *dev)
@@ -42 +44 @@
-@@ -2442,6 +2444,7 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
+@@ -2441,6 +2443,7 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
@@ -50 +52 @@
-@@ -2606,6 +2609,7 @@ eth_igb_tx_init(struct rte_eth_dev *dev)
+@@ -2605,6 +2608,7 @@ eth_igb_tx_init(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix drop action memory leak' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (6 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/e1000: " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/mlx5: fix LRO TCP checksum' " Xueming Li
                     ` (15 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Bing Zhao
  Cc: David Marchand, Mário Kuka, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=249a731ffd90c5af9047af48e76de58d05914620

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 249a731ffd90c5af9047af48e76de58d05914620 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Thu, 13 Jul 2023 14:19:41 +0300
Subject: [PATCH] net/mlx5: fix drop action memory leak
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 177d90ddd6e0e223966c2fb8a55e036cfb47db7a ]

In DV mode, when quitting an application, the default drop action
and its resources should be released. The Devx action for the TIR
was not destroyed and it would cause 80B memory leak.

With this commit, in DV mode, the action should be destroyed in the
mlx5_devx_drop_action_destroy() explicitly.

Bugzilla ID: 1192
Bugzilla ID: 1255

Fixes: bc5bee028ebc ("net/mlx5: create drop queue using DevX")

Reported-by: David Marchand <david.marchand@redhat.com>
Reported-by: Mário Kuka <kuka@cesnet.cz>
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_devx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index 02deaac612..7e0ec91328 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -1127,6 +1127,10 @@ mlx5_devx_drop_action_destroy(struct rte_eth_dev *dev)
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_hrxq *hrxq = priv->drop_queue.hrxq;
 
+#if defined(HAVE_IBV_FLOW_DV_SUPPORT) || !defined(HAVE_INFINIBAND_VERBS_H)
+	if (hrxq->action != NULL)
+		mlx5_flow_os_destroy_flow_action(hrxq->action);
+#endif
 	if (hrxq->tir != NULL)
 		mlx5_devx_tir_destroy(hrxq);
 	if (hrxq->ind_table->ind_table != NULL)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.021165400 +0800
+++ 0112-net-mlx5-fix-drop-action-memory-leak.patch	2023-08-09 21:51:18.274352000 +0800
@@ -1 +1 @@
-From 177d90ddd6e0e223966c2fb8a55e036cfb47db7a Mon Sep 17 00:00:00 2001
+From 249a731ffd90c5af9047af48e76de58d05914620 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 177d90ddd6e0e223966c2fb8a55e036cfb47db7a ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index d286cfe864..9fa400fc48 100644
+index 02deaac612..7e0ec91328 100644
@@ -34 +36 @@
-@@ -1134,6 +1134,10 @@ mlx5_devx_drop_action_destroy(struct rte_eth_dev *dev)
+@@ -1127,6 +1127,10 @@ mlx5_devx_drop_action_destroy(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix LRO TCP checksum' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (7 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/mlx5: fix drop action memory leak' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/mlx5: fix MPRQ stride size for headroom' " Xueming Li
                     ` (14 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Heng Jiang; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=1a59660e4d610955a2c5ffe5e36da8a9e3417310

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1a59660e4d610955a2c5ffe5e36da8a9e3417310 Mon Sep 17 00:00:00 2001
From: Heng Jiang <jiangheng14@huawei.com>
Date: Tue, 18 Jul 2023 11:56:13 +0300
Subject: [PATCH] net/mlx5: fix LRO TCP checksum
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 776209c4b865ad3e0eaff202c5ff7358b8f5ab57 ]

The variable csum is the sum of three 16 bits integers, the max value
is 0x2FFFD. The corner case of sum of 3 is 0x1FFFF gives the wrong
result: 0x1 + 0xFFFF = 0x10000, the upper 16 bits are not 0.
It must be folded again to ensure that the upper 16 bits are 0.

Fixes: e4c2a16eb1de ("net/mlx5: handle LRO packets in Rx queue")

Signed-off-by: Heng Jiang <jiangheng14@huawei.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 .mailmap                   | 1 +
 drivers/net/mlx5/mlx5_rx.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/.mailmap b/.mailmap
index f483c8cd69..6032ae9ea2 100644
--- a/.mailmap
+++ b/.mailmap
@@ -483,6 +483,7 @@ Helin Zhang <helin.zhang@intel.com>
 Hemant Agrawal <hemant.agrawal@nxp.com> <hemant@freescale.com>
 Heng Ding <hengx.ding@intel.com>
 Hengjian Zhang <hengjianx.zhang@intel.com>
+Heng Jiang <jiangheng14@huawei.com>
 Heng Wang <heng.wang@ericsson.com>
 Henning Schild <henning.schild@siemens.com>
 Henry Cai <caihe@huawei.com>
diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c
index 99a08ef5f1..b41f7a51f5 100644
--- a/drivers/net/mlx5/mlx5_rx.c
+++ b/drivers/net/mlx5/mlx5_rx.c
@@ -1045,6 +1045,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *__rte_restrict tcp,
 	tcp->cksum = 0;
 	csum += rte_raw_cksum(tcp, (tcp->data_off >> 4) * 4);
 	csum = ((csum & 0xffff0000) >> 16) + (csum & 0xffff);
+	csum = ((csum & 0xffff0000) >> 16) + (csum & 0xffff);
 	csum = (~csum) & 0xffff;
 	if (csum == 0)
 		csum = 0xffff;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.042069800 +0800
+++ 0113-net-mlx5-fix-LRO-TCP-checksum.patch	2023-08-09 21:51:18.284352000 +0800
@@ -1 +1 @@
-From 776209c4b865ad3e0eaff202c5ff7358b8f5ab57 Mon Sep 17 00:00:00 2001
+From 1a59660e4d610955a2c5ffe5e36da8a9e3417310 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 776209c4b865ad3e0eaff202c5ff7358b8f5ab57 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 9ce554451b..864d33ee46 100644
+index f483c8cd69..6032ae9ea2 100644
@@ -25 +27 @@
-@@ -496,6 +496,7 @@ Helin Zhang <helin.zhang@intel.com>
+@@ -483,6 +483,7 @@ Helin Zhang <helin.zhang@intel.com>
@@ -34 +36 @@
-index 71c4638251..392784050f 100644
+index 99a08ef5f1..b41f7a51f5 100644
@@ -37 +39 @@
-@@ -1090,6 +1090,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *__rte_restrict tcp,
+@@ -1045,6 +1045,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *__rte_restrict tcp,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix MPRQ stride size for headroom' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (8 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/mlx5: fix LRO TCP checksum' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/mlx5: fix validation for conntrack indirect action' " Xueming Li
                     ` (13 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=9a2a6168fc205306b2f092d4f72ac487f87c8d4d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9a2a6168fc205306b2f092d4f72ac487f87c8d4d Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Wed, 31 May 2023 22:00:18 +0300
Subject: [PATCH] net/mlx5: fix MPRQ stride size for headroom
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e6479f009fbd9c8e873807cc928dcf91a151aba9 ]

The space for the headroom is reserved at the end of every MPRQ stride
for the next packet. The Rx burst logic is to copy any overlapping
packet data if there is an overlap with this reserved headroom space.
But it is not possible if the headroom size is bigger than the whole
stride. Adjust the stride size to make sure the stride size is greater
than the headroom size.

Fixes: 34776af600df ("net/mlx5: fix MPRQ stride devargs adjustment")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5.c     |  1 +
 drivers/net/mlx5/mlx5_rxq.c | 41 +++++++++++++++++++++++++------------
 2 files changed, 29 insertions(+), 13 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 79ccea5003..8250c94803 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2479,6 +2479,7 @@ mlx5_port_args_config(struct mlx5_priv *priv, struct mlx5_kvargs_ctrl *mkvlist,
 	config->mprq.max_memcpy_len = MLX5_MPRQ_MEMCPY_DEFAULT_LEN;
 	config->mprq.min_rxqs_num = MLX5_MPRQ_MIN_RXQS;
 	config->mprq.log_stride_num = MLX5_MPRQ_DEFAULT_LOG_STRIDE_NUM;
+	config->mprq.log_stride_size = MLX5_MPRQ_DEFAULT_LOG_STRIDE_SIZE;
 	config->log_hp_size = MLX5_ARG_UNSET;
 	config->std_delay_drop = 0;
 	config->hp_delay_drop = 0;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index a42c70f898..6b2af87cd2 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1601,23 +1601,38 @@ mlx5_mprq_prepare(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	} else {
 		*actual_log_stride_num = config->mprq.log_stride_num;
 	}
-	if (config->mprq.log_stride_size) {
-		/* Checks if chosen size of stride is in supported range. */
-		if (config->mprq.log_stride_size > log_max_stride_size ||
-		    config->mprq.log_stride_size < log_min_stride_size) {
-			*actual_log_stride_size = log_def_stride_size;
+	/* Checks if chosen size of stride is in supported range. */
+	if (config->mprq.log_stride_size > log_max_stride_size ||
+	    config->mprq.log_stride_size < log_min_stride_size) {
+		*actual_log_stride_size = log_def_stride_size;
+		DRV_LOG(WARNING,
+			"Port %u Rx queue %u size of a stride for Multi-Packet RQ is out of range, setting default value (%u)",
+			dev->data->port_id, idx,
+			RTE_BIT32(log_def_stride_size));
+	} else {
+		*actual_log_stride_size = config->mprq.log_stride_size;
+	}
+	/* Make the stride fit the mbuf size by default. */
+	if (*actual_log_stride_size == MLX5_MPRQ_DEFAULT_LOG_STRIDE_SIZE) {
+		if (min_mbuf_size <= RTE_BIT32(log_max_stride_size)) {
 			DRV_LOG(WARNING,
-				"Port %u Rx queue %u size of a stride for Multi-Packet RQ is out of range, setting default value (%u)",
-				dev->data->port_id, idx,
-				RTE_BIT32(log_def_stride_size));
+				"Port %u Rx queue %u size of a stride for Multi-Packet RQ is adjusted to match the mbuf size (%u)",
+				dev->data->port_id, idx, min_mbuf_size);
+			*actual_log_stride_size = log2above(min_mbuf_size);
 		} else {
-			*actual_log_stride_size = config->mprq.log_stride_size;
+			goto unsupport;
 		}
-	} else {
-		if (min_mbuf_size <= RTE_BIT32(log_max_stride_size))
-			*actual_log_stride_size = log2above(min_mbuf_size);
-		else
+	}
+	/* Make sure the stride size is greater than the headroom. */
+	if (RTE_BIT32(*actual_log_stride_size) < RTE_PKTMBUF_HEADROOM) {
+		if (RTE_BIT32(log_max_stride_size) > RTE_PKTMBUF_HEADROOM) {
+			DRV_LOG(WARNING,
+				"Port %u Rx queue %u size of a stride for Multi-Packet RQ is adjusted to accommodate the headroom (%u)",
+				dev->data->port_id, idx, RTE_PKTMBUF_HEADROOM);
+			*actual_log_stride_size = log2above(RTE_PKTMBUF_HEADROOM);
+		} else {
 			goto unsupport;
+		}
 	}
 	log_stride_wqe_size = *actual_log_stride_num + *actual_log_stride_size;
 	/* Check if WQE buffer size is supported by hardware. */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.062732700 +0800
+++ 0114-net-mlx5-fix-MPRQ-stride-size-for-headroom.patch	2023-08-09 21:51:18.284352000 +0800
@@ -1 +1 @@
-From e6479f009fbd9c8e873807cc928dcf91a151aba9 Mon Sep 17 00:00:00 2001
+From 9a2a6168fc205306b2f092d4f72ac487f87c8d4d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e6479f009fbd9c8e873807cc928dcf91a151aba9 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index fd9b76027d..b373306f98 100644
+index 79ccea5003..8250c94803 100644
@@ -27 +29 @@
-@@ -2603,6 +2603,7 @@ mlx5_port_args_config(struct mlx5_priv *priv, struct mlx5_kvargs_ctrl *mkvlist,
+@@ -2479,6 +2479,7 @@ mlx5_port_args_config(struct mlx5_priv *priv, struct mlx5_kvargs_ctrl *mkvlist,
@@ -36 +38 @@
-index ec713009d7..8ef7860e16 100644
+index a42c70f898..6b2af87cd2 100644
@@ -39 +41 @@
-@@ -1604,23 +1604,38 @@ mlx5_mprq_prepare(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1601,23 +1601,38 @@ mlx5_mprq_prepare(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix validation for conntrack indirect action' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (9 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/mlx5: fix MPRQ stride size for headroom' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/mlx5: fix handle validation for meter mark' " Xueming Li
                     ` (12 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=0495e8506e9682fe63ec77b3b294a00c9611b19f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0495e8506e9682fe63ec77b3b294a00c9611b19f Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Tue, 18 Jul 2023 16:32:12 +0300
Subject: [PATCH] net/mlx5: fix validation for conntrack indirect action
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a9156d685fa1b8927f68606c69521c5eae3184a2 ]

After rte_flow_shared_action_* API was replaced with
rte_flow_action_handle_* API, one input parameter of the update
interface was also changed. A generic pointer was used instead of the
"const struct rte_flow_action *" pointer.

In the entrance of mlx5 PMD callback for update, the validation is
called for all indirect actions. But for conntrack type, the pointer
is no longer with rte_flow_action pointer type and it will cause an
incorrect casting and error.

The content for updating should only be validated when needed. It
should skip the validation in the entrance. Right now, the content
was already added before updating the hardware by WQE. So the type
of the indirect action should be checked before calling the action
validate function.

When creating a new conntrack object, the validation is still needed
since all the content will be used to update the hardware context.

Fixes: 4b61b8774be9 ("ethdev: introduce indirect flow action")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index b98dc9ffb2..e3ca7b6093 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -10132,9 +10132,18 @@ mlx5_action_handle_update(struct rte_eth_dev *dev,
 	const struct mlx5_flow_driver_ops *fops =
 			flow_get_drv_ops(flow_get_drv_type(dev, &attr));
 	int ret;
+	uint32_t act_idx = (uint32_t)(uintptr_t)handle;
+	uint32_t type = act_idx >> MLX5_INDIRECT_ACTION_TYPE_OFFSET;
 
-	ret = flow_drv_action_validate(dev, NULL,
-			(const struct rte_flow_action *)update, fops, error);
+	switch (type) {
+	case MLX5_INDIRECT_ACTION_TYPE_CT:
+		ret = 0;
+		break;
+	default:
+		ret = flow_drv_action_validate(dev, NULL,
+				(const struct rte_flow_action *)update,
+				fops, error);
+	}
 	if (ret)
 		return ret;
 	return flow_drv_action_update(dev, handle, update, fops,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.084133500 +0800
+++ 0115-net-mlx5-fix-validation-for-conntrack-indirect-actio.patch	2023-08-09 21:51:18.284352000 +0800
@@ -1 +1 @@
-From a9156d685fa1b8927f68606c69521c5eae3184a2 Mon Sep 17 00:00:00 2001
+From 0495e8506e9682fe63ec77b3b294a00c9611b19f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a9156d685fa1b8927f68606c69521c5eae3184a2 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -35 +37 @@
-index 4b567f61dd..9bd92f28fd 100644
+index b98dc9ffb2..e3ca7b6093 100644
@@ -38 +40 @@
-@@ -10753,9 +10753,18 @@ mlx5_action_handle_update(struct rte_eth_dev *dev,
+@@ -10132,9 +10132,18 @@ mlx5_action_handle_update(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mlx5: fix handle validation for meter mark' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (10 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/mlx5: fix validation for conntrack indirect action' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'app/testpmd: fix meter mark handle update' " Xueming Li
                     ` (11 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=532cb75dec42a09d1a65720d36013fd4f4aaf4aa

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 532cb75dec42a09d1a65720d36013fd4f4aaf4aa Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Tue, 18 Jul 2023 16:32:13 +0300
Subject: [PATCH] net/mlx5: fix handle validation for meter mark
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8b6f24396fc737ca831678a6acd3820c2073be87 ]

Skip the METER_MARK validation for the indirect action update.
The old synchronous indirect action update was left out
during the METER_MARK implementation in favor of the async way.
Allow the sync method of doing this with relaxed validation.

Fixes: 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action with HWS")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index e3ca7b6093..942dccf518 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -10137,6 +10137,7 @@ mlx5_action_handle_update(struct rte_eth_dev *dev,
 
 	switch (type) {
 	case MLX5_INDIRECT_ACTION_TYPE_CT:
+	case MLX5_INDIRECT_ACTION_TYPE_METER_MARK:
 		ret = 0;
 		break;
 	default:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.110385400 +0800
+++ 0116-net-mlx5-fix-handle-validation-for-meter-mark.patch	2023-08-09 21:51:18.284352000 +0800
@@ -1 +1 @@
-From 8b6f24396fc737ca831678a6acd3820c2073be87 Mon Sep 17 00:00:00 2001
+From 532cb75dec42a09d1a65720d36013fd4f4aaf4aa Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8b6f24396fc737ca831678a6acd3820c2073be87 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 9bd92f28fd..e91eb636d0 100644
+index e3ca7b6093..942dccf518 100644
@@ -24 +26 @@
-@@ -10758,6 +10758,7 @@ mlx5_action_handle_update(struct rte_eth_dev *dev,
+@@ -10137,6 +10137,7 @@ mlx5_action_handle_update(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'app/testpmd: fix meter mark handle update' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (11 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/mlx5: fix handle validation for meter mark' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'doc: add flow template API requirements for mlx5' " Xueming Li
                     ` (10 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=3eda3753f8ff24b497a0cdd1be43a510d861addb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3eda3753f8ff24b497a0cdd1be43a510d861addb Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Tue, 18 Jul 2023 16:32:14 +0300
Subject: [PATCH] app/testpmd: fix meter mark handle update
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5ed396098e662be8638c2d08c711db2823c386ac ]

The indirect action handle update for the METER_MARK action
was implemented only for the async flow API.
Allow updating the METER_MARK parameters via the old sync method.

Fixes: 9c4a0c1859a3 ("ethdev: add meter color mark flow action")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 app/test-pmd/config.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index acccb6b035..6a9eb4609c 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1875,6 +1875,7 @@ port_action_handle_update(portid_t port_id, uint32_t id,
 	struct rte_flow_error error;
 	struct rte_flow_action_handle *action_handle;
 	struct port_indirect_action *pia;
+	struct rte_flow_update_meter_mark mtr_update;
 	const void *update;
 
 	action_handle = port_action_handle_get_by_id(port_id, id);
@@ -1888,6 +1889,17 @@ port_action_handle_update(portid_t port_id, uint32_t id,
 	case RTE_FLOW_ACTION_TYPE_CONNTRACK:
 		update = action->conf;
 		break;
+	case RTE_FLOW_ACTION_TYPE_METER_MARK:
+		memcpy(&mtr_update.meter_mark, action->conf,
+		       sizeof(struct rte_flow_action_meter_mark));
+		if (mtr_update.meter_mark.profile)
+			mtr_update.profile_valid = 1;
+		if (mtr_update.meter_mark.policy)
+			mtr_update.policy_valid = 1;
+		mtr_update.color_mode_valid = 1;
+		mtr_update.state_valid = 1;
+		update = &mtr_update;
+		break;
 	default:
 		update = action;
 		break;
@@ -2924,8 +2936,10 @@ port_queue_action_handle_update(portid_t port_id,
 	case RTE_FLOW_ACTION_TYPE_METER_MARK:
 		rte_memcpy(&mtr_update.meter_mark, action->conf,
 			sizeof(struct rte_flow_action_meter_mark));
-		mtr_update.profile_valid = 1;
-		mtr_update.policy_valid = 1;
+		if (mtr_update.meter_mark.profile)
+			mtr_update.profile_valid = 1;
+		if (mtr_update.meter_mark.policy)
+			mtr_update.policy_valid = 1;
 		mtr_update.color_mode_valid = 1;
 		mtr_update.init_color_valid = 1;
 		mtr_update.state_valid = 1;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.134752400 +0800
+++ 0117-app-testpmd-fix-meter-mark-handle-update.patch	2023-08-09 21:51:18.294352000 +0800
@@ -1 +1 @@
-From 5ed396098e662be8638c2d08c711db2823c386ac Mon Sep 17 00:00:00 2001
+From 3eda3753f8ff24b497a0cdd1be43a510d861addb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5ed396098e662be8638c2d08c711db2823c386ac ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index c4784b7f2c..11f3a22048 100644
+index acccb6b035..6a9eb4609c 100644
@@ -23 +25 @@
-@@ -1943,6 +1943,7 @@ port_action_handle_update(portid_t port_id, uint32_t id,
+@@ -1875,6 +1875,7 @@ port_action_handle_update(portid_t port_id, uint32_t id,
@@ -31 +33 @@
-@@ -1956,6 +1957,17 @@ port_action_handle_update(portid_t port_id, uint32_t id,
+@@ -1888,6 +1889,17 @@ port_action_handle_update(portid_t port_id, uint32_t id,
@@ -49 +51 @@
-@@ -3162,8 +3174,10 @@ port_queue_action_handle_update(portid_t port_id,
+@@ -2924,8 +2936,10 @@ port_queue_action_handle_update(portid_t port_id,

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'doc: add flow template API requirements for mlx5' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (12 preceding siblings ...)
  2023-08-10  0:10   ` patch 'app/testpmd: fix meter mark handle update' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'doc: improve wording of cuda guide' " Xueming Li
                     ` (9 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Bing Zhao; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=f37767eb37c85dff452faf3bf32c34de6f235afa

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f37767eb37c85dff452faf3bf32c34de6f235afa Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 19 Jul 2023 18:35:37 +0300
Subject: [PATCH] doc: add flow template API requirements for mlx5
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 30d1fe299853af5a942ea2faf2a6691b6744c68c ]

The minimal SW and HW versions are added.

Fixes: 22681deead3e ("net/mlx5/hws: enable hardware steering")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
---
 doc/guides/nics/mlx5.rst | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 75ac2f19b4..937fa5c6e0 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -1550,6 +1550,14 @@ shortened below as "OFED".
    |                       | | ConnectX-5    | | ConnectX-5    |
    +-----------------------+-----------------+-----------------+
 
+.. table:: Minimal SW/HW versions for flow template API
+
+   +-----------------+--------------------+--------------------+
+   | DPDK            | NIC                | Firmware           |
+   +=================+====================+====================+
+   | 22.11           | ConnectX-6 Dx      | xx.35.1012         |
+   +-----------------+--------------------+--------------------+
+
 Notes for metadata
 ------------------
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.161026800 +0800
+++ 0118-doc-add-flow-template-API-requirements-for-mlx5.patch	2023-08-09 21:51:18.294352000 +0800
@@ -1 +1 @@
-From 30d1fe299853af5a942ea2faf2a6691b6744c68c Mon Sep 17 00:00:00 2001
+From f37767eb37c85dff452faf3bf32c34de6f235afa Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 30d1fe299853af5a942ea2faf2a6691b6744c68c ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index d39ba90516..3a922cd866 100644
+index 75ac2f19b4..937fa5c6e0 100644
@@ -20 +22 @@
-@@ -1629,6 +1629,14 @@ shortened below as "OFED".
+@@ -1550,6 +1550,14 @@ shortened below as "OFED".

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'doc: improve wording of cuda guide' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (13 preceding siblings ...)
  2023-08-10  0:10   ` patch 'doc: add flow template API requirements for mlx5' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'doc: fix description of runtime directories' " Xueming Li
                     ` (8 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Ali Alnubani; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=fdb81fcc2ceb4cfd4271cd650c2cd3748e370cf7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fdb81fcc2ceb4cfd4271cd650c2cd3748e370cf7 Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@nvidia.com>
Date: Mon, 3 Jul 2023 11:14:23 +0300
Subject: [PATCH] doc: improve wording of cuda guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 135551ae0bae5a9e575b0a531490c24ef730dac0 ]

Adds missing punctuation, and improves wording.
Additionally, one of the example commands for adding CUDA
headers to CFLAGS is removed as it's redundant.

Fixes: 24c77594e08f ("gpu/cuda: map GPU memory with GDRCopy")
Fixes: 1306a73b1958 ("gpu/cuda: introduce CUDA driver")

Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
---
 doc/guides/gpus/cuda.rst | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/doc/guides/gpus/cuda.rst b/doc/guides/gpus/cuda.rst
index 114e3bc8cb..6520c17c3e 100644
--- a/doc/guides/gpus/cuda.rst
+++ b/doc/guides/gpus/cuda.rst
@@ -12,20 +12,19 @@ Information and documentation about these devices can be found on the
 Build dependencies
 ------------------
 
-The CUDA GPU driver library has an header-only dependency on ``cuda.h`` and ``cudaTypedefs.h``.
-To get these headers there are two options:
+The CUDA GPU driver library has a header-only dependency on ``cuda.h`` and ``cudaTypedefs.h``.
+To get these headers, there are two options:
 
 - Install `CUDA Toolkit <https://developer.nvidia.com/cuda-toolkit>`_
   (either regular or stubs installation).
 - Download these two headers from this `CUDA headers
   <https://gitlab.com/nvidia/headers/cuda-individual/cudart>`_ repository.
 
-You need to indicate to meson where CUDA headers files are through the CFLAGS variable.
-Three ways:
+You can point to CUDA header files either with the ``CFLAGS`` environment variable,
+or with the ``c_args`` Meson option. Examples:
 
-- Set ``export CFLAGS=-I/usr/local/cuda/include`` before building
-- Add CFLAGS in the meson command line ``CFLAGS=-I/usr/local/cuda/include meson setup build``
-- Add the ``-Dc_args`` in meson command line ``meson setup build -Dc_args=-I/usr/local/cuda/include``
+- ``CFLAGS=-I/usr/local/cuda/include meson setup build``
+- ``meson setup build -Dc_args=-I/usr/local/cuda/include``
 
 If headers are not found, the CUDA GPU driver library is not built.
 
@@ -46,15 +45,15 @@ A quick recipe to download, build and run GDRCopy library and driver:
   $ # Launch gdrdrv kernel module on the system
   $ sudo ./insmod.sh
 
-You need to indicate to meson where GDRCopy headers files are as in case of CUDA headers.
+You need to indicate to Meson where GDRCopy header files are as in case of CUDA headers.
 An example would be:
 
 .. code-block:: console
 
   $ meson setup build -Dc_args="-I/usr/local/cuda/include -I/path/to/gdrcopy/include"
 
-If headers are not found, the CUDA GPU driver library is built without the CPU map capability
-and will return error if the application invokes the gpudev ``rte_gpu_mem_cpu_map`` function.
+If headers are not found, the CUDA GPU driver library is built without the CPU map capability,
+and will return an error if the application invokes the gpudev ``rte_gpu_mem_cpu_map`` function.
 
 
 CUDA Shared Library
@@ -143,7 +142,7 @@ if the address is not in the table the CUDA driver library will return an error.
 Features
 --------
 
-- Register new child devices aka new CUDA Driver contexts.
+- Register new child devices, aka CUDA driver contexts.
 - Allocate memory on the GPU.
 - Register CPU memory to make it visible from GPU.
 
@@ -189,9 +188,10 @@ External references
 A good example of how to use the GPU CUDA driver library through the gpudev library
 is the l2fwd-nv application that can be found `here <https://github.com/NVIDIA/l2fwd-nv>`_.
 
-The application is based on vanilla DPDK example l2fwd
-and is enhanced with GPU memory managed through gpudev library
-and CUDA to launch the swap of packets MAC addresses workload on the GPU.
+The application is based on the DPDK example l2fwd,
+with GPU memory managed through gpudev library.
+It includes a CUDA workload swapping MAC addresses
+of packets received in the GPU.
 
 l2fwd-nv is not intended to be used for performance
 (testpmd is the good candidate for this).
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.182320200 +0800
+++ 0119-doc-improve-wording-of-cuda-guide.patch	2023-08-09 21:51:18.294352000 +0800
@@ -1 +1 @@
-From 135551ae0bae5a9e575b0a531490c24ef730dac0 Mon Sep 17 00:00:00 2001
+From fdb81fcc2ceb4cfd4271cd650c2cd3748e370cf7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 135551ae0bae5a9e575b0a531490c24ef730dac0 ]

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'doc: fix description of runtime directories' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (14 preceding siblings ...)
  2023-08-10  0:10   ` patch 'doc: improve wording of cuda guide' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'doc: update BIOS settings and supported HW for NTB' " Xueming Li
                     ` (7 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=eba2c364844c6c434045ead9c1e7e46446556a1f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eba2c364844c6c434045ead9c1e7e46446556a1f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sun, 16 Jul 2023 11:11:14 -0700
Subject: [PATCH] doc: fix description of runtime directories
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b301f2d3ac0cf66907599a3e855abadd10881960 ]

The documentation was never updated when the DPDK EAL
was modified to follow standard runtime conventions.

Fixes: 1835a22f342f ("support systemd service convention for runtime directory")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 doc/guides/prog_guide/multi_proc_support.rst | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/doc/guides/prog_guide/multi_proc_support.rst b/doc/guides/prog_guide/multi_proc_support.rst
index 815e8bdc43..df234548a7 100644
--- a/doc/guides/prog_guide/multi_proc_support.rst
+++ b/doc/guides/prog_guide/multi_proc_support.rst
@@ -107,15 +107,19 @@ Running Multiple Independent DPDK Applications
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 In addition to the above scenarios involving multiple DPDK processes working together,
-it is possible to run multiple DPDK processes side-by-side,
+it is possible to run multiple DPDK processes concurrently,
 where those processes are all working independently.
 Support for this usage scenario is provided using the ``--file-prefix`` parameter to the EAL.
 
-By default, the EAL creates hugepage files on each hugetlbfs filesystem using the rtemap_X filename,
+The EAL puts shared runtime files in a directory based on standard conventions.
+If ``$RUNTIME_DIRECTORY`` is defined in the environment,
+it is used (as ``$RUNTIME_DIRECTORY/dpdk``).
+Otherwise, if DPDK is run as root user, it uses ``/var/run/dpdk``
+or if run as non-root user then the ``/tmp/dpdk`` (or ``$XDG_RUNTIME_DIRECTORY/dpdk``) is used.
+Hugepage files on each hugetlbfs filesystem use the ``rtemap_X`` filename,
 where X is in the range 0 to the maximum number of hugepages -1.
-Similarly, it creates shared configuration files, memory mapped in each process, using the /var/run/.rte_config filename,
-when run as root (or $HOME/.rte_config when run as a non-root user;
-if filesystem and device permissions are set up to allow this).
+Similarly, it creates shared configuration files, memory mapped in each process,
+using the ``.rte_config`` filename.
 The rte part of the filenames of each of the above is configurable using the file-prefix parameter.
 
 In addition to specifying the file-prefix parameter,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.204922300 +0800
+++ 0120-doc-fix-description-of-runtime-directories.patch	2023-08-09 21:51:18.294352000 +0800
@@ -1 +1 @@
-From b301f2d3ac0cf66907599a3e855abadd10881960 Mon Sep 17 00:00:00 2001
+From eba2c364844c6c434045ead9c1e7e46446556a1f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b301f2d3ac0cf66907599a3e855abadd10881960 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'doc: update BIOS settings and supported HW for NTB' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (15 preceding siblings ...)
  2023-08-10  0:10   ` patch 'doc: fix description of runtime directories' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'doc: fix link to flow capabilities from bnxt guide' " Xueming Li
                     ` (6 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Junfeng Guo; +Cc: Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=e43b0afe1c83a2f2da1b5bcfce60fec8cb85639c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e43b0afe1c83a2f2da1b5bcfce60fec8cb85639c Mon Sep 17 00:00:00 2001
From: Junfeng Guo <junfeng.guo@intel.com>
Date: Mon, 3 Jul 2023 17:24:34 +0800
Subject: [PATCH] doc: update BIOS settings and supported HW for NTB
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 00e57b0e550b7df2047e6d0bde8965c7ae17d203 ]

Update BIOS settings and supported platform list for Intel NTB.

Fixes: f5057be340e4 ("raw/ntb: support Intel Ice Lake")

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
 doc/guides/rawdevs/ntb.rst | 38 ++++++++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 14 deletions(-)

diff --git a/doc/guides/rawdevs/ntb.rst b/doc/guides/rawdevs/ntb.rst
index 2bb115d13f..f8befc6594 100644
--- a/doc/guides/rawdevs/ntb.rst
+++ b/doc/guides/rawdevs/ntb.rst
@@ -1,6 +1,8 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2018 Intel Corporation.
 
+.. include:: <isonum.txt>
+
 NTB Rawdev Driver
 =================
 
@@ -17,19 +19,23 @@ some information by using scratchpad registers.
 BIOS setting on Intel Xeon
 --------------------------
 
-Intel Non-transparent Bridge needs special BIOS setting. The reference for
-Skylake is https://www.intel.com/content/dam/support/us/en/documents/server-products/Intel_Xeon_Processor_Scalable_Family_BIOS_User_Guide.pdf
-
-- Set the needed PCIe port as NTB to NTB mode on both hosts.
-- Enable NTB bars and set bar size of bar 23 and bar 45 as 12-29 (4K-512M)
-  on both hosts (for Ice Lake, bar size can be set as 12-51, namely 4K-128PB).
-  Note that bar size on both hosts should be the same.
-- Disable split bars for both hosts.
-- Set crosslink control override as DSD/USP on one host, USD/DSP on
-  another host.
-- Disable PCIe PII SSC (Spread Spectrum Clocking) for both hosts. This
-  is a hardware requirement.
-
+Intel Non-transparent Bridge (NTB) needs special BIOS settings on both systems.
+Note that for 4th Generation Intel\ |reg| Xeon\ |reg| Scalable Processors,
+option ``Port Subsystem Mode`` should be changed from ``Gen5`` to ``Gen4 Only``,
+then reboot.
+
+- Set ``Non-Transparent Bridge PCIe Port Definition`` for needed PCIe ports
+  as ``NTB to NTB`` mode, on both hosts.
+- Set ``Enable NTB BARs`` as ``Enabled``, on both hosts.
+- Set ``Enable SPLIT BARs`` as ``Disabled``, on both hosts.
+- Set ``Imbar1 Size``, ``Imbar2 Size``, ``Embar1 Size`` and ``Embar2 Size``,
+  as 12-29 (i.e., 4K-512M) for 2nd Generation Intel\ |reg| Xeon\ |reg| Scalable Processors;
+  as 12-51 (i.e., 4K-128PB) for 3rd and 4th Generation Intel\ |reg| Xeon\ |reg| Scalable Processors.
+  Note that those bar sizes on both hosts should be the same.
+- Set ``Crosslink Control override`` as ``DSD/USP`` on one host,
+  ``USD/DSP`` on another host.
+- Set ``PCIe PLL SSC (Spread Spectrum Clocking)`` as ``Disabled``, on both hosts.
+  This is a hardware requirement when using Re-timer Cards.
 
 Device Setup
 ------------
@@ -145,4 +151,8 @@ like the following:
 Limitation
 ----------
 
-- This PMD only supports Intel Skylake and Ice Lake platforms.
+This PMD is only supported on Intel Xeon Platforms:
+
+- 4th Generation Intel® Xeon® Scalable Processors.
+- 3rd Generation Intel® Xeon® Scalable Processors.
+- 2nd Generation Intel® Xeon® Scalable Processors.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.239293800 +0800
+++ 0121-doc-update-BIOS-settings-and-supported-HW-for-NTB.patch	2023-08-09 21:51:18.294352000 +0800
@@ -1 +1 @@
-From 00e57b0e550b7df2047e6d0bde8965c7ae17d203 Mon Sep 17 00:00:00 2001
+From e43b0afe1c83a2f2da1b5bcfce60fec8cb85639c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 00e57b0e550b7df2047e6d0bde8965c7ae17d203 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'doc: fix link to flow capabilities from bnxt guide' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (16 preceding siblings ...)
  2023-08-10  0:10   ` patch 'doc: update BIOS settings and supported HW for NTB' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/mana: fix Tx queue statistics' " Xueming Li
                     ` (5 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=473cef257d37d422c356156bc291cb18306bd7b2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 473cef257d37d422c356156bc291cb18306bd7b2 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 21 Jun 2023 11:57:36 +0200
Subject: [PATCH] doc: fix link to flow capabilities from bnxt guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c1af29059c0008dc2498af9c0c350713ec34f77f ]

Having an explicit link to the main repository documentation breaks
other repositories documentation (like for LTS releases).

Besides, the tables numerotation may change so add an explicit anchor to
those tables and refer to them.

Fixes: b845c295cd13 ("doc: update Broadcom bnxt guide")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 doc/guides/conf.py       | 1 +
 doc/guides/nics/bnxt.rst | 6 ++----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index a55ce38800..0f7ff5282d 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -203,6 +203,7 @@ def generate_overview_table(output_filename, table_id, section, table_name, titl
     num_cols = len(header_names)
 
     print_table_css(outfile, table_id)
+    print('.. _' + table_name + ':', file=outfile)
     print('.. table:: ' + table_name + '\n', file=outfile)
     print_table_header(outfile, num_cols, header_names, title)
     print_table_body(outfile, num_cols, ini_files, ini_data, default_features)
diff --git a/doc/guides/nics/bnxt.rst b/doc/guides/nics/bnxt.rst
index 0b09b0c50a..871d14142c 100644
--- a/doc/guides/nics/bnxt.rst
+++ b/doc/guides/nics/bnxt.rst
@@ -1019,8 +1019,7 @@ Listed below are the rte_flow functions supported:
 rte_flow Items
 ~~~~~~~~~~~~~~
 
-Refer to "Table 1.2 rte_flow items availability in networking drivers" in
-`Overview of Networking Drivers <https://doc.dpdk.org/guides/nics/overview.html>`.
+Refer to :ref:`rte_flow items availability in networking drivers`.
 
 Listed below are the rte_flow items supported:
 
@@ -1045,8 +1044,7 @@ Listed below are the rte_flow items supported:
 rte_flow Actions
 ~~~~~~~~~~~~~~~~
 
-Refer to "Table 1.3 rte_flow actions availability in networking drivers" in
-`Overview of Networking Drivers <https://doc.dpdk.org/guides/nics/overview.html>`.
+Refer to :ref:`rte_flow actions availability in networking drivers`.
 
 Listed below are the rte_flow actions supported:
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.261163800 +0800
+++ 0122-doc-fix-link-to-flow-capabilities-from-bnxt-guide.patch	2023-08-09 21:51:18.294352000 +0800
@@ -1 +1 @@
-From c1af29059c0008dc2498af9c0c350713ec34f77f Mon Sep 17 00:00:00 2001
+From 473cef257d37d422c356156bc291cb18306bd7b2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c1af29059c0008dc2498af9c0c350713ec34f77f ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -34 +36 @@
-index 806288d495..70242ab2ce 100644
+index 0b09b0c50a..871d14142c 100644
@@ -37 +39 @@
-@@ -1020,8 +1020,7 @@ Listed below are the rte_flow functions supported:
+@@ -1019,8 +1019,7 @@ Listed below are the rte_flow functions supported:
@@ -47 +49 @@
-@@ -1046,8 +1045,7 @@ Listed below are the rte_flow items supported:
+@@ -1045,8 +1044,7 @@ Listed below are the rte_flow items supported:

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/mana: fix Tx queue statistics' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (17 preceding siblings ...)
  2023-08-10  0:10   ` patch 'doc: fix link to flow capabilities from bnxt guide' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/ngbe: fix RSS offload capability' " Xueming Li
                     ` (4 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=200a2b20ebf321103327d5d8fa2b705dea6d3f66

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 200a2b20ebf321103327d5d8fa2b705dea6d3f66 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Thu, 20 Jul 2023 15:42:41 -0700
Subject: [PATCH] net/mana: fix Tx queue statistics
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e1582eaa7789855416b3212c31e7093f99e4b28d ]

Bytes should be calculated using the packet length, not the mbuf segment
data length.

Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c
index 7f570181ad..39cc59550e 100644
--- a/drivers/net/mana/tx.c
+++ b/drivers/net/mana/tx.c
@@ -198,7 +198,7 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		if (!desc->pkt) {
 			DP_LOG(ERR, "mana_txq_desc has a NULL pkt");
 		} else {
-			txq->stats.bytes += desc->pkt->data_len;
+			txq->stats.bytes += desc->pkt->pkt_len;
 			rte_pktmbuf_free(desc->pkt);
 		}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.281289900 +0800
+++ 0123-net-mana-fix-Tx-queue-statistics.patch	2023-08-09 21:51:18.294352000 +0800
@@ -1 +1 @@
-From e1582eaa7789855416b3212c31e7093f99e4b28d Mon Sep 17 00:00:00 2001
+From 200a2b20ebf321103327d5d8fa2b705dea6d3f66 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e1582eaa7789855416b3212c31e7093f99e4b28d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 5947efbe8d..11ba2ee1ac 100644
+index 7f570181ad..39cc59550e 100644
@@ -21 +23 @@
-@@ -201,7 +201,7 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -198,7 +198,7 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/ngbe: fix RSS offload capability' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (18 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/mana: fix Tx queue statistics' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'test/bonding: fix include of standard header' " Xueming Li
                     ` (3 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=b158042b8c951ce2b0d29afdb606dbe427e3f4b4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b158042b8c951ce2b0d29afdb606dbe427e3f4b4 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Thu, 20 Jul 2023 17:01:02 +0800
Subject: [PATCH] net/ngbe: fix RSS offload capability
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4fbb5f203e02bbe6c613d42221dc86cf5b58dbf2 ]

Fix missed RTE_ETH_RX_OFFLOAD_RSS_HASH flag in ngbe_get_rx_port_offloads().

Fixes: 0779d7f61991 ("net/ngbe: support RSS hash")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_rxtx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c
index 0c678e1557..f31906cc2f 100644
--- a/drivers/net/ngbe/ngbe_rxtx.c
+++ b/drivers/net/ngbe/ngbe_rxtx.c
@@ -2191,6 +2191,7 @@ ngbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 		   RTE_ETH_RX_OFFLOAD_TCP_CKSUM   |
 		   RTE_ETH_RX_OFFLOAD_KEEP_CRC    |
 		   RTE_ETH_RX_OFFLOAD_VLAN_FILTER |
+		   RTE_ETH_RX_OFFLOAD_RSS_HASH    |
 		   RTE_ETH_RX_OFFLOAD_SCATTER;
 
 	if (hw->is_pf)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.302752100 +0800
+++ 0124-net-ngbe-fix-RSS-offload-capability.patch	2023-08-09 21:51:18.294352000 +0800
@@ -1 +1 @@
-From 4fbb5f203e02bbe6c613d42221dc86cf5b58dbf2 Mon Sep 17 00:00:00 2001
+From b158042b8c951ce2b0d29afdb606dbe427e3f4b4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4fbb5f203e02bbe6c613d42221dc86cf5b58dbf2 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'test/bonding: fix include of standard header' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (19 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/ngbe: fix RSS offload capability' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/nfp: fix Tx descriptor free logic of NFD3' " Xueming Li
                     ` (2 subsequent siblings)
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Morten Brørup, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=088a46f2cff5ff5a8396242938f6c815d8ede329

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 088a46f2cff5ff5a8396242938f6c815d8ede329 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 21 Jul 2023 11:57:19 +0100
Subject: [PATCH] test/bonding: fix include of standard header
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d2cfa0c7280051e7e6a385c0c8fa57f7b74f9ea0 ]

Standard headers, or headers not in the current directory generally,
should be wrapped in "<>" rather than in regular quotes "". Fix one
instance of unistd.h being included using quotes

Fixes: df468c4937bb ("app/test: refactor bonding checks with macros")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test/test_link_bonding.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 5c496352c2..2f46e4c6ee 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -2,7 +2,7 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
-#include "unistd.h"
+#include <unistd.h>
 #include <string.h>
 #include <stdarg.h>
 #include <stdio.h>
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.329627500 +0800
+++ 0125-test-bonding-fix-include-of-standard-header.patch	2023-08-09 21:51:18.294352000 +0800
@@ -1 +1 @@
-From d2cfa0c7280051e7e6a385c0c8fa57f7b74f9ea0 Mon Sep 17 00:00:00 2001
+From 088a46f2cff5ff5a8396242938f6c815d8ede329 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d2cfa0c7280051e7e6a385c0c8fa57f7b74f9ea0 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/nfp: fix Tx descriptor free logic of NFD3' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (20 preceding siblings ...)
  2023-08-10  0:10   ` patch 'test/bonding: fix include of standard header' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'net/nfp: fix offloading flows' " Xueming Li
  2023-08-10  0:10   ` patch 'common/cnxk: fix CPT backpressure disable on LBK' " Xueming Li
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=c12883295e0a268e471fe990acde498b50e1455d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c12883295e0a268e471fe990acde498b50e1455d Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Tue, 20 Jun 2023 10:49:57 +0800
Subject: [PATCH] net/nfp: fix Tx descriptor free logic of NFD3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e97738919c2315e07c2e98b6a9cc3912c335364a ]

In the Tx descriptor free logic of nfd3, the former logic might force
cast a negative number into a very big unsigned number, and which will
cause potential problem in the xmit loop.

The xmit loop will continue in the place where it should break, and will
overwrite the Tx descriptor which is not free to use by the PMD.

Fixes: 74a640dac864 ("net/nfp: avoid modulo operations for handling ring wrapping")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_rxtx.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h
index e2b48374fe..1c2a00e300 100644
--- a/drivers/net/nfp/nfp_rxtx.h
+++ b/drivers/net/nfp/nfp_rxtx.h
@@ -340,10 +340,14 @@ nfp_net_mbuf_alloc_failed(struct nfp_net_rxq *rxq)
 static inline uint32_t
 nfp_net_nfd3_free_tx_desc(struct nfp_net_txq *txq)
 {
+	uint32_t free_desc;
+
 	if (txq->wr_p >= txq->rd_p)
-		return txq->tx_count - (txq->wr_p - txq->rd_p) - 8;
+		free_desc = txq->tx_count - (txq->wr_p - txq->rd_p);
 	else
-		return txq->rd_p - txq->wr_p - 8;
+		free_desc = txq->rd_p - txq->wr_p;
+
+	return (free_desc > 8) ? (free_desc - 8) : 0;
 }
 
 /*
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.354583000 +0800
+++ 0126-net-nfp-fix-Tx-descriptor-free-logic-of-NFD3.patch	2023-08-09 21:51:18.294352000 +0800
@@ -1 +1 @@
-From e97738919c2315e07c2e98b6a9cc3912c335364a Mon Sep 17 00:00:00 2001
+From c12883295e0a268e471fe990acde498b50e1455d Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Thu, 18 May 2023 19:02:47 +0800
+Date: Tue, 20 Jun 2023 10:49:57 +0800
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e97738919c2315e07c2e98b6a9cc3912c335364a ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
- drivers/net/nfp/nfd3/nfp_nfd3.h | 8 ++++++--
+ drivers/net/nfp/nfp_rxtx.h | 8 ++++++--
@@ -25,5 +27,5 @@
-diff --git a/drivers/net/nfp/nfd3/nfp_nfd3.h b/drivers/net/nfp/nfd3/nfp_nfd3.h
-index 7bf2349904..e772bc4711 100644
---- a/drivers/net/nfp/nfd3/nfp_nfd3.h
-+++ b/drivers/net/nfp/nfd3/nfp_nfd3.h
-@@ -52,10 +52,14 @@ struct nfp_net_nfd3_tx_desc {
+diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h
+index e2b48374fe..1c2a00e300 100644
+--- a/drivers/net/nfp/nfp_rxtx.h
++++ b/drivers/net/nfp/nfp_rxtx.h
+@@ -340,10 +340,14 @@ nfp_net_mbuf_alloc_failed(struct nfp_net_rxq *rxq)

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'net/nfp: fix offloading flows' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (21 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/nfp: fix Tx descriptor free logic of NFD3' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  2023-08-10  0:10   ` patch 'common/cnxk: fix CPT backpressure disable on LBK' " Xueming Li
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=933defac2b797d847bdbfb83f055f53f9965029c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 933defac2b797d847bdbfb83f055f53f9965029c Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Tue, 20 Jun 2023 10:49:58 +0800
Subject: [PATCH] net/nfp: fix offloading flows
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 925c27ec8de92efe69f4cb56e3fc0e413354c739 ]

The symbol '_abi_flower_extra_features' is in IMEM for NFP4000,
but in EMU_CACHE for NFP3800 because which does not have IMEM.

The original logic can't read symbol from EMU_CACHE, so the probe
process will fail when we try to offload flows use NFP3800.

Modify the related data structure and logics to support read symbol
from EMU_CACHE.

Fixes: c7e9729da6b5 ("net/nfp: support CPP")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c          |   4 +-
 drivers/net/nfp/nfpcore/nfp_cpp.h     |   7 +-
 drivers/net/nfp/nfpcore/nfp_cppcore.c |  54 ++++++++---
 drivers/net/nfp/nfpcore/nfp_rtsym.c   | 135 +++++++++++++++++++++++---
 4 files changed, 174 insertions(+), 26 deletions(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index dc63b05bd6..29491f6e6d 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -929,6 +929,7 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 	int ret;
 	int err = 0;
 	uint64_t addr;
+	uint32_t cpp_id;
 	struct nfp_cpp *cpp;
 	enum nfp_app_fw_id app_fw_id;
 	struct nfp_pf_dev *pf_dev;
@@ -1028,7 +1029,8 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 		goto pf_cleanup;
 	}
 
-	pf_dev->hw_queues = nfp_cpp_map_area(pf_dev->cpp, 0, 0,
+	cpp_id = NFP_CPP_ISLAND_ID(0, NFP_CPP_ACTION_RW, 0, 0);
+	pf_dev->hw_queues = nfp_cpp_map_area(pf_dev->cpp, cpp_id,
 			addr, NFP_QCP_QUEUE_AREA_SZ,
 			&pf_dev->hwqueues_area);
 	if (pf_dev->hw_queues == NULL) {
diff --git a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h
index a04a68f546..68851b22e4 100644
--- a/drivers/net/nfp/nfpcore/nfp_cpp.h
+++ b/drivers/net/nfp/nfpcore/nfp_cpp.h
@@ -34,6 +34,9 @@ struct nfp_cpp {
 	 */
 	uint32_t imb_cat_table[16];
 
+	/* MU access type bit offset */
+	uint32_t mu_locality_lsb;
+
 	int driver_lock_needed;
 };
 
@@ -363,7 +366,7 @@ struct nfp_cpp_area *nfp_cpp_area_alloc_acquire(struct nfp_cpp *cpp,
  */
 void nfp_cpp_area_release_free(struct nfp_cpp_area *area);
 
-uint8_t *nfp_cpp_map_area(struct nfp_cpp *cpp, int domain, int target,
+uint8_t *nfp_cpp_map_area(struct nfp_cpp *cpp, uint32_t cpp_id,
 			   uint64_t addr, unsigned long size,
 			   struct nfp_cpp_area **area);
 /*
@@ -778,4 +781,6 @@ int nfp_cpp_mutex_unlock(struct nfp_cpp_mutex *mutex);
  */
 int nfp_cpp_mutex_trylock(struct nfp_cpp_mutex *mutex);
 
+uint32_t nfp_cpp_mu_locality_lsb(struct nfp_cpp *cpp);
+
 #endif /* !__NFP_CPP_H__ */
diff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c
index 37799af558..014f6c9df8 100644
--- a/drivers/net/nfp/nfpcore/nfp_cppcore.c
+++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c
@@ -19,6 +19,7 @@
 #include "nfp6000/nfp6000.h"
 #include "nfp6000/nfp_xpb.h"
 #include "nfp_nffw.h"
+#include "../nfp_logs.h"
 
 #define NFP_PL_DEVICE_ID                        0x00000004
 #define NFP_PL_DEVICE_ID_MASK                   0xff
@@ -118,6 +119,36 @@ nfp_cpp_area_name(struct nfp_cpp_area *cpp_area)
 	return cpp_area->name;
 }
 
+#define NFP_IMB_TGTADDRESSMODECFG_MODE_of(_x)       (((_x) >> 13) & 0x7)
+#define NFP_IMB_TGTADDRESSMODECFG_ADDRMODE          RTE_BIT32(12)
+
+static int
+nfp_cpp_set_mu_locality_lsb(struct nfp_cpp *cpp)
+{
+	int ret;
+	int mode;
+	int addr40;
+	uint32_t imbcppat;
+
+	imbcppat = cpp->imb_cat_table[NFP_CPP_TARGET_MU];
+	mode = NFP_IMB_TGTADDRESSMODECFG_MODE_of(imbcppat);
+	addr40 = imbcppat & NFP_IMB_TGTADDRESSMODECFG_ADDRMODE;
+
+	ret = nfp_cppat_mu_locality_lsb(mode, addr40);
+	if (ret < 0)
+		return ret;
+
+	cpp->mu_locality_lsb = ret;
+
+	return 0;
+}
+
+uint32_t
+nfp_cpp_mu_locality_lsb(struct nfp_cpp *cpp)
+{
+	return cpp->mu_locality_lsb;
+}
+
 /*
  * nfp_cpp_area_alloc - allocate a new CPP area
  * @cpp:    CPP handle
@@ -142,10 +173,6 @@ nfp_cpp_area_alloc_with_name(struct nfp_cpp *cpp, uint32_t dest,
 	if (!cpp)
 		return NULL;
 
-	/* CPP bus uses only a 40-bit address */
-	if ((address + size) > (1ULL << 40))
-		return NFP_ERRPTR(EFAULT);
-
 	/* Remap from cpp_island to cpp_target */
 	err = nfp_target_cpp(dest, tmp64, &dest, &tmp64, cpp->imb_cat_table);
 	if (err < 0)
@@ -588,6 +615,13 @@ nfp_cpp_alloc(struct rte_pci_device *dev, int driver_lock_needed)
 		}
 	}
 
+	err = nfp_cpp_set_mu_locality_lsb(cpp);
+	if (err < 0) {
+		PMD_DRV_LOG(ERR, "Can't calculate MU locality bit offset");
+		free(cpp);
+		return NULL;
+	}
+
 	return cpp;
 }
 
@@ -819,8 +853,7 @@ __nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model)
 /*
  * nfp_cpp_map_area() - Helper function to map an area
  * @cpp:    NFP CPP handler
- * @domain: CPP domain
- * @target: CPP target
+ * @cpp_id: CPP ID
  * @addr:   CPP address
  * @size:   Size of the area
  * @area:   Area handle (output)
@@ -828,18 +861,15 @@ __nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model)
  * Map an area of IOMEM access.  To undo the effect of this function call
  * @nfp_cpp_area_release_free(*area).
  *
- * Return: Pointer to memory mapped area or ERR_PTR
+ * Return: Pointer to memory mapped area or NULL
  */
 uint8_t *
-nfp_cpp_map_area(struct nfp_cpp *cpp, int domain, int target, uint64_t addr,
+nfp_cpp_map_area(struct nfp_cpp *cpp, uint32_t cpp_id, uint64_t addr,
 		 unsigned long size, struct nfp_cpp_area **area)
 {
 	uint8_t *res;
-	uint32_t dest;
-
-	dest = NFP_CPP_ISLAND_ID(target, NFP_CPP_ACTION_RW, 0, domain);
 
-	*area = nfp_cpp_area_alloc_acquire(cpp, dest, addr, size);
+	*area = nfp_cpp_area_alloc_acquire(cpp, cpp_id, addr, size);
 	if (!*area)
 		goto err_eio;
 
diff --git a/drivers/net/nfp/nfpcore/nfp_rtsym.c b/drivers/net/nfp/nfpcore/nfp_rtsym.c
index 56bbf05cd8..21879f7eb6 100644
--- a/drivers/net/nfp/nfpcore/nfp_rtsym.c
+++ b/drivers/net/nfp/nfpcore/nfp_rtsym.c
@@ -14,6 +14,7 @@
 #include "nfp_mip.h"
 #include "nfp_rtsym.h"
 #include "nfp6000/nfp6000.h"
+#include "../nfp_logs.h"
 
 /* These need to match the linker */
 #define SYM_TGT_LMEM		0
@@ -213,6 +214,113 @@ nfp_rtsym_lookup(struct nfp_rtsym_table *rtbl, const char *name)
 	return NULL;
 }
 
+static uint64_t
+nfp_rtsym_size(const struct nfp_rtsym *sym)
+{
+	switch (sym->type) {
+	case NFP_RTSYM_TYPE_NONE:
+		PMD_DRV_LOG(ERR, "rtsym '%s': type NONE", sym->name);
+		return 0;
+	case NFP_RTSYM_TYPE_OBJECT:    /* Fall through */
+	case NFP_RTSYM_TYPE_FUNCTION:
+		return sym->size;
+	case NFP_RTSYM_TYPE_ABS:
+		return sizeof(uint64_t);
+	default:
+		PMD_DRV_LOG(ERR, "rtsym '%s': unknown type: %d", sym->name, sym->type);
+		return 0;
+	}
+}
+
+static int
+nfp_rtsym_to_dest(struct nfp_cpp *cpp,
+		const struct nfp_rtsym *sym,
+		uint8_t action,
+		uint8_t token,
+		uint64_t offset,
+		uint32_t *cpp_id,
+		uint64_t *addr)
+{
+	if (sym->type != NFP_RTSYM_TYPE_OBJECT) {
+		PMD_DRV_LOG(ERR, "rtsym '%s': direct access to non-object rtsym",
+				sym->name);
+		return -EINVAL;
+	}
+
+	*addr = sym->addr + offset;
+
+	if (sym->target >= 0) {
+		*cpp_id = NFP_CPP_ISLAND_ID(sym->target, action, token, sym->domain);
+	} else if (sym->target == NFP_RTSYM_TARGET_EMU_CACHE) {
+		int locality_off = nfp_cpp_mu_locality_lsb(cpp);
+
+		*addr &= ~(NFP_MU_ADDR_ACCESS_TYPE_MASK << locality_off);
+		*addr |= NFP_MU_ADDR_ACCESS_TYPE_DIRECT << locality_off;
+
+		*cpp_id = NFP_CPP_ISLAND_ID(NFP_CPP_TARGET_MU, action, token,
+				sym->domain);
+	} else {
+		PMD_DRV_LOG(ERR, "rtsym '%s': unhandled target encoding: %d",
+				sym->name, sym->target);
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+static int
+nfp_rtsym_readl(struct nfp_cpp *cpp,
+		const struct nfp_rtsym *sym,
+		uint8_t action,
+		uint8_t token,
+		uint64_t offset,
+		uint32_t *value)
+{
+	int ret;
+	uint64_t addr;
+	uint32_t cpp_id;
+
+	if (offset + 4 > nfp_rtsym_size(sym)) {
+		PMD_DRV_LOG(ERR, "rtsym '%s': readl out of bounds", sym->name);
+		return -ENXIO;
+	}
+
+	ret = nfp_rtsym_to_dest(cpp, sym, action, token, offset, &cpp_id, &addr);
+	if (ret != 0)
+		return ret;
+
+	return nfp_cpp_readl(cpp, cpp_id, addr, value);
+}
+
+static int
+nfp_rtsym_readq(struct nfp_cpp *cpp,
+		const struct nfp_rtsym *sym,
+		uint8_t action,
+		uint8_t token,
+		uint64_t offset,
+		uint64_t *value)
+{
+	int ret;
+	uint64_t addr;
+	uint32_t cpp_id;
+
+	if (offset + 8 > nfp_rtsym_size(sym)) {
+		PMD_DRV_LOG(ERR, "rtsym '%s': readq out of bounds", sym->name);
+		return -ENXIO;
+	}
+
+	if (sym->type == NFP_RTSYM_TYPE_ABS) {
+		*value = sym->addr;
+		return 0;
+	}
+
+	ret = nfp_rtsym_to_dest(cpp, sym, action, token, offset, &cpp_id, &addr);
+	if (ret != 0)
+		return ret;
+
+	return nfp_cpp_readq(cpp, cpp_id, addr, value);
+}
+
 /*
  * nfp_rtsym_read_le() - Read a simple unsigned scalar value from symbol
  * @rtbl:	NFP RTsym table
@@ -229,7 +337,7 @@ uint64_t
 nfp_rtsym_read_le(struct nfp_rtsym_table *rtbl, const char *name, int *error)
 {
 	const struct nfp_rtsym *sym;
-	uint32_t val32, id;
+	uint32_t val32;
 	uint64_t val;
 	int err;
 
@@ -239,19 +347,13 @@ nfp_rtsym_read_le(struct nfp_rtsym_table *rtbl, const char *name, int *error)
 		goto exit;
 	}
 
-	id = NFP_CPP_ISLAND_ID(sym->target, NFP_CPP_ACTION_RW, 0, sym->domain);
-
-#ifdef DEBUG
-	printf("Reading symbol %s with size %" PRIu64 " at %" PRIx64 "\n",
-		name, sym->size, sym->addr);
-#endif
 	switch (sym->size) {
 	case 4:
-		err = nfp_cpp_readl(rtbl->cpp, id, sym->addr, &val32);
+		err = nfp_rtsym_readl(rtbl->cpp, sym, NFP_CPP_ACTION_RW, 0, 0, &val32);
 		val = val32;
 		break;
 	case 8:
-		err = nfp_cpp_readq(rtbl->cpp, id, sym->addr, &val);
+		err = nfp_rtsym_readq(rtbl->cpp, sym, NFP_CPP_ACTION_RW, 0, 0, &val);
 		break;
 	default:
 		printf("rtsym '%s' unsupported size: %" PRId64 "\n",
@@ -276,8 +378,11 @@ uint8_t *
 nfp_rtsym_map(struct nfp_rtsym_table *rtbl, const char *name,
 	      unsigned int min_size, struct nfp_cpp_area **area)
 {
-	const struct nfp_rtsym *sym;
+	int ret;
 	uint8_t *mem;
+	uint64_t addr;
+	uint32_t cpp_id;
+	const struct nfp_rtsym *sym;
 
 #ifdef DEBUG
 	printf("mapping symbol %s\n", name);
@@ -288,14 +393,20 @@ nfp_rtsym_map(struct nfp_rtsym_table *rtbl, const char *name,
 		return NULL;
 	}
 
+	ret = nfp_rtsym_to_dest(rtbl->cpp, sym, NFP_CPP_ACTION_RW, 0, 0,
+			&cpp_id, &addr);
+	if (ret != 0) {
+		PMD_DRV_LOG(ERR, "rtsym '%s': mapping failed", name);
+		return NULL;
+	}
+
 	if (sym->size < min_size) {
 		printf("Symbol %s too small (%" PRIu64 " < %u)\n", name,
 			sym->size, min_size);
 		return NULL;
 	}
 
-	mem = nfp_cpp_map_area(rtbl->cpp, sym->domain, sym->target, sym->addr,
-			       sym->size, area);
+	mem = nfp_cpp_map_area(rtbl->cpp, cpp_id, addr, sym->size, area);
 	if (!mem) {
 		printf("Failed to map symbol %s\n", name);
 		return NULL;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.380339100 +0800
+++ 0127-net-nfp-fix-offloading-flows.patch	2023-08-09 21:51:18.304352000 +0800
@@ -1 +1 @@
-From 925c27ec8de92efe69f4cb56e3fc0e413354c739 Mon Sep 17 00:00:00 2001
+From 933defac2b797d847bdbfb83f055f53f9965029c Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Wed, 7 Jun 2023 09:57:00 +0800
+Date: Tue, 20 Jun 2023 10:49:58 +0800
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 925c27ec8de92efe69f4cb56e3fc0e413354c739 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -26,3 +28,3 @@
- drivers/net/nfp/nfpcore/nfp_cppcore.c |  51 +++++++---
- drivers/net/nfp/nfpcore/nfp_rtsym.c   | 132 ++++++++++++++++++++++++--
- 4 files changed, 171 insertions(+), 23 deletions(-)
+ drivers/net/nfp/nfpcore/nfp_cppcore.c |  54 ++++++++---
+ drivers/net/nfp/nfpcore/nfp_rtsym.c   | 135 +++++++++++++++++++++++---
+ 4 files changed, 174 insertions(+), 26 deletions(-)
@@ -31 +33 @@
-index f73bffc09b..e84d2ac82e 100644
+index dc63b05bd6..29491f6e6d 100644
@@ -34 +36 @@
-@@ -937,6 +937,7 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+@@ -929,6 +929,7 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
@@ -42 +44 @@
-@@ -1036,7 +1037,8 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+@@ -1028,7 +1029,8 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
@@ -53 +55 @@
-index 2441012b95..8f87c09327 100644
+index a04a68f546..68851b22e4 100644
@@ -56 +58 @@
-@@ -31,6 +31,9 @@ struct nfp_cpp {
+@@ -34,6 +34,9 @@ struct nfp_cpp {
@@ -66 +68 @@
-@@ -455,7 +458,7 @@ struct nfp_cpp_area *nfp_cpp_area_alloc_acquire(struct nfp_cpp *cpp,
+@@ -363,7 +366,7 @@ struct nfp_cpp_area *nfp_cpp_area_alloc_acquire(struct nfp_cpp *cpp,
@@ -75 +77 @@
-@@ -869,4 +872,6 @@ int nfp_cpp_mutex_unlock(struct nfp_cpp_mutex *mutex);
+@@ -778,4 +781,6 @@ int nfp_cpp_mutex_unlock(struct nfp_cpp_mutex *mutex);
@@ -83 +85 @@
-index 681ec93b96..6daee313ce 100644
+index 37799af558..014f6c9df8 100644
@@ -86 +88,9 @@
-@@ -118,6 +118,36 @@ nfp_cpp_area_name(struct nfp_cpp_area *cpp_area)
+@@ -19,6 +19,7 @@
+ #include "nfp6000/nfp6000.h"
+ #include "nfp6000/nfp_xpb.h"
+ #include "nfp_nffw.h"
++#include "../nfp_logs.h"
+ 
+ #define NFP_PL_DEVICE_ID                        0x00000004
+ #define NFP_PL_DEVICE_ID_MASK                   0xff
+@@ -118,6 +119,36 @@ nfp_cpp_area_name(struct nfp_cpp_area *cpp_area)
@@ -123,2 +133,2 @@
-@@ -142,10 +172,6 @@ nfp_cpp_area_alloc_with_name(struct nfp_cpp *cpp, uint32_t dest,
- 	if (cpp == NULL)
+@@ -142,10 +173,6 @@ nfp_cpp_area_alloc_with_name(struct nfp_cpp *cpp, uint32_t dest,
+ 	if (!cpp)
@@ -129 +139 @@
--		return NULL;
+-		return NFP_ERRPTR(EFAULT);
@@ -134 +144 @@
-@@ -578,6 +604,13 @@ nfp_cpp_alloc(struct rte_pci_device *dev, int driver_lock_needed)
+@@ -588,6 +615,13 @@ nfp_cpp_alloc(struct rte_pci_device *dev, int driver_lock_needed)
@@ -148 +158 @@
-@@ -809,8 +842,7 @@ __nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model)
+@@ -819,8 +853,7 @@ __nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model)
@@ -158,2 +168,6 @@
-@@ -821,15 +853,12 @@ __nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model)
-  * Return: Pointer to memory mapped area or NULL
+@@ -828,18 +861,15 @@ __nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model)
+  * Map an area of IOMEM access.  To undo the effect of this function call
+  * @nfp_cpp_area_release_free(*area).
+  *
+- * Return: Pointer to memory mapped area or ERR_PTR
++ * Return: Pointer to memory mapped area or NULL
@@ -173 +187 @@
- 	if (*area == NULL)
+ 	if (!*area)
@@ -177 +191 @@
-index 9713605580..343b0d0bcf 100644
+index 56bbf05cd8..21879f7eb6 100644
@@ -180 +194,9 @@
-@@ -211,6 +211,113 @@ nfp_rtsym_lookup(struct nfp_rtsym_table *rtbl, const char *name)
+@@ -14,6 +14,7 @@
+ #include "nfp_mip.h"
+ #include "nfp_rtsym.h"
+ #include "nfp6000/nfp6000.h"
++#include "../nfp_logs.h"
+ 
+ /* These need to match the linker */
+ #define SYM_TGT_LMEM		0
+@@ -213,6 +214,113 @@ nfp_rtsym_lookup(struct nfp_rtsym_table *rtbl, const char *name)
@@ -294 +316 @@
-@@ -227,7 +334,7 @@ uint64_t
+@@ -229,7 +337,7 @@ uint64_t
@@ -303 +325 @@
-@@ -237,17 +344,13 @@ nfp_rtsym_read_le(struct nfp_rtsym_table *rtbl, const char *name, int *error)
+@@ -239,19 +347,13 @@ nfp_rtsym_read_le(struct nfp_rtsym_table *rtbl, const char *name, int *error)
@@ -309 +331,2 @@
--	PMD_DRV_LOG(DEBUG, "Reading symbol %s with size %" PRIu64 " at %" PRIx64 "",
+-#ifdef DEBUG
+-	printf("Reading symbol %s with size %" PRIu64 " at %" PRIx64 "\n",
@@ -310,0 +334 @@
+-#endif
@@ -322,2 +346,2 @@
- 		PMD_DRV_LOG(ERR, "rtsym '%s' unsupported size: %" PRId64,
-@@ -272,8 +375,11 @@ uint8_t *
+ 		printf("rtsym '%s' unsupported size: %" PRId64 "\n",
+@@ -276,8 +378,11 @@ uint8_t *
@@ -334,3 +358,3 @@
- 	PMD_DRV_LOG(DEBUG, "mapping symbol %s", name);
- 	sym = nfp_rtsym_lookup(rtbl, name);
-@@ -282,14 +388,20 @@ nfp_rtsym_map(struct nfp_rtsym_table *rtbl, const char *name,
+ #ifdef DEBUG
+ 	printf("mapping symbol %s\n", name);
+@@ -288,14 +393,20 @@ nfp_rtsym_map(struct nfp_rtsym_table *rtbl, const char *name,
@@ -348 +372 @@
- 		PMD_DRV_LOG(ERR, "Symbol %s too small (%" PRIu64 " < %u)", name,
+ 		printf("Symbol %s too small (%" PRIu64 " < %u)\n", name,
@@ -356,2 +380,2 @@
- 	if (mem == NULL) {
- 		PMD_INIT_LOG(ERR, "Failed to map symbol %s", name);
+ 	if (!mem) {
+ 		printf("Failed to map symbol %s\n", name);

^ permalink raw reply	[flat|nested] 257+ messages in thread

* patch 'common/cnxk: fix CPT backpressure disable on LBK' has been queued to stable release 22.11.3
  2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
                     ` (22 preceding siblings ...)
  2023-08-10  0:10   ` patch 'net/nfp: fix offloading flows' " Xueming Li
@ 2023-08-10  0:10   ` Xueming Li
  23 siblings, 0 replies; 257+ messages in thread
From: Xueming Li @ 2023-08-10  0:10 UTC (permalink / raw)
  To: Rahul Bhansali; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=da3c4ce23806030441aca6b3557dd99d7b81cb2a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From da3c4ce23806030441aca6b3557dd99d7b81cb2a Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Mon, 3 Jul 2023 18:58:21 +0530
Subject: [PATCH] common/cnxk: fix CPT backpressure disable on LBK
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 772e30281a1d686096b27e5926e2f369caa05cff ]

For LBK interfaces, roc_nix_inl_inb_is_enabled() is false, hence
backpressure on CPT is disabled and causing CQ full interrupt.

NIXX_AF_RX_CHAN[0x800]_CFG is global config for all PF, VF
of RPM/LBK, hence backpressure disable on CPT is not required.

Fixes: 0663a84524e5 ("common/cnxk: enable backpressure on CPT with inline inbound")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/common/cnxk/roc_nix_fc.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/common/cnxk/roc_nix_fc.c b/drivers/common/cnxk/roc_nix_fc.c
index 033e17a4bf..5e8a01c775 100644
--- a/drivers/common/cnxk/roc_nix_fc.c
+++ b/drivers/common/cnxk/roc_nix_fc.c
@@ -88,17 +88,6 @@ nix_fc_rxchan_bpid_set(struct roc_nix *roc_nix, bool enable)
 		req->chan_cnt = 1;
 		req->bpid_per_chan = 0;
 
-		rc = mbox_process_msg(mbox, (void *)&rsp);
-		if (rc)
-			goto exit;
-	} else {
-		req = mbox_alloc_msg_nix_cpt_bp_disable(mbox);
-		if (req == NULL)
-			return rc;
-		req->chan_base = 0;
-		req->chan_cnt = 1;
-		req->bpid_per_chan = 0;
-
 		rc = mbox_process_msg(mbox, (void *)&rsp);
 		if (rc)
 			goto exit;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.404246600 +0800
+++ 0128-common-cnxk-fix-CPT-backpressure-disable-on-LBK.patch	2023-08-09 21:51:18.304352000 +0800
@@ -1 +1 @@
-From 772e30281a1d686096b27e5926e2f369caa05cff Mon Sep 17 00:00:00 2001
+From da3c4ce23806030441aca6b3557dd99d7b81cb2a Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Thu, 25 May 2023 15:28:35 +0530
+Date: Mon, 3 Jul 2023 18:58:21 +0530
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 772e30281a1d686096b27e5926e2f369caa05cff ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +19,2 @@
- drivers/common/cnxk/roc_nix_fc.c | 18 ++----------------
- 1 file changed, 2 insertions(+), 16 deletions(-)
+ drivers/common/cnxk/roc_nix_fc.c | 11 -----------
+ 1 file changed, 11 deletions(-)
@@ -21 +23 @@
-index 8feb773e1d..6d6997ed82 100644
+index 033e17a4bf..5e8a01c775 100644
@@ -24,4 +26,7 @@
-@@ -87,25 +87,11 @@ nix_fc_rxchan_bpid_set(struct roc_nix *roc_nix, bool enable)
- 		if (rc)
- 			goto exit;
- 		nix->cpt_lbpid = rsp->chan_bpid[0] & 0x1FF;
+@@ -88,17 +88,6 @@ nix_fc_rxchan_bpid_set(struct roc_nix *roc_nix, bool enable)
+ 		req->chan_cnt = 1;
+ 		req->bpid_per_chan = 0;
+ 
+-		rc = mbox_process_msg(mbox, (void *)&rsp);
+-		if (rc)
+-			goto exit;
@@ -31 +36 @@
--			goto exit;
+-			return rc;
@@ -33,4 +38 @@
--		if (roc_nix_is_lbk(roc_nix) || roc_nix_is_sdp(roc_nix))
--			req->chan_cnt = NIX_LBK_MAX_CHAN;
--		else
--			req->chan_cnt = NIX_CGX_MAX_CHAN;
+-		req->chan_cnt = 1;
@@ -39,13 +41,3 @@
--		rc = mbox_process_msg(mbox, (void *)&rsp);
--		if (rc)
--			goto exit;
--		nix->cpt_lbpid = 0;
- 	}
- 
- 	/* CPT to NIX BP on all channels */
--	if (!roc_feature_nix_has_rxchan_multi_bpid() || !nix->cpt_nixbpid)
-+	if (!roc_feature_nix_has_rxchan_multi_bpid() || !nix->cpt_nixbpid ||
-+	    !roc_nix_inl_inb_is_enabled(roc_nix))
- 		goto exit;
- 
- 	mbox_put(mbox);
+ 		rc = mbox_process_msg(mbox, (void *)&rsp);
+ 		if (rc)
+ 			goto exit;

^ permalink raw reply	[flat|nested] 257+ messages in thread

end of thread, other threads:[~2023-08-10  0:13 UTC | newest]

Thread overview: 257+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-25  6:33 patch has been queued to stable release 22.11.3 Xueming Li
2023-06-25  6:33 ` patch 'net: fix return type of IPv4 L4 packet checksum' " Xueming Li
2023-06-25  6:33 ` patch 'kni: fix build with Linux 6.3' " Xueming Li
2023-06-25  6:33 ` patch 'examples/ip_pipeline: fix build with GCC 13' " Xueming Li
2023-06-25  6:33 ` patch 'examples/ntb: " Xueming Li
2023-06-25  6:33 ` patch 'ring: fix use after free' " Xueming Li
2023-06-25  6:33 ` patch 'vfio: fix include with musl runtime' " Xueming Li
2023-06-25  6:33 ` patch 'kernel/freebsd: fix function parameter list' " Xueming Li
2023-06-25  6:33 ` patch 'telemetry: fix autotest on Alpine' " Xueming Li
2023-06-25  6:33 ` patch 'ring: fix dequeue parameter name' " Xueming Li
2023-06-25  6:33 ` patch 'pipeline: fix double free for table stats' " Xueming Li
2023-06-25  6:33 ` patch 'test/malloc: fix missing free' " Xueming Li
2023-06-25  6:33 ` patch 'test/malloc: fix statistics checks' " Xueming Li
2023-06-25  6:33 ` patch 'eal: avoid calling cleanup twice' " Xueming Li
2023-06-25  6:33 ` patch 'ci: fix build for Arm cross compilation in GHA' " Xueming Li
2023-06-25  6:33 ` patch 'build: fix warning when getting NUMA nodes' " Xueming Li
2023-06-25  6:33 ` patch 'pci: fix comment referencing renamed function' " Xueming Li
2023-06-25  6:33 ` patch 'eal/x86: improve multiple of 64 bytes memcpy performance' " Xueming Li
2023-06-25  6:33 ` patch 'eventdev/timer: fix timeout event wait behavior' " Xueming Li
2023-06-25  6:33 ` patch 'doc: fix event timer adapter guide' " Xueming Li
2023-06-25  6:33 ` patch 'event/dsw: free rings on close' " Xueming Li
2023-06-25  6:33 ` patch 'event/cnxk: fix setting attributes in empty get work' " Xueming Li
2023-06-25  6:34 ` patch 'eventdev/timer: fix buffer flush' " Xueming Li
2023-06-25  6:34 ` patch 'event/cnxk: fix nanoseconds to ticks conversion' " Xueming Li
2023-06-25  6:34 ` patch 'eal/linux: fix secondary process crash for mp hotplug' " Xueming Li
2023-06-25  6:34 ` patch 'eal/linux: fix legacy mem init with many segments' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix build warning' " Xueming Li
2023-06-25  6:34 ` patch 'net/sfc: stop misuse of Rx ingress m-port metadata on EF100' " Xueming Li
2023-06-25  6:34 ` patch 'net/tap: set locally administered bit for fixed MAC address' " Xueming Li
2023-06-25  6:34 ` patch 'net/mana: use datapath logging' " Xueming Li
2023-06-25  6:34 ` patch 'net/mana: avoid unnecessary assignments in data path' " Xueming Li
2023-06-25  6:34 ` patch 'net/mana: optimize completion queue by batch processing' " Xueming Li
2023-06-25  6:34 ` patch 'net/dpaa2: fix checksum good flags' " Xueming Li
2023-06-25  6:34 ` patch 'app/testpmd: fix GTP L2 length in checksum engine' " Xueming Li
2023-06-25  6:34 ` patch 'net/nfp: fix VLAN push flow action' " Xueming Li
2023-06-25  6:34 ` patch 'net/vmxnet3: fix drop of empty segments in Tx' " Xueming Li
2023-06-25  6:34 ` patch 'net/txgbe: fix use-after-free on remove' " Xueming Li
2023-06-25  6:34 ` patch 'ethdev: fix MAC address occupies two entries' " Xueming Li
2023-06-25  6:34 ` patch 'net/mana: return probing failure if no device found' " Xueming Li
2023-06-25  6:34 ` patch 'net/sfc: invalidate dangling MAE flow action FW resource IDs' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix never set MAC flow control' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix variable type mismatch' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix Rx multiple firmware reset interrupts' " Xueming Li
2023-06-25  6:34 ` patch 'ethdev: fix indirect action conversion' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix FEC mode for 200G ports' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix FEC mode check' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix missing FEC capability' " Xueming Li
2023-06-25  6:34 ` patch 'doc: fix format in flow API guide' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix RTC time on initialization' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix RTC time after reset' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: uninitialize PTP' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: extract PTP to its own header file' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix mbuf leakage when RxQ started during reset' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix mbuf leakage when RxQ started after " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix device start return value' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix uninitialized variable' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix inaccurate log' " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix redundant line break in " Xueming Li
2023-06-25  6:34 ` patch 'net/hns3: fix IMP reset trigger' " Xueming Li
2023-06-25  6:34 ` patch 'ethdev: fix calloc arguments' " Xueming Li
2023-06-25  6:34 ` patch 'net/nfp: fix disabling promiscuous mode' " Xueming Li
2023-06-25  6:34 ` patch 'net/nfp: fix IPv6 flow item' " Xueming Li
2023-06-25  6:34 ` patch 'net/nfp: fix TOS of IPv6 VXLAN encap flow action' " Xueming Li
2023-06-25  6:34 ` patch 'net/nfp: fix TOS of IPv6 GENEVE " Xueming Li
2023-06-25  6:34 ` patch 'net/nfp: fix TOS of IPv6 NVGRE " Xueming Li
2023-06-25  6:34 ` patch 'net/nfp: fix control mempool creation' " Xueming Li
2023-06-25  6:34 ` patch 'net/nfp: fix representor " Xueming Li
2023-06-25  6:34 ` patch 'net/nfp: fix flow hash table " Xueming Li
2023-06-25  6:34 ` patch 'net/nfp: fix TP flow action for UDP' " Xueming Li
2023-06-25  6:34 ` patch 'net/vmxnet3: fix return code in initializing' " Xueming Li
2023-06-25  6:34 ` patch 'doc: fix auth algos in cryptoperf app' " Xueming Li
2023-06-25  6:34 ` patch 'crypto/qat: fix stack buffer overflow in SGL loop' " Xueming Li
2023-06-25  6:34 ` patch 'crypto/scheduler: fix last element for valid args' " Xueming Li
2023-06-25  6:34 ` patch 'test/crypto: fix return value for SNOW3G' " Xueming Li
2023-06-25  6:34 ` patch 'examples/ipsec-secgw: fix zero address in ethernet header' " Xueming Li
2023-06-25  6:34 ` patch 'cryptodev: clarify error codes for symmetric session' " Xueming Li
2023-06-25  6:34 ` patch 'crypto/openssl: fix memory free' " Xueming Li
2023-06-25  6:34 ` patch 'test/crypto: fix session creation check' " Xueming Li
2023-06-25  6:34 ` patch 'crypto/ipsec_mb: fix enqueue counter for SNOW3G' " Xueming Li
2023-06-25  6:34 ` patch 'crypto/cnxk: fix IPsec CCM capabilities' " Xueming Li
2023-06-25  6:34 ` patch 'test/crypto: fix IPsec AES CCM vector' " Xueming Li
2023-06-25  6:34 ` patch 'crypto/ipsec_mb: optimize allocation in session' " Xueming Li
2023-06-25  6:35 ` patch 'vhost: fix notification stats for packed ring' " Xueming Li
2023-06-25  6:35 ` patch 'vhost: fix invalid call FD handling' " Xueming Li
2023-06-25  6:35 ` patch 'net/virtio: propagate interrupt configuration error values' " Xueming Li
2023-06-25  6:35 ` patch 'net/virtio: fix initialization to return negative errno' " Xueming Li
2023-06-25  6:35 ` patch 'net/virtio-user: fix leak when initialisation fails' " Xueming Li
2023-06-25  6:35 ` patch 'net/mlx5: enhance error log for tunnel offloading' " Xueming Li
2023-06-25  6:35 ` patch 'net/mlx5: fix matcher layout size calculation' " Xueming Li
2023-06-25  6:35 ` patch 'net/mlx5: fix VXLAN matching with zero value' " Xueming Li
2023-06-25  6:35 ` patch 'net/mlx5: forbid duplicated tag index in pattern template' " Xueming Li
2023-06-25  6:35 ` patch 'net/mlx5: fix duplicated tag index matching in SWS' " Xueming Li
2023-06-25  6:35 ` patch 'net/mlx5: fix drop action attribute validation' " Xueming Li
2023-06-25  6:35 ` patch 'mempool/cnxk: avoid hang when counting batch allocs' " Xueming Li
2023-06-25  6:35 ` patch 'common/cnxk: fix IPsec IPv6 tunnel address byte swap' " Xueming Li
2023-06-25  6:35 ` patch 'event/cnxk: fix Tx adapter data pointer' " Xueming Li
2023-06-25  6:35 ` patch 'event/cnxk: fix mempool cookies check' " Xueming Li
2023-06-25  6:35 ` patch 'common/cnxk: fix setting channel mask for SDP interfaces' " Xueming Li
2023-06-25  6:35 ` patch 'common/cnxk: fix uninitialized pointer read' " Xueming Li
2023-06-25  6:35 ` patch 'common/cnxk: fix inline device VF identification' " Xueming Li
2023-06-25  6:35 ` patch 'common/cnxk: fix receive queue with multiple mask' " Xueming Li
2023-06-25  6:35 ` patch 'net/qede: fix RSS indirection table initialization' " Xueming Li
2023-06-25  6:35 ` patch 'doc: fix typo in cnxk platform guide' " Xueming Li
2023-06-25  6:35 ` patch 'net/i40e: fix Rx data buffer size' " Xueming Li
2023-06-25  6:35 ` patch 'net/ice: " Xueming Li
2023-06-25  6:35 ` patch 'net/iavf: " Xueming Li
2023-06-25  6:35 ` patch 'net/idpf: " Xueming Li
2023-06-25  6:35 ` patch 'common/idpf: remove device stop flag' " Xueming Li
2023-06-25  6:35 ` patch 'common/idpf/base: fix control queue send and receive' " Xueming Li
2023-06-25  6:35 ` patch 'common/idpf/base: fix ITR register definitions for AVF' " Xueming Li
2023-06-25  6:35 ` patch 'common/idpf/base: fix parameters when send msg to cp' " Xueming Li
2023-06-25  6:35 ` patch 'common/idpf/base: fix memory leaks on control queue' " Xueming Li
2023-06-25  6:35 ` patch 'net/ice: fix statistics' " Xueming Li
2023-06-25  6:35 ` patch 'net/ice: fix DCF RSS initialization' " Xueming Li
2023-06-25  6:35 ` patch 'net/iavf: release large VF when closing device' " Xueming Li
2023-06-25  6:35 ` patch 'net/ice: fix DCF control thread crash' " Xueming Li
2023-06-25  6:35 ` patch 'net/ice/base: fix incorrect defines for DCBx' " Xueming Li
2023-06-25  6:35 ` patch 'net/ice/base: remove unreachable code' " Xueming Li
2023-06-25  6:35 ` patch 'net/ice: adjust timestamp mbuf register' " Xueming Li
2023-06-25  6:35 ` patch 'net/ice: fix timestamp enabling' " Xueming Li
2023-06-25  6:35 ` patch 'net/ice: initialize parser for double VLAN' " Xueming Li
2023-06-25  6:35 ` patch 'net/ice: fix outer UDP checksum offload' " Xueming Li
2023-06-25  6:35 ` patch 'net/iavf: fix virtchnl command called in interrupt' " Xueming Li
2023-06-25  6:35 ` patch 'test/mbuf: fix crash in a forked process' " Xueming Li
2023-06-25  6:35 ` patch 'doc: fix typo in graph guide' " Xueming Li
2023-06-25  6:35 ` patch 'doc: remove warning with Doxygen 1.9.7' " Xueming Li
2023-06-25  6:35 ` patch 'dma/dpaa2: set VFA bit for route-by-port with VF' " Xueming Li
2023-08-09 23:47 ` patch " Xueming Li
2023-08-09 23:47   ` patch 'examples/l2fwd-cat: fix external build' " Xueming Li
2023-08-09 23:47   ` patch 'examples/fips_validation: " Xueming Li
2023-08-09 23:47   ` patch 'test: add graph tests' " Xueming Li
2023-08-09 23:47   ` patch 'mbuf: fix Doxygen comment of distributor metadata' " Xueming Li
2023-08-09 23:47   ` patch 'ci: fix libabigail cache in GHA' " Xueming Li
2023-08-09 23:47   ` patch 'common/qat: fix command parameter corruption' " Xueming Li
2023-08-09 23:47   ` patch 'crypto/qat: fix sym device prototype' " Xueming Li
2023-08-09 23:47   ` patch 'crypto/openssl: fix memory leak in auth processing' " Xueming Li
2023-08-09 23:47   ` patch 'crypto/openssl: skip workaround at compilation time' " Xueming Li
2023-08-09 23:47   ` patch 'test/security: fix event inline IPsec reassembly tests' " Xueming Li
2023-08-09 23:47   ` patch 'net/nfp: fix IPv6 address for set flow action' " Xueming Li
2023-08-09 23:47   ` patch 'net/nfp: fix unneeded endian conversion' " Xueming Li
2023-08-09 23:47   ` patch 'net/nfp: fix endian conversion for tunnel decap action' " Xueming Li
2023-08-09 23:47   ` patch 'ethdev: update documentation for API to set FEC' " Xueming Li
2023-08-09 23:47   ` patch 'ethdev: check that at least one FEC mode is specified' " Xueming Li
2023-08-09 23:47   ` patch 'ethdev: update documentation for API to get FEC' " Xueming Li
2023-08-09 23:47   ` patch 'net/nfp: fix VNI of VXLAN encap action' " Xueming Li
2023-08-09 23:47   ` patch 'net/nfp: fix VNI of IPv4 NVGRE " Xueming Li
2023-08-09 23:47   ` patch 'net/nfp: fix VNI of IPv6 " Xueming Li
2023-08-09 23:47   ` patch 'net/bonding: fix startup when NUMA is not supported' " Xueming Li
2023-08-09 23:47   ` patch 'net/bonding: fix destroy dedicated queues flow' " Xueming Li
2023-08-09 23:47   ` patch 'net/txgbe/base: fix Tx with fiber hotplug' " Xueming Li
2023-08-09 23:47   ` patch 'net/txgbe: fix interrupt enable mask' " Xueming Li
2023-08-09 23:47   ` patch 'net/txgbe: adapt to MNG veto bit setting' " Xueming Li
2023-08-09 23:47   ` patch 'net/txgbe: fix to set autoneg for 1G speed' " Xueming Li
2023-08-09 23:47   ` patch 'net/txgbe: fix extended statistics' " Xueming Li
2023-08-09 23:47   ` patch 'net/ngbe: " Xueming Li
2023-08-09 23:47   ` patch 'net/ngbe: adapt to MNG veto bit setting' " Xueming Li
2023-08-09 23:47   ` patch 'net/ngbe: fix link status in no LSC mode' " Xueming Li
2023-08-09 23:47   ` patch 'net/ngbe: remove redundant codes' " Xueming Li
2023-08-09 23:47   ` patch 'app/testpmd: fix primary process not polling all queues' " Xueming Li
2023-08-09 23:47   ` patch 'net/nfp: fix representor name too long' " Xueming Li
2023-08-09 23:47   ` patch 'net/nfp: fix address always related with PF ID 0' " Xueming Li
2023-08-09 23:47   ` patch 'common/sfc_efx/base: fix Rx queue without RSS hash prefix' " Xueming Li
2023-08-09 23:47   ` patch 'net/iavf: fix VLAN offload with AVX512' " Xueming Li
2023-08-09 23:47   ` patch 'net/ice: fix tunnel packet Tx descriptor' " Xueming Li
2023-08-09 23:47   ` patch 'net/ixgbe: add proper memory barriers in Rx' " Xueming Li
2023-08-09 23:48   ` patch 'common/idpf: fix memory leak on AVX512 Tx queue close' " Xueming Li
2023-08-09 23:48   ` patch 'net/iavf: fix abnormal disable HW interrupt' " Xueming Li
2023-08-09 23:48   ` patch 'net/i40e: fix tunnel packet Tx descriptor' " Xueming Li
2023-08-09 23:48   ` patch 'net/e1000: fix queue number initialization' " Xueming Li
2023-08-09 23:48   ` patch 'net/ice: fix MAC type of E822 and E823' " Xueming Li
2023-08-09 23:48   ` patch 'net/ice: fix protocol agnostic offloading with big packets' " Xueming Li
2023-08-09 23:48   ` patch 'net/iavf: " Xueming Li
2023-08-09 23:48   ` patch 'net/mlx5: fix risk in NEON Rx descriptor read' " Xueming Li
2023-08-09 23:48   ` patch 'net/mlx5: fix device removal event handling' " Xueming Li
2023-08-09 23:48   ` patch 'common/mlx5: adjust fork call with new kernel API' " Xueming Li
2023-08-09 23:48   ` patch 'net/cnxk: flush SQ before configuring MTU' " Xueming Li
2023-08-09 23:48   ` patch 'net/cnxk: fix cookies check with security offload' " Xueming Li
2023-08-09 23:48   ` patch 'net/cnxk: fix flow queue index validation' " Xueming Li
2023-08-09 23:48   ` patch 'cryptodev: fix comments of modular operation parameters' " Xueming Li
2023-08-09 23:48   ` patch 'raw/ntb: avoid disabling interrupt twice' " Xueming Li
2023-08-09 23:48   ` patch 'ipc: fix file descriptor leakage with unhandled messages' " Xueming Li
2023-08-09 23:58 ` patch 'devtools: fix mailmap check for parentheses' " Xueming Li
2023-08-09 23:58   ` patch 'fib: fix adding default route' " Xueming Li
2023-08-09 23:58   ` patch 'mem: fix memsegs exhausted message' " Xueming Li
2023-08-09 23:58   ` patch 'hash: fix reading unaligned bits in Toeplitz hash' " Xueming Li
2023-08-09 23:58   ` patch 'member: fix PRNG seed reset in NitroSketch mode' " Xueming Li
2023-08-09 23:58   ` patch 'net/netvsc: fix sizeof calculation' " Xueming Li
2023-08-09 23:58   ` patch 'app/testpmd: fix checksum engine with GTP on 32-bit' " Xueming Li
2023-08-09 23:58   ` patch 'net/hns3: delete duplicate macro definition' " Xueming Li
2023-08-09 23:58   ` patch 'doc: fix kernel patch link in hns3 guide' " Xueming Li
2023-08-09 23:58   ` patch 'doc: fix syntax " Xueming Li
2023-08-09 23:58   ` patch 'doc: fix number of leading spaces " Xueming Li
2023-08-09 23:58   ` patch 'net/txgbe: fix blocking system events' " Xueming Li
2023-08-09 23:58   ` patch 'app/testpmd: revert primary process polling all queues fix' " Xueming Li
2023-08-09 23:58   ` patch 'net/hns3: fix non-zero weight for disabled TC' " Xueming Li
2023-08-09 23:58   ` patch 'app/testpmd: fix flow rule number parsing' " Xueming Li
2023-08-09 23:58   ` patch 'net/mana: fix counter overflow for posted WQE' " Xueming Li
2023-08-09 23:58   ` patch 'net/mana: fix WQE count for ringing RQ doorbell' " Xueming Li
2023-08-09 23:58   ` patch 'net/hns3: fix index to look up table in NEON Rx' " Xueming Li
2023-08-09 23:58   ` patch 'ethdev: fix potential leak in PCI probing helper' " Xueming Li
2023-08-09 23:58   ` patch 'net/mlx5: fix flow dump for modify field' " Xueming Li
2023-08-09 23:58   ` patch 'net/mlx5: fix error set in Tx representor tagging' " Xueming Li
2023-08-09 23:58   ` patch 'net/mlx5: fix return value of vport action' " Xueming Li
2023-08-09 23:58   ` patch 'net/mlx5: fix error set in control tables create' " Xueming Li
2023-08-09 23:58   ` patch 'net/mlx5: fix error set for age pool initialization' " Xueming Li
2023-08-09 23:58   ` patch 'net/mlx5: fix error in VLAN actions creation' " Xueming Li
2023-08-09 23:58   ` patch 'common/mlx5: fix obtaining IB device in LAG mode' " Xueming Li
2023-08-09 23:58   ` patch 'net/mlx5: fix profile check of meter mark' " Xueming Li
2023-08-09 23:59   ` patch 'net/mlx5: reduce counter pool name length' " Xueming Li
2023-08-09 23:59   ` patch 'net/mlx5: fix flow workspace destruction' " Xueming Li
2023-08-09 23:59   ` patch 'net/mlx5: forbid MPRQ restart' " Xueming Li
2023-08-09 23:59   ` patch 'net/mlx5: fix RSS expansion inner buffer overflow' " Xueming Li
2023-08-09 23:59   ` patch 'net/mlx5: fix query for NIC flow capability' " Xueming Li
2023-08-09 23:59   ` patch 'net/ice: fix VLAN mode parser' " Xueming Li
2023-08-09 23:59   ` patch 'net/iavf: fix VLAN insertion in vector path' " Xueming Li
2023-08-09 23:59   ` patch 'net/ice: fix 32-bit build' " Xueming Li
2023-08-09 23:59   ` patch 'net/iavf: fix tunnel TSO path selection' " Xueming Li
2023-08-09 23:59   ` patch 'net/ice: fix RSS hash key generation' " Xueming Li
2023-08-09 23:59   ` patch 'baseband/fpga_5gnr_fec: fix possible division by zero' " Xueming Li
2023-08-09 23:59   ` patch 'baseband/fpga_5gnr_fec: fix starting unconfigured queue' " Xueming Li
2023-08-09 23:59   ` patch 'crypto/qat: fix null algorithm digest placement' " Xueming Li
2023-08-10  0:06 ` Xueming Li
2023-08-10  0:06   ` patch 'common/qat: detach crypto from compress build' " Xueming Li
2023-08-10  0:06   ` patch 'test/crypto: fix PDCP-SDAP test vectors' " Xueming Li
2023-08-10  0:06   ` patch 'examples/fips_validation: fix digest length in AES-GCM' " Xueming Li
2023-08-10  0:06   ` patch 'cryptodev: fix device socket ID type' " Xueming Li
2023-08-10  0:06   ` patch 'app/crypto-perf: fix socket ID default value' " Xueming Li
2023-08-10  0:06   ` patch 'examples/ipsec-secgw: " Xueming Li
2023-08-10  0:06   ` patch 'examples/ipsec-secgw: fix TAP default MAC address' " Xueming Li
2023-08-10  0:06   ` patch 'ipsec: fix NAT-T header length' " Xueming Li
2023-08-10  0:06   ` patch 'examples/l3fwd: fix duplicate expression for default nexthop' " Xueming Li
2023-08-10  0:06   ` patch 'kni: fix build with Linux 6.5' " Xueming Li
2023-08-10  0:10 ` patch 'devtools: fix bashism in mailmap check' " Xueming Li
2023-08-10  0:10   ` patch 'doc: fix typos and wording in flow API guide' " Xueming Li
2023-08-10  0:10   ` patch 'net/i40e: fix comments' " Xueming Li
2023-08-10  0:10   ` patch 'net/iavf: fix stop ordering' " Xueming Li
2023-08-10  0:10   ` patch 'common/iavf: fix MAC type for 710 NIC' " Xueming Li
2023-08-10  0:10   ` patch 'net/ixgbe: fix Rx and Tx queue status' " Xueming Li
2023-08-10  0:10   ` patch 'net/igc: " Xueming Li
2023-08-10  0:10   ` patch 'net/e1000: " Xueming Li
2023-08-10  0:10   ` patch 'net/mlx5: fix drop action memory leak' " Xueming Li
2023-08-10  0:10   ` patch 'net/mlx5: fix LRO TCP checksum' " Xueming Li
2023-08-10  0:10   ` patch 'net/mlx5: fix MPRQ stride size for headroom' " Xueming Li
2023-08-10  0:10   ` patch 'net/mlx5: fix validation for conntrack indirect action' " Xueming Li
2023-08-10  0:10   ` patch 'net/mlx5: fix handle validation for meter mark' " Xueming Li
2023-08-10  0:10   ` patch 'app/testpmd: fix meter mark handle update' " Xueming Li
2023-08-10  0:10   ` patch 'doc: add flow template API requirements for mlx5' " Xueming Li
2023-08-10  0:10   ` patch 'doc: improve wording of cuda guide' " Xueming Li
2023-08-10  0:10   ` patch 'doc: fix description of runtime directories' " Xueming Li
2023-08-10  0:10   ` patch 'doc: update BIOS settings and supported HW for NTB' " Xueming Li
2023-08-10  0:10   ` patch 'doc: fix link to flow capabilities from bnxt guide' " Xueming Li
2023-08-10  0:10   ` patch 'net/mana: fix Tx queue statistics' " Xueming Li
2023-08-10  0:10   ` patch 'net/ngbe: fix RSS offload capability' " Xueming Li
2023-08-10  0:10   ` patch 'test/bonding: fix include of standard header' " Xueming Li
2023-08-10  0:10   ` patch 'net/nfp: fix Tx descriptor free logic of NFD3' " Xueming Li
2023-08-10  0:10   ` patch 'net/nfp: fix offloading flows' " Xueming Li
2023-08-10  0:10   ` patch 'common/cnxk: fix CPT backpressure disable on LBK' " 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).