patches for DPDK stable branches
 help / color / mirror / Atom feed
* patches have been queued to stable release 23.11.1
@ 2024-03-05  9:45 Xueming Li
  2024-03-05  9:45 ` patch 'buildtools/cmdline: fix generated code for IP addresses' has " Xueming Li
                   ` (136 more replies)
  0 siblings, 137 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: Xueming Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 05bea47b81f3f38d07cb3aedc6fc2a578c3caae8 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Tue, 5 Mar 2024 17:39:30 +0800
Subject: [PATCH] patch list
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

*** BLURB HERE ***

Ajit Khaparde (2):
  net/bnxt: fix array overflow
  net/bnxt: modify locking for representor Tx

Akhil Goyal (1):
  common/cnxk: fix memory leak in CPT init

Akshay Dorwat (1):
  net/ionic: fix RSS query

Alan Elder (2):
  net: add macros for VLAN metadata parsing
  net/netvsc: fix VLAN metadata parsing

Andrew Boyer (1):
  net/ionic: fix device close

Anoob Joseph (1):
  examples/ipsec-secgw: fix width of variables

Anup Prabhu (1):
  ml/cnxk: fix xstats calculation

Bruce Richardson (5):
  buildtools/cmdline: fix generated code for IP addresses
  buildtools/cmdline: fix IP address initializer
  kernel/freebsd: fix module build on FreeBSD 14
  build: fix linker warnings about undefined symbols
  net/vmxnet3: fix initialization on FreeBSD

Chaoyong He (9):
  net/nfp: fix resource leak for device initialization
  net/nfp: fix resource leak for CoreNIC firmware
  net/nfp: fix resource leak for PF initialization
  net/nfp: fix resource leak for flower firmware
  net/nfp: fix resource leak for exit of CoreNIC firmware
  net/nfp: fix resource leak for exit of flower firmware
  net/nfp: fix resource leak for VF
  net/nfp: fix NFD3 metadata process
  net/nfp: fix NFDk metadata process

Chengwen Feng (17):
  eal: verify strdup return
  bus/dpaa: verify strdup return
  bus/fslmc: verify strdup return
  bus/vdev: verify strdup return
  dma/idxd: verify strdup return
  event/cnxk: verify strdup return
  net/failsafe: fix memory leak in args parsing
  net/nfp: verify strdup return
  app/dumpcap: verify strdup return
  app/pdump: verify strdup return
  app/crypto-perf: verify strdup return
  app/dma-perf: verify strdup return
  app/testpmd: verify strdup return
  test: verify strdup return
  examples/qos_sched: fix memory leak in args parsing
  examples/vhost: verify strdup return
  net/hns3: remove QinQ insert support for VF

Cristian Dumitrescu (1):
  net/softnic: fix include of log library

David Marchand (13):
  hash: remove some dead code
  regexdev: fix logtype register
  lib: use dedicated logtypes and macros
  lib: add newline in logs
  lib: remove redundant newline from logs
  dma/dpaa2: fix logtype register
  build: fix reasons conflict
  app/graph: fix build reason
  ci: update versions of actions in GHA
  vhost: fix virtqueue access check in datapath
  vhost: fix virtqueue access check in VDUSE setup
  vhost: fix virtqueue access check in vhost-user setup
  test/event: skip test if no driver is present

Dengdui Huang (8):
  net/hns3: refactor VF mailbox message struct
  net/hns3: refactor PF mailbox message struct
  net/hns3: refactor send mailbox function
  net/hns3: refactor handle mailbox function
  net/hns3: fix VF multiple count on one reset
  net/hns3: fix disable command with firmware
  net/hns3: fix reset level comparison
  app/testpmd: fix crash in multi-process forwarding

Edwin Brossette (1):
  net/virtio: remove duplicate queue xstats

Ferruh Yigit (8):
  pipeline: fix calloc parameters
  eventdev: fix calloc parameters
  dmadev: fix calloc parameters
  rawdev: fix calloc parameters
  common/mlx5: fix calloc parameters
  net/bnx2x: fix calloc parameters
  net/nfp: fix calloc parameters
  net/sfc: fix calloc parameters

Gowrishankar Muthukrishnan (1):
  crypto/cnxk: fix CN9K ECDH public key verification

Hanumanth Pothula (1):
  net/thunderx: fix DMAC control register update

Hao Chen (1):
  vhost: fix deadlock during vDPA SW live migration

Harman Kalra (2):
  common/cnxk: fix mbox region copy
  common/cnxk: fix VLAN check for inner header

Honnappa Nagarahalli (2):
  rcu: use atomic operation on acked token
  rcu: fix acked token in debug log

Jonathan Erb (1):
  telemetry: fix empty JSON dictionaries

Joyce Kong (1):
  net/memif: fix crash with Tx burst larger than 255

Kaiwen Deng (3):
  net/i40e: remove redundant judgment in flow parsing
  net/ice: fix tunnel TSO capabilities
  net: fix TCP/UDP checksum with padding data

Kalesh AP (3):
  net/bnxt: fix 50G and 100G forced speed
  net/bnxt: fix speed change from 200G to 25G on Thor
  net/bnxt: fix backward firmware compatibility

Kiran Kumar K (1):
  net/cnxk: fix flow RSS configuration

Kumara Parameshwaran (2):
  gro: fix reordering of packets
  app/testpmd: fix GRO packets flush on timeout

Long Li (3):
  net/mana: prevent values overflow returned from RDMA layer
  net/mana: fix memory leak on MR allocation
  net/mana: handle MR cache expansion failure

Long Wu (5):
  net/nfp: fix Rx memory leak
  net/nfp: fix Rx descriptor
  net/nfp: fix device close
  net/nfp: fix device resource freeing
  net/nfp: free switch domain ID on close

Maxime Coquelin (1):
  vhost: fix memory leak in Virtio Tx split path

Michael Baum (8):
  net/mlx5: fix jump action validation
  net/mlx5: fix flow tag modification
  net/mlx5/hws: fix ESP flow matching validation
  net/mlx5: fix GENEVE TLV option management
  common/mlx5: fix duplicate read of general capabilities
  common/mlx5: fix query sample info capability
  net/mlx5: remove GENEVE options length limitation
  net/mlx5: fix GENEVE option item translation

Mingjin Ye (1):
  net/iavf: fix no polling mode switching

Mário Kuka (1):
  net/bonding: fix flow count query

Neel Patel (1):
  net/ionic: fix missing volatile type for cqe pointers

Pavan Nikhilesh (2):
  event/cnxk: fix dequeue timeout configuration
  doc: fix commands in eventdev test tool guide

Qi Zhang (2):
  net/ice: fix link update
  net/ice: fix memory leaks

Robin Jarry (1):
  build: link static libs with whole-archive in subproject

Rongwei Liu (1):
  net/mlx5: fix stats query crash in secondary process

Rushil Gupta (1):
  net/gve: fix DQO for chained descriptors

Satheesh Paul (1):
  net/cnxk: fix aged flow query

Shaowei Sun (1):
  telemetry: fix connected clients count

Shiyang He (1):
  net/iavf: fix crash on VF start

Sivaprasad Tummala (1):
  eal/x86: add AMD vendor check for TSC calibration

Sivaramakrishnan Venkat (1):
  drivers/net: fix buffer overflow for packet types list

Stephen Hemminger (5):
  doc: remove cmdline polling mode deprecation notice
  cryptodev: remove unused extern variable
  doc: add --latencystats option in testpmd guide
  app/testpmd: hide --bitrate-stats in help if disabled
  common/sfc_efx/base: use C11 static assert

Suanming Mou (3):
  app/crypto-perf: fix next segment mbuf
  app/crypto-perf: fix data comparison
  app/crypto-perf: fix encrypt operation verification

Sunyang Wu (1):
  ethdev: fix NVGRE encap flow action description

Wathsala Vithanage (1):
  net/memif: fix extra mbuf refcnt update in zero copy Tx

Weiguo Li (1):
  net/bnxt: fix deadlock in ULP timer callback

Yajun Wu (1):
  vdpa/mlx5: fix queue enable drain CQ

Yunjian Wang (3):
  net/iavf: fix memory leak on security context error
  net/ixgbe: fix memoy leak after device init failure
  net/af_xdp: fix memzone leak on config failure

 .github/workflows/build.yml                   |  20 +-
 .mailmap                                      |   8 +-
 app/dumpcap/main.c                            |   5 +
 app/graph/meson.build                         |   1 +
 app/meson.build                               |   2 +-
 app/pdump/main.c                              |   3 +
 app/test-crypto-perf/cperf_options_parsing.c  |   4 +
 app/test-crypto-perf/cperf_test_common.c      |  15 +-
 app/test-crypto-perf/cperf_test_verify.c      |  59 +++--
 app/test-dma-perf/main.c                      |   2 +
 app/test-pmd/cmdline.c                        |   2 +
 app/test-pmd/config.c                         |   6 +-
 app/test-pmd/csumonly.c                       |  21 +-
 app/test-pmd/parameters.c                     |  10 +-
 app/test/process.h                            |   5 +-
 app/test/test_eventdev.c                      |  10 +-
 buildtools/dpdk-cmdline-gen.py                |   4 +-
 buildtools/subproject/meson.build             |   3 +-
 config/meson.build                            |   3 +
 doc/guides/rel_notes/deprecation.rst          |   4 -
 doc/guides/testpmd_app_ug/run_app.rst         |   4 +
 doc/guides/tools/testeventdev.rst             |  24 +-
 drivers/bus/dpaa/dpaa_bus.c                   |   4 +
 drivers/bus/fslmc/fslmc_bus.c                 |   4 +
 drivers/bus/vdev/vdev.c                       |   4 +
 drivers/common/cnxk/roc_cpt.c                 |   3 +-
 drivers/common/cnxk/roc_dev.c                 |   5 +-
 drivers/common/cnxk/roc_npc_aging.c           |   4 +
 drivers/common/cnxk/roc_npc_parse.c           |  10 +-
 drivers/common/mlx5/mlx5_common_mr.c          |   2 +-
 drivers/common/mlx5/mlx5_devx_cmds.c          |  24 +-
 drivers/common/mlx5/mlx5_devx_cmds.h          |   1 +
 drivers/common/qat/meson.build                |  10 +-
 drivers/common/sfc_efx/base/efx.h             |  14 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |  12 +-
 drivers/crypto/ipsec_mb/ipsec_mb_ops.c        |   2 +-
 drivers/dma/dpaa2/dpaa2_qdma.c                |   5 +-
 drivers/dma/idxd/idxd_bus.c                   |  10 +-
 drivers/event/cnxk/cnxk_eventdev.c            |  16 +-
 drivers/meson.build                           |   4 +-
 drivers/ml/cnxk/cn10k_ml_ops.c                |  11 +
 drivers/net/af_xdp/rte_eth_af_xdp.c           |   2 +-
 drivers/net/bnx2x/bnx2x.c                     |   2 +-
 drivers/net/bnxt/bnxt.h                       |   6 +-
 drivers/net/bnxt/bnxt_ethdev.c                |  53 +++--
 drivers/net/bnxt/bnxt_hwrm.c                  |  25 +-
 drivers/net/bnxt/bnxt_reps.c                  |   6 +-
 drivers/net/bnxt/bnxt_txq.c                   |   6 +
 drivers/net/bnxt/bnxt_txq.h                   |   1 +
 drivers/net/bnxt/bnxt_txr.c                   |  13 +
 drivers/net/bnxt/bnxt_txr.h                   |   4 +-
 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c          |   1 +
 drivers/net/bonding/rte_eth_bond_flow.c       |   6 +
 drivers/net/cnxk/cnxk_flow.c                  |  18 +-
 drivers/net/dpaa/dpaa_ethdev.c                |   3 +-
 drivers/net/failsafe/failsafe_args.c          |   2 +-
 drivers/net/gve/gve_tx_dqo.c                  |  22 +-
 drivers/net/hns3/hns3_common.c                |   2 +-
 drivers/net/hns3/hns3_ethdev.c                |  30 +--
 drivers/net/hns3/hns3_ethdev_vf.c             | 225 ++++++++++--------
 drivers/net/hns3/hns3_mbx.c                   | 165 +++++++------
 drivers/net/hns3/hns3_mbx.h                   |  92 +++++--
 drivers/net/hns3/hns3_rxtx.c                  |  18 +-
 drivers/net/i40e/i40e_flow.c                  |   3 +-
 drivers/net/iavf/iavf.h                       |   6 +-
 drivers/net/iavf/iavf_ethdev.c                |  68 +++++-
 drivers/net/iavf/iavf_ipsec_crypto.c          |   5 +-
 drivers/net/iavf/iavf_vchnl.c                 |  24 +-
 drivers/net/ice/ice_ethdev.c                  |  32 ++-
 drivers/net/ice/ice_ethdev.h                  |   4 +
 drivers/net/ice/ice_rxtx_vec_common.h         |   4 +
 drivers/net/ice/ice_tm.c                      |  12 +
 drivers/net/ionic/ionic_ethdev.c              |  39 +--
 drivers/net/ionic/ionic_rxtx.c                |   4 +-
 drivers/net/ionic/ionic_rxtx_sg.c             |   8 +-
 drivers/net/ionic/ionic_rxtx_simple.c         |   8 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |  17 +-
 drivers/net/mana/mana.c                       |  24 +-
 drivers/net/mana/mana.h                       |   6 +-
 drivers/net/mana/mr.c                         |  60 +++--
 drivers/net/memif/rte_eth_memif.c             |   8 +-
 drivers/net/mlx5/hws/mlx5dr_definer.c         |   5 -
 drivers/net/mlx5/linux/mlx5_os.c              |   8 +-
 drivers/net/mlx5/mlx5_flow_dv.c               |  59 ++---
 drivers/net/mvneta/mvneta_ethdev.c            |   3 +-
 drivers/net/mvpp2/mrvl_ethdev.c               |   3 +-
 drivers/net/netvsc/hn_rxtx.c                  |   8 +-
 drivers/net/nfp/flower/nfp_flower.c           |  78 ++----
 drivers/net/nfp/flower/nfp_flower.h           |   1 +
 .../net/nfp/flower/nfp_flower_representor.c   | 166 ++++++++++++-
 .../net/nfp/flower/nfp_flower_representor.h   |   1 +
 drivers/net/nfp/nfd3/nfp_nfd3_dp.c            |  19 +-
 drivers/net/nfp/nfdk/nfp_nfdk_dp.c            |  27 ++-
 drivers/net/nfp/nfp_ethdev.c                  | 135 ++++++++---
 drivers/net/nfp/nfp_ethdev_vf.c               |  10 +-
 drivers/net/nfp/nfp_ipsec.c                   |   5 +
 drivers/net/nfp/nfp_net_common.c              |   1 +
 drivers/net/nfp/nfp_net_common.h              |   1 +
 drivers/net/nfp/nfp_rxtx.c                    |  18 +-
 drivers/net/nfp/nfpcore/nfp_mutex.c           |   2 +-
 drivers/net/pfe/pfe_ethdev.c                  |   3 +-
 drivers/net/sfc/sfc_mae.c                     |   4 +-
 drivers/net/softnic/rte_eth_softnic_cli.c     |   2 +
 drivers/net/tap/rte_eth_tap.c                 |   1 +
 drivers/net/thunderx/base/nicvf_mbox.c        |  12 +
 drivers/net/thunderx/base/nicvf_mbox.h        |  10 +
 drivers/net/thunderx/nicvf_ethdev.c           |  28 +++
 drivers/net/virtio/virtio_ethdev.c            |   2 -
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |   4 +
 drivers/vdpa/mlx5/mlx5_vdpa_event.c           |  29 ++-
 examples/ipsec-secgw/ipsec-secgw.c            |   5 +-
 examples/ipsec-secgw/ipsec_worker.h           |   4 +-
 examples/pipeline/cli.c                       |   2 +
 examples/qos_sched/args.c                     |   4 +-
 examples/vhost/main.c                         |   3 +
 kernel/freebsd/nic_uio/nic_uio.c              |   8 +-
 lib/bbdev/rte_bbdev.c                         |   6 +-
 lib/cfgfile/rte_cfgfile.c                     |  14 +-
 lib/compressdev/rte_compressdev_pmd.c         |   4 +-
 lib/cryptodev/rte_cryptodev.c                 |   4 +-
 lib/cryptodev/rte_cryptodev.h                 |   2 -
 lib/dispatcher/rte_dispatcher.c               |  12 +-
 lib/dmadev/rte_dmadev.c                       |   4 +-
 lib/eal/common/eal_common_options.c           |  26 +-
 lib/eal/linux/eal_dev.c                       |   2 +
 lib/eal/linux/eal_hugepage_info.c             |   2 +-
 lib/eal/linux/eal_interrupts.c                |   2 +-
 lib/eal/windows/eal_memory.c                  |   2 +-
 lib/eal/x86/rte_cycles.c                      |  16 ++
 lib/ethdev/ethdev_driver.c                    |   4 +-
 lib/ethdev/ethdev_pci.h                       |   2 +-
 lib/ethdev/ethdev_private.c                   |   2 +-
 lib/ethdev/rte_class_eth.c                    |   2 +-
 lib/ethdev/rte_ethdev.c                       |  40 ++--
 lib/ethdev/rte_flow.c                         |   2 +-
 lib/ethdev/rte_flow.h                         |   2 +-
 lib/eventdev/eventdev_pmd.h                   |   6 +-
 lib/eventdev/rte_event_crypto_adapter.c       |  12 +-
 lib/eventdev/rte_event_dma_adapter.c          |  18 +-
 lib/eventdev/rte_event_eth_rx_adapter.c       |  40 ++--
 lib/eventdev/rte_event_eth_tx_adapter.c       |   2 +-
 lib/eventdev/rte_event_timer_adapter.c        |   4 +-
 lib/eventdev/rte_eventdev.c                   |  12 +-
 lib/gro/gro_tcp.h                             |   9 +
 lib/gro/gro_tcp4.c                            |  36 ++-
 lib/gro/gro_tcp_internal.h                    |   2 +-
 lib/gro/gro_vxlan_tcp4.c                      |   5 +-
 lib/hash/rte_cuckoo_hash.h                    |  11 -
 lib/lpm/rte_lpm6.c                            |   6 +-
 lib/mempool/rte_mempool_ops.c                 |   2 +-
 lib/meson.build                               |   2 +-
 lib/metrics/rte_metrics_telemetry.c           |   2 +-
 lib/mldev/rte_mldev.c                         | 102 ++++----
 lib/net/rte_ether.h                           |  14 ++
 lib/net/rte_ip.h                              |  15 +-
 lib/net/rte_net_crc.c                         |   6 +-
 lib/node/ethdev_rx.c                          |   4 +-
 lib/node/ip4_lookup.c                         |   2 +-
 lib/node/ip6_lookup.c                         |   2 +-
 lib/node/kernel_rx.c                          |   8 +-
 lib/node/kernel_tx.c                          |   4 +-
 lib/pipeline/rte_swx_pipeline_spec.c          |   4 +-
 lib/power/guest_channel.c                     |   2 +-
 lib/power/rte_power_pmd_mgmt.c                |   6 +-
 lib/rawdev/rte_rawdev.c                       |   2 +-
 lib/rcu/rte_rcu_qsbr.c                        |   4 +-
 lib/rcu/rte_rcu_qsbr.h                        |  16 +-
 lib/regexdev/rte_regexdev.c                   |   2 +-
 lib/stack/rte_stack.c                         |   8 +-
 lib/telemetry/telemetry.c                     |  11 +-
 lib/vhost/vdpa.c                              |  11 +-
 lib/vhost/vduse.c                             |   4 +
 lib/vhost/vhost_crypto.c                      |   6 +-
 lib/vhost/vhost_user.c                        |   2 +
 lib/vhost/virtio_net.c                        |  84 ++++---
 meson.build                                   |   6 +-
 176 files changed, 1731 insertions(+), 978 deletions(-)

--
2.34.1

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

* patch 'buildtools/cmdline: fix generated code for IP addresses' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'buildtools/cmdline: fix IP address initializer' " Xueming Li
                   ` (135 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Sunil Kumar Kori, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3cedd8b9e4617682700bc3a712edfb19964cd302 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 5 Dec 2023 11:31:04 +0000
Subject: [PATCH] buildtools/cmdline: fix generated code for IP addresses
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a78b8f11dc1093cd1dc25bb4bcdde63b5dccb4ac ]

The C code generated for the tokens for matching IP addresses in
commandlines was missing the "static" prefix present in the output for
the other data-types.

Fixes: 37666691e9ed ("buildtools: add a tool to generate cmdline boilerplate")

Reported-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
---
 buildtools/dpdk-cmdline-gen.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buildtools/dpdk-cmdline-gen.py b/buildtools/dpdk-cmdline-gen.py
index 49b03bee4a..bf1253d949 100755
--- a/buildtools/dpdk-cmdline-gen.py
+++ b/buildtools/dpdk-cmdline-gen.py
@@ -71,7 +71,7 @@ def process_command(lineno, tokens, comment):
         elif t_type in ["IP", "IP_ADDR", "IPADDR"]:
             result_struct.append(f"\tcmdline_ipaddr_t {t_name};")
             initializers.append(
-                f"cmdline_parse_token_ipaddr_t cmd_{name}_{t_name}_tok =\n"
+                f"static cmdline_parse_token_ipaddr_t cmd_{name}_{t_name}_tok =\n"
                 f"\tTOKEN_IPV4_INITIALIZER(struct cmd_{name}_result, {t_name});"
             )
         elif t_type.startswith("(") and t_type.endswith(")"):
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.152339106 +0800
+++ 0001-buildtools-cmdline-fix-generated-code-for-IP-address.patch	2024-03-05 17:39:30.633566488 +0800
@@ -1 +1 @@
-From a78b8f11dc1093cd1dc25bb4bcdde63b5dccb4ac Mon Sep 17 00:00:00 2001
+From 3cedd8b9e4617682700bc3a712edfb19964cd302 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a78b8f11dc1093cd1dc25bb4bcdde63b5dccb4ac ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'buildtools/cmdline: fix IP address initializer' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
  2024-03-05  9:45 ` patch 'buildtools/cmdline: fix generated code for IP addresses' has " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'hash: remove some dead code' " Xueming Li
                   ` (134 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Sunil Kumar Kori, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2c512fe65af23d7d217d8bc5c30617962dfab289 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 5 Dec 2023 14:51:08 +0000
Subject: [PATCH] buildtools/cmdline: fix IP address initializer
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7cd7850a888e5aa112062711107d9417570ca719 ]

The IP address type should be generic for both IPv4 and IPv6 and so use
the cmdline lib's TOKEN_IPADDR_INITIALIZER rather than
TOKEN_IPV4_INITIALIZER.

Fixes: 37666691e9ed ("buildtools: add a tool to generate cmdline boilerplate")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
---
 buildtools/dpdk-cmdline-gen.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buildtools/dpdk-cmdline-gen.py b/buildtools/dpdk-cmdline-gen.py
index bf1253d949..30d32ac183 100755
--- a/buildtools/dpdk-cmdline-gen.py
+++ b/buildtools/dpdk-cmdline-gen.py
@@ -72,7 +72,7 @@ def process_command(lineno, tokens, comment):
             result_struct.append(f"\tcmdline_ipaddr_t {t_name};")
             initializers.append(
                 f"static cmdline_parse_token_ipaddr_t cmd_{name}_{t_name}_tok =\n"
-                f"\tTOKEN_IPV4_INITIALIZER(struct cmd_{name}_result, {t_name});"
+                f"\tTOKEN_IPADDR_INITIALIZER(struct cmd_{name}_result, {t_name});"
             )
         elif t_type.startswith("(") and t_type.endswith(")"):
             result_struct.append(f"\tcmdline_fixed_string_t {t_name};")
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.174017506 +0800
+++ 0002-buildtools-cmdline-fix-IP-address-initializer.patch	2024-03-05 17:39:30.633566488 +0800
@@ -1 +1 @@
-From 7cd7850a888e5aa112062711107d9417570ca719 Mon Sep 17 00:00:00 2001
+From 2c512fe65af23d7d217d8bc5c30617962dfab289 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7cd7850a888e5aa112062711107d9417570ca719 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'hash: remove some dead code' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
  2024-03-05  9:45 ` patch 'buildtools/cmdline: fix generated code for IP addresses' has " Xueming Li
  2024-03-05  9:45 ` patch 'buildtools/cmdline: fix IP address initializer' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'regexdev: fix logtype register' " Xueming Li
                   ` (133 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: David Marchand
  Cc: Stephen Hemminger, Tyler Retzlaff, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dc0428a5e4734bc7fc73f2b8bf038813fd4b2e75 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 21 Nov 2023 16:24:23 +0100
Subject: [PATCH] hash: remove some dead code
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 25e3fe362b3ad7484750eb7134bfca8e3fab5703 ]

This macro is not used.

Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 lib/hash/rte_cuckoo_hash.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h
index f7afc4dd79..8ea793c66e 100644
--- a/lib/hash/rte_cuckoo_hash.h
+++ b/lib/hash/rte_cuckoo_hash.h
@@ -29,17 +29,6 @@
 #define RETURN_IF_TRUE(cond, retval)
 #endif

-#if defined(RTE_LIBRTE_HASH_DEBUG)
-#define ERR_IF_TRUE(cond, fmt, args...) do { \
-	if (cond) { \
-		RTE_LOG(ERR, HASH, fmt, ##args); \
-		return; \
-	} \
-} while (0)
-#else
-#define ERR_IF_TRUE(cond, fmt, args...)
-#endif
-
 #include <rte_hash_crc.h>
 #include <rte_jhash.h>

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.198667607 +0800
+++ 0003-hash-remove-some-dead-code.patch	2024-03-05 17:39:30.633566488 +0800
@@ -1 +1 @@
-From 25e3fe362b3ad7484750eb7134bfca8e3fab5703 Mon Sep 17 00:00:00 2001
+From dc0428a5e4734bc7fc73f2b8bf038813fd4b2e75 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 25e3fe362b3ad7484750eb7134bfca8e3fab5703 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'regexdev: fix logtype register' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (2 preceding siblings ...)
  2024-03-05  9:45 ` patch 'hash: remove some dead code' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'lib: use dedicated logtypes and macros' " Xueming Li
                   ` (132 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: David Marchand; +Cc: Stephen Hemminger, Tyler Retzlaff, Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f1e3dec4b49c184049d6cbefd3f5ebfecd0d7025 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 7 Dec 2023 14:50:41 +0100
Subject: [PATCH] regexdev: fix logtype register
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6351bdeb975dcf4b00ae1319f1d901eb65d4d4d3 ]

This library logtype was not initialized so its logs would end up under
the 0 logtype, iow, RTE_LOGTYPE_EAL.

Fixes: b25246beaefc ("regexdev: add core functions")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 lib/regexdev/rte_regexdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/regexdev/rte_regexdev.c b/lib/regexdev/rte_regexdev.c
index caec069182..d38a85eb0b 100644
--- a/lib/regexdev/rte_regexdev.c
+++ b/lib/regexdev/rte_regexdev.c
@@ -19,7 +19,7 @@ static struct {
 	struct rte_regexdev_data data[RTE_MAX_REGEXDEV_DEVS];
 } *rte_regexdev_shared_data;

-int rte_regexdev_logtype;
+RTE_LOG_REGISTER_DEFAULT(rte_regexdev_logtype, INFO);

 static uint16_t
 regexdev_find_free_dev(void)
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.222372108 +0800
+++ 0004-regexdev-fix-logtype-register.patch	2024-03-05 17:39:30.633566488 +0800
@@ -1 +1 @@
-From 6351bdeb975dcf4b00ae1319f1d901eb65d4d4d3 Mon Sep 17 00:00:00 2001
+From f1e3dec4b49c184049d6cbefd3f5ebfecd0d7025 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6351bdeb975dcf4b00ae1319f1d901eb65d4d4d3 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'lib: use dedicated logtypes and macros' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (3 preceding siblings ...)
  2024-03-05  9:45 ` patch 'regexdev: fix logtype register' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'lib: add newline in logs' " Xueming Li
                   ` (131 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: David Marchand
  Cc: Stephen Hemminger, Tyler Retzlaff, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e421bcd7085615de38888ea6e4e3e064fe835b93 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 6 Dec 2023 13:51:57 +0100
Subject: [PATCH] lib: use dedicated logtypes and macros
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c07da8e381ef860e972abd90400f134c64f3f77a ]

No printf!
When a dedicated log helper exists, use it.
And no usurpation please: a library should log under its logtype
(see the eventdev rx adapter update for example).

Note: the RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET macro is renamed for
consistency with the rest of eventdev (private) macros.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/cryptodev/rte_cryptodev.c           |  2 +-
 lib/ethdev/ethdev_driver.c              |  4 ++--
 lib/ethdev/ethdev_private.c             |  2 +-
 lib/ethdev/rte_class_eth.c              |  2 +-
 lib/eventdev/rte_event_dma_adapter.c    |  4 ++--
 lib/eventdev/rte_event_eth_rx_adapter.c | 12 ++++++------
 lib/eventdev/rte_eventdev.c             |  6 +++---
 lib/mempool/rte_mempool_ops.c           |  2 +-
 8 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index b258827734..d8769f0b8d 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -2682,7 +2682,7 @@ rte_cryptodev_driver_id_get(const char *name)
 	int driver_id = -1;

 	if (name == NULL) {
-		RTE_LOG(DEBUG, CRYPTODEV, "name pointer NULL");
+		CDEV_LOG_DEBUG("name pointer NULL");
 		return -1;
 	}

diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index fff4b7b4cd..55a9dcc565 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -487,7 +487,7 @@ rte_eth_devargs_parse(const char *dargs, struct rte_eth_devargs *eth_da)
 		pair = &args.pairs[i];
 		if (strcmp("representor", pair->key) == 0) {
 			if (eth_da->type != RTE_ETH_REPRESENTOR_NONE) {
-				RTE_LOG(ERR, EAL, "duplicated representor key: %s\n",
+				RTE_ETHDEV_LOG(ERR, "duplicated representor key: %s\n",
 					dargs);
 				result = -1;
 				goto parse_cleanup;
@@ -713,7 +713,7 @@ rte_eth_representor_id_get(uint16_t port_id,
 		if (info->ranges[i].controller != controller)
 			continue;
 		if (info->ranges[i].id_end < info->ranges[i].id_base) {
-			RTE_LOG(WARNING, EAL, "Port %hu invalid representor ID Range %u - %u, entry %d\n",
+			RTE_ETHDEV_LOG(WARNING, "Port %hu invalid representor ID Range %u - %u, entry %d\n",
 				port_id, info->ranges[i].id_base,
 				info->ranges[i].id_end, i);
 			continue;
diff --git a/lib/ethdev/ethdev_private.c b/lib/ethdev/ethdev_private.c
index e98b7188b0..0e1c7b23c1 100644
--- a/lib/ethdev/ethdev_private.c
+++ b/lib/ethdev/ethdev_private.c
@@ -182,7 +182,7 @@ rte_eth_devargs_parse_representor_ports(char *str, void *data)
 		RTE_DIM(eth_da->representor_ports));
 done:
 	if (str == NULL)
-		RTE_LOG(ERR, EAL, "wrong representor format: %s\n", str);
+		RTE_ETHDEV_LOG(ERR, "wrong representor format: %s\n", str);
 	return str == NULL ? -1 : 0;
 }

diff --git a/lib/ethdev/rte_class_eth.c b/lib/ethdev/rte_class_eth.c
index b61dae849d..311beb17cb 100644
--- a/lib/ethdev/rte_class_eth.c
+++ b/lib/ethdev/rte_class_eth.c
@@ -165,7 +165,7 @@ eth_dev_iterate(const void *start,
 			valid_keys = eth_params_keys;
 		kvargs = rte_kvargs_parse(str, valid_keys);
 		if (kvargs == NULL) {
-			RTE_LOG(ERR, EAL, "cannot parse argument list\n");
+			RTE_ETHDEV_LOG(ERR, "cannot parse argument list\n");
 			rte_errno = EINVAL;
 			return NULL;
 		}
diff --git a/lib/eventdev/rte_event_dma_adapter.c b/lib/eventdev/rte_event_dma_adapter.c
index af4b5ad388..cbf9405438 100644
--- a/lib/eventdev/rte_event_dma_adapter.c
+++ b/lib/eventdev/rte_event_dma_adapter.c
@@ -1046,7 +1046,7 @@ rte_event_dma_adapter_vchan_add(uint8_t id, int16_t dma_dev_id, uint16_t vchan,
 							sizeof(struct dma_vchan_info),
 							0, adapter->socket_id);
 			if (dev_info->vchanq == NULL) {
-				printf("Queue pair add not supported\n");
+				RTE_EDEV_LOG_ERR("Queue pair add not supported");
 				return -ENOMEM;
 			}
 		}
@@ -1057,7 +1057,7 @@ rte_event_dma_adapter_vchan_add(uint8_t id, int16_t dma_dev_id, uint16_t vchan,
 						sizeof(struct dma_vchan_info),
 						0, adapter->socket_id);
 			if (dev_info->tqmap == NULL) {
-				printf("tq pair add not supported\n");
+				RTE_EDEV_LOG_ERR("tq pair add not supported");
 				return -ENOMEM;
 			}
 		}
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index 6db03adf04..82ae31712d 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -314,9 +314,9 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
 	} \
 } while (0)

-#define RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(port_id, retval) do { \
+#define RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(port_id, retval) do { \
 	if (!rte_eth_dev_is_valid_port(port_id)) { \
-		RTE_ETHDEV_LOG(ERR, "Invalid port_id=%u\n", port_id); \
+		RTE_EDEV_LOG_ERR("Invalid port_id=%u", port_id); \
 		ret = retval; \
 		goto error; \
 	} \
@@ -3671,7 +3671,7 @@ handle_rxa_get_queue_conf(const char *cmd __rte_unused,

 	/* Get device ID from parameter string */
 	eth_dev_id = strtoul(token, NULL, 10);
-	RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);
+	RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);

 	token = strtok(NULL, ",");
 	RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, -1);
@@ -3743,7 +3743,7 @@ handle_rxa_get_queue_stats(const char *cmd __rte_unused,

 	/* Get device ID from parameter string */
 	eth_dev_id = strtoul(token, NULL, 10);
-	RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);
+	RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);

 	token = strtok(NULL, ",");
 	RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, -1);
@@ -3813,7 +3813,7 @@ handle_rxa_queue_stats_reset(const char *cmd __rte_unused,

 	/* Get device ID from parameter string */
 	eth_dev_id = strtoul(token, NULL, 10);
-	RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);
+	RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);

 	token = strtok(NULL, ",");
 	RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, -1);
@@ -3868,7 +3868,7 @@ handle_rxa_instance_get(const char *cmd __rte_unused,

 	/* Get device ID from parameter string */
 	eth_dev_id = strtoul(token, NULL, 10);
-	RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);
+	RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);

 	token = strtok(NULL, ",");
 	RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, -1);
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 0ca32d6721..ae50821a3f 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -1428,8 +1428,8 @@ rte_event_vector_pool_create(const char *name, unsigned int n,
 	int ret;

 	if (!nb_elem) {
-		RTE_LOG(ERR, EVENTDEV,
-			"Invalid number of elements=%d requested\n", nb_elem);
+		RTE_EDEV_LOG_ERR("Invalid number of elements=%d requested",
+			nb_elem);
 		rte_errno = EINVAL;
 		return NULL;
 	}
@@ -1444,7 +1444,7 @@ rte_event_vector_pool_create(const char *name, unsigned int n,
 	mp_ops_name = rte_mbuf_best_mempool_ops();
 	ret = rte_mempool_set_ops_byname(mp, mp_ops_name, NULL);
 	if (ret != 0) {
-		RTE_LOG(ERR, EVENTDEV, "error setting mempool handler\n");
+		RTE_EDEV_LOG_ERR("error setting mempool handler");
 		goto err;
 	}

diff --git a/lib/mempool/rte_mempool_ops.c b/lib/mempool/rte_mempool_ops.c
index ae1d288f27..e871de9ec9 100644
--- a/lib/mempool/rte_mempool_ops.c
+++ b/lib/mempool/rte_mempool_ops.c
@@ -46,7 +46,7 @@ rte_mempool_register_ops(const struct rte_mempool_ops *h)

 	if (strlen(h->name) >= sizeof(ops->name) - 1) {
 		rte_spinlock_unlock(&rte_mempool_ops_table.sl);
-		RTE_LOG(DEBUG, EAL, "%s(): mempool_ops <%s>: name too long\n",
+		RTE_LOG(DEBUG, MEMPOOL, "%s(): mempool_ops <%s>: name too long\n",
 				__func__, h->name);
 		rte_errno = EEXIST;
 		return -EEXIST;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.244469409 +0800
+++ 0005-lib-use-dedicated-logtypes-and-macros.patch	2024-03-05 17:39:30.643566489 +0800
@@ -1 +1 @@
-From c07da8e381ef860e972abd90400f134c64f3f77a Mon Sep 17 00:00:00 2001
+From e421bcd7085615de38888ea6e4e3e064fe835b93 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c07da8e381ef860e972abd90400f134c64f3f77a ]
@@ -14,2 +16,0 @@
-Cc: stable@dpdk.org
-
@@ -32 +33 @@
-index 25e3ec12d1..ead8c9a623 100644
+index b258827734..d8769f0b8d 100644
@@ -35 +36 @@
-@@ -2684,7 +2684,7 @@ rte_cryptodev_driver_id_get(const char *name)
+@@ -2682,7 +2682,7 @@ rte_cryptodev_driver_id_get(const char *name)

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

* patch 'lib: add newline in logs' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (4 preceding siblings ...)
  2024-03-05  9:45 ` patch 'lib: use dedicated logtypes and macros' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'lib: remove redundant newline from " Xueming Li
                   ` (130 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: David Marchand
  Cc: Stephen Hemminger, Tyler Retzlaff, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ec5e780f093f38199b82f76c0c6aef1155978f1d Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 6 Dec 2023 11:59:59 +0100
Subject: [PATCH] lib: add newline in logs
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8e2407e46782d43f9a1d83d72e279a4f86389bcd ]

Fix places leading to a log message not terminated with a newline.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/eal/common/eal_common_options.c |  2 +-
 lib/eal/linux/eal_hugepage_info.c   |  2 +-
 lib/eal/linux/eal_interrupts.c      |  2 +-
 lib/ethdev/ethdev_pci.h             |  2 +-
 lib/ethdev/rte_ethdev.c             | 40 ++++++++++++++---------------
 lib/lpm/rte_lpm6.c                  |  6 ++---
 lib/power/guest_channel.c           |  2 +-
 lib/power/rte_power_pmd_mgmt.c      |  6 ++---
 8 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
index a6d21f1cba..e9ba01fb89 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -2141,7 +2141,7 @@ rte_vect_set_max_simd_bitwidth(uint16_t bitwidth)
 	struct internal_config *internal_conf =
 		eal_get_internal_configuration();
 	if (internal_conf->max_simd_bitwidth.forced) {
-		RTE_LOG(NOTICE, EAL, "Cannot set max SIMD bitwidth - user runtime override enabled");
+		RTE_LOG(NOTICE, EAL, "Cannot set max SIMD bitwidth - user runtime override enabled\n");
 		return -EPERM;
 	}

diff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c
index 581d9dfc91..36a495fb1f 100644
--- a/lib/eal/linux/eal_hugepage_info.c
+++ b/lib/eal/linux/eal_hugepage_info.c
@@ -403,7 +403,7 @@ inspect_hugedir_cb(const struct walk_hugedir_data *whd)
 	struct stat st;

 	if (fstat(whd->file_fd, &st) < 0)
-		RTE_LOG(DEBUG, EAL, "%s(): stat(\"%s\") failed: %s",
+		RTE_LOG(DEBUG, EAL, "%s(): stat(\"%s\") failed: %s\n",
 				__func__, whd->file_name, strerror(errno));
 	else
 		(*total_size) += st.st_size;
diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index d4919dff45..eabac24992 100644
--- a/lib/eal/linux/eal_interrupts.c
+++ b/lib/eal/linux/eal_interrupts.c
@@ -1542,7 +1542,7 @@ rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd)
 		/* only check, initialization would be done in vdev driver.*/
 		if ((uint64_t)rte_intr_efd_counter_size_get(intr_handle) >
 		    sizeof(union rte_intr_read_buffer)) {
-			RTE_LOG(ERR, EAL, "the efd_counter_size is oversized");
+			RTE_LOG(ERR, EAL, "the efd_counter_size is oversized\n");
 			return -EINVAL;
 		}
 	} else {
diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h
index 320e3e0093..ddb559aa95 100644
--- a/lib/ethdev/ethdev_pci.h
+++ b/lib/ethdev/ethdev_pci.h
@@ -31,7 +31,7 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
 	struct rte_pci_device *pci_dev)
 {
 	if ((eth_dev == NULL) || (pci_dev == NULL)) {
-		RTE_ETHDEV_LOG(ERR, "NULL pointer eth_dev=%p pci_dev=%p",
+		RTE_ETHDEV_LOG(ERR, "NULL pointer eth_dev=%p pci_dev=%p\n",
 			(void *)eth_dev, (void *)pci_dev);
 		return;
 	}
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 3858983fcc..b9d99ece15 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -724,7 +724,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
 	uint16_t pid;

 	if (name == NULL) {
-		RTE_ETHDEV_LOG(ERR, "Cannot get port ID from NULL name");
+		RTE_ETHDEV_LOG(ERR, "Cannot get port ID from NULL name\n");
 		return -EINVAL;
 	}

@@ -2394,41 +2394,41 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 		nb_rx_desc = cap.max_nb_desc;
 	if (nb_rx_desc > cap.max_nb_desc) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for nb_rx_desc(=%hu), should be: <= %hu",
+			"Invalid value for nb_rx_desc(=%hu), should be: <= %hu\n",
 			nb_rx_desc, cap.max_nb_desc);
 		return -EINVAL;
 	}
 	if (conf->peer_count > cap.max_rx_2_tx) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for number of peers for Rx queue(=%u), should be: <= %hu",
+			"Invalid value for number of peers for Rx queue(=%u), should be: <= %hu\n",
 			conf->peer_count, cap.max_rx_2_tx);
 		return -EINVAL;
 	}
 	if (conf->use_locked_device_memory && !cap.rx_cap.locked_device_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use locked device memory for Rx queue, which is not supported");
+			"Attempt to use locked device memory for Rx queue, which is not supported\n");
 		return -EINVAL;
 	}
 	if (conf->use_rte_memory && !cap.rx_cap.rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use DPDK memory for Rx queue, which is not supported");
+			"Attempt to use DPDK memory for Rx queue, which is not supported\n");
 		return -EINVAL;
 	}
 	if (conf->use_locked_device_memory && conf->use_rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use mutually exclusive memory settings for Rx queue");
+			"Attempt to use mutually exclusive memory settings for Rx queue\n");
 		return -EINVAL;
 	}
 	if (conf->force_memory &&
 	    !conf->use_locked_device_memory &&
 	    !conf->use_rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to force Rx queue memory settings, but none is set");
+			"Attempt to force Rx queue memory settings, but none is set\n");
 		return -EINVAL;
 	}
 	if (conf->peer_count == 0) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for number of peers for Rx queue(=%u), should be: > 0",
+			"Invalid value for number of peers for Rx queue(=%u), should be: > 0\n",
 			conf->peer_count);
 		return -EINVAL;
 	}
@@ -2438,7 +2438,7 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 			count++;
 	}
 	if (count > cap.max_nb_queues) {
-		RTE_ETHDEV_LOG(ERR, "To many Rx hairpin queues max is %d",
+		RTE_ETHDEV_LOG(ERR, "To many Rx hairpin queues max is %d\n",
 		cap.max_nb_queues);
 		return -EINVAL;
 	}
@@ -2597,41 +2597,41 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 		nb_tx_desc = cap.max_nb_desc;
 	if (nb_tx_desc > cap.max_nb_desc) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for nb_tx_desc(=%hu), should be: <= %hu",
+			"Invalid value for nb_tx_desc(=%hu), should be: <= %hu\n",
 			nb_tx_desc, cap.max_nb_desc);
 		return -EINVAL;
 	}
 	if (conf->peer_count > cap.max_tx_2_rx) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for number of peers for Tx queue(=%u), should be: <= %hu",
+			"Invalid value for number of peers for Tx queue(=%u), should be: <= %hu\n",
 			conf->peer_count, cap.max_tx_2_rx);
 		return -EINVAL;
 	}
 	if (conf->use_locked_device_memory && !cap.tx_cap.locked_device_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use locked device memory for Tx queue, which is not supported");
+			"Attempt to use locked device memory for Tx queue, which is not supported\n");
 		return -EINVAL;
 	}
 	if (conf->use_rte_memory && !cap.tx_cap.rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use DPDK memory for Tx queue, which is not supported");
+			"Attempt to use DPDK memory for Tx queue, which is not supported\n");
 		return -EINVAL;
 	}
 	if (conf->use_locked_device_memory && conf->use_rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use mutually exclusive memory settings for Tx queue");
+			"Attempt to use mutually exclusive memory settings for Tx queue\n");
 		return -EINVAL;
 	}
 	if (conf->force_memory &&
 	    !conf->use_locked_device_memory &&
 	    !conf->use_rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to force Tx queue memory settings, but none is set");
+			"Attempt to force Tx queue memory settings, but none is set\n");
 		return -EINVAL;
 	}
 	if (conf->peer_count == 0) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for number of peers for Tx queue(=%u), should be: > 0",
+			"Invalid value for number of peers for Tx queue(=%u), should be: > 0\n",
 			conf->peer_count);
 		return -EINVAL;
 	}
@@ -2641,7 +2641,7 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 			count++;
 	}
 	if (count > cap.max_nb_queues) {
-		RTE_ETHDEV_LOG(ERR, "To many Tx hairpin queues max is %d",
+		RTE_ETHDEV_LOG(ERR, "To many Tx hairpin queues max is %d\n",
 		cap.max_nb_queues);
 		return -EINVAL;
 	}
@@ -6716,7 +6716,7 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id,
 	}

 	if (reassembly_capa == NULL) {
-		RTE_ETHDEV_LOG(ERR, "Cannot get reassembly capability to NULL");
+		RTE_ETHDEV_LOG(ERR, "Cannot get reassembly capability to NULL\n");
 		return -EINVAL;
 	}

@@ -6752,7 +6752,7 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id,
 	}

 	if (conf == NULL) {
-		RTE_ETHDEV_LOG(ERR, "Cannot get reassembly info to NULL");
+		RTE_ETHDEV_LOG(ERR, "Cannot get reassembly info to NULL\n");
 		return -EINVAL;
 	}

@@ -6780,7 +6780,7 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id,
 	if (dev->data->dev_configured == 0) {
 		RTE_ETHDEV_LOG(ERR,
 			"Device with port_id=%u is not configured.\n"
-			"Cannot set IP reassembly configuration",
+			"Cannot set IP reassembly configuration\n",
 			port_id);
 		return -EINVAL;
 	}
diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c
index 8d21aeddb8..79c75d8dfc 100644
--- a/lib/lpm/rte_lpm6.c
+++ b/lib/lpm/rte_lpm6.c
@@ -279,7 +279,7 @@ rte_lpm6_create(const char *name, int socket_id,

 	rules_tbl = rte_hash_create(&rule_hash_tbl_params);
 	if (rules_tbl == NULL) {
-		RTE_LOG(ERR, LPM, "LPM rules hash table allocation failed: %s (%d)",
+		RTE_LOG(ERR, LPM, "LPM rules hash table allocation failed: %s (%d)\n",
 				  rte_strerror(rte_errno), rte_errno);
 		goto fail_wo_unlock;
 	}
@@ -289,7 +289,7 @@ rte_lpm6_create(const char *name, int socket_id,
 			sizeof(uint32_t) * config->number_tbl8s,
 			RTE_CACHE_LINE_SIZE);
 	if (tbl8_pool == NULL) {
-		RTE_LOG(ERR, LPM, "LPM tbl8 pool allocation failed: %s (%d)",
+		RTE_LOG(ERR, LPM, "LPM tbl8 pool allocation failed: %s (%d)\n",
 				  rte_strerror(rte_errno), rte_errno);
 		rte_errno = ENOMEM;
 		goto fail_wo_unlock;
@@ -300,7 +300,7 @@ rte_lpm6_create(const char *name, int socket_id,
 			sizeof(struct rte_lpm_tbl8_hdr) * config->number_tbl8s,
 			RTE_CACHE_LINE_SIZE);
 	if (tbl8_hdrs == NULL) {
-		RTE_LOG(ERR, LPM, "LPM tbl8 headers allocation failed: %s (%d)",
+		RTE_LOG(ERR, LPM, "LPM tbl8 headers allocation failed: %s (%d)\n",
 				  rte_strerror(rte_errno), rte_errno);
 		rte_errno = ENOMEM;
 		goto fail_wo_unlock;
diff --git a/lib/power/guest_channel.c b/lib/power/guest_channel.c
index 7b2ae0b650..c964332011 100644
--- a/lib/power/guest_channel.c
+++ b/lib/power/guest_channel.c
@@ -89,7 +89,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
 	flags |= O_NONBLOCK;
 	if (fcntl(fd, F_SETFL, flags) < 0) {
 		RTE_LOG(ERR, GUEST_CHANNEL, "Failed on setting non-blocking mode for "
-				"file %s", fd_path);
+				"file %s\n", fd_path);
 		goto error;
 	}
 	/* QEMU needs a delay after connection */
diff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power/rte_power_pmd_mgmt.c
index 38f8384085..6f18ed0adf 100644
--- a/lib/power/rte_power_pmd_mgmt.c
+++ b/lib/power/rte_power_pmd_mgmt.c
@@ -686,7 +686,7 @@ int
 rte_power_pmd_mgmt_set_pause_duration(unsigned int duration)
 {
 	if (duration == 0) {
-		RTE_LOG(ERR, POWER, "Pause duration must be greater than 0, value unchanged");
+		RTE_LOG(ERR, POWER, "Pause duration must be greater than 0, value unchanged\n");
 		return -EINVAL;
 	}
 	pause_duration = duration;
@@ -709,7 +709,7 @@ rte_power_pmd_mgmt_set_scaling_freq_min(unsigned int lcore, unsigned int min)
 	}

 	if (min > scale_freq_max[lcore]) {
-		RTE_LOG(ERR, POWER, "Invalid min frequency: Cannot be greater than max frequency");
+		RTE_LOG(ERR, POWER, "Invalid min frequency: Cannot be greater than max frequency\n");
 		return -EINVAL;
 	}
 	scale_freq_min[lcore] = min;
@@ -729,7 +729,7 @@ rte_power_pmd_mgmt_set_scaling_freq_max(unsigned int lcore, unsigned int max)
 	if (max == 0)
 		max = UINT32_MAX;
 	if (max < scale_freq_min[lcore]) {
-		RTE_LOG(ERR, POWER, "Invalid max frequency: Cannot be less than min frequency");
+		RTE_LOG(ERR, POWER, "Invalid max frequency: Cannot be less than min frequency\n");
 		return -EINVAL;
 	}

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.290195810 +0800
+++ 0006-lib-add-newline-in-logs.patch	2024-03-05 17:39:30.653566489 +0800
@@ -1 +1 @@
-From 8e2407e46782d43f9a1d83d72e279a4f86389bcd Mon Sep 17 00:00:00 2001
+From ec5e780f093f38199b82f76c0c6aef1155978f1d Mon Sep 17 00:00:00 2001
@@ -4,0 +5 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
@@ -6 +7 @@
-Fix places leading to a log message not terminated with a newline.
+[ upstream commit 8e2407e46782d43f9a1d83d72e279a4f86389bcd ]
@@ -8 +9 @@
-Cc: stable@dpdk.org
+Fix places leading to a log message not terminated with a newline.
@@ -234 +235 @@
-index 873cc8bc26..24ce7dd022 100644
+index 8d21aeddb8..79c75d8dfc 100644
@@ -237 +238 @@
-@@ -280,7 +280,7 @@ rte_lpm6_create(const char *name, int socket_id,
+@@ -279,7 +279,7 @@ rte_lpm6_create(const char *name, int socket_id,
@@ -246 +247 @@
-@@ -290,7 +290,7 @@ rte_lpm6_create(const char *name, int socket_id,
+@@ -289,7 +289,7 @@ rte_lpm6_create(const char *name, int socket_id,
@@ -255 +256 @@
-@@ -301,7 +301,7 @@ rte_lpm6_create(const char *name, int socket_id,
+@@ -300,7 +300,7 @@ rte_lpm6_create(const char *name, int socket_id,
@@ -265 +266 @@
-index cc05347425..a6f2097d5b 100644
+index 7b2ae0b650..c964332011 100644
@@ -268 +269 @@
-@@ -90,7 +90,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
+@@ -89,7 +89,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)

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

* patch 'lib: remove redundant newline from logs' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (5 preceding siblings ...)
  2024-03-05  9:45 ` patch 'lib: add newline in logs' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'dma/dpaa2: fix logtype register' " Xueming Li
                   ` (129 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: David Marchand
  Cc: Stephen Hemminger, Chengwen Feng, Mattias Rönnblom, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fd6f07da946292d1637b7fd4ae42fd08d2c5bb84 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 17 Nov 2023 14:18:22 +0100
Subject: [PATCH] lib: remove redundant newline from logs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ae282b0611c33aa73a01ee6137d116155053b835 ]

Fix places where two newline characters may be logged.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 drivers/crypto/ipsec_mb/ipsec_mb_ops.c  |   2 +-
 lib/bbdev/rte_bbdev.c                   |   6 +-
 lib/cfgfile/rte_cfgfile.c               |  14 ++--
 lib/compressdev/rte_compressdev_pmd.c   |   4 +-
 lib/cryptodev/rte_cryptodev.c           |   2 +-
 lib/dispatcher/rte_dispatcher.c         |  12 +--
 lib/dmadev/rte_dmadev.c                 |   2 +-
 lib/eal/windows/eal_memory.c            |   2 +-
 lib/eventdev/eventdev_pmd.h             |   6 +-
 lib/eventdev/rte_event_crypto_adapter.c |  12 +--
 lib/eventdev/rte_event_dma_adapter.c    |  14 ++--
 lib/eventdev/rte_event_eth_rx_adapter.c |  28 +++----
 lib/eventdev/rte_event_eth_tx_adapter.c |   2 +-
 lib/eventdev/rte_event_timer_adapter.c  |   4 +-
 lib/eventdev/rte_eventdev.c             |   4 +-
 lib/metrics/rte_metrics_telemetry.c     |   2 +-
 lib/mldev/rte_mldev.c                   | 102 ++++++++++++------------
 lib/net/rte_net_crc.c                   |   6 +-
 lib/node/ethdev_rx.c                    |   4 +-
 lib/node/ip4_lookup.c                   |   2 +-
 lib/node/ip6_lookup.c                   |   2 +-
 lib/node/kernel_rx.c                    |   8 +-
 lib/node/kernel_tx.c                    |   4 +-
 lib/rcu/rte_rcu_qsbr.c                  |   4 +-
 lib/rcu/rte_rcu_qsbr.h                  |   8 +-
 lib/stack/rte_stack.c                   |   8 +-
 lib/vhost/vhost_crypto.c                |   6 +-
 27 files changed, 135 insertions(+), 135 deletions(-)

diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
index 30f919cd40..2a5599b7d8 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
@@ -406,7 +406,7 @@ ipsec_mb_ipc_request(const struct rte_mp_msg *mp_msg, const void *peer)
 		resp_param->result = ipsec_mb_qp_release(dev, qp_id);
 		break;
 	default:
-		CDEV_LOG_ERR("invalid mp request type\n");
+		CDEV_LOG_ERR("invalid mp request type");
 	}

 out:
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index cfebea09c7..e09bb97abb 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -1106,12 +1106,12 @@ rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op,

 	intr_handle = dev->intr_handle;
 	if (intr_handle == NULL) {
-		rte_bbdev_log(ERR, "Device %u intr handle unset\n", dev_id);
+		rte_bbdev_log(ERR, "Device %u intr handle unset", dev_id);
 		return -ENOTSUP;
 	}

 	if (queue_id >= RTE_MAX_RXTX_INTR_VEC_ID) {
-		rte_bbdev_log(ERR, "Device %u queue_id %u is too big\n",
+		rte_bbdev_log(ERR, "Device %u queue_id %u is too big",
 				dev_id, queue_id);
 		return -ENOTSUP;
 	}
@@ -1120,7 +1120,7 @@ rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op,
 	ret = rte_intr_rx_ctl(intr_handle, epfd, op, vec, data);
 	if (ret && (ret != -EEXIST)) {
 		rte_bbdev_log(ERR,
-				"dev %u q %u int ctl error op %d epfd %d vec %u\n",
+				"dev %u q %u int ctl error op %d epfd %d vec %u",
 				dev_id, queue_id, op, epfd, vec);
 		return ret;
 	}
diff --git a/lib/cfgfile/rte_cfgfile.c b/lib/cfgfile/rte_cfgfile.c
index eefba6e408..2f9cc0722a 100644
--- a/lib/cfgfile/rte_cfgfile.c
+++ b/lib/cfgfile/rte_cfgfile.c
@@ -137,7 +137,7 @@ rte_cfgfile_check_params(const struct rte_cfgfile_parameters *params)
 	unsigned int i;

 	if (!params) {
-		CFG_LOG(ERR, "missing cfgfile parameters\n");
+		CFG_LOG(ERR, "missing cfgfile parameters");
 		return -EINVAL;
 	}

@@ -150,7 +150,7 @@ rte_cfgfile_check_params(const struct rte_cfgfile_parameters *params)
 	}

 	if (valid_comment == 0)	{
-		CFG_LOG(ERR, "invalid comment characters %c\n",
+		CFG_LOG(ERR, "invalid comment characters %c",
 		       params->comment_character);
 		return -ENOTSUP;
 	}
@@ -188,7 +188,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
 		lineno++;
 		if ((len >= sizeof(buffer) - 1) && (buffer[len-1] != '\n')) {
 			CFG_LOG(ERR, " line %d - no \\n found on string. "
-					"Check if line too long\n", lineno);
+					"Check if line too long", lineno);
 			goto error1;
 		}
 		/* skip parsing if comment character found */
@@ -209,7 +209,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
 			char *end = memchr(buffer, ']', len);
 			if (end == NULL) {
 				CFG_LOG(ERR,
-					"line %d - no terminating ']' character found\n",
+					"line %d - no terminating ']' character found",
 					lineno);
 				goto error1;
 			}
@@ -225,7 +225,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
 			split[1] = memchr(buffer, '=', len);
 			if (split[1] == NULL) {
 				CFG_LOG(ERR,
-					"line %d - no '=' character found\n",
+					"line %d - no '=' character found",
 					lineno);
 				goto error1;
 			}
@@ -249,7 +249,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
 			if (!(flags & CFG_FLAG_EMPTY_VALUES) &&
 					(*split[1] == '\0')) {
 				CFG_LOG(ERR,
-					"line %d - cannot use empty values\n",
+					"line %d - cannot use empty values",
 					lineno);
 				goto error1;
 			}
@@ -414,7 +414,7 @@ int rte_cfgfile_set_entry(struct rte_cfgfile *cfg, const char *sectionname,
 			return 0;
 		}

-	CFG_LOG(ERR, "entry name doesn't exist\n");
+	CFG_LOG(ERR, "entry name doesn't exist");
 	return -EINVAL;
 }

diff --git a/lib/compressdev/rte_compressdev_pmd.c b/lib/compressdev/rte_compressdev_pmd.c
index 156bccd972..762b44f03e 100644
--- a/lib/compressdev/rte_compressdev_pmd.c
+++ b/lib/compressdev/rte_compressdev_pmd.c
@@ -100,12 +100,12 @@ rte_compressdev_pmd_create(const char *name,
 	struct rte_compressdev *compressdev;

 	if (params->name[0] != '\0') {
-		COMPRESSDEV_LOG(INFO, "User specified device name = %s\n",
+		COMPRESSDEV_LOG(INFO, "User specified device name = %s",
 				params->name);
 		name = params->name;
 	}

-	COMPRESSDEV_LOG(INFO, "Creating compressdev %s\n", name);
+	COMPRESSDEV_LOG(INFO, "Creating compressdev %s", name);

 	COMPRESSDEV_LOG(INFO, "Init parameters - name: %s, socket id: %d",
 			name, params->socket_id);
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index d8769f0b8d..a3a8fc9c07 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -2072,7 +2072,7 @@ rte_cryptodev_sym_session_create(uint8_t dev_id,
 	}

 	if (xforms == NULL) {
-		CDEV_LOG_ERR("Invalid xform\n");
+		CDEV_LOG_ERR("Invalid xform");
 		rte_errno = EINVAL;
 		return NULL;
 	}
diff --git a/lib/dispatcher/rte_dispatcher.c b/lib/dispatcher/rte_dispatcher.c
index 10d02edde9..95dd41b818 100644
--- a/lib/dispatcher/rte_dispatcher.c
+++ b/lib/dispatcher/rte_dispatcher.c
@@ -246,7 +246,7 @@ evd_service_register(struct rte_dispatcher *dispatcher)
 	rc = rte_service_component_register(&service, &dispatcher->service_id);
 	if (rc != 0)
 		RTE_EDEV_LOG_ERR("Registration of dispatcher service "
-				 "%s failed with error code %d\n",
+				 "%s failed with error code %d",
 				 service.name, rc);

 	return rc;
@@ -260,7 +260,7 @@ evd_service_unregister(struct rte_dispatcher *dispatcher)
 	rc = rte_service_component_unregister(dispatcher->service_id);
 	if (rc != 0)
 		RTE_EDEV_LOG_ERR("Unregistration of dispatcher service "
-				 "failed with error code %d\n", rc);
+				 "failed with error code %d", rc);

 	return rc;
 }
@@ -279,7 +279,7 @@ rte_dispatcher_create(uint8_t event_dev_id)
 				  RTE_CACHE_LINE_SIZE, socket_id);

 	if (dispatcher == NULL) {
-		RTE_EDEV_LOG_ERR("Unable to allocate memory for dispatcher\n");
+		RTE_EDEV_LOG_ERR("Unable to allocate memory for dispatcher");
 		rte_errno = ENOMEM;
 		return NULL;
 	}
@@ -483,7 +483,7 @@ evd_lcore_uninstall_handler(struct rte_dispatcher_lcore *lcore,
 	unreg_handler = evd_lcore_get_handler_by_id(lcore, handler_id);

 	if (unreg_handler == NULL) {
-		RTE_EDEV_LOG_ERR("Invalid handler id %d\n", handler_id);
+		RTE_EDEV_LOG_ERR("Invalid handler id %d", handler_id);
 		return -EINVAL;
 	}

@@ -602,7 +602,7 @@ rte_dispatcher_finalize_unregister(struct rte_dispatcher *dispatcher,
 	unreg_finalizer = evd_get_finalizer_by_id(dispatcher, finalizer_id);

 	if (unreg_finalizer == NULL) {
-		RTE_EDEV_LOG_ERR("Invalid finalizer id %d\n", finalizer_id);
+		RTE_EDEV_LOG_ERR("Invalid finalizer id %d", finalizer_id);
 		return -EINVAL;
 	}

@@ -636,7 +636,7 @@ evd_set_service_runstate(struct rte_dispatcher *dispatcher, int state)
 	 */
 	if (rc != 0)
 		RTE_EDEV_LOG_ERR("Unexpected error %d occurred while setting "
-				 "service component run state to %d\n", rc,
+				 "service component run state to %d", rc,
 				 state);

 	RTE_VERIFY(rc == 0);
diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c
index 4e5e420c82..009a21849a 100644
--- a/lib/dmadev/rte_dmadev.c
+++ b/lib/dmadev/rte_dmadev.c
@@ -726,7 +726,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
 		return -EINVAL;

 	if (vchan >= dev->data->dev_conf.nb_vchans) {
-		RTE_DMA_LOG(ERR, "Device %u vchan %u out of range\n", dev_id, vchan);
+		RTE_DMA_LOG(ERR, "Device %u vchan %u out of range", dev_id, vchan);
 		return -EINVAL;
 	}

diff --git a/lib/eal/windows/eal_memory.c b/lib/eal/windows/eal_memory.c
index 31410a41fd..fd39155163 100644
--- a/lib/eal/windows/eal_memory.c
+++ b/lib/eal/windows/eal_memory.c
@@ -110,7 +110,7 @@ eal_mem_win32api_init(void)
 	VirtualAlloc2_ptr = (VirtualAlloc2_type)(
 		(void *)GetProcAddress(library, function));
 	if (VirtualAlloc2_ptr == NULL) {
-		RTE_LOG_WIN32_ERR("GetProcAddress(\"%s\", \"%s\")\n",
+		RTE_LOG_WIN32_ERR("GetProcAddress(\"%s\", \"%s\")",
 			library_name, function);

 		/* Contrary to the docs, Server 2016 is not supported. */
diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 30bd90085c..2ec5aec0a8 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -49,14 +49,14 @@ extern "C" {
 /* Macros to check for valid device */
 #define RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, retval) do { \
 	if (!rte_event_pmd_is_valid_dev((dev_id))) { \
-		RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
+		RTE_EDEV_LOG_ERR("Invalid dev_id=%d", dev_id); \
 		return retval; \
 	} \
 } while (0)

 #define RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, errno, retval) do { \
 	if (!rte_event_pmd_is_valid_dev((dev_id))) { \
-		RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
+		RTE_EDEV_LOG_ERR("Invalid dev_id=%d", dev_id); \
 		rte_errno = errno; \
 		return retval; \
 	} \
@@ -64,7 +64,7 @@ extern "C" {

 #define RTE_EVENTDEV_VALID_DEVID_OR_RET(dev_id) do { \
 	if (!rte_event_pmd_is_valid_dev((dev_id))) { \
-		RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
+		RTE_EDEV_LOG_ERR("Invalid dev_id=%d", dev_id); \
 		return; \
 	} \
 } while (0)
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 1b435c9f0e..d46595d190 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -133,7 +133,7 @@ static struct event_crypto_adapter **event_crypto_adapter;
 /* Macros to check for valid adapter */
 #define EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) do { \
 	if (!eca_valid_id(id)) { \
-		RTE_EDEV_LOG_ERR("Invalid crypto adapter id = %d\n", id); \
+		RTE_EDEV_LOG_ERR("Invalid crypto adapter id = %d", id); \
 		return retval; \
 	} \
 } while (0)
@@ -309,7 +309,7 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,

 	ret = rte_event_dev_configure(dev_id, &dev_conf);
 	if (ret) {
-		RTE_EDEV_LOG_ERR("failed to configure event dev %u\n", dev_id);
+		RTE_EDEV_LOG_ERR("failed to configure event dev %u", dev_id);
 		if (started) {
 			if (rte_event_dev_start(dev_id))
 				return -EIO;
@@ -319,7 +319,7 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,

 	ret = rte_event_port_setup(dev_id, port_id, port_conf);
 	if (ret) {
-		RTE_EDEV_LOG_ERR("failed to setup event port %u\n", port_id);
+		RTE_EDEV_LOG_ERR("failed to setup event port %u", port_id);
 		return ret;
 	}

@@ -391,7 +391,7 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
 					sizeof(struct crypto_device_info), 0,
 					socket_id);
 	if (adapter->cdevs == NULL) {
-		RTE_EDEV_LOG_ERR("Failed to get mem for crypto devices\n");
+		RTE_EDEV_LOG_ERR("Failed to get mem for crypto devices");
 		eca_circular_buffer_free(&adapter->ebuf);
 		rte_free(adapter);
 		return -ENOMEM;
@@ -1403,7 +1403,7 @@ rte_event_crypto_adapter_runtime_params_set(uint8_t id,
 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);

 	if (params == NULL) {
-		RTE_EDEV_LOG_ERR("params pointer is NULL\n");
+		RTE_EDEV_LOG_ERR("params pointer is NULL");
 		return -EINVAL;
 	}

@@ -1436,7 +1436,7 @@ rte_event_crypto_adapter_runtime_params_get(uint8_t id,
 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);

 	if (params == NULL) {
-		RTE_EDEV_LOG_ERR("params pointer is NULL\n");
+		RTE_EDEV_LOG_ERR("params pointer is NULL");
 		return -EINVAL;
 	}

diff --git a/lib/eventdev/rte_event_dma_adapter.c b/lib/eventdev/rte_event_dma_adapter.c
index cbf9405438..4196164305 100644
--- a/lib/eventdev/rte_event_dma_adapter.c
+++ b/lib/eventdev/rte_event_dma_adapter.c
@@ -20,7 +20,7 @@
 #define EVENT_DMA_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) \
 	do { \
 		if (!edma_adapter_valid_id(id)) { \
-			RTE_EDEV_LOG_ERR("Invalid DMA adapter id = %d\n", id); \
+			RTE_EDEV_LOG_ERR("Invalid DMA adapter id = %d", id); \
 			return retval; \
 		} \
 	} while (0)
@@ -313,7 +313,7 @@ edma_default_config_cb(uint8_t id, uint8_t evdev_id, struct rte_event_dma_adapte

 	ret = rte_event_dev_configure(evdev_id, &dev_conf);
 	if (ret) {
-		RTE_EDEV_LOG_ERR("Failed to configure event dev %u\n", evdev_id);
+		RTE_EDEV_LOG_ERR("Failed to configure event dev %u", evdev_id);
 		if (started) {
 			if (rte_event_dev_start(evdev_id))
 				return -EIO;
@@ -323,7 +323,7 @@ edma_default_config_cb(uint8_t id, uint8_t evdev_id, struct rte_event_dma_adapte

 	ret = rte_event_port_setup(evdev_id, port_id, port_conf);
 	if (ret) {
-		RTE_EDEV_LOG_ERR("Failed to setup event port %u\n", port_id);
+		RTE_EDEV_LOG_ERR("Failed to setup event port %u", port_id);
 		return ret;
 	}

@@ -407,7 +407,7 @@ rte_event_dma_adapter_create_ext(uint8_t id, uint8_t evdev_id,
 					       num_dma_dev * sizeof(struct dma_device_info), 0,
 					       socket_id);
 	if (adapter->dma_devs == NULL) {
-		RTE_EDEV_LOG_ERR("Failed to get memory for DMA devices\n");
+		RTE_EDEV_LOG_ERR("Failed to get memory for DMA devices");
 		edma_circular_buffer_free(&adapter->ebuf);
 		rte_free(adapter);
 		return -ENOMEM;
@@ -417,7 +417,7 @@ rte_event_dma_adapter_create_ext(uint8_t id, uint8_t evdev_id,
 	for (i = 0; i < num_dma_dev; i++) {
 		ret = rte_dma_info_get(i, &info);
 		if (ret) {
-			RTE_EDEV_LOG_ERR("Failed to get dma device info\n");
+			RTE_EDEV_LOG_ERR("Failed to get dma device info");
 			edma_circular_buffer_free(&adapter->ebuf);
 			rte_free(adapter);
 			return ret;
@@ -1297,7 +1297,7 @@ rte_event_dma_adapter_runtime_params_set(uint8_t id,
 	EVENT_DMA_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);

 	if (params == NULL) {
-		RTE_EDEV_LOG_ERR("params pointer is NULL\n");
+		RTE_EDEV_LOG_ERR("params pointer is NULL");
 		return -EINVAL;
 	}

@@ -1326,7 +1326,7 @@ rte_event_dma_adapter_runtime_params_get(uint8_t id,
 	EVENT_DMA_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);

 	if (params == NULL) {
-		RTE_EDEV_LOG_ERR("params pointer is NULL\n");
+		RTE_EDEV_LOG_ERR("params pointer is NULL");
 		return -EINVAL;
 	}

diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index 82ae31712d..1b83a55b5c 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -293,14 +293,14 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,

 #define RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) do { \
 	if (!rxa_validate_id(id)) { \
-		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d\n", id); \
+		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d", id); \
 		return retval; \
 	} \
 } while (0)

 #define RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_GOTO_ERR_RET(id, retval) do { \
 	if (!rxa_validate_id(id)) { \
-		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d\n", id); \
+		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d", id); \
 		ret = retval; \
 		goto error; \
 	} \
@@ -308,7 +308,7 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,

 #define RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, retval) do { \
 	if ((token) == NULL || strlen(token) == 0 || !isdigit(*token)) { \
-		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter token\n"); \
+		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter token"); \
 		ret = retval; \
 		goto error; \
 	} \
@@ -1540,7 +1540,7 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,

 	ret = rte_event_dev_configure(dev_id, &dev_conf);
 	if (ret) {
-		RTE_EDEV_LOG_ERR("failed to configure event dev %u\n",
+		RTE_EDEV_LOG_ERR("failed to configure event dev %u",
 						dev_id);
 		if (started) {
 			if (rte_event_dev_start(dev_id))
@@ -1551,7 +1551,7 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,

 	ret = rte_event_port_setup(dev_id, port_id, port_conf);
 	if (ret) {
-		RTE_EDEV_LOG_ERR("failed to setup event port %u\n",
+		RTE_EDEV_LOG_ERR("failed to setup event port %u",
 					port_id);
 		return ret;
 	}
@@ -1628,7 +1628,7 @@ rxa_create_intr_thread(struct event_eth_rx_adapter *rx_adapter)
 	if (!err)
 		return 0;

-	RTE_EDEV_LOG_ERR("Failed to create interrupt thread err = %d\n", err);
+	RTE_EDEV_LOG_ERR("Failed to create interrupt thread err = %d", err);
 	rte_free(rx_adapter->epoll_events);
 error:
 	rte_ring_free(rx_adapter->intr_ring);
@@ -1644,12 +1644,12 @@ rxa_destroy_intr_thread(struct event_eth_rx_adapter *rx_adapter)

 	err = pthread_cancel((pthread_t)rx_adapter->rx_intr_thread.opaque_id);
 	if (err)
-		RTE_EDEV_LOG_ERR("Can't cancel interrupt thread err = %d\n",
+		RTE_EDEV_LOG_ERR("Can't cancel interrupt thread err = %d",
 				err);

 	err = rte_thread_join(rx_adapter->rx_intr_thread, NULL);
 	if (err)
-		RTE_EDEV_LOG_ERR("Can't join interrupt thread err = %d\n", err);
+		RTE_EDEV_LOG_ERR("Can't join interrupt thread err = %d", err);

 	rte_free(rx_adapter->epoll_events);
 	rte_ring_free(rx_adapter->intr_ring);
@@ -1915,7 +1915,7 @@ rxa_init_service(struct event_eth_rx_adapter *rx_adapter, uint8_t id)
 	if (rte_mbuf_dyn_rx_timestamp_register(
 			&event_eth_rx_timestamp_dynfield_offset,
 			&event_eth_rx_timestamp_dynflag) != 0) {
-		RTE_EDEV_LOG_ERR("Error registering timestamp field in mbuf\n");
+		RTE_EDEV_LOG_ERR("Error registering timestamp field in mbuf");
 		return -rte_errno;
 	}

@@ -2445,7 +2445,7 @@ rxa_create(uint8_t id, uint8_t dev_id,
 			    RTE_DIM(default_rss_key));

 	if (rx_adapter->eth_devices == NULL) {
-		RTE_EDEV_LOG_ERR("failed to get mem for eth devices\n");
+		RTE_EDEV_LOG_ERR("failed to get mem for eth devices");
 		rte_free(rx_adapter);
 		return -ENOMEM;
 	}
@@ -2497,12 +2497,12 @@ rxa_config_params_validate(struct rte_event_eth_rx_adapter_params *rxa_params,
 		return 0;
 	} else if (!rxa_params->use_queue_event_buf &&
 		    rxa_params->event_buf_size == 0) {
-		RTE_EDEV_LOG_ERR("event buffer size can't be zero\n");
+		RTE_EDEV_LOG_ERR("event buffer size can't be zero");
 		return -EINVAL;
 	} else if (rxa_params->use_queue_event_buf &&
 		   rxa_params->event_buf_size != 0) {
 		RTE_EDEV_LOG_ERR("event buffer size needs to be configured "
-				 "as part of queue add\n");
+				 "as part of queue add");
 		return -EINVAL;
 	}

@@ -3597,7 +3597,7 @@ handle_rxa_stats(const char *cmd __rte_unused,
 	/* Get Rx adapter stats */
 	if (rte_event_eth_rx_adapter_stats_get(rx_adapter_id,
 					       &rx_adptr_stats)) {
-		RTE_EDEV_LOG_ERR("Failed to get Rx adapter stats\n");
+		RTE_EDEV_LOG_ERR("Failed to get Rx adapter stats");
 		return -1;
 	}

@@ -3636,7 +3636,7 @@ handle_rxa_stats_reset(const char *cmd __rte_unused,

 	/* Reset Rx adapter stats */
 	if (rte_event_eth_rx_adapter_stats_reset(rx_adapter_id)) {
-		RTE_EDEV_LOG_ERR("Failed to reset Rx adapter stats\n");
+		RTE_EDEV_LOG_ERR("Failed to reset Rx adapter stats");
 		return -1;
 	}

diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index 360d5caf6a..56435be991 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -334,7 +334,7 @@ txa_service_conf_cb(uint8_t __rte_unused id, uint8_t dev_id,

 	ret = rte_event_port_setup(dev_id, port_id, pc);
 	if (ret) {
-		RTE_EDEV_LOG_ERR("failed to setup event port %u\n",
+		RTE_EDEV_LOG_ERR("failed to setup event port %u",
 					port_id);
 		if (started) {
 			if (rte_event_dev_start(dev_id))
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index 27466707bc..3f22e85173 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -106,7 +106,7 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,

 	ret = rte_event_dev_configure(dev_id, &dev_conf);
 	if (ret < 0) {
-		EVTIM_LOG_ERR("failed to configure event dev %u\n", dev_id);
+		EVTIM_LOG_ERR("failed to configure event dev %u", dev_id);
 		if (started)
 			if (rte_event_dev_start(dev_id))
 				return -EIO;
@@ -116,7 +116,7 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,

 	ret = rte_event_port_setup(dev_id, port_id, port_conf);
 	if (ret < 0) {
-		EVTIM_LOG_ERR("failed to setup event port %u on event dev %u\n",
+		EVTIM_LOG_ERR("failed to setup event port %u on event dev %u",
 			      port_id, dev_id);
 		return ret;
 	}
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index ae50821a3f..157752868d 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -1007,13 +1007,13 @@ rte_event_port_profile_links_set(uint8_t dev_id, uint8_t port_id, const uint8_t
 	}

 	if (*dev->dev_ops->port_link == NULL) {
-		RTE_EDEV_LOG_ERR("Function not supported\n");
+		RTE_EDEV_LOG_ERR("Function not supported");
 		rte_errno = ENOTSUP;
 		return 0;
 	}

 	if (profile_id && *dev->dev_ops->port_link_profile == NULL) {
-		RTE_EDEV_LOG_ERR("Function not supported\n");
+		RTE_EDEV_LOG_ERR("Function not supported");
 		rte_errno = ENOTSUP;
 		return 0;
 	}
diff --git a/lib/metrics/rte_metrics_telemetry.c b/lib/metrics/rte_metrics_telemetry.c
index 5be21b2e86..1d133e1f8c 100644
--- a/lib/metrics/rte_metrics_telemetry.c
+++ b/lib/metrics/rte_metrics_telemetry.c
@@ -363,7 +363,7 @@ rte_metrics_tel_stat_names_to_ids(const char * const *stat_names,
 			}
 		}
 		if (j == num_metrics) {
-			METRICS_LOG_WARN("Invalid stat name %s\n",
+			METRICS_LOG_WARN("Invalid stat name %s",
 					stat_names[i]);
 			free(names);
 			return -EINVAL;
diff --git a/lib/mldev/rte_mldev.c b/lib/mldev/rte_mldev.c
index cc5f2e0cc6..196b1850e6 100644
--- a/lib/mldev/rte_mldev.c
+++ b/lib/mldev/rte_mldev.c
@@ -159,7 +159,7 @@ int
 rte_ml_dev_init(size_t dev_max)
 {
 	if (dev_max == 0 || dev_max > INT16_MAX) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_max = %zu (> %d)\n", dev_max, INT16_MAX);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_max = %zu (> %d)", dev_max, INT16_MAX);
 		rte_errno = EINVAL;
 		return -rte_errno;
 	}
@@ -217,7 +217,7 @@ rte_ml_dev_socket_id(int16_t dev_id)
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -232,7 +232,7 @@ rte_ml_dev_info_get(int16_t dev_id, struct rte_ml_dev_info *dev_info)
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -241,7 +241,7 @@ rte_ml_dev_info_get(int16_t dev_id, struct rte_ml_dev_info *dev_info)
 		return -ENOTSUP;

 	if (dev_info == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, dev_info cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, dev_info cannot be NULL", dev_id);
 		return -EINVAL;
 	}
 	memset(dev_info, 0, sizeof(struct rte_ml_dev_info));
@@ -257,7 +257,7 @@ rte_ml_dev_configure(int16_t dev_id, const struct rte_ml_dev_config *config)
 	int ret;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -271,7 +271,7 @@ rte_ml_dev_configure(int16_t dev_id, const struct rte_ml_dev_config *config)
 	}

 	if (config == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, config cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, config cannot be NULL", dev_id);
 		return -EINVAL;
 	}

@@ -280,7 +280,7 @@ rte_ml_dev_configure(int16_t dev_id, const struct rte_ml_dev_config *config)
 		return ret;

 	if (config->nb_queue_pairs > dev_info.max_queue_pairs) {
-		RTE_MLDEV_LOG(ERR, "Device %d num of queues %u > %u\n", dev_id,
+		RTE_MLDEV_LOG(ERR, "Device %d num of queues %u > %u", dev_id,
 			      config->nb_queue_pairs, dev_info.max_queue_pairs);
 		return -EINVAL;
 	}
@@ -294,7 +294,7 @@ rte_ml_dev_close(int16_t dev_id)
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -318,7 +318,7 @@ rte_ml_dev_start(int16_t dev_id)
 	int ret;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -345,7 +345,7 @@ rte_ml_dev_stop(int16_t dev_id)
 	int ret;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -372,7 +372,7 @@ rte_ml_dev_queue_pair_setup(int16_t dev_id, uint16_t queue_pair_id,
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -386,7 +386,7 @@ rte_ml_dev_queue_pair_setup(int16_t dev_id, uint16_t queue_pair_id,
 	}

 	if (qp_conf == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, qp_conf cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, qp_conf cannot be NULL", dev_id);
 		return -EINVAL;
 	}

@@ -404,7 +404,7 @@ rte_ml_dev_stats_get(int16_t dev_id, struct rte_ml_dev_stats *stats)
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -413,7 +413,7 @@ rte_ml_dev_stats_get(int16_t dev_id, struct rte_ml_dev_stats *stats)
 		return -ENOTSUP;

 	if (stats == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, stats cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, stats cannot be NULL", dev_id);
 		return -EINVAL;
 	}
 	memset(stats, 0, sizeof(struct rte_ml_dev_stats));
@@ -427,7 +427,7 @@ rte_ml_dev_stats_reset(int16_t dev_id)
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return;
 	}

@@ -445,7 +445,7 @@ rte_ml_dev_xstats_names_get(int16_t dev_id, enum rte_ml_dev_xstats_mode mode, in
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -462,7 +462,7 @@ rte_ml_dev_xstats_by_name_get(int16_t dev_id, const char *name, uint16_t *stat_i
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -471,12 +471,12 @@ rte_ml_dev_xstats_by_name_get(int16_t dev_id, const char *name, uint16_t *stat_i
 		return -ENOTSUP;

 	if (name == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, name cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, name cannot be NULL", dev_id);
 		return -EINVAL;
 	}

 	if (value == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, value cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, value cannot be NULL", dev_id);
 		return -EINVAL;
 	}

@@ -490,7 +490,7 @@ rte_ml_dev_xstats_get(int16_t dev_id, enum rte_ml_dev_xstats_mode mode, int32_t
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -499,12 +499,12 @@ rte_ml_dev_xstats_get(int16_t dev_id, enum rte_ml_dev_xstats_mode mode, int32_t
 		return -ENOTSUP;

 	if (stat_ids == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, stat_ids cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, stat_ids cannot be NULL", dev_id);
 		return -EINVAL;
 	}

 	if (values == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, values cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, values cannot be NULL", dev_id);
 		return -EINVAL;
 	}

@@ -518,7 +518,7 @@ rte_ml_dev_xstats_reset(int16_t dev_id, enum rte_ml_dev_xstats_mode mode, int32_
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -535,7 +535,7 @@ rte_ml_dev_dump(int16_t dev_id, FILE *fd)
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -544,7 +544,7 @@ rte_ml_dev_dump(int16_t dev_id, FILE *fd)
 		return -ENOTSUP;

 	if (fd == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, file descriptor cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, file descriptor cannot be NULL", dev_id);
 		return -EINVAL;
 	}

@@ -557,7 +557,7 @@ rte_ml_dev_selftest(int16_t dev_id)
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -574,7 +574,7 @@ rte_ml_model_load(int16_t dev_id, struct rte_ml_model_params *params, uint16_t *
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -583,12 +583,12 @@ rte_ml_model_load(int16_t dev_id, struct rte_ml_model_params *params, uint16_t *
 		return -ENOTSUP;

 	if (params == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, params cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, params cannot be NULL", dev_id);
 		return -EINVAL;
 	}

 	if (model_id == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, model_id cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, model_id cannot be NULL", dev_id);
 		return -EINVAL;
 	}

@@ -601,7 +601,7 @@ rte_ml_model_unload(int16_t dev_id, uint16_t model_id)
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -618,7 +618,7 @@ rte_ml_model_start(int16_t dev_id, uint16_t model_id)
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -635,7 +635,7 @@ rte_ml_model_stop(int16_t dev_id, uint16_t model_id)
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -652,7 +652,7 @@ rte_ml_model_info_get(int16_t dev_id, uint16_t model_id, struct rte_ml_model_inf
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -661,7 +661,7 @@ rte_ml_model_info_get(int16_t dev_id, uint16_t model_id, struct rte_ml_model_inf
 		return -ENOTSUP;

 	if (model_info == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, model_id %u, model_info cannot be NULL\n", dev_id,
+		RTE_MLDEV_LOG(ERR, "Dev %d, model_id %u, model_info cannot be NULL", dev_id,
 			      model_id);
 		return -EINVAL;
 	}
@@ -675,7 +675,7 @@ rte_ml_model_params_update(int16_t dev_id, uint16_t model_id, void *buffer)
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -684,7 +684,7 @@ rte_ml_model_params_update(int16_t dev_id, uint16_t model_id, void *buffer)
 		return -ENOTSUP;

 	if (buffer == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, buffer cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, buffer cannot be NULL", dev_id);
 		return -EINVAL;
 	}

@@ -698,7 +698,7 @@ rte_ml_io_quantize(int16_t dev_id, uint16_t model_id, struct rte_ml_buff_seg **d
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -707,12 +707,12 @@ rte_ml_io_quantize(int16_t dev_id, uint16_t model_id, struct rte_ml_buff_seg **d
 		return -ENOTSUP;

 	if (dbuffer == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, dbuffer cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, dbuffer cannot be NULL", dev_id);
 		return -EINVAL;
 	}

 	if (qbuffer == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, qbuffer cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, qbuffer cannot be NULL", dev_id);
 		return -EINVAL;
 	}

@@ -726,7 +726,7 @@ rte_ml_io_dequantize(int16_t dev_id, uint16_t model_id, struct rte_ml_buff_seg *
 	struct rte_ml_dev *dev;

 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -735,12 +735,12 @@ rte_ml_io_dequantize(int16_t dev_id, uint16_t model_id, struct rte_ml_buff_seg *
 		return -ENOTSUP;

 	if (qbuffer == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, qbuffer cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, qbuffer cannot be NULL", dev_id);
 		return -EINVAL;
 	}

 	if (dbuffer == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, dbuffer cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, dbuffer cannot be NULL", dev_id);
 		return -EINVAL;
 	}

@@ -811,7 +811,7 @@ rte_ml_enqueue_burst(int16_t dev_id, uint16_t qp_id, struct rte_ml_op **ops, uin

 #ifdef RTE_LIBRTE_ML_DEV_DEBUG
 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		rte_errno = -EINVAL;
 		return 0;
 	}
@@ -823,13 +823,13 @@ rte_ml_enqueue_burst(int16_t dev_id, uint16_t qp_id, struct rte_ml_op **ops, uin
 	}

 	if (ops == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, ops cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, ops cannot be NULL", dev_id);
 		rte_errno = -EINVAL;
 		return 0;
 	}

 	if (qp_id >= dev->data->nb_queue_pairs) {
-		RTE_MLDEV_LOG(ERR, "Invalid qp_id %u\n", qp_id);
+		RTE_MLDEV_LOG(ERR, "Invalid qp_id %u", qp_id);
 		rte_errno = -EINVAL;
 		return 0;
 	}
@@ -847,7 +847,7 @@ rte_ml_dequeue_burst(int16_t dev_id, uint16_t qp_id, struct rte_ml_op **ops, uin

 #ifdef RTE_LIBRTE_ML_DEV_DEBUG
 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		rte_errno = -EINVAL;
 		return 0;
 	}
@@ -859,13 +859,13 @@ rte_ml_dequeue_burst(int16_t dev_id, uint16_t qp_id, struct rte_ml_op **ops, uin
 	}

 	if (ops == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, ops cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, ops cannot be NULL", dev_id);
 		rte_errno = -EINVAL;
 		return 0;
 	}

 	if (qp_id >= dev->data->nb_queue_pairs) {
-		RTE_MLDEV_LOG(ERR, "Invalid qp_id %u\n", qp_id);
+		RTE_MLDEV_LOG(ERR, "Invalid qp_id %u", qp_id);
 		rte_errno = -EINVAL;
 		return 0;
 	}
@@ -883,7 +883,7 @@ rte_ml_op_error_get(int16_t dev_id, struct rte_ml_op *op, struct rte_ml_op_error

 #ifdef RTE_LIBRTE_ML_DEV_DEBUG
 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
-		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
 		return -EINVAL;
 	}

@@ -892,12 +892,12 @@ rte_ml_op_error_get(int16_t dev_id, struct rte_ml_op *op, struct rte_ml_op_error
 		return -ENOTSUP;

 	if (op == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, op cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, op cannot be NULL", dev_id);
 		return -EINVAL;
 	}

 	if (error == NULL) {
-		RTE_MLDEV_LOG(ERR, "Dev %d, error cannot be NULL\n", dev_id);
+		RTE_MLDEV_LOG(ERR, "Dev %d, error cannot be NULL", dev_id);
 		return -EINVAL;
 	}
 #else
diff --git a/lib/net/rte_net_crc.c b/lib/net/rte_net_crc.c
index a685f9e7bb..900d6de7f4 100644
--- a/lib/net/rte_net_crc.c
+++ b/lib/net/rte_net_crc.c
@@ -179,7 +179,7 @@ avx512_vpclmulqdq_get_handlers(void)
 			max_simd_bitwidth >= RTE_VECT_SIMD_512)
 		return handlers_avx512;
 #endif
-	NET_LOG(INFO, "Requirements not met, can't use AVX512\n");
+	NET_LOG(INFO, "Requirements not met, can't use AVX512");
 	return NULL;
 }

@@ -205,7 +205,7 @@ sse42_pclmulqdq_get_handlers(void)
 			max_simd_bitwidth >= RTE_VECT_SIMD_128)
 		return handlers_sse42;
 #endif
-	NET_LOG(INFO, "Requirements not met, can't use SSE\n");
+	NET_LOG(INFO, "Requirements not met, can't use SSE");
 	return NULL;
 }

@@ -231,7 +231,7 @@ neon_pmull_get_handlers(void)
 			max_simd_bitwidth >= RTE_VECT_SIMD_128)
 		return handlers_neon;
 #endif
-	NET_LOG(INFO, "Requirements not met, can't use NEON\n");
+	NET_LOG(INFO, "Requirements not met, can't use NEON");
 	return NULL;
 }

diff --git a/lib/node/ethdev_rx.c b/lib/node/ethdev_rx.c
index 3e8fac1df4..475eff6abe 100644
--- a/lib/node/ethdev_rx.c
+++ b/lib/node/ethdev_rx.c
@@ -160,13 +160,13 @@ ethdev_ptype_setup(uint16_t port, uint16_t queue)

 	if (!l3_ipv4 || !l3_ipv6) {
 		node_info("ethdev_rx",
-			  "Enabling ptype callback for required ptypes on port %u\n",
+			  "Enabling ptype callback for required ptypes on port %u",
 			  port);

 		if (!rte_eth_add_rx_callback(port, queue, eth_pkt_parse_cb,
 					     NULL)) {
 			node_err("ethdev_rx",
-				 "Failed to add rx ptype cb: port=%d, queue=%d\n",
+				 "Failed to add rx ptype cb: port=%d, queue=%d",
 				 port, queue);
 			return -EINVAL;
 		}
diff --git a/lib/node/ip4_lookup.c b/lib/node/ip4_lookup.c
index 0dbfde64fe..18955971f6 100644
--- a/lib/node/ip4_lookup.c
+++ b/lib/node/ip4_lookup.c
@@ -143,7 +143,7 @@ rte_node_ip4_route_add(uint32_t ip, uint8_t depth, uint16_t next_hop,
 				  ip, depth, val);
 		if (ret < 0) {
 			node_err("ip4_lookup",
-				 "Unable to add entry %s / %d nh (%x) to LPM table on sock %d, rc=%d\n",
+				 "Unable to add entry %s / %d nh (%x) to LPM table on sock %d, rc=%d",
 				 abuf, depth, val, socket, ret);
 			return ret;
 		}
diff --git a/lib/node/ip6_lookup.c b/lib/node/ip6_lookup.c
index 6f56eb5ec5..309964f60f 100644
--- a/lib/node/ip6_lookup.c
+++ b/lib/node/ip6_lookup.c
@@ -283,7 +283,7 @@ rte_node_ip6_route_add(const uint8_t *ip, uint8_t depth, uint16_t next_hop,
 		if (ret < 0) {
 			node_err("ip6_lookup",
 				 "Unable to add entry %s / %d nh (%x) to LPM "
-				 "table on sock %d, rc=%d\n",
+				 "table on sock %d, rc=%d",
 				 abuf, depth, val, socket, ret);
 			return ret;
 		}
diff --git a/lib/node/kernel_rx.c b/lib/node/kernel_rx.c
index 2dba7c8cc7..6c20cdbb1e 100644
--- a/lib/node/kernel_rx.c
+++ b/lib/node/kernel_rx.c
@@ -134,7 +134,7 @@ kernel_rx_node_do(struct rte_graph *graph, struct rte_node *node, kernel_rx_node
 			if (len == 0 || len == 0xFFFF) {
 				rte_pktmbuf_free(m);
 				if (rx->idx <= 0)
-					node_dbg("kernel_rx", "rx_mbuf array is empty\n");
+					node_dbg("kernel_rx", "rx_mbuf array is empty");
 				rx->idx--;
 				break;
 			}
@@ -207,20 +207,20 @@ kernel_rx_node_init(const struct rte_graph *graph, struct rte_node *node)
 	RTE_VERIFY(elem != NULL);

 	if (ctx->pktmbuf_pool == NULL) {
-		node_err("kernel_rx", "Invalid mbuf pool on graph %s\n", graph->name);
+		node_err("kernel_rx", "Invalid mbuf pool on graph %s", graph->name);
 		return -EINVAL;
 	}

 	recv_info = rte_zmalloc_socket("kernel_rx_info", sizeof(kernel_rx_info_t),
 				       RTE_CACHE_LINE_SIZE, graph->socket);
 	if (!recv_info) {
-		node_err("kernel_rx", "Kernel recv_info is NULL\n");
+		node_err("kernel_rx", "Kernel recv_info is NULL");
 		return -ENOMEM;
 	}

 	sock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
 	if (sock < 0) {
-		node_err("kernel_rx", "Unable to open RAW socket\n");
+		node_err("kernel_rx", "Unable to open RAW socket");
 		return sock;
 	}

diff --git a/lib/node/kernel_tx.c b/lib/node/kernel_tx.c
index 27d1808c71..3a96741622 100644
--- a/lib/node/kernel_tx.c
+++ b/lib/node/kernel_tx.c
@@ -36,7 +36,7 @@ kernel_tx_process_mbuf(struct rte_node *node, struct rte_mbuf **mbufs, uint16_t
 		sin.sin_addr.s_addr = ip4->dst_addr;

 		if (sendto(ctx->sock, buf, len, 0, (struct sockaddr *)&sin, sizeof(sin)) < 0)
-			node_err("kernel_tx", "Unable to send packets: %s\n", strerror(errno));
+			node_err("kernel_tx", "Unable to send packets: %s", strerror(errno));
 	}
 }

@@ -87,7 +87,7 @@ kernel_tx_node_init(const struct rte_graph *graph __rte_unused, struct rte_node

 	ctx->sock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
 	if (ctx->sock < 0)
-		node_err("kernel_tx", "Unable to open RAW socket\n");
+		node_err("kernel_tx", "Unable to open RAW socket");

 	return 0;
 }
diff --git a/lib/rcu/rte_rcu_qsbr.c b/lib/rcu/rte_rcu_qsbr.c
index a9f3d6cc98..41a44be4b9 100644
--- a/lib/rcu/rte_rcu_qsbr.c
+++ b/lib/rcu/rte_rcu_qsbr.c
@@ -92,7 +92,7 @@ rte_rcu_qsbr_thread_register(struct rte_rcu_qsbr *v, unsigned int thread_id)
 		return 1;
 	}

-	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u\n",
+	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u",
 				v->qsbr_cnt[thread_id].lock_cnt);

 	id = thread_id & __RTE_QSBR_THRID_MASK;
@@ -144,7 +144,7 @@ rte_rcu_qsbr_thread_unregister(struct rte_rcu_qsbr *v, unsigned int thread_id)
 		return 1;
 	}

-	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u\n",
+	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u",
 				v->qsbr_cnt[thread_id].lock_cnt);

 	id = thread_id & __RTE_QSBR_THRID_MASK;
diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h
index 5979fb0efb..6b908e7ee0 100644
--- a/lib/rcu/rte_rcu_qsbr.h
+++ b/lib/rcu/rte_rcu_qsbr.h
@@ -299,7 +299,7 @@ rte_rcu_qsbr_thread_online(struct rte_rcu_qsbr *v, unsigned int thread_id)

 	RTE_ASSERT(v != NULL && thread_id < v->max_threads);

-	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u\n",
+	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u",
 				v->qsbr_cnt[thread_id].lock_cnt);

 	/* Copy the current value of token.
@@ -350,7 +350,7 @@ rte_rcu_qsbr_thread_offline(struct rte_rcu_qsbr *v, unsigned int thread_id)
 {
 	RTE_ASSERT(v != NULL && thread_id < v->max_threads);

-	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u\n",
+	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u",
 				v->qsbr_cnt[thread_id].lock_cnt);

 	/* The reader can go offline only after the load of the
@@ -427,7 +427,7 @@ rte_rcu_qsbr_unlock(__rte_unused struct rte_rcu_qsbr *v,
 				1, rte_memory_order_release);

 	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, WARNING,
-				"Lock counter %u. Nested locks?\n",
+				"Lock counter %u. Nested locks?",
 				v->qsbr_cnt[thread_id].lock_cnt);
 #endif
 }
@@ -481,7 +481,7 @@ rte_rcu_qsbr_quiescent(struct rte_rcu_qsbr *v, unsigned int thread_id)

 	RTE_ASSERT(v != NULL && thread_id < v->max_threads);

-	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u\n",
+	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u",
 				v->qsbr_cnt[thread_id].lock_cnt);

 	/* Acquire the changes to the shared data structure released
diff --git a/lib/stack/rte_stack.c b/lib/stack/rte_stack.c
index 1fabec2bfe..1dab6d6645 100644
--- a/lib/stack/rte_stack.c
+++ b/lib/stack/rte_stack.c
@@ -56,7 +56,7 @@ rte_stack_create(const char *name, unsigned int count, int socket_id,
 	int ret;

 	if (flags & ~(RTE_STACK_F_LF)) {
-		STACK_LOG_ERR("Unsupported stack flags %#x\n", flags);
+		STACK_LOG_ERR("Unsupported stack flags %#x", flags);
 		return NULL;
 	}

@@ -65,7 +65,7 @@ rte_stack_create(const char *name, unsigned int count, int socket_id,
 #endif
 #if !defined(RTE_STACK_LF_SUPPORTED)
 	if (flags & RTE_STACK_F_LF) {
-		STACK_LOG_ERR("Lock-free stack is not supported on your platform\n");
+		STACK_LOG_ERR("Lock-free stack is not supported on your platform");
 		rte_errno = ENOTSUP;
 		return NULL;
 	}
@@ -82,7 +82,7 @@ rte_stack_create(const char *name, unsigned int count, int socket_id,

 	te = rte_zmalloc("STACK_TAILQ_ENTRY", sizeof(*te), 0);
 	if (te == NULL) {
-		STACK_LOG_ERR("Cannot reserve memory for tailq\n");
+		STACK_LOG_ERR("Cannot reserve memory for tailq");
 		rte_errno = ENOMEM;
 		return NULL;
 	}
@@ -92,7 +92,7 @@ rte_stack_create(const char *name, unsigned int count, int socket_id,
 	mz = rte_memzone_reserve_aligned(mz_name, sz, socket_id,
 					 0, __alignof__(*s));
 	if (mz == NULL) {
-		STACK_LOG_ERR("Cannot reserve stack memzone!\n");
+		STACK_LOG_ERR("Cannot reserve stack memzone!");
 		rte_mcfg_tailq_write_unlock();
 		rte_free(te);
 		return NULL;
diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
index 9bf5ef67b9..7b22281815 100644
--- a/lib/vhost/vhost_crypto.c
+++ b/lib/vhost/vhost_crypto.c
@@ -245,7 +245,7 @@ transform_cipher_param(struct rte_crypto_sym_xform *xform,
 		return ret;

 	if (param->cipher_key_len > VHOST_USER_CRYPTO_MAX_CIPHER_KEY_LENGTH) {
-		VC_LOG_DBG("Invalid cipher key length\n");
+		VC_LOG_DBG("Invalid cipher key length");
 		return -VIRTIO_CRYPTO_BADMSG;
 	}

@@ -301,7 +301,7 @@ transform_chain_param(struct rte_crypto_sym_xform *xforms,
 		return ret;

 	if (param->cipher_key_len > VHOST_USER_CRYPTO_MAX_CIPHER_KEY_LENGTH) {
-		VC_LOG_DBG("Invalid cipher key length\n");
+		VC_LOG_DBG("Invalid cipher key length");
 		return -VIRTIO_CRYPTO_BADMSG;
 	}

@@ -321,7 +321,7 @@ transform_chain_param(struct rte_crypto_sym_xform *xforms,
 		return ret;

 	if (param->auth_key_len > VHOST_USER_CRYPTO_MAX_HMAC_KEY_LENGTH) {
-		VC_LOG_DBG("Invalid auth key length\n");
+		VC_LOG_DBG("Invalid auth key length");
 		return -VIRTIO_CRYPTO_BADMSG;
 	}

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.334676812 +0800
+++ 0007-lib-remove-redundant-newline-from-logs.patch	2024-03-05 17:39:30.663566489 +0800
@@ -1 +1 @@
-From ae282b0611c33aa73a01ee6137d116155053b835 Mon Sep 17 00:00:00 2001
+From fd6f07da946292d1637b7fd4ae42fd08d2c5bb84 Mon Sep 17 00:00:00 2001
@@ -7,0 +8 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
@@ -9 +10 @@
-Fix places where two newline characters may be logged.
+[ upstream commit ae282b0611c33aa73a01ee6137d116155053b835 ]
@@ -11 +12 @@
-Cc: stable@dpdk.org
+Fix places where two newline characters may be logged.
@@ -48 +49 @@
-index 52d6d010c7..f21f9cc5a0 100644
+index 30f919cd40..2a5599b7d8 100644
@@ -51 +52 @@
-@@ -407,7 +407,7 @@ ipsec_mb_ipc_request(const struct rte_mp_msg *mp_msg, const void *peer)
+@@ -406,7 +406,7 @@ ipsec_mb_ipc_request(const struct rte_mp_msg *mp_msg, const void *peer)
@@ -175 +176 @@
-index ead8c9a623..b233c0ecd7 100644
+index d8769f0b8d..a3a8fc9c07 100644
@@ -178 +179 @@
-@@ -2074,7 +2074,7 @@ rte_cryptodev_sym_session_create(uint8_t dev_id,
+@@ -2072,7 +2072,7 @@ rte_cryptodev_sym_session_create(uint8_t dev_id,
@@ -1297 +1298 @@
-index 3e1ef1ac25..6e5443e5f8 100644
+index 9bf5ef67b9..7b22281815 100644

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

* patch 'dma/dpaa2: fix logtype register' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (6 preceding siblings ...)
  2024-03-05  9:45 ` patch 'lib: remove redundant newline from " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'net/i40e: remove redundant judgment in flow parsing' " Xueming Li
                   ` (128 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: David Marchand; +Cc: Stephen Hemminger, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ec5fe01a283f35268671af1aeaa82127f10e8cbd Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 18 Dec 2023 16:46:39 +0100
Subject: [PATCH] dma/dpaa2: fix logtype register
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f334b4c0b856e92d678cd09828207a3292e24ac2 ]

This driver logtype was not initialized so its logs would end up under
the 0 logtype, iow, RTE_LOGTYPE_EAL.
This issue comes from a typo on the logtype variable name.

Fixes: 8caf8427f85a ("dma/dpaa2: introduce driver skeleton")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/dma/dpaa2/dpaa2_qdma.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c
index 8968bb853b..2c91ceec13 100644
--- a/drivers/dma/dpaa2/dpaa2_qdma.c
+++ b/drivers/dma/dpaa2/dpaa2_qdma.c
@@ -16,9 +16,6 @@

 #define DPAA2_QDMA_PREFETCH "prefetch"

-/* Dynamic log type identifier */
-int dpaa2_qdma_logtype;
-
 uint32_t dpaa2_coherent_no_alloc_cache;
 uint32_t dpaa2_coherent_alloc_cache;

@@ -1699,4 +1696,4 @@ static struct rte_dpaa2_driver rte_dpaa2_qdma_pmd = {
 RTE_PMD_REGISTER_DPAA2(dpaa2_qdma, rte_dpaa2_qdma_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(dpaa2_qdma,
 	"no_prefetch=<int> ");
-RTE_LOG_REGISTER_DEFAULT(dpaa_qdma2_logtype, INFO);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_qdma_logtype, INFO);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.371239313 +0800
+++ 0008-dma-dpaa2-fix-logtype-register.patch	2024-03-05 17:39:30.663566489 +0800
@@ -1 +1 @@
-From f334b4c0b856e92d678cd09828207a3292e24ac2 Mon Sep 17 00:00:00 2001
+From ec5fe01a283f35268671af1aeaa82127f10e8cbd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f334b4c0b856e92d678cd09828207a3292e24ac2 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/i40e: remove redundant judgment in flow parsing' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (7 preceding siblings ...)
  2024-03-05  9:45 ` patch 'dma/dpaa2: fix logtype register' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'net/iavf: fix memory leak on security context error' " Xueming Li
                   ` (127 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ca47a866b53941ecddfb3735f656f0bc939a2ed2 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Fri, 24 Nov 2023 15:01:03 +0800
Subject: [PATCH] net/i40e: remove redundant judgment in flow parsing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e930f8622e05e410a475c6b57dd7edd73b2e1705 ]

if (eth_spec && eth_mask &&
	       next_type == RTE_FLOW_ITEM_TYPE_END) {
            ...
            if (next_type == RTE_FLOW_ITEM_TYPE_VLAN || ...) {
            ...
            }
...
}

Clearly, that condition in the inner "if" is always "false".

This commit will remove the redundant judgment.

Fixes: 7d83c152a207 ("net/i40e: parse flow director filter")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 877e49151e..92165c8422 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -1708,8 +1708,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,

 				ether_type = rte_be_to_cpu_16(eth_spec->hdr.ether_type);

-				if (next_type == RTE_FLOW_ITEM_TYPE_VLAN ||
-				    ether_type == RTE_ETHER_TYPE_IPV4 ||
+				if (ether_type == RTE_ETHER_TYPE_IPV4 ||
 				    ether_type == RTE_ETHER_TYPE_IPV6 ||
 				    ether_type == i40e_get_outer_vlan(dev)) {
 					rte_flow_error_set(error, EINVAL,
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.399119414 +0800
+++ 0009-net-i40e-remove-redundant-judgment-in-flow-parsing.patch	2024-03-05 17:39:30.663566489 +0800
@@ -1 +1 @@
-From e930f8622e05e410a475c6b57dd7edd73b2e1705 Mon Sep 17 00:00:00 2001
+From ca47a866b53941ecddfb3735f656f0bc939a2ed2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e930f8622e05e410a475c6b57dd7edd73b2e1705 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/iavf: fix memory leak on security context error' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (8 preceding siblings ...)
  2024-03-05  9:45 ` patch 'net/i40e: remove redundant judgment in flow parsing' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'net/ixgbe: fix memoy leak after device init failure' " Xueming Li
                   ` (126 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3defa10a78b056c43a0ffc585fdac4d4133e6da8 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 1 Dec 2023 18:46:49 +0800
Subject: [PATCH] net/iavf: fix memory leak on security context error
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8758ad5f8633ce4197271d41ece0cc7f799d3d6e ]

In iavf_security_ctx_create() allocated memory for the
'security_ctx', we should free it when memory malloc for
the 'iavf_security_ctx' fails, otherwise it will lead to
memory leak.

Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ipsec_crypto.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c
index 07a69db540..d6c0180ffd 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -1518,8 +1518,11 @@ iavf_security_ctx_create(struct iavf_adapter *adapter)
 	if (adapter->security_ctx == NULL) {
 		adapter->security_ctx = rte_malloc("iavf_security_ctx",
 				sizeof(struct iavf_security_ctx), 0);
-		if (adapter->security_ctx == NULL)
+		if (adapter->security_ctx == NULL) {
+			rte_free(adapter->vf.eth_dev->security_ctx);
+			adapter->vf.eth_dev->security_ctx = NULL;
 			return -ENOMEM;
+		}
 	}

 	return 0;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.422786015 +0800
+++ 0010-net-iavf-fix-memory-leak-on-security-context-error.patch	2024-03-05 17:39:30.663566489 +0800
@@ -1 +1 @@
-From 8758ad5f8633ce4197271d41ece0cc7f799d3d6e Mon Sep 17 00:00:00 2001
+From 3defa10a78b056c43a0ffc585fdac4d4133e6da8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8758ad5f8633ce4197271d41ece0cc7f799d3d6e ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ixgbe: fix memoy leak after device init failure' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (9 preceding siblings ...)
  2024-03-05  9:45 ` patch 'net/iavf: fix memory leak on security context error' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'net/ice: fix link update' " Xueming Li
                   ` (125 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c655f20c8f5e55b625dd8f69036d699b821ef3b2 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 14 Dec 2023 14:44:41 +0800
Subject: [PATCH] net/ixgbe: fix memoy leak after device init failure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4d70ae0f1bb88e2aa100f5f7bf50b6484f0685cd ]

In ixgbe_ipsec_ctx_create() allocated memory for the 'security_ctx',
we should free it when errors occur, otherwise it will lead
to memory leak.

Fixes: 9a0752f498d2 ("net/ixgbe: enable inline IPsec")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index d6cf00317e..a32d3a6d7c 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1190,7 +1190,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	diag = ixgbe_validate_eeprom_checksum(hw, &csum);
 	if (diag != IXGBE_SUCCESS) {
 		PMD_INIT_LOG(ERR, "The EEPROM checksum is not valid: %d", diag);
-		return -EIO;
+		ret = -EIO;
+		goto err_exit;
 	}

 #ifdef RTE_LIBRTE_IXGBE_BYPASS
@@ -1228,7 +1229,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 		PMD_INIT_LOG(ERR, "Unsupported SFP+ Module");
 	if (diag) {
 		PMD_INIT_LOG(ERR, "Hardware Initialization Failure: %d", diag);
-		return -EIO;
+		ret = -EIO;
+		goto err_exit;
 	}

 	/* Reset the hw statistics */
@@ -1248,7 +1250,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 			     "Failed to allocate %u bytes needed to store "
 			     "MAC addresses",
 			     RTE_ETHER_ADDR_LEN * hw->mac.num_rar_entries);
-		return -ENOMEM;
+		ret = -ENOMEM;
+		goto err_exit;
 	}
 	/* Copy the permanent MAC address */
 	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr,
@@ -1263,7 +1266,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 			     RTE_ETHER_ADDR_LEN * IXGBE_VMDQ_NUM_UC_MAC);
 		rte_free(eth_dev->data->mac_addrs);
 		eth_dev->data->mac_addrs = NULL;
-		return -ENOMEM;
+		ret = -ENOMEM;
+		goto err_exit;
 	}

 	/* initialize the vfta */
@@ -1347,6 +1351,11 @@ err_pf_host_init:
 	eth_dev->data->mac_addrs = NULL;
 	rte_free(eth_dev->data->hash_mac_addrs);
 	eth_dev->data->hash_mac_addrs = NULL;
+err_exit:
+#ifdef RTE_LIB_SECURITY
+	rte_free(eth_dev->security_ctx);
+	eth_dev->security_ctx = NULL;
+#endif
 	return ret;
 }

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.451848416 +0800
+++ 0011-net-ixgbe-fix-memoy-leak-after-device-init-failure.patch	2024-03-05 17:39:30.673566490 +0800
@@ -1 +1 @@
-From 4d70ae0f1bb88e2aa100f5f7bf50b6484f0685cd Mon Sep 17 00:00:00 2001
+From c655f20c8f5e55b625dd8f69036d699b821ef3b2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4d70ae0f1bb88e2aa100f5f7bf50b6484f0685cd ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice: fix link update' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (10 preceding siblings ...)
  2024-03-05  9:45 ` patch 'net/ixgbe: fix memoy leak after device init failure' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'net/ice: fix tunnel TSO capabilities' " Xueming Li
                   ` (124 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 48efa16873357fdac7264853cc6423ad1585a790 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 14 Dec 2023 03:40:54 -0500
Subject: [PATCH] net/ice: fix link update
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4e5dc111464e83e9a55fa466d8f682f0027b721e ]

The ice_aq_get_link_info function is not thread-safe. However,
it is possible to simultaneous invocations during both the dev_start
and the LSC interrupt handler, potentially leading to unexpected adminq
errors. This patch addresses the issue by introducing a thread-safe
wrapper that utilizes a spinlock.

Fixes: cf911d90e366 ("net/ice: support link update")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 26 ++++++++++++++++++++------
 drivers/net/ice/ice_ethdev.h |  4 ++++
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 3ccba4db80..1f8ab5158a 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -1804,6 +1804,7 @@ ice_pf_setup(struct ice_pf *pf)
 	}

 	pf->main_vsi = vsi;
+	rte_spinlock_init(&pf->link_lock);

 	return 0;
 }
@@ -3621,17 +3622,31 @@ ice_rxq_intr_setup(struct rte_eth_dev *dev)
 	return 0;
 }

+static enum ice_status
+ice_get_link_info_safe(struct ice_pf *pf, bool ena_lse,
+		       struct ice_link_status *link)
+{
+	struct ice_hw *hw = ICE_PF_TO_HW(pf);
+	int ret;
+
+	rte_spinlock_lock(&pf->link_lock);
+
+	ret = ice_aq_get_link_info(hw->port_info, ena_lse, link, NULL);
+
+	rte_spinlock_unlock(&pf->link_lock);
+
+	return ret;
+}
+
 static void
 ice_get_init_link_status(struct rte_eth_dev *dev)
 {
-	struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	bool enable_lse = dev->data->dev_conf.intr_conf.lsc ? true : false;
 	struct ice_link_status link_status;
 	int ret;

-	ret = ice_aq_get_link_info(hw->port_info, enable_lse,
-				   &link_status, NULL);
+	ret = ice_get_link_info_safe(pf, enable_lse, &link_status);
 	if (ret != ICE_SUCCESS) {
 		PMD_DRV_LOG(ERR, "Failed to get link info");
 		pf->init_link_up = false;
@@ -3996,7 +4011,7 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 {
 #define CHECK_INTERVAL 50  /* 50ms */
 #define MAX_REPEAT_TIME 40  /* 2s (40 * 50ms) in total */
-	struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct ice_link_status link_status;
 	struct rte_eth_link link, old;
 	int status;
@@ -4010,8 +4025,7 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)

 	do {
 		/* Get link status information from hardware */
-		status = ice_aq_get_link_info(hw->port_info, enable_lse,
-					      &link_status, NULL);
+		status = ice_get_link_info_safe(pf, enable_lse, &link_status);
 		if (status != ICE_SUCCESS) {
 			link.link_speed = RTE_ETH_SPEED_NUM_100M;
 			link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index abe6dcdc23..d607f028e0 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -548,6 +548,10 @@ struct ice_pf {
 	uint64_t rss_hf;
 	struct ice_tm_conf tm_conf;
 	uint16_t outer_ethertype;
+	/* lock prevent race condition between lsc interrupt handler
+	 * and link status update during dev_start.
+	 */
+	rte_spinlock_t link_lock;
 };

 #define ICE_MAX_QUEUE_NUM  2048
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.481020117 +0800
+++ 0012-net-ice-fix-link-update.patch	2024-03-05 17:39:30.673566490 +0800
@@ -1 +1 @@
-From 4e5dc111464e83e9a55fa466d8f682f0027b721e Mon Sep 17 00:00:00 2001
+From 48efa16873357fdac7264853cc6423ad1585a790 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4e5dc111464e83e9a55fa466d8f682f0027b721e ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice: fix tunnel TSO capabilities' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (11 preceding siblings ...)
  2024-03-05  9:45 ` patch 'net/ice: fix link update' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'net/iavf: fix no polling mode switching' " Xueming Li
                   ` (123 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c321ba6a9d17c218f6e37a4f8600c4911ca29ec6 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Thu, 7 Dec 2023 10:30:51 +0800
Subject: [PATCH] net/ice: fix tunnel TSO capabilities
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit daac90272857812b3da1db95caf5922f03a83343 ]

The Tx offload capabilities doesn't include TSO tunnel which
will result in TSO tunnel setting to not take effect.

The patch adds tunnel TSO offload to ICE_TX_NO_VECTOR_FLAGS.

This commit will add TSO tunnel capabilities in ice_dev_info_get().

Bugzilla ID: 1327
Fixes: d852fec1be63 ("net/ice: fix Tx offload path choice")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c          | 6 +++++-
 drivers/net/ice/ice_rxtx_vec_common.h | 4 ++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 1f8ab5158a..3c3bc49dc2 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3891,7 +3891,11 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			RTE_ETH_TX_OFFLOAD_TCP_CKSUM |
 			RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |
 			RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |
-			RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;
+			RTE_ETH_TX_OFFLOAD_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;
 		dev_info->flow_type_rss_offloads |= ICE_RSS_OFFLOAD_ALL;
 	}

diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index 55840cf170..4b73465af5 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -251,6 +251,10 @@ ice_rxq_vec_setup_default(struct ice_rx_queue *rxq)
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		\
 		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |	\
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |	\
+		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_OUTER_UDP_CKSUM)

 #define ICE_TX_VECTOR_OFFLOAD (				\
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.511990518 +0800
+++ 0013-net-ice-fix-tunnel-TSO-capabilities.patch	2024-03-05 17:39:30.683566490 +0800
@@ -1 +1 @@
-From daac90272857812b3da1db95caf5922f03a83343 Mon Sep 17 00:00:00 2001
+From c321ba6a9d17c218f6e37a4f8600c4911ca29ec6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit daac90272857812b3da1db95caf5922f03a83343 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/iavf: fix no polling mode switching' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (12 preceding siblings ...)
  2024-03-05  9:45 ` patch 'net/ice: fix tunnel TSO capabilities' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'net/iavf: fix crash on VF start' " Xueming Li
                   ` (122 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: Mingjin Ye; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0a72821dd9ecd32734257c1a740f37b89c95c601 Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Thu, 14 Dec 2023 10:33:02 +0000
Subject: [PATCH] net/iavf: fix no polling mode switching
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5c8ca9f13c78096589e3fb2f323987df6c973f8d ]

PMD does not switch to no polling mode when the PF triggers a reset event
or the watchdog detects a reset event. In this scenario, data path will
access the freed resources and cause a core dump.

This patch fixes this issue by automatically switching modes on VF reset.

Fixes: 5b3124a0a6ef ("net/iavf: support no polling when link down")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf.h        |  3 ++-
 drivers/net/iavf/iavf_ethdev.c | 27 +++++++++++++++++++++++----
 drivers/net/iavf/iavf_vchnl.c  | 24 ++++++++++--------------
 3 files changed, 35 insertions(+), 19 deletions(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index 10868f2c30..5bfe85dabd 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -18,7 +18,7 @@

 #define IAVF_AQ_LEN               32
 #define IAVF_AQ_BUF_SZ            4096
-#define IAVF_RESET_WAIT_CNT       500
+#define IAVF_RESET_WAIT_CNT       2000
 #define IAVF_BUF_SIZE_MIN         1024
 #define IAVF_FRAME_SIZE_MAX       9728
 #define IAVF_QUEUE_BASE_ADDR_UNIT 128
@@ -512,4 +512,5 @@ int iavf_flow_sub_check(struct iavf_adapter *adapter,
 void iavf_dev_watchdog_enable(struct iavf_adapter *adapter);
 void iavf_dev_watchdog_disable(struct iavf_adapter *adapter);
 int iavf_handle_hw_reset(struct rte_eth_dev *dev);
+void iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change);
 #endif /* _IAVF_ETHDEV_H_ */
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index d1edb0dd5c..0952998304 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -296,6 +296,7 @@ iavf_dev_watchdog(void *cb_arg)
 			PMD_DRV_LOG(INFO, "VF \"%s\" reset has completed",
 				adapter->vf.eth_dev->data->name);
 			adapter->vf.vf_reset = false;
+			iavf_set_no_poll(adapter, false);
 		}
 	/* If not in reset then poll vfr_inprogress register for VFLR event */
 	} else {
@@ -308,6 +309,7 @@ iavf_dev_watchdog(void *cb_arg)

 			/* enter reset state with VFLR event */
 			adapter->vf.vf_reset = true;
+			iavf_set_no_poll(adapter, false);
 			adapter->vf.link_up = false;

 			iavf_dev_event_post(adapter->vf.eth_dev, RTE_ETH_EVENT_INTR_RESET,
@@ -2916,8 +2918,10 @@ iavf_dev_close(struct rte_eth_dev *dev)
 	 * effect.
 	 */
 out:
-	if (vf->vf_reset && !rte_pci_set_bus_master(pci_dev, true))
+	if (vf->vf_reset && !rte_pci_set_bus_master(pci_dev, true)) {
 		vf->vf_reset = false;
+		iavf_set_no_poll(adapter, false);
+	}

 	/* disable watchdog */
 	iavf_dev_watchdog_disable(adapter);
@@ -2948,6 +2952,8 @@ static int
 iavf_dev_reset(struct rte_eth_dev *dev)
 {
 	int ret;
+	struct iavf_adapter *adapter =
+		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);

@@ -2962,6 +2968,7 @@ iavf_dev_reset(struct rte_eth_dev *dev)
 		return ret;
 	}
 	vf->vf_reset = false;
+	iavf_set_no_poll(adapter, false);

 	PMD_DRV_LOG(DEBUG, "Start dev_reset ...\n");
 	ret = iavf_dev_uninit(dev);
@@ -2977,10 +2984,13 @@ iavf_dev_reset(struct rte_eth_dev *dev)
 int
 iavf_handle_hw_reset(struct rte_eth_dev *dev)
 {
+	struct iavf_adapter *adapter =
+		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	int ret;

 	vf->in_reset_recovery = true;
+	iavf_set_no_poll(adapter, false);

 	ret = iavf_dev_reset(dev);
 	if (ret)
@@ -2998,16 +3008,25 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev)
 	if (ret)
 		goto error;
 	dev->data->dev_started = 1;
-
-	vf->in_reset_recovery = false;
-	return 0;
+	goto exit;

 error:
 	PMD_DRV_LOG(DEBUG, "RESET recover with error code=%d\n", ret);
+exit:
 	vf->in_reset_recovery = false;
+	iavf_set_no_poll(adapter, false);
 	return ret;
 }

+void
+iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change)
+{
+	struct iavf_info *vf = &adapter->vf;
+
+	adapter->no_poll = (link_change & !vf->link_up) ||
+		vf->vf_reset || vf->in_reset_recovery;
+}
+
 static int
 iavf_dcf_cap_check_handler(__rte_unused const char *key,
 			   const char *value, __rte_unused void *opaque)
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 0a3e1d082c..1111d30f57 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -273,20 +273,18 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,
 					iavf_dev_watchdog_enable(adapter);
 			}
 			if (adapter->devargs.no_poll_on_link_down) {
-				if (vf->link_up && adapter->no_poll) {
-					adapter->no_poll = false;
-					PMD_DRV_LOG(DEBUG, "VF no poll turned off");
-				}
-				if (!vf->link_up) {
-					adapter->no_poll = true;
+				iavf_set_no_poll(adapter, true);
+				if (adapter->no_poll)
 					PMD_DRV_LOG(DEBUG, "VF no poll turned on");
-				}
+				else
+					PMD_DRV_LOG(DEBUG, "VF no poll turned off");
 			}
 			PMD_DRV_LOG(INFO, "Link status update:%s",
 					vf->link_up ? "up" : "down");
 			break;
 		case VIRTCHNL_EVENT_RESET_IMPENDING:
 			vf->vf_reset = true;
+			iavf_set_no_poll(adapter, false);
 			PMD_DRV_LOG(INFO, "VF is resetting");
 			break;
 		case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
@@ -462,6 +460,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 		vf->link_up = false;
 		if (!vf->vf_reset) {
 			vf->vf_reset = true;
+			iavf_set_no_poll(adapter, false);
 			iavf_dev_event_post(dev, RTE_ETH_EVENT_INTR_RESET,
 				NULL, 0);
 		}
@@ -485,14 +484,11 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 				iavf_dev_watchdog_enable(adapter);
 		}
 		if (adapter->devargs.no_poll_on_link_down) {
-			if (vf->link_up && adapter->no_poll) {
-				adapter->no_poll = false;
-				PMD_DRV_LOG(DEBUG, "VF no poll turned off");
-			}
-			if (!vf->link_up) {
-				adapter->no_poll = true;
+			iavf_set_no_poll(adapter, true);
+			if (adapter->no_poll)
 				PMD_DRV_LOG(DEBUG, "VF no poll turned on");
-			}
+			else
+				PMD_DRV_LOG(DEBUG, "VF no poll turned off");
 		}
 		iavf_dev_event_post(dev, RTE_ETH_EVENT_INTR_LSC, NULL, 0);
 		break;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.538476919 +0800
+++ 0014-net-iavf-fix-no-polling-mode-switching.patch	2024-03-05 17:39:30.683566490 +0800
@@ -1 +1 @@
-From 5c8ca9f13c78096589e3fb2f323987df6c973f8d Mon Sep 17 00:00:00 2001
+From 0a72821dd9ecd32734257c1a740f37b89c95c601 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5c8ca9f13c78096589e3fb2f323987df6c973f8d ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/iavf: fix crash on VF start' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (13 preceding siblings ...)
  2024-03-05  9:45 ` patch 'net/iavf: fix no polling mode switching' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'net/ice: fix memory leaks' " Xueming Li
                   ` (121 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: Shiyang He; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9aa2da4c022425461eb21ffbfef889edae9bd881 Mon Sep 17 00:00:00 2001
From: Shiyang He <shiyangx.he@intel.com>
Date: Wed, 3 Jan 2024 10:42:07 +0000
Subject: [PATCH] net/iavf: fix crash on VF start
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 80fb3c92045824da18af333ee8a758145b54b19f ]

When the VF starts to request multiple queues, the PF sends a reset
command to the VF. During the reset process, adminq sends an abnormal
message to PF for an unknown reason, and the resource request fails
resulting in a coredump.

This patch fixes the issue by checking the reset state before resetting.

Fixes: 3e6a5d2d310a ("net/iavf: add devargs to enable VF auto-reset")

Signed-off-by: Shiyang He <shiyangx.he@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf.h        |  3 ++-
 drivers/net/iavf/iavf_ethdev.c | 45 +++++++++++++++++++++++++++-------
 2 files changed, 38 insertions(+), 10 deletions(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index 5bfe85dabd..d273d884f5 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -19,6 +19,7 @@
 #define IAVF_AQ_LEN               32
 #define IAVF_AQ_BUF_SZ            4096
 #define IAVF_RESET_WAIT_CNT       2000
+#define IAVF_RESET_DETECTED_CNT   500
 #define IAVF_BUF_SIZE_MIN         1024
 #define IAVF_FRAME_SIZE_MAX       9728
 #define IAVF_QUEUE_BASE_ADDR_UNIT 128
@@ -511,6 +512,6 @@ int iavf_flow_sub_check(struct iavf_adapter *adapter,
 			struct iavf_fsub_conf *filter);
 void iavf_dev_watchdog_enable(struct iavf_adapter *adapter);
 void iavf_dev_watchdog_disable(struct iavf_adapter *adapter);
-int iavf_handle_hw_reset(struct rte_eth_dev *dev);
+void iavf_handle_hw_reset(struct rte_eth_dev *dev);
 void iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change);
 #endif /* _IAVF_ETHDEV_H_ */
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 0952998304..32a1626420 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1088,9 +1088,6 @@ iavf_dev_stop(struct rte_eth_dev *dev)

 	PMD_INIT_FUNC_TRACE();

-	if (vf->vf_reset)
-		return 0;
-
 	if (adapter->closed)
 		return -1;

@@ -2955,7 +2952,6 @@ iavf_dev_reset(struct rte_eth_dev *dev)
 	struct iavf_adapter *adapter =
 		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);

 	/*
 	 * Check whether the VF reset has been done and inform application,
@@ -2967,7 +2963,6 @@ iavf_dev_reset(struct rte_eth_dev *dev)
 		PMD_DRV_LOG(ERR, "Wait too long for reset done!\n");
 		return ret;
 	}
-	vf->vf_reset = false;
 	iavf_set_no_poll(adapter, false);

 	PMD_DRV_LOG(DEBUG, "Start dev_reset ...\n");
@@ -2978,17 +2973,47 @@ iavf_dev_reset(struct rte_eth_dev *dev)
 	return iavf_dev_init(dev);
 }

+static inline bool
+iavf_is_reset(struct iavf_hw *hw)
+{
+	return !(IAVF_READ_REG(hw, IAVF_VF_ARQLEN1) &
+		IAVF_VF_ARQLEN1_ARQENABLE_MASK);
+}
+
+static bool
+iavf_is_reset_detected(struct iavf_adapter *adapter)
+{
+	struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(adapter);
+	int i;
+
+	/* poll until we see the reset actually happen */
+	for (i = 0; i < IAVF_RESET_DETECTED_CNT; i++) {
+		if (iavf_is_reset(hw))
+			return true;
+		rte_delay_ms(20);
+	}
+
+	return false;
+}
+
 /*
  * Handle hardware reset
  */
-int
+void
 iavf_handle_hw_reset(struct rte_eth_dev *dev)
 {
-	struct iavf_adapter *adapter =
-		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+	struct iavf_adapter *adapter = dev->data->dev_private;
 	int ret;

+	if (!dev->data->dev_started)
+		return;
+
+	if (!iavf_is_reset_detected(adapter)) {
+		PMD_DRV_LOG(DEBUG, "reset not start\n");
+		return;
+	}
+
 	vf->in_reset_recovery = true;
 	iavf_set_no_poll(adapter, false);

@@ -3007,6 +3032,7 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev)
 	ret = iavf_dev_start(dev);
 	if (ret)
 		goto error;
+
 	dev->data->dev_started = 1;
 	goto exit;

@@ -3015,7 +3041,8 @@ error:
 exit:
 	vf->in_reset_recovery = false;
 	iavf_set_no_poll(adapter, false);
-	return ret;
+
+	return;
 }

 void
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.566084319 +0800
+++ 0015-net-iavf-fix-crash-on-VF-start.patch	2024-03-05 17:39:30.683566490 +0800
@@ -1 +1 @@
-From 80fb3c92045824da18af333ee8a758145b54b19f Mon Sep 17 00:00:00 2001
+From 9aa2da4c022425461eb21ffbfef889edae9bd881 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 80fb3c92045824da18af333ee8a758145b54b19f ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ice: fix memory leaks' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (14 preceding siblings ...)
  2024-03-05  9:45 ` patch 'net/iavf: fix crash on VF start' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'kernel/freebsd: fix module build on FreeBSD 14' " Xueming Li
                   ` (120 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Wenjun Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 943de5c27e81245ded7d392cea48dd3ee65898e5 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Sun, 7 Jan 2024 06:50:53 -0500
Subject: [PATCH] net/ice: fix memory leaks
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 546ee62dd441730daae181e336f30b315c5fb16f ]

Free memory for AQ buffer at icd_move_recfg_lan_txq
Free memory for profile list at ice_tm_conf_uninit

Fixes: 8c481c3bb65b ("net/ice: support queue and queue group bandwidth limit")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenjun Wu <wenjun1.wu@intel.com>
---
 drivers/net/ice/ice_tm.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/ice/ice_tm.c b/drivers/net/ice/ice_tm.c
index f5ea47ae83..65b9fdf320 100644
--- a/drivers/net/ice/ice_tm.c
+++ b/drivers/net/ice/ice_tm.c
@@ -58,8 +58,15 @@ void
 ice_tm_conf_uninit(struct rte_eth_dev *dev)
 {
 	struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+	struct ice_tm_shaper_profile *shaper_profile;
 	struct ice_tm_node *tm_node;

+	/* clear profile */
+	while ((shaper_profile = TAILQ_FIRST(&pf->tm_conf.shaper_profile_list))) {
+		TAILQ_REMOVE(&pf->tm_conf.shaper_profile_list, shaper_profile, node);
+		rte_free(shaper_profile);
+	}
+
 	/* clear node configuration */
 	while ((tm_node = TAILQ_FIRST(&pf->tm_conf.queue_list))) {
 		TAILQ_REMOVE(&pf->tm_conf.queue_list, tm_node, node);
@@ -648,6 +655,8 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
 	uint16_t buf_size = ice_struct_size(buf, txqs, 1);

 	buf = (struct ice_aqc_move_txqs_data *)ice_malloc(hw, sizeof(*buf));
+	if (buf == NULL)
+		return -ENOMEM;

 	queue_parent_node = queue_sched_node->parent;
 	buf->src_teid = queue_parent_node->info.node_teid;
@@ -659,6 +668,7 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
 					NULL, buf, buf_size, &txqs_moved, NULL);
 	if (ret || txqs_moved == 0) {
 		PMD_DRV_LOG(ERR, "move lan queue %u failed", queue_id);
+		rte_free(buf);
 		return ICE_ERR_PARAM;
 	}

@@ -668,12 +678,14 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
 	} else {
 		PMD_DRV_LOG(ERR, "invalid children number %d for queue %u",
 			    queue_parent_node->num_children, queue_id);
+		rte_free(buf);
 		return ICE_ERR_PARAM;
 	}
 	dst_node->children[dst_node->num_children++] = queue_sched_node;
 	queue_sched_node->parent = dst_node;
 	ice_sched_query_elem(hw, queue_sched_node->info.node_teid, &queue_sched_node->info);

+	rte_free(buf);
 	return ret;
 }

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.595962520 +0800
+++ 0016-net-ice-fix-memory-leaks.patch	2024-03-05 17:39:30.683566490 +0800
@@ -1 +1 @@
-From 546ee62dd441730daae181e336f30b315c5fb16f Mon Sep 17 00:00:00 2001
+From 943de5c27e81245ded7d392cea48dd3ee65898e5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 546ee62dd441730daae181e336f30b315c5fb16f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index b570798f07..c00ecb6a97 100644
+index f5ea47ae83..65b9fdf320 100644
@@ -22 +24 @@
-@@ -59,8 +59,15 @@ void
+@@ -58,8 +58,15 @@ void
@@ -38 +40 @@
-@@ -636,6 +643,8 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
+@@ -648,6 +655,8 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
@@ -47 +49 @@
-@@ -647,6 +656,7 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
+@@ -659,6 +668,7 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
@@ -55 +57 @@
-@@ -656,12 +666,14 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
+@@ -668,12 +678,14 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,

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

* patch 'kernel/freebsd: fix module build on FreeBSD 14' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (15 preceding siblings ...)
  2024-03-05  9:45 ` patch 'net/ice: fix memory leaks' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:45 ` patch 'build: fix reasons conflict' " Xueming Li
                   ` (119 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Daxue Gao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 54e4045c780242359f0432af50093b09e6496944 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 19 Dec 2023 11:29:59 +0000
Subject: [PATCH] kernel/freebsd: fix module build on FreeBSD 14
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5eedf66ac0e5ce62cd333e523996c63a3c4c2c00 ]

When building nic_uio module on FreeBSD 14, a build error is given in
the DRIVER_MODULE macro:

nic_uio.c:84:81: error: too many arguments provided to function-like macro invocation
DRIVER_MODULE(nic_uio, pci, nic_uio_driver, nic_uio_devclass, nic_uio_modevent, 0);
                                                                                ^
On FreeBSD 14, the devclass parameter is dropped from the macro,
so we conditionally compile a different invocation
for BSD versions before/after v14.

Bugzilla ID: 1335

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
---
 kernel/freebsd/nic_uio/nic_uio.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/freebsd/nic_uio/nic_uio.c b/kernel/freebsd/nic_uio/nic_uio.c
index 7a81694c92..0043892870 100644
--- a/kernel/freebsd/nic_uio/nic_uio.c
+++ b/kernel/freebsd/nic_uio/nic_uio.c
@@ -78,10 +78,14 @@ struct pci_bdf {
 	uint32_t function;
 };

-static devclass_t nic_uio_devclass;
-
 DEFINE_CLASS_0(nic_uio, nic_uio_driver, nic_uio_methods, sizeof(struct nic_uio_softc));
+
+#if __FreeBSD_version < 1400000
+static devclass_t nic_uio_devclass;
 DRIVER_MODULE(nic_uio, pci, nic_uio_driver, nic_uio_devclass, nic_uio_modevent, 0);
+#else
+DRIVER_MODULE(nic_uio, pci, nic_uio_driver, nic_uio_modevent, 0);
+#endif

 static int
 nic_uio_mmap(struct cdev *cdev, vm_ooffset_t offset, vm_paddr_t *paddr,
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.621323621 +0800
+++ 0017-kernel-freebsd-fix-module-build-on-FreeBSD-14.patch	2024-03-05 17:39:30.683566490 +0800
@@ -1 +1 @@
-From 5eedf66ac0e5ce62cd333e523996c63a3c4c2c00 Mon Sep 17 00:00:00 2001
+From 54e4045c780242359f0432af50093b09e6496944 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5eedf66ac0e5ce62cd333e523996c63a3c4c2c00 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org

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

* patch 'build: fix reasons conflict' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (16 preceding siblings ...)
  2024-03-05  9:45 ` patch 'kernel/freebsd: fix module build on FreeBSD 14' " Xueming Li
@ 2024-03-05  9:45 ` Xueming Li
  2024-03-05  9:46 ` patch 'app/graph: fix build reason' " Xueming Li
                   ` (118 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:45 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7872a7b0bd6270b7fb47ebd3f10d70ff2e118d54 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 31 Jan 2024 18:45:51 +0100
Subject: [PATCH] build: fix reasons conflict
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a206a01537eb04fabad9236372991ace6c5c0b4b ]

The "_disable_reason" variables are subject to naming conflicts.

This has been caught while looking at mingw builds where the graph
application was skipped with an <unknown_reason> (which is caused by a
missing reason variable set in app/graph/meson.build) and the graph
library was skipped with the same <unknown_reason> too, even though
this library meson does set a proper reason variable.

Example in GHA:

=================
Content Skipped
=================

apps:
	dumpcap:	not supported on Windows
	graph:	<unknown reason>
	pdump:	not supported on Windows
...

libs:
	acl:	not supported on Windows
	bbdev:	not supported on Windows
...
	graph:	<unknown reason>
	node:	not supported on Windows

Prefix all those variables with the type of component.

Fixes: ecf75180171b ("build: list selected applications")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 app/meson.build                |  2 +-
 drivers/common/qat/meson.build | 10 +++++-----
 drivers/meson.build            |  4 ++--
 lib/meson.build                |  2 +-
 meson.build                    |  6 +++---
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 8aaed59f39..21b6da29b3 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -93,7 +93,7 @@ foreach app:apps
     if not build
         if reason != ''
             dpdk_apps_disabled += app
-            set_variable(app.underscorify() + '_disable_reason', reason)
+            set_variable('app_' + app.underscorify() + '_disable_reason', reason)
         endif
         continue
     endif
diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
index 5c36fbb270..62abcb6fe3 100644
--- a/drivers/common/qat/meson.build
+++ b/drivers/common/qat/meson.build
@@ -17,13 +17,13 @@ qat_compress_relpath = '../../' + qat_compress_path
 if disable_drivers.contains(qat_crypto_path)
     qat_crypto = false
     dpdk_drvs_disabled += qat_crypto_path
-    set_variable(qat_crypto_path.underscorify() + '_disable_reason',
+    set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
             'Explicitly disabled via build config')
 endif
 if disable_drivers.contains(qat_compress_path)
     qat_compress = false
     dpdk_drvs_disabled += qat_compress_path
-    set_variable(qat_compress_path.underscorify() + '_disable_reason',
+    set_variable('drv_' + qat_compress_path.underscorify() + '_disable_reason',
             'Explicitly disabled via build config')
 endif

@@ -36,7 +36,7 @@ if arch_subdir == 'arm'
     else
         qat_crypto = false
         dpdk_drvs_disabled += qat_crypto_path
-        set_variable(qat_crypto_path.underscorify() + '_disable_reason',
+        set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
         'missing dependency for Arm, libcrypto')
     endif
 else
@@ -57,7 +57,7 @@ else
         else
             qat_crypto = false
             dpdk_drvs_disabled += qat_crypto_path
-            set_variable(qat_crypto_path.underscorify() + '_disable_reason',
+            set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
                 'missing dependency, libipsecmb or libcrypto')
         endif
     elif libcrypto.found()
@@ -66,7 +66,7 @@ else
     else
         qat_crypto = false
         dpdk_drvs_disabled += qat_crypto_path
-        set_variable(qat_crypto_path.underscorify() + '_disable_reason',
+        set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
             'missing dependency, libipsecmb or libcrypto')
     endif
 endif
diff --git a/drivers/meson.build b/drivers/meson.build
index 5ba534049a..f2be71bc05 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -93,7 +93,7 @@ foreach subpath:subdirs
         if skip_class
             drv_path = join_paths(class, '*')
             dpdk_drvs_disabled += drv_path
-            set_variable(drv_path.underscorify() + '_disable_reason', reason)
+            set_variable('drv_' + drv_path.underscorify() + '_disable_reason', reason)
             continue
         endif
     endif
@@ -199,7 +199,7 @@ foreach subpath:subdirs
             # component disable printout in those cases
             if reason != ''
                 dpdk_drvs_disabled += drv_path
-                set_variable(drv_path.underscorify() + '_disable_reason', reason)
+                set_variable('drv_' + drv_path.underscorify() + '_disable_reason', reason)
             endif
             continue
         endif
diff --git a/lib/meson.build b/lib/meson.build
index 6c143ce5a6..55d483cd26 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -228,7 +228,7 @@ foreach l:libraries

     if not build
         dpdk_libs_disabled += name
-        set_variable(name.underscorify() + '_disable_reason', reason)
+        set_variable('lib_' + name.underscorify() + '_disable_reason', reason)
         continue
     endif

diff --git a/meson.build b/meson.build
index 5e161f43e5..8b248d4505 100644
--- a/meson.build
+++ b/meson.build
@@ -164,17 +164,17 @@ message(output_message + '\n')
 output_message = '\n=================\nContent Skipped\n=================\n'
 output_message += '\napps:\n\t'
 foreach app:dpdk_apps_disabled
-    reason = get_variable(app.underscorify() + '_disable_reason')
+    reason = get_variable('app_' + app.underscorify() + '_disable_reason')
     output_message += app + ':\t' + reason + '\n\t'
 endforeach
 output_message += '\nlibs:\n\t'
 foreach lib:dpdk_libs_disabled
-    reason = get_variable(lib.underscorify() + '_disable_reason')
+    reason = get_variable('lib_' + lib.underscorify() + '_disable_reason')
     output_message += lib + ':\t' + reason + '\n\t'
 endforeach
 output_message += '\ndrivers:\n\t'
 foreach drv:dpdk_drvs_disabled
-    reason = get_variable(drv.underscorify() + '_disable_reason')
+    reason = get_variable('drv_' + drv.underscorify() + '_disable_reason')
     output_message += drv + ':\t' + reason + '\n\t'
 endforeach
 message(output_message + '\n')
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.648534022 +0800
+++ 0018-build-fix-reasons-conflict.patch	2024-03-05 17:39:30.693566490 +0800
@@ -1 +1 @@
-From a206a01537eb04fabad9236372991ace6c5c0b4b Mon Sep 17 00:00:00 2001
+From 7872a7b0bd6270b7fb47ebd3f10d70ff2e118d54 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a206a01537eb04fabad9236372991ace6c5c0b4b ]
@@ -36 +38,0 @@
-Cc: stable@dpdk.org
@@ -132 +134 @@
-index 72e9138d14..8637b72ab5 100644
+index 6c143ce5a6..55d483cd26 100644
@@ -135 +137 @@
-@@ -201,7 +201,7 @@ foreach l:libraries
+@@ -228,7 +228,7 @@ foreach l:libraries

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

* patch 'app/graph: fix build reason' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (17 preceding siblings ...)
  2024-03-05  9:45 ` patch 'build: fix reasons conflict' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'telemetry: fix connected clients count' " Xueming Li
                   ` (117 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: David Marchand; +Cc: Tyler Retzlaff, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d7dc4804327b8d3df9a7a744912da00f7b82bfac Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 31 Jan 2024 18:45:52 +0100
Subject: [PATCH] app/graph: fix build reason
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d9b797782bc36707e5689ae0362be4c2267461df ]

When a component is disabled, the reason meson variable must be set to
provide an explanation why.

Since epoll is a Linux thing, report that the graph application is only
supported on Linux.

Fixes: 5b21ffb23308 ("app/graph: add CLI framework")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/graph/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/graph/meson.build b/app/graph/meson.build
index 5b0f966d99..8aefdf505c 100644
--- a/app/graph/meson.build
+++ b/app/graph/meson.build
@@ -5,6 +5,7 @@
 name = 'graph'
 build = cc.has_header('sys/epoll.h')
 if not build
+    reason = 'only supported on Linux'
     subdir_done()
 endif

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.674285723 +0800
+++ 0019-app-graph-fix-build-reason.patch	2024-03-05 17:39:30.693566490 +0800
@@ -1 +1 @@
-From d9b797782bc36707e5689ae0362be4c2267461df Mon Sep 17 00:00:00 2001
+From d7dc4804327b8d3df9a7a744912da00f7b82bfac Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d9b797782bc36707e5689ae0362be4c2267461df ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'telemetry: fix connected clients count' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (18 preceding siblings ...)
  2024-03-05  9:46 ` patch 'app/graph: fix build reason' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'telemetry: fix empty JSON dictionaries' " Xueming Li
                   ` (116 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Shaowei Sun; +Cc: Bruce Richardson, Ciara Power, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cbd1c165bb1ea86efc31c8ac309ee5e7c5f555cb Mon Sep 17 00:00:00 2001
From: Shaowei Sun <1819846787@qq.com>
Date: Tue, 30 Jan 2024 09:57:04 +0800
Subject: [PATCH] telemetry: fix connected clients count
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e14bb5f1050924de1602033596d5b417bfbeee52 ]

Telemetry can only create 10 conns by default, each of which is processed
by a thread.

When a thread fails to write using socket, the thread will end directly
without reducing the total number of conns.

This will result in the machine running for a long time, and if there are
10 failures, the telemetry will be unavailable

Fixes: 2a7d0b872f79 ("telemetry: add upper limit on connections")

Signed-off-by: Shaowei Sun <1819846787@qq.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 .mailmap                  | 1 +
 lib/telemetry/telemetry.c | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index ab0742a382..8d8f5b1b5d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1278,6 +1278,7 @@ Shally Verma <shallyv@marvell.com> <shally.verma@caviumnetworks.com>
 Shannon Nelson <snelson@pensando.io>
 Shannon Zhao <zhaoshenglong@huawei.com>
 Shaopeng He <shaopeng.he@intel.com>
+Shaowei Sun <1819846787@qq.com>
 Sharmila Podury <sharmila.podury@att.com>
 Sharon Haroni <sharon.haroni@intel.com>
 Shay Agroskin <shayagr@amazon.com>
diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index 92982842a8..ee4718a4b3 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -377,8 +377,8 @@ client_handler(void *sock_id)
 			"{\"version\":\"%s\",\"pid\":%d,\"max_output_len\":%d}",
 			telemetry_version, getpid(), MAX_OUTPUT_LEN);
 	if (write(s, info_str, strlen(info_str)) < 0) {
-		close(s);
-		return NULL;
+		TMTY_LOG(ERR, "Socket write base info to client failed\n");
+		goto exit;
 	}

 	/* receive data is not null terminated */
@@ -403,6 +403,7 @@ client_handler(void *sock_id)

 		bytes = read(s, buffer, sizeof(buffer) - 1);
 	}
+exit:
 	close(s);
 	rte_atomic_fetch_sub_explicit(&v2_clients, 1, rte_memory_order_relaxed);
 	return NULL;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.698145124 +0800
+++ 0020-telemetry-fix-connected-clients-count.patch	2024-03-05 17:39:30.693566490 +0800
@@ -1 +1 @@
-From e14bb5f1050924de1602033596d5b417bfbeee52 Mon Sep 17 00:00:00 2001
+From cbd1c165bb1ea86efc31c8ac309ee5e7c5f555cb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e14bb5f1050924de1602033596d5b417bfbeee52 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index aa569ff456..a0756974e2 100644
+index ab0742a382..8d8f5b1b5d 100644
@@ -31 +33 @@
-@@ -1281,6 +1281,7 @@ Shally Verma <shallyv@marvell.com> <shally.verma@caviumnetworks.com>
+@@ -1278,6 +1278,7 @@ Shally Verma <shallyv@marvell.com> <shally.verma@caviumnetworks.com>
@@ -40 +42 @@
-index 47846ef868..d4720197ba 100644
+index 92982842a8..ee4718a4b3 100644
@@ -43 +45 @@
-@@ -378,8 +378,8 @@ client_handler(void *sock_id)
+@@ -377,8 +377,8 @@ client_handler(void *sock_id)
@@ -49 +51 @@
-+		TMTY_LOG_LINE(ERR, "Socket write base info to client failed");
++		TMTY_LOG(ERR, "Socket write base info to client failed\n");
@@ -54 +56 @@
-@@ -404,6 +404,7 @@ client_handler(void *sock_id)
+@@ -403,6 +403,7 @@ client_handler(void *sock_id)

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

* patch 'telemetry: fix empty JSON dictionaries' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (19 preceding siblings ...)
  2024-03-05  9:46 ` patch 'telemetry: fix connected clients count' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'gro: fix reordering of packets' " Xueming Li
                   ` (115 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Jonathan Erb; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b5c580913f3fd171f6324940b978bca487c36fc4 Mon Sep 17 00:00:00 2001
From: Jonathan Erb <jonathan.erb@threater.com>
Date: Thu, 18 Jan 2024 12:26:02 -0500
Subject: [PATCH] telemetry: fix empty JSON dictionaries
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 324ec1df541711ca829f4d99b7e2d32ffe38d3ca ]

Fix to allow telemetry to handle empty dictionaries correctly.

This patch resolves an issue where empty dictionaries are reported
by telemetry as '[]' rather than '{}'. Initializing the output
buffer based on the container type resolves the issue.

Fixes: c933bb5177ca ("telemetry: support array values in data object")

Signed-off-by: Jonathan Erb <jonathan.erb@threater.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 .mailmap                  | 2 +-
 lib/telemetry/telemetry.c | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index 8d8f5b1b5d..bff68cefd8 100644
--- a/.mailmap
+++ b/.mailmap
@@ -675,7 +675,7 @@ John Ousterhout <ouster@cs.stanford.edu>
 John Romein <romein@astron.nl>
 John W. Linville <linville@tuxdriver.com>
 Jonas Pfefferle <jpf@zurich.ibm.com> <pepperjo@japf.ch>
-Jonathan Erb <jonathan.erb@threatblockr.com> <jonathan.erb@banduracyber.com>
+Jonathan Erb <jonathan.erb@threater.com> <jonathan.erb@threatblockr.com> <jonathan.erb@banduracyber.com>
 Jonathan Tsai <jonathan1.tsai@intel.com>
 Jon DeVree <nuxi@vault24.org>
 Jon Loeliger <jdl@netgate.com>
diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index ee4718a4b3..88d6410980 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -169,7 +169,11 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
 		d->type != TEL_ARRAY_INT && d->type != TEL_ARRAY_STRING)
 		return snprintf(out_buf, buf_len, "null");

-	used = rte_tel_json_empty_array(out_buf, buf_len, 0);
+	if (d->type == TEL_DICT)
+		used = rte_tel_json_empty_obj(out_buf, buf_len, 0);
+	else
+		used = rte_tel_json_empty_array(out_buf, buf_len, 0);
+
 	if (d->type == TEL_ARRAY_UINT)
 		for (i = 0; i < d->data_len; i++)
 			used = rte_tel_json_add_array_uint(out_buf,
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.721663925 +0800
+++ 0021-telemetry-fix-empty-JSON-dictionaries.patch	2024-03-05 17:39:30.703566491 +0800
@@ -1 +1 @@
-From 324ec1df541711ca829f4d99b7e2d32ffe38d3ca Mon Sep 17 00:00:00 2001
+From b5c580913f3fd171f6324940b978bca487c36fc4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 324ec1df541711ca829f4d99b7e2d32ffe38d3ca ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index a0756974e2..de339562f4 100644
+index 8d8f5b1b5d..bff68cefd8 100644
@@ -26 +28 @@
-@@ -676,7 +676,7 @@ John Ousterhout <ouster@cs.stanford.edu>
+@@ -675,7 +675,7 @@ John Ousterhout <ouster@cs.stanford.edu>
@@ -36 +38 @@
-index d4720197ba..1663bd8c68 100644
+index ee4718a4b3..88d6410980 100644
@@ -39 +41 @@
-@@ -170,7 +170,11 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
+@@ -169,7 +169,11 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)

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

* patch 'gro: fix reordering of packets' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (20 preceding siblings ...)
  2024-03-05  9:46 ` patch 'telemetry: fix empty JSON dictionaries' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'ci: update versions of actions in GHA' " Xueming Li
                   ` (114 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Kumara Parameshwaran; +Cc: Jiayu Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d7a30d20c42e7409e1e9e3f3ad525898982befb3 Mon Sep 17 00:00:00 2001
From: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Date: Mon, 8 Jan 2024 21:34:53 +0530
Subject: [PATCH] gro: fix reordering of packets
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 547f294357690ab8501f120457a82919b1217517 ]

In the current implementation when a packet is received with
special TCP flag(s) set, only that packet is delivered out of order.
There could be already coalesced packets in the GRO table
belonging to the same flow but not delivered.
This fix makes sure that the entire segment is delivered with the
special flag(s) set which is how the Linux GRO is also implemented.

Fixes: 0d2cbe59b719 ("lib/gro: support TCP/IPv4")

Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Reviewed-by: Jiayu Hu <hujiayu.hu@foxmail.com>
---
 lib/gro/gro_tcp.h          |  9 +++++++++
 lib/gro/gro_tcp4.c         | 36 +++++++++++++++++++++++++++---------
 lib/gro/gro_tcp_internal.h |  2 +-
 lib/gro/gro_vxlan_tcp4.c   |  5 +++--
 4 files changed, 40 insertions(+), 12 deletions(-)

diff --git a/lib/gro/gro_tcp.h b/lib/gro/gro_tcp.h
index d926c4b8cc..2c68b5f23e 100644
--- a/lib/gro/gro_tcp.h
+++ b/lib/gro/gro_tcp.h
@@ -19,6 +19,8 @@
 #define INVALID_TCP_HDRLEN(len) \
 	(((len) < sizeof(struct rte_tcp_hdr)) || ((len) > MAX_TCP_HLEN))

+#define VALID_GRO_TCP_FLAGS (RTE_TCP_ACK_FLAG | RTE_TCP_PSH_FLAG | RTE_TCP_FIN_FLAG)
+
 struct cmn_tcp_key {
 	struct rte_ether_addr eth_saddr;
 	struct rte_ether_addr eth_daddr;
@@ -81,11 +83,13 @@ merge_two_tcp_packets(struct gro_tcp_item *item,
 		struct rte_mbuf *pkt,
 		int cmp,
 		uint32_t sent_seq,
+		uint8_t tcp_flags,
 		uint16_t ip_id,
 		uint16_t l2_offset)
 {
 	struct rte_mbuf *pkt_head, *pkt_tail, *lastseg;
 	uint16_t hdr_len, l2_len;
+	struct rte_tcp_hdr *tcp_hdr;

 	if (cmp > 0) {
 		pkt_head = item->firstseg;
@@ -128,6 +132,11 @@ merge_two_tcp_packets(struct gro_tcp_item *item,
 	/* update MBUF metadata for the merged packet */
 	pkt_head->nb_segs += pkt_tail->nb_segs;
 	pkt_head->pkt_len += pkt_tail->pkt_len;
+	if (tcp_flags != RTE_TCP_ACK_FLAG) {
+		tcp_hdr = rte_pktmbuf_mtod_offset(pkt, struct rte_tcp_hdr *,
+						l2_offset + pkt_head->l2_len + pkt_head->l3_len);
+		tcp_hdr->tcp_flags |= tcp_flags;
+	}

 	return 1;
 }
diff --git a/lib/gro/gro_tcp4.c b/lib/gro/gro_tcp4.c
index 6645de592b..c8b8d7990c 100644
--- a/lib/gro/gro_tcp4.c
+++ b/lib/gro/gro_tcp4.c
@@ -126,6 +126,7 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
 	uint32_t item_idx;
 	uint32_t i, max_flow_num, remaining_flow_num;
 	uint8_t find;
+	uint32_t item_start_idx;

 	/*
 	 * Don't process the packet whose TCP header length is greater
@@ -139,11 +140,8 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
 	tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);
 	hdr_len = pkt->l2_len + pkt->l3_len + pkt->l4_len;

-	/*
-	 * Don't process the packet which has FIN, SYN, RST, PSH, URG, ECE
-	 * or CWR set.
-	 */
-	if (tcp_hdr->tcp_flags != RTE_TCP_ACK_FLAG)
+	/* Return early if the TCP flags are not handled in GRO layer */
+	if (tcp_hdr->tcp_flags & ~VALID_GRO_TCP_FLAGS)
 		return -1;

 	/* trim the tail padding bytes */
@@ -183,13 +181,35 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
 		if (tbl->flows[i].start_index != INVALID_ARRAY_INDEX) {
 			if (is_same_tcp4_flow(tbl->flows[i].key, key)) {
 				find = 1;
+				item_start_idx = tbl->flows[i].start_index;
 				break;
 			}
 			remaining_flow_num--;
 		}
 	}

-	if (find == 0) {
+	if (find == 1) {
+		/*
+		 * Any packet with additional flags like PSH,FIN should be processed
+		 * and flushed immediately.
+		 * Hence marking the start time to 0, so that the packets will be flushed
+		 * immediately in timer mode.
+		 */
+		if (tcp_hdr->tcp_flags & (RTE_TCP_ACK_FLAG | RTE_TCP_PSH_FLAG | RTE_TCP_FIN_FLAG)) {
+			if (tcp_hdr->tcp_flags != RTE_TCP_ACK_FLAG)
+				tbl->items[item_start_idx].start_time = 0;
+			return process_tcp_item(pkt, tcp_hdr, tcp_dl, tbl->items,
+						tbl->flows[i].start_index, &tbl->item_num,
+						tbl->max_item_num, ip_id, is_atomic, start_time);
+		} else {
+			return -1;
+		}
+	}
+	/*
+	 * Add new flow to the table only if contains ACK flag with data.
+	 * Do not add any packets with additional tcp flags to the GRO table
+	 */
+	if (tcp_hdr->tcp_flags == RTE_TCP_ACK_FLAG) {
 		sent_seq = rte_be_to_cpu_32(tcp_hdr->sent_seq);
 		item_idx = insert_new_tcp_item(pkt, tbl->items, &tbl->item_num,
 						tbl->max_item_num, start_time,
@@ -209,9 +229,7 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
 		return 0;
 	}

-	return process_tcp_item(pkt, tcp_hdr, tcp_dl, tbl->items, tbl->flows[i].start_index,
-						&tbl->item_num, tbl->max_item_num,
-						ip_id, is_atomic, start_time);
+	return -1;
 }

 /*
diff --git a/lib/gro/gro_tcp_internal.h b/lib/gro/gro_tcp_internal.h
index cc84abeaeb..e4855da1ad 100644
--- a/lib/gro/gro_tcp_internal.h
+++ b/lib/gro/gro_tcp_internal.h
@@ -101,7 +101,7 @@ process_tcp_item(struct rte_mbuf *pkt,
 				is_atomic);
 		if (cmp) {
 			if (merge_two_tcp_packets(&items[cur_idx],
-						pkt, cmp, sent_seq, ip_id, 0))
+						pkt, cmp, sent_seq, tcp_hdr->tcp_flags, ip_id, 0))
 				return 1;
 			/*
 			 * Fail to merge the two packets, as the packet
diff --git a/lib/gro/gro_vxlan_tcp4.c b/lib/gro/gro_vxlan_tcp4.c
index 6ab7001922..8dd62a949c 100644
--- a/lib/gro/gro_vxlan_tcp4.c
+++ b/lib/gro/gro_vxlan_tcp4.c
@@ -239,10 +239,11 @@ merge_two_vxlan_tcp4_packets(struct gro_vxlan_tcp4_item *item,
 		struct rte_mbuf *pkt,
 		int cmp,
 		uint32_t sent_seq,
+		uint8_t tcp_flags,
 		uint16_t outer_ip_id,
 		uint16_t ip_id)
 {
-	if (merge_two_tcp_packets(&item->inner_item, pkt, cmp, sent_seq,
+	if (merge_two_tcp_packets(&item->inner_item, pkt, cmp, sent_seq, tcp_flags,
 				ip_id, pkt->outer_l2_len +
 				pkt->outer_l3_len)) {
 		/* Update the outer IPv4 ID to the large value. */
@@ -413,7 +414,7 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt,
 				tcp_dl, outer_is_atomic, is_atomic);
 		if (cmp) {
 			if (merge_two_vxlan_tcp4_packets(&(tbl->items[cur_idx]),
-						pkt, cmp, sent_seq,
+						pkt, cmp, sent_seq, tcp_hdr->tcp_flags,
 						outer_ip_id, ip_id))
 				return 1;
 			/*
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.746546825 +0800
+++ 0022-gro-fix-reordering-of-packets.patch	2024-03-05 17:39:30.703566491 +0800
@@ -1 +1 @@
-From 547f294357690ab8501f120457a82919b1217517 Mon Sep 17 00:00:00 2001
+From d7a30d20c42e7409e1e9e3f3ad525898982befb3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 547f294357690ab8501f120457a82919b1217517 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index bbd2f9c16a..e9be7b95d1 100644
+index d926c4b8cc..2c68b5f23e 100644
@@ -65 +67 @@
-index d6c0f9182d..855cc7a71d 100644
+index 6645de592b..c8b8d7990c 100644
@@ -152 +154 @@
-index 2752650389..29d4a2e13d 100644
+index 6ab7001922..8dd62a949c 100644

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

* patch 'ci: update versions of actions in GHA' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (21 preceding siblings ...)
  2024-03-05  9:46 ` patch 'gro: fix reordering of packets' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'eal/x86: add AMD vendor check for TSC calibration' " Xueming Li
                   ` (113 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: David Marchand; +Cc: Aaron Conole, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a9e8fc49d9c537910ba78371b84766395004e2ef Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 31 Jan 2024 18:44:36 +0100
Subject: [PATCH] ci: update versions of actions in GHA
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2ea7994ae39ff979b15899ec9eb9c68c944d4b11 ]

GitHub started deprecating GHA actions based on Node 16 [1].
For now, only warnings are raised, but we might as well switch to v4
versions of the common actions, now.

Link: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 .github/workflows/build.yml | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 272a6ffc7f..6b35c56da0 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -72,7 +72,7 @@ jobs:

     steps:
     - name: Checkout sources
-      uses: actions/checkout@v3
+      uses: actions/checkout@v4
     - name: Generate cache keys
       id: get_ref_keys
       run: |
@@ -80,7 +80,7 @@ jobs:
         echo 'libabigail=libabigail-${{ env.LIBABIGAIL_VERSION }}-${{ matrix.config.os }}' >> $GITHUB_OUTPUT
         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
     - name: Retrieve ccache cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       with:
         path: ~/.ccache
         key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
@@ -88,13 +88,13 @@ jobs:
           ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
     - name: Retrieve libabigail cache
       id: libabigail-cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       if: env.ABI_CHECKS == 'true'
       with:
         path: libabigail
         key: ${{ steps.get_ref_keys.outputs.libabigail }}
     - name: Retrieve ABI reference cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       if: env.ABI_CHECKS == 'true'
       with:
         path: reference
@@ -143,7 +143,7 @@ jobs:
       run: .ci/linux-build.sh
     - name: Upload logs on failure
       if: failure()
-      uses: actions/upload-artifact@v3
+      uses: actions/upload-artifact@v4
       with:
         name: meson-logs-${{ join(matrix.config.*, '-') }}
         path: |
@@ -171,7 +171,7 @@ jobs:
         echo 'image=image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d) >> $GITHUB_OUTPUT
     - name: Retrieve image cache
       id: image_cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       with:
         path: ~/.image
         key: ${{ steps.get_keys.outputs.image }}
@@ -218,7 +218,7 @@ jobs:

     steps:
     - name: Checkout sources
-      uses: actions/checkout@v3
+      uses: actions/checkout@v4
     - name: Generate various keys
       id: get_keys
       run: |
@@ -226,7 +226,7 @@ jobs:
         echo 'logs=meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':' >> $GITHUB_OUTPUT
     - name: Retrieve image cache
       id: image_cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       with:
         path: ~/.image
         key: ${{ needs.prepare-container-images.outputs.image }}
@@ -236,7 +236,7 @@ jobs:
         echo 'Image ${{ matrix.config.image }} is not cached.'
         false
     - name: Retrieve ccache cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       with:
         path: ~/.ccache
         key: ${{ steps.get_keys.outputs.ccache }}-${{ github.ref }}
@@ -276,7 +276,7 @@ jobs:
       run: docker kill dpdk
     - name: Upload logs on failure
       if: failure()
-      uses: actions/upload-artifact@v3
+      uses: actions/upload-artifact@v4
       with:
         name: ${{ steps.get_keys.outputs.logs }}
         path: |
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.776755526 +0800
+++ 0023-ci-update-versions-of-actions-in-GHA.patch	2024-03-05 17:39:30.703566491 +0800
@@ -1 +1 @@
-From 2ea7994ae39ff979b15899ec9eb9c68c944d4b11 Mon Sep 17 00:00:00 2001
+From a9e8fc49d9c537910ba78371b84766395004e2ef Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2ea7994ae39ff979b15899ec9eb9c68c944d4b11 ]
@@ -12,2 +14,0 @@
-Cc: stable@dpdk.org
-
@@ -21 +22 @@
-index 421207c241..776fbf6f30 100644
+index 272a6ffc7f..6b35c56da0 100644

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

* patch 'eal/x86: add AMD vendor check for TSC calibration' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (22 preceding siblings ...)
  2024-03-05  9:46 ` patch 'ci: update versions of actions in GHA' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05 11:17   ` Tummala, Sivaprasad
  2024-03-05  9:46 ` patch 'doc: remove cmdline polling mode deprecation notice' " Xueming Li
                   ` (112 subsequent siblings)
  136 siblings, 1 reply; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Sivaprasad Tummala; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5f30c47cc54f320a4f7bffdd06abcbe6cc2bc7d0 Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Wed, 22 Nov 2023 23:27:30 -0800
Subject: [PATCH] eal/x86: add AMD vendor check for TSC calibration
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 31d72ff4dc7c057366153e9918ac92bf9123a3bc ]

AMD Epyc processors doesn't support get_tsc_freq_arch().
The patch allows graceful return to allow fallback to
alternate TSC calibration.

Fixes: 3dbc565e81a0 ("timer: honor arch-specific TSC frequency query")

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/eal/x86/rte_cycles.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/lib/eal/x86/rte_cycles.c b/lib/eal/x86/rte_cycles.c
index 69ed59b4f0..f147a5231d 100644
--- a/lib/eal/x86/rte_cycles.c
+++ b/lib/eal/x86/rte_cycles.c
@@ -10,6 +10,10 @@
 #include <cpuid.h>
 #endif

+#define x86_vendor_amd(t1, t2, t3)        \
+	((t1 == 0x68747541) && /* htuA */   \
+	 (t2 == 0x444d4163) && /* DMAc */   \
+	 (t3 == 0x69746e65))   /* itne */

 #include "eal_private.h"

@@ -110,6 +114,18 @@ get_tsc_freq_arch(void)
 	uint8_t mult, model;
 	int32_t ret;

+#ifdef RTE_TOOLCHAIN_MSVC
+	__cpuid(cpuinfo, 0);
+	a = cpuinfo[0];
+	b = cpuinfo[1];
+	c = cpuinfo[2];
+	d = cpuinfo[3];
+#else
+	__cpuid(0, a, b, c, d);
+#endif
+	if (x86_vendor_amd(b, c, d))
+		return 0;
+
 	/*
 	 * Time Stamp Counter and Nominal Core Crystal Clock
 	 * Information Leaf
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.808571927 +0800
+++ 0024-eal-x86-add-AMD-vendor-check-for-TSC-calibration.patch	2024-03-05 17:39:30.703566491 +0800
@@ -1 +1 @@
-From 31d72ff4dc7c057366153e9918ac92bf9123a3bc Mon Sep 17 00:00:00 2001
+From 5f30c47cc54f320a4f7bffdd06abcbe6cc2bc7d0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 31d72ff4dc7c057366153e9918ac92bf9123a3bc ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'doc: remove cmdline polling mode deprecation notice' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (23 preceding siblings ...)
  2024-03-05  9:46 ` patch 'eal/x86: add AMD vendor check for TSC calibration' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'eal: verify strdup return' " Xueming Li
                   ` (111 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bb34c79bf4d107dc8ccd952c48960523b58527ff Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 11 Dec 2023 08:52:37 -0800
Subject: [PATCH] doc: remove cmdline polling mode deprecation notice
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1b4cdb197ce38ac719b9b0b98fc55c75dbb03450 ]

cmdline_poll has been removed by:
commit f44f2edd198a ("cmdline: remove poll function")
but deprecation notice was left behind.

Fixes: f44f2edd198a ("cmdline: remove poll function")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/rel_notes/deprecation.rst | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 81b93515cb..10630ba255 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -27,10 +27,6 @@ Deprecation Notices
 * kvargs: The function ``rte_kvargs_process`` will get a new parameter
   for returning key match count. It will ease handling of no-match case.

-* cmdline: The function ``cmdline_poll`` does not work correctly on either
-  Linux or Windows and is unused by any part of DPDK.
-  This function is now deprecated and will be removed in DPDK 23.11.
-
 * telemetry: The functions ``rte_tel_data_add_array_u64`` and ``rte_tel_data_add_dict_u64``,
   used by telemetry callbacks for adding unsigned integer values to be returned to the user,
   are renamed to ``rte_tel_data_add_array_uint`` and ``rte_tel_data_add_dict_uint`` respectively.
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.842664829 +0800
+++ 0025-doc-remove-cmdline-polling-mode-deprecation-notice.patch	2024-03-05 17:39:30.703566491 +0800
@@ -1 +1 @@
-From 1b4cdb197ce38ac719b9b0b98fc55c75dbb03450 Mon Sep 17 00:00:00 2001
+From bb34c79bf4d107dc8ccd952c48960523b58527ff Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1b4cdb197ce38ac719b9b0b98fc55c75dbb03450 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'eal: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (24 preceding siblings ...)
  2024-03-05  9:46 ` patch 'doc: remove cmdline polling mode deprecation notice' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'bus/dpaa: " Xueming Li
                   ` (110 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2feed5de509bed9536955e38c0a917126fbe6283 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:02 +0000
Subject: [PATCH] eal: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5821a384a4ca611e0f67786400b9f5b18f34a416 ]

Add verify strdup() return value logic.

Fixes: 293c53d8b23c ("eal: add telemetry callbacks")
Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/eal/common/eal_common_options.c | 24 ++++++++++++++++++++++--
 lib/eal/linux/eal_dev.c             |  2 ++
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
index e9ba01fb89..aec51736f2 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -226,6 +226,8 @@ eal_save_args(int argc, char **argv)
 		if (strcmp(argv[i], "--") == 0)
 			break;
 		eal_args[i] = strdup(argv[i]);
+		if (eal_args[i] == NULL)
+			goto error;
 	}
 	eal_args[i++] = NULL; /* always finish with NULL */

@@ -235,13 +237,31 @@ eal_save_args(int argc, char **argv)

 	eal_app_args = calloc(argc - i + 1, sizeof(*eal_args));
 	if (eal_app_args == NULL)
-		return -1;
+		goto error;

-	for (j = 0; i < argc; j++, i++)
+	for (j = 0; i < argc; j++, i++) {
 		eal_app_args[j] = strdup(argv[i]);
+		if (eal_app_args[j] == NULL)
+			goto error;
+	}
 	eal_app_args[j] = NULL;

 	return 0;
+
+error:
+	if (eal_app_args != NULL) {
+		i = 0;
+		while (eal_app_args[i] != NULL)
+			free(eal_app_args[i++]);
+		free(eal_app_args);
+		eal_app_args = NULL;
+	}
+	i = 0;
+	while (eal_args[i] != NULL)
+		free(eal_args[i++]);
+	free(eal_args);
+	eal_args = NULL;
+	return -1;
 }
 #endif

diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index ac76f6174d..c0ba98852b 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -182,6 +182,8 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
 			i += 14;
 			strlcpy(pci_slot_name, buf, sizeof(subsystem));
 			event->devname = strdup(pci_slot_name);
+			if (event->devname == NULL)
+				return -1;
 		}
 		for (; i < length; i++) {
 			if (*buf == '\0')
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.864153229 +0800
+++ 0026-eal-verify-strdup-return.patch	2024-03-05 17:39:30.713566491 +0800
@@ -1 +1 @@
-From 5821a384a4ca611e0f67786400b9f5b18f34a416 Mon Sep 17 00:00:00 2001
+From 2feed5de509bed9536955e38c0a917126fbe6283 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5821a384a4ca611e0f67786400b9f5b18f34a416 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index d9748076b4..e541f07939 100644
+index e9ba01fb89..aec51736f2 100644
@@ -66 +68 @@
-index e678dce6c7..fff4e8fa83 100644
+index ac76f6174d..c0ba98852b 100644

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

* patch 'bus/dpaa: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (25 preceding siblings ...)
  2024-03-05  9:46 ` patch 'eal: verify strdup return' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'bus/fslmc: " Xueming Li
                   ` (109 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Sachin Saxena, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8c8e7aeb9062db3e911628ec955af657432c7b61 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:03 +0000
Subject: [PATCH] bus/dpaa: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2729fa6654b328bb4b9a0ede6d1e1019bd6caf0c ]

Add verify strdup return value logic.

Fixes: e79df833d3f6 ("bus/dpaa: support hotplug ops")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index e57159f5d8..a67f5c9ab5 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -791,6 +791,10 @@ dpaa_bus_dev_iterate(const void *start, const char *str,

 	/* Now that name=device_name format is available, split */
 	dup = strdup(str);
+	if (dup == NULL) {
+		DPAA_BUS_DEBUG("Dup string (%s) failed!\n", str);
+		return NULL;
+	}
 	dev_name = dup + strlen("name=");

 	if (start != NULL) {
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.889322330 +0800
+++ 0027-bus-dpaa-verify-strdup-return.patch	2024-03-05 17:39:30.713566491 +0800
@@ -1 +1 @@
-From 2729fa6654b328bb4b9a0ede6d1e1019bd6caf0c Mon Sep 17 00:00:00 2001
+From 8c8e7aeb9062db3e911628ec955af657432c7b61 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2729fa6654b328bb4b9a0ede6d1e1019bd6caf0c ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 46473603c8..5d4352bb3c 100644
+index e57159f5d8..a67f5c9ab5 100644
@@ -21 +23 @@
-@@ -792,6 +792,10 @@ dpaa_bus_dev_iterate(const void *start, const char *str,
+@@ -791,6 +791,10 @@ dpaa_bus_dev_iterate(const void *start, const char *str,

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

* patch 'bus/fslmc: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (26 preceding siblings ...)
  2024-03-05  9:46 ` patch 'bus/dpaa: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'bus/vdev: " Xueming Li
                   ` (108 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Sachin Saxena, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 82d4ba69f265c36bdfeadf9bf369b616934f1bb7 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:04 +0000
Subject: [PATCH] bus/fslmc: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 180d52bc7de2395ce9f4e5a707f4d8bb52be2fe4 ]

Add verify strdup return value logic.

Fixes: e67a61614d0b ("bus/fslmc: support device iteration")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/bus/fslmc/fslmc_bus.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 57bfb5111a..89f0f329c0 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -634,6 +634,10 @@ fslmc_bus_dev_iterate(const void *start, const char *str,

 	/* Now that name=device_name format is available, split */
 	dup = strdup(str);
+	if (dup == NULL) {
+		DPAA2_BUS_DEBUG("Dup string (%s) failed!\n", str);
+		return NULL;
+	}
 	dev_name = dup + strlen("name=");

 	if (start != NULL) {
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.917707931 +0800
+++ 0028-bus-fslmc-verify-strdup-return.patch	2024-03-05 17:39:30.713566491 +0800
@@ -1 +1 @@
-From 180d52bc7de2395ce9f4e5a707f4d8bb52be2fe4 Mon Sep 17 00:00:00 2001
+From 82d4ba69f265c36bdfeadf9bf369b616934f1bb7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 180d52bc7de2395ce9f4e5a707f4d8bb52be2fe4 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index b1af47ca7d..c155f4a2fd 100644
+index 57bfb5111a..89f0f329c0 100644
@@ -21 +23 @@
-@@ -635,6 +635,10 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
+@@ -634,6 +634,10 @@ fslmc_bus_dev_iterate(const void *start, const char *str,

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

* patch 'bus/vdev: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (27 preceding siblings ...)
  2024-03-05  9:46 ` patch 'bus/fslmc: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'dma/idxd: " Xueming Li
                   ` (107 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b4943e7a51aac2584539eef7d4cbed84b9a3da06 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:05 +0000
Subject: [PATCH] bus/vdev: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 83f275fa8124daf3a6b3e56f4b40a2be4b07a3b4 ]

Add verify strdup return value logic.

Fixes: 64051bb1f144 ("devargs: unify scratch buffer storage")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
---
 drivers/bus/vdev/vdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 7974b27295..05582f1727 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -247,6 +247,10 @@ alloc_devargs(const char *name, const char *args)
 		devargs->data = strdup(args);
 	else
 		devargs->data = strdup("");
+	if (devargs->data == NULL) {
+		free(devargs);
+		return NULL;
+	}
 	devargs->args = devargs->data;

 	ret = strlcpy(devargs->name, name, sizeof(devargs->name));
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.941769232 +0800
+++ 0029-bus-vdev-verify-strdup-return.patch	2024-03-05 17:39:30.713566491 +0800
@@ -1 +1 @@
-From 83f275fa8124daf3a6b3e56f4b40a2be4b07a3b4 Mon Sep 17 00:00:00 2001
+From b4943e7a51aac2584539eef7d4cbed84b9a3da06 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 83f275fa8124daf3a6b3e56f4b40a2be4b07a3b4 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'dma/idxd: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (28 preceding siblings ...)
  2024-03-05  9:46 ` patch 'bus/vdev: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'event/cnxk: " Xueming Li
                   ` (106 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From df74839ea1d53002f0d56b0045a6b23b391e487d Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:06 +0000
Subject: [PATCH] dma/idxd: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c ]

Add verify strdup return value logic.

Fixes: e888bb1278c6 ("dma/idxd: add bus device probing")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/dma/idxd/idxd_bus.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index 3b2d4c2b65..ba8076715d 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -261,9 +261,15 @@ static int
 is_for_this_process_use(struct rte_dsa_device *dev, const char *name)
 {
 	char *runtime_dir = strdup(rte_eal_get_runtime_dir());
-	char *prefix = basename(runtime_dir);
-	int prefixlen = strlen(prefix);
 	int retval = 0;
+	int prefixlen;
+	char *prefix;
+
+	if (runtime_dir == NULL)
+		return retval;
+
+	prefix = basename(runtime_dir);
+	prefixlen = strlen(prefix);

 	if (strncmp(name, "dpdk_", 5) == 0)
 		retval = 1;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.966258033 +0800
+++ 0030-dma-idxd-verify-strdup-return.patch	2024-03-05 17:39:30.713566491 +0800
@@ -1 +1 @@
-From 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c Mon Sep 17 00:00:00 2001
+From df74839ea1d53002f0d56b0045a6b23b391e487d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'event/cnxk: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (29 preceding siblings ...)
  2024-03-05  9:46 ` patch 'dma/idxd: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net/failsafe: fix memory leak in args parsing' " Xueming Li
                   ` (105 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cedf721f24a038780f06375573dc53c3f65ea5a8 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:07 +0000
Subject: [PATCH] event/cnxk: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b4b3a7037b2cab4dc5d004ed0fb9ec1e5911334e ]

Add verify strdup return value logic.

Fixes: 38c2e3240ba8 ("event/cnxk: add option to control SSO HWGRP QoS")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/event/cnxk/cnxk_eventdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 0c61f4c20e..1ec281e735 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -553,6 +553,9 @@ parse_list(const char *value, void *opaque, param_parse_t fn)
 	char *end = NULL;
 	char *f = s;

+	if (s == NULL)
+		return;
+
 	while (*s) {
 		if (*s == '[')
 			start = s;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.992995734 +0800
+++ 0031-event-cnxk-verify-strdup-return.patch	2024-03-05 17:39:30.713566491 +0800
@@ -1 +1 @@
-From b4b3a7037b2cab4dc5d004ed0fb9ec1e5911334e Mon Sep 17 00:00:00 2001
+From cedf721f24a038780f06375573dc53c3f65ea5a8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b4b3a7037b2cab4dc5d004ed0fb9ec1e5911334e ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/failsafe: fix memory leak in args parsing' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (30 preceding siblings ...)
  2024-03-05  9:46 ` patch 'event/cnxk: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net/nfp: verify strdup return' " Xueming Li
                   ` (104 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2044a179a7605771a17920dd560ca450b1131a4b Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:08 +0000
Subject: [PATCH] net/failsafe: fix memory leak in args parsing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2ddf2d7a15deeac3585e08fd7f9ef46ad082b126 ]

Should free the memory which allocated by strdup().

Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/net/failsafe/failsafe_args.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/failsafe/failsafe_args.c b/drivers/net/failsafe/failsafe_args.c
index b203e02d9a..3b867437d7 100644
--- a/drivers/net/failsafe/failsafe_args.c
+++ b/drivers/net/failsafe/failsafe_args.c
@@ -248,7 +248,7 @@ fs_parse_device_param(struct rte_eth_dev *dev, const char *param,
 			goto free_args;
 	} else {
 		ERROR("Unrecognized device type: %.*s", (int)b, param);
-		return -EINVAL;
+		ret = -EINVAL;
 	}
 free_args:
 	free(args);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.019396234 +0800
+++ 0032-net-failsafe-fix-memory-leak-in-args-parsing.patch	2024-03-05 17:39:30.723566491 +0800
@@ -1 +1 @@
-From 2ddf2d7a15deeac3585e08fd7f9ef46ad082b126 Mon Sep 17 00:00:00 2001
+From 2044a179a7605771a17920dd560ca450b1131a4b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2ddf2d7a15deeac3585e08fd7f9ef46ad082b126 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/nfp: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (31 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net/failsafe: fix memory leak in args parsing' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'app/dumpcap: " Xueming Li
                   ` (103 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Chaoyong He, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c6790ef542674b526824592b3b04ed46a804fcc9 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:09 +0000
Subject: [PATCH] net/nfp: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4ea9eeb66170b30eb5bf02f91531f08aecd13298 ]

Add verify strdup return value logic.

Fixes: 3d21da66c06b ("net/nfp: create security session")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/nfp_ipsec.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/nfp/nfp_ipsec.c b/drivers/net/nfp/nfp_ipsec.c
index 452947380e..7ce9cca0b2 100644
--- a/drivers/net/nfp/nfp_ipsec.c
+++ b/drivers/net/nfp/nfp_ipsec.c
@@ -524,6 +524,11 @@ nfp_aesgcm_iv_update(struct ipsec_add_sa *cfg,
 	uint8_t *cfg_iv;

 	iv_str = strdup(iv_string);
+	if (iv_str == NULL) {
+		PMD_DRV_LOG(ERR, "Failed to strdup iv_string");
+		return;
+	}
+
 	cfg_iv = (uint8_t *)cfg->aesgcm_fields.iv;

 	for (i = 0; i < iv_len; i++) {
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.043366235 +0800
+++ 0033-net-nfp-verify-strdup-return.patch	2024-03-05 17:39:30.723566491 +0800
@@ -1 +1 @@
-From 4ea9eeb66170b30eb5bf02f91531f08aecd13298 Mon Sep 17 00:00:00 2001
+From c6790ef542674b526824592b3b04ed46a804fcc9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4ea9eeb66170b30eb5bf02f91531f08aecd13298 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 6e9bb06aa6..0b815fa983 100644
+index 452947380e..7ce9cca0b2 100644
@@ -21 +23 @@
-@@ -526,6 +526,11 @@ nfp_aesgcm_iv_update(struct ipsec_add_sa *cfg,
+@@ -524,6 +524,11 @@ nfp_aesgcm_iv_update(struct ipsec_add_sa *cfg,

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

* patch 'app/dumpcap: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (32 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net/nfp: verify strdup return' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'app/pdump: " Xueming Li
                   ` (102 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1387327fa4b3d0b0e8da1e0f97afc9c36a9ac35d Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:10 +0000
Subject: [PATCH] app/dumpcap: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6bb5ffe3ea9a5ad41848c19c2787df42de2a3cab ]

Add verify strdup return value logic.

Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/dumpcap/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index fc28e2d702..d57db0589a 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -628,6 +628,11 @@ static void dpdk_init(void)
 		eal_argv[i++] = strdup(file_prefix);
 	}

+	for (i = 0; i < (unsigned int)eal_argc; i++) {
+		if (eal_argv[i] == NULL)
+			rte_panic("No memory\n");
+	}
+
 	if (rte_eal_init(eal_argc, eal_argv) < 0)
 		rte_exit(EXIT_FAILURE, "EAL init failed: is primary process running?\n");
 }
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.069435436 +0800
+++ 0034-app-dumpcap-verify-strdup-return.patch	2024-03-05 17:39:30.723566491 +0800
@@ -1 +1 @@
-From 6bb5ffe3ea9a5ad41848c19c2787df42de2a3cab Mon Sep 17 00:00:00 2001
+From 1387327fa4b3d0b0e8da1e0f97afc9c36a9ac35d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6bb5ffe3ea9a5ad41848c19c2787df42de2a3cab ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/pdump: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (33 preceding siblings ...)
  2024-03-05  9:46 ` patch 'app/dumpcap: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'app/crypto-perf: " Xueming Li
                   ` (101 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e0fd44c6abb047b5030d0dd0e8b497c739694368 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:11 +0000
Subject: [PATCH] app/pdump: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 32e1cb918d4bbe94c5da8d0888ce29fac1f4dbb4 ]

Add verify strdup return value logic.

Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/pdump/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index 7a1c7bdf60..a9205e130b 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -171,6 +171,9 @@ parse_device_id(const char *key __rte_unused, const char *value,
 	struct pdump_tuples *pt = extra_args;

 	pt->device_id = strdup(value);
+	if (pt->device_id == NULL)
+		return -1;
+
 	pt->dump_by_type = DEVICE_ID;

 	return 0;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.109601237 +0800
+++ 0035-app-pdump-verify-strdup-return.patch	2024-03-05 17:39:30.723566491 +0800
@@ -1 +1 @@
-From 32e1cb918d4bbe94c5da8d0888ce29fac1f4dbb4 Mon Sep 17 00:00:00 2001
+From e0fd44c6abb047b5030d0dd0e8b497c739694368 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 32e1cb918d4bbe94c5da8d0888ce29fac1f4dbb4 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/crypto-perf: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (34 preceding siblings ...)
  2024-03-05  9:46 ` patch 'app/pdump: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'app/dma-perf: " Xueming Li
                   ` (100 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fefe40a5eda6cbaebadbadd40fdda45eaea9f8c3 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:13 +0000
Subject: [PATCH] app/crypto-perf: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bf4728da1842bd264b2038e9f67e519ae9a0b4e3 ]

Add verify strdup return value logic.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/test-crypto-perf/cperf_options_parsing.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 75afedc7fd..8909b5690d 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -516,6 +516,10 @@ parse_test_file(struct cperf_options *opts,
 		const char *arg)
 {
 	opts->test_file = strdup(arg);
+	if (opts->test_file == NULL) {
+		RTE_LOG(ERR, USER1, "Dup vector file failed!\n");
+		return -1;
+	}
 	if (access(opts->test_file, F_OK) != -1)
 		return 0;
 	RTE_LOG(ERR, USER1, "Test vector file doesn't exist\n");
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.141178239 +0800
+++ 0036-app-crypto-perf-verify-strdup-return.patch	2024-03-05 17:39:30.723566491 +0800
@@ -1 +1 @@
-From bf4728da1842bd264b2038e9f67e519ae9a0b4e3 Mon Sep 17 00:00:00 2001
+From fefe40a5eda6cbaebadbadd40fdda45eaea9f8c3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bf4728da1842bd264b2038e9f67e519ae9a0b4e3 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/dma-perf: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (35 preceding siblings ...)
  2024-03-05  9:46 ` patch 'app/crypto-perf: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'app/testpmd: " Xueming Li
                   ` (99 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8d5327fcfde672c44d6eabfbc4450d47062a31b9 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:14 +0000
Subject: [PATCH] app/dma-perf: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8d9b64343344a56301dfc1975e4756d526f05824 ]

Add verify strdup return value logic.

Fixes: 623dc9364dc6 ("app/dma-perf: introduce DMA performance test")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
---
 app/test-dma-perf/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c
index 5f8bab8f45..544784df50 100644
--- a/app/test-dma-perf/main.c
+++ b/app/test-dma-perf/main.c
@@ -206,6 +206,8 @@ parse_lcore_dma(struct test_configure *test_case, const char *value)
 		return -1;

 	input = strndup(value, strlen(value) + 1);
+	if (input == NULL)
+		return -1;
 	addrs = input;

 	while (*addrs == '\0')
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.166195439 +0800
+++ 0037-app-dma-perf-verify-strdup-return.patch	2024-03-05 17:39:30.723566491 +0800
@@ -1 +1 @@
-From 8d9b64343344a56301dfc1975e4756d526f05824 Mon Sep 17 00:00:00 2001
+From 8d5327fcfde672c44d6eabfbc4450d47062a31b9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8d9b64343344a56301dfc1975e4756d526f05824 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/testpmd: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (36 preceding siblings ...)
  2024-03-05  9:46 ` patch 'app/dma-perf: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'test: " Xueming Li
                   ` (98 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Ivan Malov, Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c830d9e2afb0cdb8748d8d31347a36f24ea039c6 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:15 +0000
Subject: [PATCH] app/testpmd: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 365cdd7d01f70da2b10671aea05c5aaa036d3771 ]

Add verify strdup return value logic.

Fixes: 52e2e7edcf48 ("app/testpmd: add protocol-based buffer split")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ivan Malov <ivan.malov@arknetworks.am>
Acked-by: Huisong Li <lihuisong@huawei.com>
---
 app/test-pmd/cmdline.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 9369d3b4c5..d9304e4a32 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3528,6 +3528,8 @@ parse_hdrs_list(const char *str, const char *item_name, unsigned int max_items,

 	nb_item = 0;
 	char *str2 = strdup(str);
+	if (str2 == NULL)
+		return nb_item;
 	cur = strtok_r(str2, ",", &tmp);
 	while (cur != NULL) {
 		parsed_items[nb_item] = get_ptype(cur);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.189705840 +0800
+++ 0038-app-testpmd-verify-strdup-return.patch	2024-03-05 17:39:30.733566492 +0800
@@ -1 +1 @@
-From 365cdd7d01f70da2b10671aea05c5aaa036d3771 Mon Sep 17 00:00:00 2001
+From c830d9e2afb0cdb8748d8d31347a36f24ea039c6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 365cdd7d01f70da2b10671aea05c5aaa036d3771 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'test: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (37 preceding siblings ...)
  2024-03-05  9:46 ` patch 'app/testpmd: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'examples/qos_sched: fix memory leak in args parsing' " Xueming Li
                   ` (97 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fbd04d26f306ad0d5357fdd1f596dc43dfcadebc Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:12 +0000
Subject: [PATCH] test: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 68edcacf428994d3088afb6f5278958cc76665da ]

Add verify strdup return value logic.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
---
 app/test/process.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test/process.h b/app/test/process.h
index af7bc3e0de..c576c42349 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -59,8 +59,11 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
 		return -1;
 	else if (pid == 0) {
 		/* make a copy of the arguments to be passed to exec */
-		for (i = 0; i < numargs; i++)
+		for (i = 0; i < numargs; i++) {
 			argv_cpy[i] = strdup(argv[i]);
+			if (argv_cpy[i] == NULL)
+				rte_panic("Error dup args\n");
+		}
 		argv_cpy[i] = NULL;
 		num = numargs;

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.222730341 +0800
+++ 0039-test-verify-strdup-return.patch	2024-03-05 17:39:30.733566492 +0800
@@ -1 +1 @@
-From 68edcacf428994d3088afb6f5278958cc76665da Mon Sep 17 00:00:00 2001
+From fbd04d26f306ad0d5357fdd1f596dc43dfcadebc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 68edcacf428994d3088afb6f5278958cc76665da ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'examples/qos_sched: fix memory leak in args parsing' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (38 preceding siblings ...)
  2024-03-05  9:46 ` patch 'test: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'examples/vhost: verify strdup return' " Xueming Li
                   ` (96 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 88f1c9af336f8fee966bd4b4b5f26e54ff809270 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:16 +0000
Subject: [PATCH] examples/qos_sched: fix memory leak in args parsing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit db8aee153e43375538667c6f861e981a47574476 ]

Should free the memory which allocated by strdup().

Fixes: 035b6a4f4bba ("examples/qos_sched: fix out-of-bounds option parsing")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 examples/qos_sched/args.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
index e97273152a..8d61d3e454 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -103,8 +103,10 @@ app_parse_opt_vals(const char *conf_str, char separator, uint32_t n_vals, uint32

 	n_tokens = rte_strsplit(string, strnlen(string, 32), tokens, n_vals, separator);

-	if (n_tokens > MAX_OPT_VALUES)
+	if (n_tokens > MAX_OPT_VALUES) {
+		free(string);
 		return -1;
+	}

 	for (i = 0; i < n_tokens; i++)
 		opt_vals[i] = (uint32_t)atol(tokens[i]);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.248213842 +0800
+++ 0040-examples-qos_sched-fix-memory-leak-in-args-parsing.patch	2024-03-05 17:39:30.733566492 +0800
@@ -1 +1 @@
-From db8aee153e43375538667c6f861e981a47574476 Mon Sep 17 00:00:00 2001
+From 88f1c9af336f8fee966bd4b4b5f26e54ff809270 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit db8aee153e43375538667c6f861e981a47574476 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'examples/vhost: verify strdup return' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (39 preceding siblings ...)
  2024-03-05  9:46 ` patch 'examples/qos_sched: fix memory leak in args parsing' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'pipeline: fix calloc parameters' " Xueming Li
                   ` (95 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5331b413827f6a7fa43403fdccd13f574b34e849 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:17 +0000
Subject: [PATCH] examples/vhost: verify strdup return
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b119863bd6643558af3ac3b39a63b6524e7545eb ]

Add verify strdup return value logic.

Fixes: 53d3f4778c1d ("vhost: integrate dmadev in asynchronous data-path")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
---
 examples/vhost/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index ce5c1efddf..3fc1b151d1 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -260,6 +260,9 @@ open_dma(const char *value)
 	char *dma_arg[RTE_MAX_VHOST_DEVICE];
 	int args_nr;

+	if (input == NULL)
+		return -1;
+
 	while (isblank(*addrs))
 		addrs++;
 	if (*addrs == '\0') {
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.271432143 +0800
+++ 0041-examples-vhost-verify-strdup-return.patch	2024-03-05 17:39:30.733566492 +0800
@@ -1 +1 @@
-From b119863bd6643558af3ac3b39a63b6524e7545eb Mon Sep 17 00:00:00 2001
+From 5331b413827f6a7fa43403fdccd13f574b34e849 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b119863bd6643558af3ac3b39a63b6524e7545eb ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'pipeline: fix calloc parameters' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (40 preceding siblings ...)
  2024-03-05  9:46 ` patch 'examples/vhost: verify strdup return' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'eventdev: " Xueming Li
                   ` (94 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Cristian Dumitrescu, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 600e30b793ef66ba9022a65d336455e376881146 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:53:58 +0000
Subject: [PATCH] pipeline: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0594ae0c42773d62aff870df25e73394f7f0a5a5 ]

gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.0 20231102 (experimental)

[2]
 Compiling C object .../pipeline_rte_swx_pipeline_spec.c.o
.../rte_swx_pipeline_spec.c: In function ‘pipeline_spec_parse’:
../lib/pipeline/rte_swx_pipeline_spec.c:2893:11:
  warning: allocation of insufficient size ‘1’ for type
           ‘struct pipeline_spec’ with size ‘144’ [-Walloc-size]
 2893 |         s = calloc(sizeof(struct pipeline_spec), 1);
      |           ^

.../rte_swx_pipeline_spec.c: In function ‘pipeline_iospec_parse’:
../lib/pipeline/rte_swx_pipeline_spec.c:4244:11:
  warning: allocation of insufficient size ‘1’ for type
           ‘struct pipeline_iospec’ with size ‘64’ [-Walloc-size]
 4244 |         s = calloc(sizeof(struct pipeline_iospec), 1);
      |           ^

Fixes: 30c4abb90942 ("pipeline: rework specification file-based pipeline build")
Fixes: 54cae37ef4ef ("pipeline: support I/O specification")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/pipeline/rte_swx_pipeline_spec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/pipeline/rte_swx_pipeline_spec.c b/lib/pipeline/rte_swx_pipeline_spec.c
index 2bba0d0524..17419e7b85 100644
--- a/lib/pipeline/rte_swx_pipeline_spec.c
+++ b/lib/pipeline/rte_swx_pipeline_spec.c
@@ -2890,7 +2890,7 @@ pipeline_spec_parse(FILE *spec,
 	}

 	/* Memory allocation. */
-	s = calloc(sizeof(struct pipeline_spec), 1);
+	s = calloc(1, sizeof(struct pipeline_spec));
 	if (!s) {
 		if (err_line)
 			*err_line = n_lines;
@@ -4241,7 +4241,7 @@ pipeline_iospec_parse(FILE *spec,
 	}

 	/* Memory allocation. */
-	s = calloc(sizeof(struct pipeline_iospec), 1);
+	s = calloc(1, sizeof(struct pipeline_iospec));
 	if (!s) {
 		if (err_line)
 			*err_line = n_lines;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.297020344 +0800
+++ 0042-pipeline-fix-calloc-parameters.patch	2024-03-05 17:39:30.733566492 +0800
@@ -1 +1 @@
-From 0594ae0c42773d62aff870df25e73394f7f0a5a5 Mon Sep 17 00:00:00 2001
+From 600e30b793ef66ba9022a65d336455e376881146 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0594ae0c42773d62aff870df25e73394f7f0a5a5 ]
@@ -33 +35,0 @@
-Cc: stable@dpdk.org

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

* patch 'eventdev: fix calloc parameters' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (41 preceding siblings ...)
  2024-03-05  9:46 ` patch 'pipeline: fix calloc parameters' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'dmadev: " Xueming Li
                   ` (93 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Morten Brørup, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9173abff753d14fb5da1ac6640c085ca3c6eb7d6 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:54:01 +0000
Subject: [PATCH] eventdev: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 09fbda36e495bc6f24fbe26d0909801107bee5f7 ]

gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.1 20240124 (experimental)

[2]
Compiling C object lib/librte_eventdev.a.p/eventdev_rte_eventdev.c.o
../lib/eventdev/rte_eventdev.c: In function ‘handle_dev_dump’:
../lib/eventdev/rte_eventdev.c:2005:29:
  warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
  argument and not in the later argument [-Wcalloc-transposed-args]
 2005 |     buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
      |                         ^~~~

Fixes: a3b7b476d723 ("eventdev: support telemetry dump eventdev")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/eventdev/rte_eventdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 157752868d..1c865e993f 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -2002,7 +2002,7 @@ handle_dev_dump(const char *cmd __rte_unused,

 	RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -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.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.324709245 +0800
+++ 0043-eventdev-fix-calloc-parameters.patch	2024-03-05 17:39:30.743566492 +0800
@@ -1 +1 @@
-From 09fbda36e495bc6f24fbe26d0909801107bee5f7 Mon Sep 17 00:00:00 2001
+From 9173abff753d14fb5da1ac6640c085ca3c6eb7d6 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 09fbda36e495bc6f24fbe26d0909801107bee5f7 ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org
@@ -35 +37 @@
-index d494f8f205..ca295c87c4 100644
+index 157752868d..1c865e993f 100644
@@ -38 +40 @@
-@@ -2005,7 +2005,7 @@ handle_dev_dump(const char *cmd __rte_unused,
+@@ -2002,7 +2002,7 @@ handle_dev_dump(const char *cmd __rte_unused,

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

* patch 'dmadev: fix calloc parameters' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (42 preceding siblings ...)
  2024-03-05  9:46 ` patch 'eventdev: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'rawdev: " Xueming Li
                   ` (92 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Morten Brørup, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ad881b0db859fe2e4762ab2313a8e2fd4881894f Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:54:02 +0000
Subject: [PATCH] dmadev: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 905f8335f916aed1f3119e35332a32119dea4510 ]

gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.1 20240124 (experimental)

[2]
Compiling C object lib/librte_dmadev.a.p/dmadev_rte_dmadev.c.o
../lib/dmadev/rte_dmadev.c: In function ‘dmadev_handle_dev_dump’:
../lib/dmadev/rte_dmadev.c:1033:29:
  warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
  argument and not in the later argument [-Wcalloc-transposed-args]
 1033 |     buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
      |                         ^~~~

Fixes: 94043b04212a ("dmadev: support telemetry dump dmadev")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/dmadev/rte_dmadev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c
index 009a21849a..31a268cfdb 100644
--- a/lib/dmadev/rte_dmadev.c
+++ b/lib/dmadev/rte_dmadev.c
@@ -1028,7 +1028,7 @@ dmadev_handle_dev_dump(const char *cmd __rte_unused,
 	if (*end_param != '\0')
 		RTE_DMA_LOG(WARNING, "Extra parameters passed to dmadev telemetry command, ignoring");

-	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.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.350643745 +0800
+++ 0044-dmadev-fix-calloc-parameters.patch	2024-03-05 17:39:30.743566492 +0800
@@ -1 +1 @@
-From 905f8335f916aed1f3119e35332a32119dea4510 Mon Sep 17 00:00:00 2001
+From ad881b0db859fe2e4762ab2313a8e2fd4881894f Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 905f8335f916aed1f3119e35332a32119dea4510 ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org
@@ -35 +37 @@
-index 25c92ef8a8..e64b279bac 100644
+index 009a21849a..31a268cfdb 100644
@@ -38 +40 @@
-@@ -1040,7 +1040,7 @@ dmadev_handle_dev_dump(const char *cmd __rte_unused,
+@@ -1028,7 +1028,7 @@ dmadev_handle_dev_dump(const char *cmd __rte_unused,

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

* patch 'rawdev: fix calloc parameters' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (43 preceding siblings ...)
  2024-03-05  9:46 ` patch 'dmadev: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'common/mlx5: " Xueming Li
                   ` (91 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Morten Brørup, Chengwen Feng, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7c10528d681e4cd7e5aeb0b14466ca71905b0c2e Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:54:00 +0000
Subject: [PATCH] rawdev: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 37ff33833b6b8932bfbc8e149d386ef23ccdc54e ]

gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.0 20240108 (experimental)

[2]
Compiling C object .../lib/librte_rawdev.a.p/rawdev_rte_rawdev.c.o
../lib/rawdev/rte_rawdev.c: In function ‘handle_dev_dump’:
../lib/rawdev/rte_rawdev.c:659:29:
  error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
  argument and not in the later argument
  [-Werror=calloc-transposed-args]
  659 |     buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
      |                         ^~~~

Fixes: e915d404eb72 ("rawdev: support telemetry dump rawdev")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 lib/rawdev/rte_rawdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c
index 474bdc9540..4f8897b639 100644
--- a/lib/rawdev/rte_rawdev.c
+++ b/lib/rawdev/rte_rawdev.c
@@ -656,7 +656,7 @@ handle_dev_dump(const char *cmd __rte_unused,
 	if (!rte_rawdev_pmd_is_valid_dev(dev_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.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.374030346 +0800
+++ 0045-rawdev-fix-calloc-parameters.patch	2024-03-05 17:39:30.743566492 +0800
@@ -1 +1 @@
-From 37ff33833b6b8932bfbc8e149d386ef23ccdc54e Mon Sep 17 00:00:00 2001
+From 7c10528d681e4cd7e5aeb0b14466ca71905b0c2e Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 37ff33833b6b8932bfbc8e149d386ef23ccdc54e ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org

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

* patch 'common/mlx5: fix calloc parameters' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (44 preceding siblings ...)
  2024-03-05  9:46 ` patch 'rawdev: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net/bnx2x: " Xueming Li
                   ` (90 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Morten Brørup, Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e3ae3295ee76a8016c023a083eef9ae68eb768eb Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:54:03 +0000
Subject: [PATCH] common/mlx5: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f805f70bc5511cd98a34fa2f8f7bd7a3e4cd8aa3 ]

gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.1 20240124 (experimental)

[2]
Compiling C object .../common_mlx5_mlx5_common_mr.c.o
.../mlx5/mlx5_common_mr.c: In function ‘mlx5_mempool_get_chunks’:
.../common/mlx5/mlx5_common_mr.c:1384:29:
  warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
  argument and not in the later argument [-Wcalloc-transposed-args]
 1384 |         *out = calloc(sizeof(**out), n);
      |                             ^

Fixes: 7297d2cdecce ("common/mlx5: fix external memory pool registration")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/common/mlx5/mlx5_common_mr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/mlx5/mlx5_common_mr.c b/drivers/common/mlx5/mlx5_common_mr.c
index 40ff9153bd..85ec10d2ee 100644
--- a/drivers/common/mlx5/mlx5_common_mr.c
+++ b/drivers/common/mlx5/mlx5_common_mr.c
@@ -1381,7 +1381,7 @@ mlx5_mempool_get_chunks(struct rte_mempool *mp, struct mlx5_range **out,

 	DRV_LOG(DEBUG, "Collecting chunks of regular mempool %s", mp->name);
 	n = mp->nb_mem_chunks;
-	*out = calloc(sizeof(**out), n);
+	*out = calloc(n, sizeof(**out));
 	if (*out == NULL)
 		return -1;
 	rte_mempool_mem_iter(mp, mlx5_range_from_mempool_chunk, *out);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.397821147 +0800
+++ 0046-common-mlx5-fix-calloc-parameters.patch	2024-03-05 17:39:30.743566492 +0800
@@ -1 +1 @@
-From f805f70bc5511cd98a34fa2f8f7bd7a3e4cd8aa3 Mon Sep 17 00:00:00 2001
+From e3ae3295ee76a8016c023a083eef9ae68eb768eb Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f805f70bc5511cd98a34fa2f8f7bd7a3e4cd8aa3 ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/bnx2x: fix calloc parameters' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (45 preceding siblings ...)
  2024-03-05  9:46 ` patch 'common/mlx5: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net/nfp: " Xueming Li
                   ` (89 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 238a03cdec9c471a8de6c87b92c09af8ba39871b Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:54:04 +0000
Subject: [PATCH] net/bnx2x: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ff0d80191617d3b4435e0f473b129cdc539c23f5 ]

gcc [1] generates warning [2] about rte_calloc usage, because
rte_calloc parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.1 20240124 (experimental)

[2]
Compiling C object drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_bnx2x.c.o
../drivers/net/bnx2x/bnx2x.c: In function ‘bnx2x_alloc_ilt_lines_mem’:
../drivers/net/bnx2x/bnx2x.c:2392:44:
 warning: ‘rte_calloc’ sizes specified with ‘sizeof’ in the earlier
 argument and not in the later argument [-Wcalloc-transposed-args]
 2392 |                     sizeof(struct ilt_line), ILT_MAX_LINES,
      |                            ^~~~~~

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 drivers/net/bnx2x/bnx2x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index c3283c94f3..597ee43359 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -2389,7 +2389,7 @@ int bnx2x_alloc_ilt_mem(struct bnx2x_softc *sc)
 static int bnx2x_alloc_ilt_lines_mem(struct bnx2x_softc *sc)
 {
 	sc->ilt->lines = rte_calloc("",
-				    sizeof(struct ilt_line), ILT_MAX_LINES,
+				    ILT_MAX_LINES, sizeof(struct ilt_line),
 				    RTE_CACHE_LINE_SIZE);
 	return sc->ilt->lines == NULL;
 }
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.427704748 +0800
+++ 0047-net-bnx2x-fix-calloc-parameters.patch	2024-03-05 17:39:30.753566492 +0800
@@ -1 +1 @@
-From ff0d80191617d3b4435e0f473b129cdc539c23f5 Mon Sep 17 00:00:00 2001
+From 238a03cdec9c471a8de6c87b92c09af8ba39871b Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ff0d80191617d3b4435e0f473b129cdc539c23f5 ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/nfp: fix calloc parameters' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (46 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net/bnx2x: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net/sfc: " Xueming Li
                   ` (88 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Chaoyong He, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From acad009eedab668baf31f2aed512a3fd48a226cf Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:53:59 +0000
Subject: [PATCH] net/nfp: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0352f47a3bf923574afe17e822af58bedc7ead49 ]

gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.0 20231102 (experimental)

[2]
Compiling C object .../net_nfp_nfpcore_nfp_mutex.c.o
.../net/nfp/nfpcore/nfp_mutex.c: In function ‘nfp_cpp_mutex_alloc’:
../drivers/net/nfp/nfpcore/nfp_mutex.c:171:15:
  warning: allocation of insufficient size ‘1’ for type
           ‘struct nfp_cpp_mutex’ with size ‘48’ [-Walloc-size]
  171 |         mutex = calloc(sizeof(*mutex), 1);
      |               ^

Fixes: c7e9729da6b5 ("net/nfp: support CPP")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Chaoyong He <chaoyong.he@corigine.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 drivers/net/nfp/nfpcore/nfp_mutex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_mutex.c b/drivers/net/nfp/nfpcore/nfp_mutex.c
index 3c10c7a090..edb78dfdc9 100644
--- a/drivers/net/nfp/nfpcore/nfp_mutex.c
+++ b/drivers/net/nfp/nfpcore/nfp_mutex.c
@@ -168,7 +168,7 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp,
 	if (tmp != key)
 		return NULL;

-	mutex = calloc(sizeof(*mutex), 1);
+	mutex = calloc(1, sizeof(*mutex));
 	if (mutex == NULL)
 		return NULL;

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.455542749 +0800
+++ 0048-net-nfp-fix-calloc-parameters.patch	2024-03-05 17:39:30.753566492 +0800
@@ -1 +1 @@
-From 0352f47a3bf923574afe17e822af58bedc7ead49 Mon Sep 17 00:00:00 2001
+From acad009eedab668baf31f2aed512a3fd48a226cf Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0352f47a3bf923574afe17e822af58bedc7ead49 ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/sfc: fix calloc parameters' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (47 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net/nfp: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'build: fix linker warnings about undefined symbols' " Xueming Li
                   ` (87 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 63241d76621b2accf88e511aa2fcf2b63f0a870e Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:54:05 +0000
Subject: [PATCH] net/sfc: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 351f656ed67277f175de0a2baf296eed7e3fb21d ]

gcc [1] generates warning [2] about rte_calloc usage, because
rte_calloc parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.1 20240124 (experimental)

[2]
Compiling C object drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_mae.c.o
../net/sfc/sfc_mae.c: In function ‘sfc_mae_action_set_list_add’:
../drivers/net/sfc/sfc_mae.c:1353:35:
 warning: ‘rte_calloc’ sizes specified with ‘sizeof’ in the earlier
 argument and not in the later argument [-Wcalloc-transposed-args]
 1353 |                    sizeof(struct sfc_mae_action_set *),
      |                           ^~~~~~

Fixes: 002f591f54c3 ("net/sfc: support packet replay in transfer flows")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/sfc/sfc_mae.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index e5ec0ae49d..60ff6d2181 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -1350,8 +1350,8 @@ sfc_mae_action_set_list_add(struct sfc_adapter *sa,

 	action_set_list->action_sets =
 		rte_calloc("sfc_mae_action_set_list_action_sets",
-			   sizeof(struct sfc_mae_action_set *),
-			   action_set_list->nb_action_sets, 0);
+			   action_set_list->nb_action_sets,
+			   sizeof(struct sfc_mae_action_set *), 0);
 	if (action_set_list->action_sets == NULL) {
 		sfc_err(sa, "failed to allocate action set list");
 		rte_free(action_set_list);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.477893550 +0800
+++ 0049-net-sfc-fix-calloc-parameters.patch	2024-03-05 17:39:30.753566492 +0800
@@ -1 +1 @@
-From 351f656ed67277f175de0a2baf296eed7e3fb21d Mon Sep 17 00:00:00 2001
+From 63241d76621b2accf88e511aa2fcf2b63f0a870e Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 351f656ed67277f175de0a2baf296eed7e3fb21d ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org

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

* patch 'build: fix linker warnings about undefined symbols' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (48 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net/sfc: " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'build: link static libs with whole-archive in subproject' " Xueming Li
                   ` (86 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5e24d7f2ded389295b24688a339b2139d5281941 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 10 Jan 2024 15:01:03 +0000
Subject: [PATCH] build: fix linker warnings about undefined symbols
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 51c9428dca9fad10bd60ca668ffdf78e4a801e2f ]

The default behaviour of "ld.lld" has changed, so it now prints out
warnings about entries in the version.map file which don't exist in
the current build. Since we use our version.map file simply to filter
out the functions we don't want made public, we include in it all
functions across all OS's and builds that we want public if present.
This causes these ld warnings to be emitted, e.g. on BSD, which is
missing functionality found on Linux. For example:

* hpet functions in EAL
* regexdev enqueue and dequeue burst
* eventdev event_timer functions

Easiest solution, without major rework of how we use our version.map
files, and without dynamically generating them per-build, is to pass
the --undefined-version flag to the linker, to restore the old
behaviour.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index a9ccd56deb..65662c5de3 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -188,6 +188,9 @@ dpdk_conf.set('RTE_ARCH_32', cc.sizeof('void *') == 4)

 if not is_windows
     add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
+    if cc.has_link_argument('-Wl,--undefined-version')
+        add_project_link_arguments('-Wl,--undefined-version', language: 'c')
+    endif
 endif

 # use pthreads if available for the platform
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.504618451 +0800
+++ 0050-build-fix-linker-warnings-about-undefined-symbols.patch	2024-03-05 17:39:30.753566492 +0800
@@ -1 +1 @@
-From 51c9428dca9fad10bd60ca668ffdf78e4a801e2f Mon Sep 17 00:00:00 2001
+From 5e24d7f2ded389295b24688a339b2139d5281941 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 51c9428dca9fad10bd60ca668ffdf78e4a801e2f ]
@@ -22,2 +24,0 @@
-
-Cc: stable@dpdk.org

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

* patch 'build: link static libs with whole-archive in subproject' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (49 preceding siblings ...)
  2024-03-05  9:46 ` patch 'build: fix linker warnings about undefined symbols' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'rcu: use atomic operation on acked token' " Xueming Li
                   ` (85 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Robin Jarry; +Cc: David Marchand, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8878a84e2ebc75bb3cc7fc94a5912810f32cd50e Mon Sep 17 00:00:00 2001
From: Robin Jarry <rjarry@redhat.com>
Date: Mon, 29 Jan 2024 13:47:17 +0100
Subject: [PATCH] build: link static libs with whole-archive in subproject
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cafb10b3e4a73750c26b3d5e00df48caa93a997b ]

When DPDK is used as a subproject, declare static libs to be linked with
-Wl,--whole-archive along with the drivers. This is already done this
way in pkg-config.

Fixes: f93a605f2d6e ("build: add definitions for use as Meson subproject")

Signed-off-by: Robin Jarry <rjarry@redhat.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 buildtools/subproject/meson.build | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/buildtools/subproject/meson.build b/buildtools/subproject/meson.build
index 3192efaa40..322e01c029 100644
--- a/buildtools/subproject/meson.build
+++ b/buildtools/subproject/meson.build
@@ -8,8 +8,7 @@ if get_option('default_library') == 'static'
             dependencies: dpdk_static_lib_deps,
             # static library deps in DPDK build don't include "link_with" parameters,
             # so explicitly link-in both libs and drivers
-            link_with: dpdk_static_libraries,
-            link_whole: dpdk_drivers,
+            link_whole: dpdk_static_libraries + dpdk_drivers,
             link_args: dpdk_extra_ldflags)
 else
     dpdk_dep = declare_dependency(
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.528191751 +0800
+++ 0051-build-link-static-libs-with-whole-archive-in-subproj.patch	2024-03-05 17:39:30.753566492 +0800
@@ -1 +1 @@
-From cafb10b3e4a73750c26b3d5e00df48caa93a997b Mon Sep 17 00:00:00 2001
+From 8878a84e2ebc75bb3cc7fc94a5912810f32cd50e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cafb10b3e4a73750c26b3d5e00df48caa93a997b ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'rcu: use atomic operation on acked token' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (50 preceding siblings ...)
  2024-03-05  9:46 ` patch 'build: link static libs with whole-archive in subproject' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'rcu: fix acked token in debug log' " Xueming Li
                   ` (84 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Ola Liljedahl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 94b20c14a64b64c09acd7887165f75b7674e46fb Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 5 Feb 2024 04:59:48 +0000
Subject: [PATCH] rcu: use atomic operation on acked token
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 063cddfc7426989f0c7feb514aa82bd8c4274756 ]

acked_token should be read using atomic operation as the
the API rte_rcu_qsbr_check is advertised as multi-thread safe.

Fixes: 1f90d32ce175 ("rcu: add least acknowledged token optimization")

Reported-by: Ola Liljedahl <ola.liljedahl@arm.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
---
 lib/rcu/rte_rcu_qsbr.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h
index 6b908e7ee0..66780b324b 100644
--- a/lib/rcu/rte_rcu_qsbr.h
+++ b/lib/rcu/rte_rcu_qsbr.h
@@ -667,7 +667,8 @@ rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
 	RTE_ASSERT(v != NULL);

 	/* Check if all the readers have already acknowledged this token */
-	if (likely(t <= v->acked_token)) {
+	if (likely(t <= rte_atomic_load_explicit(&v->acked_token,
+						rte_memory_order_relaxed))) {
 		__RTE_RCU_DP_LOG(DEBUG,
 			"%s: check: token = %" PRIu64 ", wait = %d",
 			__func__, t, wait);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.551375152 +0800
+++ 0052-rcu-use-atomic-operation-on-acked-token.patch	2024-03-05 17:39:30.753566492 +0800
@@ -1 +1 @@
-From 063cddfc7426989f0c7feb514aa82bd8c4274756 Mon Sep 17 00:00:00 2001
+From 94b20c14a64b64c09acd7887165f75b7674e46fb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 063cddfc7426989f0c7feb514aa82bd8c4274756 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 23c9f89805..ef1621d597 100644
+index 6b908e7ee0..66780b324b 100644
@@ -23 +25 @@
-@@ -666,7 +666,8 @@ rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
+@@ -667,7 +667,8 @@ rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)

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

* patch 'rcu: fix acked token in debug log' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (51 preceding siblings ...)
  2024-03-05  9:46 ` patch 'rcu: use atomic operation on acked token' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net: fix TCP/UDP checksum with padding data' " Xueming Li
                   ` (83 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Nathan Brown, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c30a4f8b3162bbe1178e79fdf476b2d65f182ea9 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 5 Feb 2024 04:59:49 +0000
Subject: [PATCH] rcu: fix acked token in debug log
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit df33fb53e464cb1efc79fa65f923aaa60ae10f42 ]

Debug print should use acked token value that was used for comparison.

Fixes: bf386ae377aa ("rcu: add additional debug logs")

Reported-by: Nathan Brown <nathan.brown@arm.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Nathan Brown <nathan.brown@arm.com>
---
 lib/rcu/rte_rcu_qsbr.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h
index 66780b324b..8bda00e911 100644
--- a/lib/rcu/rte_rcu_qsbr.h
+++ b/lib/rcu/rte_rcu_qsbr.h
@@ -664,17 +664,20 @@ __rte_rcu_qsbr_check_all(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
 static __rte_always_inline int
 rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
 {
+	uint64_t acked_token;
+
 	RTE_ASSERT(v != NULL);

 	/* Check if all the readers have already acknowledged this token */
-	if (likely(t <= rte_atomic_load_explicit(&v->acked_token,
-						rte_memory_order_relaxed))) {
+	acked_token = rte_atomic_load_explicit(&v->acked_token,
+						rte_memory_order_relaxed);
+	if (likely(t <= acked_token)) {
 		__RTE_RCU_DP_LOG(DEBUG,
 			"%s: check: token = %" PRIu64 ", wait = %d",
 			__func__, t, wait);
 		__RTE_RCU_DP_LOG(DEBUG,
 			"%s: status: least acked token = %" PRIu64,
-			__func__, v->acked_token);
+			__func__, acked_token);
 		return 1;
 	}

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.576372153 +0800
+++ 0053-rcu-fix-acked-token-in-debug-log.patch	2024-03-05 17:39:30.753566492 +0800
@@ -1 +1 @@
-From df33fb53e464cb1efc79fa65f923aaa60ae10f42 Mon Sep 17 00:00:00 2001
+From c30a4f8b3162bbe1178e79fdf476b2d65f182ea9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit df33fb53e464cb1efc79fa65f923aaa60ae10f42 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index ef1621d597..e7ef788175 100644
+index 66780b324b..8bda00e911 100644
@@ -22 +24 @@
-@@ -663,17 +663,20 @@ __rte_rcu_qsbr_check_all(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
+@@ -664,17 +664,20 @@ __rte_rcu_qsbr_check_all(struct rte_rcu_qsbr *v, uint64_t t, bool wait)

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

* patch 'net: fix TCP/UDP checksum with padding data' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (52 preceding siblings ...)
  2024-03-05  9:46 ` patch 'rcu: fix acked token in debug log' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'vhost: fix virtqueue access check in datapath' " Xueming Li
                   ` (82 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c139df70dd02ed9031e82d80bd51ba1882157f63 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Thu, 14 Dec 2023 17:22:59 +0800
Subject: [PATCH] net: fix TCP/UDP checksum with padding data
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e55ea3d5d970dfff2989e4a1c65b76d02512bce0 ]

IEEE 802 packets may have a minimum size limit. The data fields
should be padded when necessary. In some cases, the padding data
is not zero.

In 'rte_ipv4_udptcp_cksum_mbuf()', as payload length
"mbuf->pkt_len - l4_off" is used, which includes padding and if
padding is not zero it will end up producing wrong checksum.

This patch will use IP header to get the payload size to calculate
TCP/UDP checksum.

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

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/net/rte_ip.h | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h
index 6fa98a5a0f..0d103d4127 100644
--- a/lib/net/rte_ip.h
+++ b/lib/net/rte_ip.h
@@ -419,11 +419,14 @@ __rte_ipv4_udptcp_cksum_mbuf(const struct rte_mbuf *m,
 {
 	uint16_t raw_cksum;
 	uint32_t cksum;
+	uint16_t len;

-	if (l4_off > m->pkt_len)
-		return 0;
+	if (unlikely(l4_off > m->pkt_len))
+		return 0; /* invalid params, return a dummy value */
+
+	len = rte_be_to_cpu_16(ipv4_hdr->total_length) - (uint16_t)rte_ipv4_hdr_len(ipv4_hdr);

-	if (rte_raw_cksum_mbuf(m, l4_off, m->pkt_len - l4_off, &raw_cksum))
+	if (rte_raw_cksum_mbuf(m, l4_off, len, &raw_cksum))
 		return 0;

 	cksum = raw_cksum + rte_ipv4_phdr_cksum(ipv4_hdr, 0);
@@ -663,10 +666,10 @@ __rte_ipv6_udptcp_cksum_mbuf(const struct rte_mbuf *m,
 	uint16_t raw_cksum;
 	uint32_t cksum;

-	if (l4_off > m->pkt_len)
-		return 0;
+	if (unlikely(l4_off > m->pkt_len))
+		return 0; /* invalid params, return a dummy value */

-	if (rte_raw_cksum_mbuf(m, l4_off, m->pkt_len - l4_off, &raw_cksum))
+	if (rte_raw_cksum_mbuf(m, l4_off, rte_be_to_cpu_16(ipv6_hdr->payload_len), &raw_cksum))
 		return 0;

 	cksum = raw_cksum + rte_ipv6_phdr_cksum(ipv6_hdr, 0);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.609662554 +0800
+++ 0054-net-fix-TCP-UDP-checksum-with-padding-data.patch	2024-03-05 17:39:30.763566493 +0800
@@ -1 +1 @@
-From e55ea3d5d970dfff2989e4a1c65b76d02512bce0 Mon Sep 17 00:00:00 2001
+From c139df70dd02ed9031e82d80bd51ba1882157f63 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e55ea3d5d970dfff2989e4a1c65b76d02512bce0 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org

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

* patch 'vhost: fix virtqueue access check in datapath' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (53 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net: fix TCP/UDP checksum with padding data' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'vhost: fix virtqueue access check in VDUSE setup' " Xueming Li
                   ` (81 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: David Marchand; +Cc: Eelco Chaudron, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bbba917213589deeedba18ad5671c4733cf0134e Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 5 Dec 2023 10:45:31 +0100
Subject: [PATCH] vhost: fix virtqueue access check in datapath
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9fc93a1e23203e3053f5acc198e9203bc49024b5 ]

Now that a r/w lock is used, the access_ok field should only be updated
under a write lock.

Since the datapath code only takes a read lock on the virtqueue to check
access_ok, this lock must be released and a write lock taken before
calling vring_translate().

Fixes: 03f77d66d966 ("vhost: change virtqueue access lock to a read/write one")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/virtio_net.c | 60 +++++++++++++++++++++++++++++++-----------
 1 file changed, 44 insertions(+), 16 deletions(-)

diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index 8af20f1487..d00f4b03aa 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -1696,6 +1696,17 @@ virtio_dev_rx_packed(struct virtio_net *dev,
 	return pkt_idx;
 }

+static void
+virtio_dev_vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
+{
+	rte_rwlock_write_lock(&vq->access_lock);
+	vhost_user_iotlb_rd_lock(vq);
+	if (!vq->access_ok)
+		vring_translate(dev, vq);
+	vhost_user_iotlb_rd_unlock(vq);
+	rte_rwlock_write_unlock(&vq->access_lock);
+}
+
 static __rte_always_inline uint32_t
 virtio_dev_rx(struct virtio_net *dev, struct vhost_virtqueue *vq,
 	struct rte_mbuf **pkts, uint32_t count)
@@ -1710,9 +1721,13 @@ virtio_dev_rx(struct virtio_net *dev, struct vhost_virtqueue *vq,

 	vhost_user_iotlb_rd_lock(vq);

-	if (unlikely(!vq->access_ok))
-		if (unlikely(vring_translate(dev, vq) < 0))
-			goto out;
+	if (unlikely(!vq->access_ok)) {
+		vhost_user_iotlb_rd_unlock(vq);
+		rte_rwlock_read_unlock(&vq->access_lock);
+
+		virtio_dev_vring_translate(dev, vq);
+		goto out_no_unlock;
+	}

 	count = RTE_MIN((uint32_t)MAX_PKT_BURST, count);
 	if (count == 0)
@@ -1731,6 +1746,7 @@ out:
 out_access_unlock:
 	rte_rwlock_read_unlock(&vq->access_lock);

+out_no_unlock:
 	return nb_tx;
 }

@@ -2528,9 +2544,13 @@ virtio_dev_rx_async_submit(struct virtio_net *dev, struct vhost_virtqueue *vq,

 	vhost_user_iotlb_rd_lock(vq);

-	if (unlikely(!vq->access_ok))
-		if (unlikely(vring_translate(dev, vq) < 0))
-			goto out;
+	if (unlikely(!vq->access_ok)) {
+		vhost_user_iotlb_rd_unlock(vq);
+		rte_rwlock_read_unlock(&vq->access_lock);
+
+		virtio_dev_vring_translate(dev, vq);
+		goto out_no_unlock;
+	}

 	count = RTE_MIN((uint32_t)MAX_PKT_BURST, count);
 	if (count == 0)
@@ -2551,6 +2571,7 @@ out:
 out_access_unlock:
 	rte_rwlock_write_unlock(&vq->access_lock);

+out_no_unlock:
 	return nb_tx;
 }

@@ -3581,11 +3602,13 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,

 	vhost_user_iotlb_rd_lock(vq);

-	if (unlikely(!vq->access_ok))
-		if (unlikely(vring_translate(dev, vq) < 0)) {
-			count = 0;
-			goto out;
-		}
+	if (unlikely(!vq->access_ok)) {
+		vhost_user_iotlb_rd_unlock(vq);
+		rte_rwlock_read_unlock(&vq->access_lock);
+
+		virtio_dev_vring_translate(dev, vq);
+		goto out_no_unlock;
+	}

 	/*
 	 * Construct a RARP broadcast packet, and inject it to the "pkts"
@@ -3646,6 +3669,7 @@ out_access_unlock:
 	if (unlikely(rarp_mbuf != NULL))
 		count += 1;

+out_no_unlock:
 	return count;
 }

@@ -4196,11 +4220,14 @@ rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_id,

 	vhost_user_iotlb_rd_lock(vq);

-	if (unlikely(vq->access_ok == 0))
-		if (unlikely(vring_translate(dev, vq) < 0)) {
-			count = 0;
-			goto out;
-		}
+	if (unlikely(vq->access_ok == 0)) {
+		vhost_user_iotlb_rd_unlock(vq);
+		rte_rwlock_read_unlock(&vq->access_lock);
+
+		virtio_dev_vring_translate(dev, vq);
+		count = 0;
+		goto out_no_unlock;
+	}

 	/*
 	 * Construct a RARP broadcast packet, and inject it to the "pkts"
@@ -4266,5 +4293,6 @@ out_access_unlock:
 	if (unlikely(rarp_mbuf != NULL))
 		count += 1;

+out_no_unlock:
 	return count;
 }
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.640555955 +0800
+++ 0055-vhost-fix-virtqueue-access-check-in-datapath.patch	2024-03-05 17:39:30.763566493 +0800
@@ -1 +1 @@
-From 9fc93a1e23203e3053f5acc198e9203bc49024b5 Mon Sep 17 00:00:00 2001
+From bbba917213589deeedba18ad5671c4733cf0134e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9fc93a1e23203e3053f5acc198e9203bc49024b5 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 280d4845f8..c738b7edc9 100644
+index 8af20f1487..d00f4b03aa 100644

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

* patch 'vhost: fix virtqueue access check in VDUSE setup' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (54 preceding siblings ...)
  2024-03-05  9:46 ` patch 'vhost: fix virtqueue access check in datapath' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'vhost: fix virtqueue access check in vhost-user " Xueming Li
                   ` (80 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: David Marchand; +Cc: Eelco Chaudron, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 692a7a0034dfc55a057be1ffd8623581a5ada51d Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 5 Dec 2023 10:45:32 +0100
Subject: [PATCH] vhost: fix virtqueue access check in VDUSE setup
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit af5328656709c65a75fe7bdd4146d18da16104b4 ]

vring_translate and vring_invalidate change the vq access_ok field.
The access_ok field should only be updated under a (write) lock.

Fixes: a9120db8b98b ("vhost: add VDUSE device startup")
Fixes: ad67c65efda1 ("vhost: add VDUSE device stop")

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

diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
index 080b58f7de..e198eeef64 100644
--- a/lib/vhost/vduse.c
+++ b/lib/vhost/vduse.c
@@ -196,6 +196,7 @@ vduse_vring_setup(struct virtio_net *dev, unsigned int index)
 				vq->size * sizeof(struct batch_copy_elem),
 				RTE_CACHE_LINE_SIZE, 0);

+	rte_rwlock_write_lock(&vq->access_lock);
 	vhost_user_iotlb_rd_lock(vq);
 	if (vring_translate(dev, vq))
 		VHOST_LOG_CONFIG(dev->ifname, ERR, "Failed to translate vring %d addresses\n",
@@ -206,6 +207,7 @@ vduse_vring_setup(struct virtio_net *dev, unsigned int index)
 				"Failed to disable guest notifications on vring %d\n",
 				index);
 	vhost_user_iotlb_rd_unlock(vq);
+	rte_rwlock_write_unlock(&vq->access_lock);

 	vq_efd.index = index;
 	vq_efd.fd = vq->kickfd;
@@ -259,7 +261,9 @@ vduse_vring_cleanup(struct virtio_net *dev, unsigned int index)
 	close(vq->kickfd);
 	vq->kickfd = VIRTIO_UNINITIALIZED_EVENTFD;

+	rte_rwlock_write_lock(&vq->access_lock);
 	vring_invalidate(dev, vq);
+	rte_rwlock_write_unlock(&vq->access_lock);

 	rte_free(vq->batch_copy_elems);
 	vq->batch_copy_elems = NULL;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.668656556 +0800
+++ 0056-vhost-fix-virtqueue-access-check-in-VDUSE-setup.patch	2024-03-05 17:39:30.773566493 +0800
@@ -1 +1 @@
-From af5328656709c65a75fe7bdd4146d18da16104b4 Mon Sep 17 00:00:00 2001
+From 692a7a0034dfc55a057be1ffd8623581a5ada51d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit af5328656709c65a75fe7bdd4146d18da16104b4 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index c7ba5a61dd..d462428d2c 100644
+index 080b58f7de..e198eeef64 100644
@@ -31 +33 @@
- 		VHOST_CONFIG_LOG(dev->ifname, ERR, "Failed to translate vring %d addresses",
+ 		VHOST_LOG_CONFIG(dev->ifname, ERR, "Failed to translate vring %d addresses\n",
@@ -33 +35 @@
- 				"Failed to disable guest notifications on vring %d",
+ 				"Failed to disable guest notifications on vring %d\n",

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

* patch 'vhost: fix virtqueue access check in vhost-user setup' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (55 preceding siblings ...)
  2024-03-05  9:46 ` patch 'vhost: fix virtqueue access check in VDUSE setup' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net/virtio: remove duplicate queue xstats' " Xueming Li
                   ` (79 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: David Marchand; +Cc: Eelco Chaudron, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c8e7cd6c6dbf806fe64c8b930ad362d253fc7230 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 5 Dec 2023 10:45:33 +0100
Subject: [PATCH] vhost: fix virtqueue access check in vhost-user setup
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b3e42d92362bcc75df21c5b86ba7c0685b40a3bf ]

Calling vring_invalidate must be done with a (write) lock taken on the
virtqueue.

Fixes: 72d002b3ebda ("vhost: fix vring address handling during live migration")

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

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index e36312181a..a323ce5fbf 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2198,7 +2198,9 @@ vhost_user_get_vring_base(struct virtio_net **pdev,

 	vhost_user_iotlb_flush_all(dev);

+	rte_rwlock_write_lock(&vq->access_lock);
 	vring_invalidate(dev, vq);
+	rte_rwlock_write_unlock(&vq->access_lock);

 	return RTE_VHOST_MSG_RESULT_REPLY;
 }
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.691983857 +0800
+++ 0057-vhost-fix-virtqueue-access-check-in-vhost-user-setup.patch	2024-03-05 17:39:30.773566493 +0800
@@ -1 +1 @@
-From b3e42d92362bcc75df21c5b86ba7c0685b40a3bf Mon Sep 17 00:00:00 2001
+From c8e7cd6c6dbf806fe64c8b930ad362d253fc7230 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b3e42d92362bcc75df21c5b86ba7c0685b40a3bf ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index bac10e6182..931dc690ad 100644
+index e36312181a..a323ce5fbf 100644

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

* patch 'net/virtio: remove duplicate queue xstats' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (56 preceding siblings ...)
  2024-03-05  9:46 ` patch 'vhost: fix virtqueue access check in vhost-user " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'vhost: fix deadlock during vDPA SW live migration' " Xueming Li
                   ` (78 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Edwin Brossette; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 33fbddf9a41548ffe2746b6dfee7e3bdb64c043b Mon Sep 17 00:00:00 2001
From: Edwin Brossette <edwin.brossette@6wind.com>
Date: Fri, 24 Nov 2023 14:52:36 +0100
Subject: [PATCH] net/virtio: remove duplicate queue xstats
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4b0a1fdb745c39003d70c75696d6730eba5636a5 ]

The flag RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS was temporarily set while
moving queue stats from 'struct rte_eth_stats' to the individual PMDs,
as explained in commit
f30e69b41f94 ("ethdev: add device flag to bypass auto-filled queue xstats").

This flag was added so every pmd would keep its original behavior until
the change was implemented. However, this flag was not removed
afterwards in the virtio PMD and as a result, some queue stats are
displayed twice when trying to get them: once in lib_rte_ethdev, and a
second time in the virtio PMD.

Remove this flag so stats are printed only once.

Fixes: f30e69b41f94 ("ethdev: add device flag to bypass auto-filled queue xstats")

Signed-off-by: Edwin Brossette <edwin.brossette@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/virtio/virtio_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index c2c0a1a111..517585740e 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1793,8 +1793,6 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 	else
 		eth_dev->data->dev_flags &= ~RTE_ETH_DEV_INTR_LSC;

-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
 	/* Setting up rx_header size for the device */
 	if (virtio_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF) ||
 	    virtio_with_feature(hw, VIRTIO_F_VERSION_1) ||
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.717076558 +0800
+++ 0058-net-virtio-remove-duplicate-queue-xstats.patch	2024-03-05 17:39:30.773566493 +0800
@@ -1 +1 @@
-From 4b0a1fdb745c39003d70c75696d6730eba5636a5 Mon Sep 17 00:00:00 2001
+From 33fbddf9a41548ffe2746b6dfee7e3bdb64c043b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4b0a1fdb745c39003d70c75696d6730eba5636a5 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org

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

* patch 'vhost: fix deadlock during vDPA SW live migration' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (57 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net/virtio: remove duplicate queue xstats' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'vdpa/mlx5: fix queue enable drain CQ' " Xueming Li
                   ` (77 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Hao Chen; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5eb1dd92dce634a60324243f530dfb4130efe610 Mon Sep 17 00:00:00 2001
From: Hao Chen <chenh@yusur.tech>
Date: Mon, 22 Jan 2024 11:27:44 +0800
Subject: [PATCH] vhost: fix deadlock during vDPA SW live migration
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 19639c3b693bcfdc941c56d9d5bd60f65a8eeecb ]

In a nested virtualization environment, running dpdk-vdpa
in QEMU-L1 for software live migration will result in a
deadlock between dpdk-vdpa and QEMU-L2 processes.
'rte_vdpa_relay_vring_used'->
'__vhost_iova_to_vva'->
'vhost_user_iotlb_rd_unlock(vq)'->
'vhost_user_iotlb_miss'-> send vhost message
'VHOST_USER_SLAVE_IOTLB_MSG' to QEMU-L2's vdpa socket, then
call 'vhost_user_iotlb_rd_lock(vq)' to hold the read lock
`iotlb_lock`.

But there is no place to release this read lock.

QEMU-L2 get the 'VHOST_USER_SLAVE_IOTLB_MSG', then call
'vhost_user_send_device_iotlb_msg' to send
'VHOST_USER_IOTLB_MSG' messages to dpdk-vdpa.

dpdk-vdpa will call vhost_user_iotlb_cache_insert and will
obtain the write lock `iotlb_lock`, but the read lock
`iotlb_lock` has not been released and will block here.

This patch add lock and unlock function to fix the deadlock.

Fixes: b13ad2decc83 ("vhost: provide helpers for virtio ring relay")

Signed-off-by: Hao Chen <chenh@yusur.tech>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/vdpa.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
index 219eef879c..ce4fb09859 100644
--- a/lib/vhost/vdpa.c
+++ b/lib/vhost/vdpa.c
@@ -19,6 +19,7 @@
 #include "rte_vdpa.h"
 #include "vdpa_driver.h"
 #include "vhost.h"
+#include "iotlb.h"

 /** Double linked list of vDPA devices. */
 TAILQ_HEAD(vdpa_device_list, rte_vdpa_device);
@@ -147,7 +148,6 @@ rte_vdpa_unregister_device(struct rte_vdpa_device *dev)

 int
 rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
-	__rte_no_thread_safety_analysis /* FIXME: requires iotlb_lock? */
 {
 	struct virtio_net *dev = get_device(vid);
 	uint16_t idx, idx_m, desc_id;
@@ -193,17 +193,21 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
 			if (unlikely(nr_descs > vq->size))
 				return -1;

+			vhost_user_iotlb_rd_lock(vq);
 			desc_ring = (struct vring_desc *)(uintptr_t)
 				vhost_iova_to_vva(dev, vq,
 						vq->desc[desc_id].addr, &dlen,
 						VHOST_ACCESS_RO);
+			vhost_user_iotlb_rd_unlock(vq);
 			if (unlikely(!desc_ring))
 				return -1;

 			if (unlikely(dlen < vq->desc[desc_id].len)) {
+				vhost_user_iotlb_rd_lock(vq);
 				idesc = vhost_alloc_copy_ind_table(dev, vq,
 						vq->desc[desc_id].addr,
 						vq->desc[desc_id].len);
+				vhost_user_iotlb_rd_unlock(vq);
 				if (unlikely(!idesc))
 					return -1;

@@ -220,9 +224,12 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
 			if (unlikely(nr_descs-- == 0))
 				goto fail;
 			desc = desc_ring[desc_id];
-			if (desc.flags & VRING_DESC_F_WRITE)
+			if (desc.flags & VRING_DESC_F_WRITE) {
+				vhost_user_iotlb_rd_lock(vq);
 				vhost_log_write_iova(dev, vq, desc.addr,
 						     desc.len);
+				vhost_user_iotlb_rd_unlock(vq);
+			}
 			desc_id = desc.next;
 		} while (desc.flags & VRING_DESC_F_NEXT);

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.743697159 +0800
+++ 0059-vhost-fix-deadlock-during-vDPA-SW-live-migration.patch	2024-03-05 17:39:30.773566493 +0800
@@ -1 +1 @@
-From 19639c3b693bcfdc941c56d9d5bd60f65a8eeecb Mon Sep 17 00:00:00 2001
+From 5eb1dd92dce634a60324243f530dfb4130efe610 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 19639c3b693bcfdc941c56d9d5bd60f65a8eeecb ]
@@ -30 +32,0 @@
-Cc: stable@dpdk.org
@@ -39 +41 @@
-index 9776fc07a9..a1dd5a753b 100644
+index 219eef879c..ce4fb09859 100644

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

* patch 'vdpa/mlx5: fix queue enable drain CQ' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (58 preceding siblings ...)
  2024-03-05  9:46 ` patch 'vhost: fix deadlock during vDPA SW live migration' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'vhost: fix memory leak in Virtio Tx split path' " Xueming Li
                   ` (76 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Yajun Wu; +Cc: Matan Azrad, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 19f0cf0927c7171c0fe06526388f51c17c5ce62b Mon Sep 17 00:00:00 2001
From: Yajun Wu <yajunw@nvidia.com>
Date: Thu, 25 Jan 2024 11:17:55 +0800
Subject: [PATCH] vdpa/mlx5: fix queue enable drain CQ
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 32fbcf3139fbff04651b3fe173e9f3457f105221 ]

For the case: `ethtool -L eth0 combined xxx` in VM, VQ will disable
and enable without calling device close. In such case, need add
drain CQ before reuse/reset event QP.

Fixes: 24969c7b6224 ("vdpa/mlx5: reuse event queues")

Signed-off-by: Yajun Wu <yajunw@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_event.c | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
index 9557c1042e..32430614d5 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
@@ -244,22 +244,30 @@ mlx5_vdpa_queues_complete(struct mlx5_vdpa_priv *priv)
 	return max;
 }

+static void
+mlx5_vdpa_drain_cq_one(struct mlx5_vdpa_priv *priv,
+	struct mlx5_vdpa_virtq *virtq)
+{
+	struct mlx5_vdpa_cq *cq = &virtq->eqp.cq;
+
+	mlx5_vdpa_queue_complete(cq);
+	if (cq->cq_obj.cq) {
+		cq->cq_obj.cqes[0].wqe_counter = rte_cpu_to_be_16(UINT16_MAX);
+		virtq->eqp.qp_pi = 0;
+		if (!cq->armed)
+			mlx5_vdpa_cq_arm(priv, cq);
+	}
+}
+
 void
 mlx5_vdpa_drain_cq(struct mlx5_vdpa_priv *priv)
 {
+	struct mlx5_vdpa_virtq *virtq;
 	unsigned int i;

 	for (i = 0; i < priv->caps.max_num_virtio_queues; i++) {
-		struct mlx5_vdpa_cq *cq = &priv->virtqs[i].eqp.cq;
-
-		mlx5_vdpa_queue_complete(cq);
-		if (cq->cq_obj.cq) {
-			cq->cq_obj.cqes[0].wqe_counter =
-				rte_cpu_to_be_16(UINT16_MAX);
-			priv->virtqs[i].eqp.qp_pi = 0;
-			if (!cq->armed)
-				mlx5_vdpa_cq_arm(priv, cq);
-		}
+		virtq = &priv->virtqs[i];
+		mlx5_vdpa_drain_cq_one(priv, virtq);
 	}
 }

@@ -632,6 +640,7 @@ mlx5_vdpa_event_qp_prepare(struct mlx5_vdpa_priv *priv, uint16_t desc_n,
 	if (eqp->cq.cq_obj.cq != NULL && log_desc_n == eqp->cq.log_desc_n) {
 		/* Reuse existing resources. */
 		eqp->cq.callfd = callfd;
+		mlx5_vdpa_drain_cq_one(priv, virtq);
 		/* FW will set event qp to error state in q destroy. */
 		if (reset && !mlx5_vdpa_qps2rst2rts(eqp))
 			rte_write32(rte_cpu_to_be_32(RTE_BIT32(log_desc_n)),
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.765921359 +0800
+++ 0060-vdpa-mlx5-fix-queue-enable-drain-CQ.patch	2024-03-05 17:39:30.773566493 +0800
@@ -1 +1 @@
-From 32fbcf3139fbff04651b3fe173e9f3457f105221 Mon Sep 17 00:00:00 2001
+From 19f0cf0927c7171c0fe06526388f51c17c5ce62b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 32fbcf3139fbff04651b3fe173e9f3457f105221 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'vhost: fix memory leak in Virtio Tx split path' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (59 preceding siblings ...)
  2024-03-05  9:46 ` patch 'vdpa/mlx5: fix queue enable drain CQ' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'cryptodev: remove unused extern variable' " Xueming Li
                   ` (75 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e951bbbd186c29ef86a3016ff30bc33b9dac35fa Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 31 Jan 2024 20:53:08 +0100
Subject: [PATCH] vhost: fix memory leak in Virtio Tx split path
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7746fba831509fdb4c528266d0b38a89566e01e5 ]

When vIOMMU is enabled, rte_vhost_dequeue_burst() can return early
because of IOTLB misses.
Such IOTLB misses are especially frequent when a Virtio device is
bound to a kernel driver in guest.

This patch fixes a mbuf leak occurring in this case.

Fixes: 242695f6122a ("vhost: allocate and free packets in bulk in Tx split")

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

diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index d00f4b03aa..895a79cf51 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -3104,7 +3104,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 {
 	uint16_t i;
 	uint16_t avail_entries;
-	uint16_t dropped = 0;
 	static bool allocerr_warned;

 	/*
@@ -3143,11 +3142,8 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,

 		update_shadow_used_ring_split(vq, head_idx, 0);

-		if (unlikely(buf_len <= dev->vhost_hlen)) {
-			dropped += 1;
-			i++;
+		if (unlikely(buf_len <= dev->vhost_hlen))
 			break;
-		}

 		buf_len -= dev->vhost_hlen;

@@ -3164,8 +3160,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 					buf_len, mbuf_pool->name);
 				allocerr_warned = true;
 			}
-			dropped += 1;
-			i++;
 			break;
 		}

@@ -3176,27 +3170,21 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 				VHOST_LOG_DATA(dev->ifname, ERR, "failed to copy desc to mbuf.\n");
 				allocerr_warned = true;
 			}
-			dropped += 1;
-			i++;
 			break;
 		}
-
 	}

-	if (dropped)
-		rte_pktmbuf_free_bulk(&pkts[i - 1], count - i + 1);
+	if (unlikely(count != i))
+		rte_pktmbuf_free_bulk(&pkts[i], count - i);

-	vq->last_avail_idx += i;
-
-	do_data_copy_dequeue(vq);
-	if (unlikely(i < count))
-		vq->shadow_used_idx = i;
 	if (likely(vq->shadow_used_idx)) {
+		vq->last_avail_idx += vq->shadow_used_idx;
+		do_data_copy_dequeue(vq);
 		flush_shadow_used_ring_split(dev, vq);
 		vhost_vring_call_split(dev, vq);
 	}

-	return (i - dropped);
+	return i;
 }

 __rte_noinline
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.803090760 +0800
+++ 0061-vhost-fix-memory-leak-in-Virtio-Tx-split-path.patch	2024-03-05 17:39:30.783566493 +0800
@@ -1 +1 @@
-From 7746fba831509fdb4c528266d0b38a89566e01e5 Mon Sep 17 00:00:00 2001
+From e951bbbd186c29ef86a3016ff30bc33b9dac35fa Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7746fba831509fdb4c528266d0b38a89566e01e5 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index c738b7edc9..9951842b9f 100644
+index d00f4b03aa..895a79cf51 100644
@@ -58 +60 @@
- 				VHOST_DATA_LOG(dev->ifname, ERR, "failed to copy desc to mbuf.");
+ 				VHOST_LOG_DATA(dev->ifname, ERR, "failed to copy desc to mbuf.\n");

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

* patch 'cryptodev: remove unused extern variable' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (60 preceding siblings ...)
  2024-03-05  9:46 ` patch 'vhost: fix memory leak in Virtio Tx split path' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'examples/ipsec-secgw: fix width of variables' " Xueming Li
                   ` (74 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 96d48b5b40c7fc54c66734c2e239ba7a37b16c21 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 12 Dec 2023 08:31:04 -0800
Subject: [PATCH] cryptodev: remove unused extern variable
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b6f30094e511c22f038907a507d16f7cc022c682 ]

The variable rte_cyptodev_names is unused and misspelled.

Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 lib/cryptodev/rte_cryptodev.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index aaeaf294e6..59c7d69da5 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -26,8 +26,6 @@ extern "C" {

 #include "rte_cryptodev_trace_fp.h"

-extern const char **rte_cyptodev_names;
-
 /* Logging Macros */

 #define CDEV_LOG_ERR(...) \
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.828445461 +0800
+++ 0062-cryptodev-remove-unused-extern-variable.patch	2024-03-05 17:39:30.783566493 +0800
@@ -1 +1 @@
-From b6f30094e511c22f038907a507d16f7cc022c682 Mon Sep 17 00:00:00 2001
+From 96d48b5b40c7fc54c66734c2e239ba7a37b16c21 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b6f30094e511c22f038907a507d16f7cc022c682 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 359b6c2b29..f6ab0e5bbb 100644
+index aaeaf294e6..59c7d69da5 100644
@@ -27,3 +29,3 @@
- /**
-  * @internal Logtype used for cryptodev related messages.
-  */
+ /* Logging Macros */
+
+ #define CDEV_LOG_ERR(...) \

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

* patch 'examples/ipsec-secgw: fix width of variables' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (61 preceding siblings ...)
  2024-03-05  9:46 ` patch 'cryptodev: remove unused extern variable' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'common/cnxk: fix memory leak in CPT init' " Xueming Li
                   ` (73 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Konstantin Ananyev, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f5d6c54154ea55c29a229683fae42f880980c4f0 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Tue, 19 Dec 2023 10:59:22 +0530
Subject: [PATCH] examples/ipsec-secgw: fix width of variables
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6b9dabfdffee7ff1efa83e9548b4063fab0819c5 ]

'rte_eth_rx_burst' returns uint16_t. The same value need to be passed
to 'process_packets' functions which performs further processing. Having
this function use 'uint8_t' can result in issues when MAX_PKT_BURST is
larger.

The route functions (route4_pkts & route6_pkts) take uint8_t as the
argument. The caller can pass larger values as the field that is passed
is of type uint32_t. And the function can work with uint32_t as it loops
through the packets and sends it out. Using uint8_t can result in silent
packet drops.

Fixes: 4fbfa6c7c921 ("examples/ipsec-secgw: update eth header during route lookup")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/ipsec-secgw.c  | 5 ++---
 examples/ipsec-secgw/ipsec_worker.h | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index bf98d2618b..a61bea400a 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -568,7 +568,7 @@ process_pkts_outbound_nosp(struct ipsec_ctx *ipsec_ctx,

 static inline void
 process_pkts(struct lcore_conf *qconf, struct rte_mbuf **pkts,
-	     uint8_t nb_pkts, uint16_t portid, void *ctx)
+	     uint16_t nb_pkts, uint16_t portid, void *ctx)
 {
 	struct ipsec_traffic traffic;

@@ -695,8 +695,7 @@ ipsec_poll_mode_worker(void)
 	struct rte_mbuf *pkts[MAX_PKT_BURST];
 	uint32_t lcore_id;
 	uint64_t prev_tsc, diff_tsc, cur_tsc;
-	int32_t i, nb_rx;
-	uint16_t portid;
+	uint16_t i, nb_rx, portid;
 	uint8_t queueid;
 	struct lcore_conf *qconf;
 	int32_t rc, socket_id;
diff --git a/examples/ipsec-secgw/ipsec_worker.h b/examples/ipsec-secgw/ipsec_worker.h
index ac980b8bcf..8e937fda3e 100644
--- a/examples/ipsec-secgw/ipsec_worker.h
+++ b/examples/ipsec-secgw/ipsec_worker.h
@@ -469,7 +469,7 @@ fail:

 static __rte_always_inline void
 route4_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[],
-	    uint8_t nb_pkts, uint64_t tx_offloads, bool ip_cksum)
+	    uint32_t nb_pkts, uint64_t tx_offloads, bool ip_cksum)
 {
 	uint32_t hop[MAX_PKT_BURST * 2];
 	uint32_t dst_ip[MAX_PKT_BURST * 2];
@@ -557,7 +557,7 @@ route4_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[],
 }

 static __rte_always_inline void
-route6_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[], uint8_t nb_pkts)
+route6_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[], uint32_t nb_pkts)
 {
 	int32_t hop[MAX_PKT_BURST * 2];
 	uint8_t dst_ip[MAX_PKT_BURST * 2][16];
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.852461062 +0800
+++ 0063-examples-ipsec-secgw-fix-width-of-variables.patch	2024-03-05 17:39:30.783566493 +0800
@@ -1 +1 @@
-From 6b9dabfdffee7ff1efa83e9548b4063fab0819c5 Mon Sep 17 00:00:00 2001
+From f5d6c54154ea55c29a229683fae42f880980c4f0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6b9dabfdffee7ff1efa83e9548b4063fab0819c5 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org

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

* patch 'common/cnxk: fix memory leak in CPT init' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (62 preceding siblings ...)
  2024-03-05  9:46 ` patch 'examples/ipsec-secgw: fix width of variables' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'crypto/cnxk: fix CN9K ECDH public key verification' " Xueming Li
                   ` (72 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ea096d3e488957cb72e339e9822794e0f6bfd2a9 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <gakhil@marvell.com>
Date: Wed, 17 Jan 2024 16:00:46 +0530
Subject: [PATCH] common/cnxk: fix memory leak in CPT init
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ffe0b570cfd04a35b3a2f8f753efbbbe0225c38c ]

dev_init() acquires some resources which need to be cleaned
in case a failure is observed afterwards.

Fixes: c045d2e5cbbc ("common/cnxk: add CPT configuration")

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/common/cnxk/roc_cpt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index 981e85a204..4e23d8c135 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -756,7 +756,7 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
 	rc = dev_init(dev, pci_dev);
 	if (rc) {
 		plt_err("Failed to init roc device");
-		goto fail;
+		return rc;
 	}

 	cpt->pci_dev = pci_dev;
@@ -788,6 +788,7 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
 	return 0;

 fail:
+	dev_fini(dev, pci_dev);
 	return rc;
 }

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.877164463 +0800
+++ 0064-common-cnxk-fix-memory-leak-in-CPT-init.patch	2024-03-05 17:39:30.783566493 +0800
@@ -1 +1 @@
-From ffe0b570cfd04a35b3a2f8f753efbbbe0225c38c Mon Sep 17 00:00:00 2001
+From ea096d3e488957cb72e339e9822794e0f6bfd2a9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ffe0b570cfd04a35b3a2f8f753efbbbe0225c38c ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'crypto/cnxk: fix CN9K ECDH public key verification' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (63 preceding siblings ...)
  2024-03-05  9:46 ` patch 'common/cnxk: fix memory leak in CPT init' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'app/crypto-perf: fix next segment mbuf' " Xueming Li
                   ` (71 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8988726643bc4e51fc69195f98fde69422761cf0 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 17 Jan 2024 16:00:50 +0530
Subject: [PATCH] crypto/cnxk: fix CN9K ECDH public key verification
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5c90255831675489f3e303f7c2b08012f8401505 ]

Fix ECDH pubkey verify in cn9k.

Fixes: baae0994fa96 ("crypto/cnxk: support ECDH")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
index 34d40b07d4..442cd8e5a9 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
@@ -578,7 +578,17 @@ cn9k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp, struct rte_crypto_op *cop,
 		if (unlikely(res->uc_compcode)) {
 			if (res->uc_compcode == ROC_SE_ERR_GC_ICV_MISCOMPARE)
 				cop->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
-			else
+			else if (cop->type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC &&
+				 cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION &&
+				 cop->asym->ecdh.ke_type == RTE_CRYPTO_ASYM_KE_PUB_KEY_VERIFY) {
+				if (res->uc_compcode == ROC_AE_ERR_ECC_POINT_NOT_ON_CURVE) {
+					cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
+					return;
+				} else if (res->uc_compcode == ROC_AE_ERR_ECC_PAI) {
+					cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
+					return;
+				}
+			} else
 				cop->status = RTE_CRYPTO_OP_STATUS_ERROR;

 			plt_dp_info("Request failed with microcode error");
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.903248864 +0800
+++ 0065-crypto-cnxk-fix-CN9K-ECDH-public-key-verification.patch	2024-03-05 17:39:30.783566493 +0800
@@ -1 +1 @@
-From 5c90255831675489f3e303f7c2b08012f8401505 Mon Sep 17 00:00:00 2001
+From 8988726643bc4e51fc69195f98fde69422761cf0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5c90255831675489f3e303f7c2b08012f8401505 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 8b91d11b79..ccbd390bd7 100644
+index 34d40b07d4..442cd8e5a9 100644

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

* patch 'app/crypto-perf: fix next segment mbuf' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (64 preceding siblings ...)
  2024-03-05  9:46 ` patch 'crypto/cnxk: fix CN9K ECDH public key verification' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'app/crypto-perf: fix data comparison' " Xueming Li
                   ` (70 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Anoob Joseph, Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dfc9d45365291d201b6f08cfaa5efba092a9572b Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Thu, 4 Jan 2024 10:24:05 +0800
Subject: [PATCH] app/crypto-perf: fix next segment mbuf
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 06a109ca5dc551631d9251e81966a4bc52f98c5a ]

In fill_multi_seg_mbuf(), when remaining_segments is 0,
rte_mbuf m's next should pointer to NULL instead of a
new rte_mbuf, that causes setting m->next as NULL out
of the while loop to the invalid mbuf.

This commit fixes the invalid mbuf next operation.

Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 app/test-crypto-perf/cperf_test_common.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 932aab16df..b3bf9f67e8 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -49,7 +49,6 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
 {
 	uint16_t mbuf_hdr_size = sizeof(struct rte_mbuf);
 	uint16_t remaining_segments = segments_nb;
-	struct rte_mbuf *next_mbuf;
 	rte_iova_t next_seg_phys_addr = rte_mempool_virt2iova(obj) +
 			 mbuf_offset + mbuf_hdr_size;

@@ -70,15 +69,15 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
 		m->nb_segs = segments_nb;
 		m->port = 0xff;
 		rte_mbuf_refcnt_set(m, 1);
-		next_mbuf = (struct rte_mbuf *) ((uint8_t *) m +
-					mbuf_hdr_size + segment_sz);
-		m->next = next_mbuf;
-		m = next_mbuf;
-		remaining_segments--;

+		remaining_segments--;
+		if (remaining_segments > 0) {
+			m->next = (struct rte_mbuf *)((uint8_t *) m + mbuf_hdr_size + segment_sz);
+			m = m->next;
+		} else {
+			m->next = NULL;
+		}
 	} while (remaining_segments > 0);
-
-	m->next = NULL;
 }

 static void
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.931514065 +0800
+++ 0066-app-crypto-perf-fix-next-segment-mbuf.patch	2024-03-05 17:39:30.783566493 +0800
@@ -1 +1 @@
-From 06a109ca5dc551631d9251e81966a4bc52f98c5a Mon Sep 17 00:00:00 2001
+From dfc9d45365291d201b6f08cfaa5efba092a9572b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 06a109ca5dc551631d9251e81966a4bc52f98c5a ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/crypto-perf: fix data comparison' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (65 preceding siblings ...)
  2024-03-05  9:46 ` patch 'app/crypto-perf: fix next segment mbuf' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'app/crypto-perf: fix encrypt operation verification' " Xueming Li
                   ` (69 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Anoob Joseph, Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 04d9dfd6655c1604a1496601a8dac81580b6ec8f Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Fri, 5 Jan 2024 08:03:22 +0800
Subject: [PATCH] app/crypto-perf: fix data comparison
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ddec2a39bae12da2817392239ddce19f3953fd53 ]

The function memcmp() returns an integer less than, equal to,
or greater than zero. In current code, if the first memcmp()
returns less than zero and the second memcmp() returns greater
than zero, the sum of results may still be 0 and indicates
verify successed.

This commit converts the return value to be zero or greater
than zero. That will make sure the sum of results be correct.

Fixes: df52cb3b6e13 ("app/crypto-perf: move verify as single test type")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 app/test-crypto-perf/cperf_test_verify.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index a6c0ffe813..8aa714b969 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -186,18 +186,18 @@ cperf_verify_op(struct rte_crypto_op *op,

 	if (cipher == 1) {
 		if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
-			res += memcmp(data + cipher_offset,
+			res += !!memcmp(data + cipher_offset,
 					vector->ciphertext.data,
 					options->test_buffer_size);
 		else
-			res += memcmp(data + cipher_offset,
+			res += !!memcmp(data + cipher_offset,
 					vector->plaintext.data,
 					options->test_buffer_size);
 	}

 	if (auth == 1) {
 		if (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE)
-			res += memcmp(data + auth_offset,
+			res += !!memcmp(data + auth_offset,
 					vector->digest.data,
 					options->digest_sz);
 	}
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.955412366 +0800
+++ 0067-app-crypto-perf-fix-data-comparison.patch	2024-03-05 17:39:30.783566493 +0800
@@ -1 +1 @@
-From ddec2a39bae12da2817392239ddce19f3953fd53 Mon Sep 17 00:00:00 2001
+From 04d9dfd6655c1604a1496601a8dac81580b6ec8f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ddec2a39bae12da2817392239ddce19f3953fd53 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/crypto-perf: fix encrypt operation verification' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (66 preceding siblings ...)
  2024-03-05  9:46 ` patch 'app/crypto-perf: fix data comparison' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'event/cnxk: fix dequeue timeout configuration' " Xueming Li
                   ` (68 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b7fd1f73feff644ae8483546f3fb5c9903f5e6e6 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Fri, 5 Jan 2024 08:03:23 +0800
Subject: [PATCH] app/crypto-perf: fix encrypt operation verification
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7d55ca15124c47561120d23d5023843ad99c1a81 ]

AEAD uses RTE_CRYPTO_AEAD_OP_* with aead_op and CIPHER uses
RTE_CRYPTO_CIPHER_OP_* with cipher_op in current code.

This commit aligns aead_op and cipher_op operation to fix
incorrect AEAD verification.

Fixes: df52cb3b6e13 ("app/crypto-perf: move verify as single test type")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test-crypto-perf/cperf_test_verify.c | 55 ++++++++++++------------
 1 file changed, 27 insertions(+), 28 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 8aa714b969..2b0d3f142b 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -111,8 +111,10 @@ cperf_verify_op(struct rte_crypto_op *op,
 	uint32_t len;
 	uint16_t nb_segs;
 	uint8_t *data;
-	uint32_t cipher_offset, auth_offset;
-	uint8_t	cipher, auth;
+	uint32_t cipher_offset, auth_offset = 0;
+	bool cipher = false;
+	bool digest_verify = false;
+	bool is_encrypt = false;
 	int res = 0;

 	if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS)
@@ -150,42 +152,43 @@ cperf_verify_op(struct rte_crypto_op *op,

 	switch (options->op_type) {
 	case CPERF_CIPHER_ONLY:
-		cipher = 1;
+		cipher = true;
 		cipher_offset = 0;
-		auth = 0;
-		auth_offset = 0;
-		break;
-	case CPERF_CIPHER_THEN_AUTH:
-		cipher = 1;
-		cipher_offset = 0;
-		auth = 1;
-		auth_offset = options->test_buffer_size;
+		is_encrypt = options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 		break;
 	case CPERF_AUTH_ONLY:
-		cipher = 0;
 		cipher_offset = 0;
-		auth = 1;
-		auth_offset = options->test_buffer_size;
+		if (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE) {
+			auth_offset = options->test_buffer_size;
+			digest_verify = true;
+		}
 		break;
+	case CPERF_CIPHER_THEN_AUTH:
 	case CPERF_AUTH_THEN_CIPHER:
-		cipher = 1;
+		cipher = true;
 		cipher_offset = 0;
-		auth = 1;
-		auth_offset = options->test_buffer_size;
+		if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) {
+			auth_offset = options->test_buffer_size;
+			digest_verify = true;
+			is_encrypt = true;
+		}
 		break;
 	case CPERF_AEAD:
-		cipher = 1;
+		cipher = true;
 		cipher_offset = 0;
-		auth = 1;
-		auth_offset = options->test_buffer_size;
+		if (options->aead_op == RTE_CRYPTO_AEAD_OP_ENCRYPT) {
+			auth_offset = options->test_buffer_size;
+			digest_verify = true;
+			is_encrypt = true;
+		}
 		break;
 	default:
 		res = 1;
 		goto out;
 	}

-	if (cipher == 1) {
-		if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
+	if (cipher) {
+		if (is_encrypt)
 			res += !!memcmp(data + cipher_offset,
 					vector->ciphertext.data,
 					options->test_buffer_size);
@@ -195,12 +198,8 @@ cperf_verify_op(struct rte_crypto_op *op,
 					options->test_buffer_size);
 	}

-	if (auth == 1) {
-		if (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE)
-			res += !!memcmp(data + auth_offset,
-					vector->digest.data,
-					options->digest_sz);
-	}
+	if (digest_verify)
+		res += !!memcmp(data + auth_offset, vector->digest.data, options->digest_sz);

 out:
 	rte_free(data);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.985038467 +0800
+++ 0068-app-crypto-perf-fix-encrypt-operation-verification.patch	2024-03-05 17:39:30.793566494 +0800
@@ -1 +1 @@
-From 7d55ca15124c47561120d23d5023843ad99c1a81 Mon Sep 17 00:00:00 2001
+From b7fd1f73feff644ae8483546f3fb5c9903f5e6e6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7d55ca15124c47561120d23d5023843ad99c1a81 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'event/cnxk: fix dequeue timeout configuration' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (67 preceding siblings ...)
  2024-03-05  9:46 ` patch 'app/crypto-perf: fix encrypt operation verification' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'test/event: skip test if no driver is present' " Xueming Li
                   ` (67 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6ccd84cf1692d9fdc800078696afb99219946ed9 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Thu, 7 Dec 2023 12:25:39 +0530
Subject: [PATCH] event/cnxk: fix dequeue timeout configuration
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit efcf81e1a89fa7b20aae17accfcb4a8e7ddc3d02 ]

Allow dequeue timeout to be configured as zero, when
RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT is disabled.

Fixes: 5512c7de85cd ("event/cnxk: add common configuration validation")

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

diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 1ec281e735..20f7f0d6df 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -162,16 +162,17 @@ cnxk_sso_dev_validate(const struct rte_eventdev *event_dev, uint32_t deq_depth,

 	deq_tmo_ns = conf->dequeue_timeout_ns;

-	if (deq_tmo_ns == 0)
-		deq_tmo_ns = dev->min_dequeue_timeout_ns;
-	if (deq_tmo_ns < dev->min_dequeue_timeout_ns ||
-	    deq_tmo_ns > dev->max_dequeue_timeout_ns) {
+	if (deq_tmo_ns && (deq_tmo_ns < dev->min_dequeue_timeout_ns ||
+			   deq_tmo_ns > dev->max_dequeue_timeout_ns)) {
 		plt_err("Unsupported dequeue timeout requested");
 		return -EINVAL;
 	}

-	if (conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT)
+	if (conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT) {
+		if (deq_tmo_ns == 0)
+			deq_tmo_ns = dev->min_dequeue_timeout_ns;
 		dev->is_timeout_deq = 1;
+	}

 	dev->deq_tmo_ns = deq_tmo_ns;

@@ -666,7 +667,7 @@ cnxk_sso_init(struct rte_eventdev *event_dev)
 	}

 	dev->is_timeout_deq = 0;
-	dev->min_dequeue_timeout_ns = 0;
+	dev->min_dequeue_timeout_ns = USEC2NSEC(1);
 	dev->max_dequeue_timeout_ns = USEC2NSEC(0x3FF);
 	dev->max_num_events = -1;
 	dev->nb_event_queues = 0;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.012799767 +0800
+++ 0069-event-cnxk-fix-dequeue-timeout-configuration.patch	2024-03-05 17:39:30.793566494 +0800
@@ -1 +1 @@
-From efcf81e1a89fa7b20aae17accfcb4a8e7ddc3d02 Mon Sep 17 00:00:00 2001
+From 6ccd84cf1692d9fdc800078696afb99219946ed9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit efcf81e1a89fa7b20aae17accfcb4a8e7ddc3d02 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'test/event: skip test if no driver is present' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (68 preceding siblings ...)
  2024-03-05  9:46 ` patch 'event/cnxk: fix dequeue timeout configuration' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'doc: fix commands in eventdev test tool guide' " Xueming Li
                   ` (66 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 935051346296fcd2075265414e5161b8dbaa309b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 24 Jan 2024 13:33:38 +0100
Subject: [PATCH] test/event: skip test if no driver is present
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f1caf6ff072ad932d93f3d5587c504d5f90d5d70 ]

Align eventdev with what other device abstraction libraries do: if no
driver is present, skip the tests.

Fixes: f8f9d233ea0e ("test/eventdev: add unit tests")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_eventdev.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c
index 71de947ce4..e4e234dc98 100644
--- a/app/test/test_eventdev.c
+++ b/app/test/test_eventdev.c
@@ -33,9 +33,15 @@ testsuite_setup(void)
 	uint8_t count;
 	count = rte_event_dev_count();
 	if (!count) {
+		int ret;
+
 		printf("Failed to find a valid event device,"
-			" testing with event_skeleton device\n");
-		return rte_vdev_init("event_skeleton", NULL);
+			" trying with event_skeleton device\n");
+		ret = rte_vdev_init("event_skeleton", NULL);
+		if (ret != 0) {
+			printf("No event device, skipping\n");
+			return TEST_SKIPPED;
+		}
 	}
 	return TEST_SUCCESS;
 }
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.043051268 +0800
+++ 0070-test-event-skip-test-if-no-driver-is-present.patch	2024-03-05 17:39:30.793566494 +0800
@@ -1 +1 @@
-From f1caf6ff072ad932d93f3d5587c504d5f90d5d70 Mon Sep 17 00:00:00 2001
+From 935051346296fcd2075265414e5161b8dbaa309b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f1caf6ff072ad932d93f3d5587c504d5f90d5d70 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'doc: fix commands in eventdev test tool guide' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (69 preceding siblings ...)
  2024-03-05  9:46 ` patch 'test/event: skip test if no driver is present' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'ethdev: fix NVGRE encap flow action description' " Xueming Li
                   ` (65 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d06a34452406cbc0c0802c634a657d0033c7d1f0 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Fri, 2 Feb 2024 01:07:50 +0530
Subject: [PATCH] doc: fix commands in eventdev test tool guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b3342d76189e46f4b97d09245617a1188145d384 ]

Fix incorrect core masks in testeventdev example commands.

Fixes: f6dda59153f1 ("doc: add order queue test in eventdev test guide")
Fixes: dd37027f2ba6 ("doc: add order all types queue test in eventdev test guide")
Fixes: 43bc2fef79cd ("doc: add perf queue test in eventdev test guide")
Fixes: b3d4e665ed3d ("doc: add perf all types queue test in eventdev test guide")
Fixes: b01974da9f25 ("app/eventdev: add ethernet device producer option")
Fixes: ba9de463abeb ("doc: add pipeline queue test in testeventdev guide")
Fixes: d1b46daf7484 ("doc: add pipeline atq test in testeventdev guide")
Fixes: d008f20bce23 ("app/eventdev: add event timer adapter as a producer")
Fixes: 2eaa37b86635 ("app/eventdev: add vector mode in pipeline test")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 doc/guides/tools/testeventdev.rst | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/guides/tools/testeventdev.rst b/doc/guides/tools/testeventdev.rst
index fc36bfb30c..3fcc2c9894 100644
--- a/doc/guides/tools/testeventdev.rst
+++ b/doc/guides/tools/testeventdev.rst
@@ -308,7 +308,7 @@ Example command to run order queue test:

 .. code-block:: console

-   sudo <build_dir>/app/dpdk-test-eventdev --vdev=event_sw0 -- \
+   sudo <build_dir>/app/dpdk-test-eventdev -c 0x1f -s 0x10 --vdev=event_sw0 -- \
                 --test=order_queue --plcores 1 --wlcores 2,3


@@ -371,7 +371,7 @@ Example command to run order ``all types queue`` test:

 .. code-block:: console

-   sudo <build_dir>/app/dpdk-test-eventdev --vdev=event_octeontx -- \
+   sudo <build_dir>/app/dpdk-test-eventdev -c 0x1f -- \
                         --test=order_atq --plcores 1 --wlcores 2,3


@@ -475,14 +475,14 @@ Example command to run perf queue test:

 .. code-block:: console

-   sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -s 0x1 --vdev=event_sw0 -- \
+   sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -s 0x2 --vdev=event_sw0 -- \
         --test=perf_queue --plcores=2 --wlcore=3 --stlist=p --nb_pkts=0

 Example command to run perf queue test with producer enqueuing a burst of events:

 .. code-block:: console

-   sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -s 0x1 --vdev=event_sw0 -- \
+   sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -s 0x2 --vdev=event_sw0 -- \
         --test=perf_queue --plcores=2 --wlcore=3 --stlist=p --nb_pkts=0 \
         --prod_enq_burst_sz=32

@@ -490,15 +490,15 @@ Example command to run perf queue test with ethernet ports:

 .. code-block:: console

-   sudo build/app/dpdk-test-eventdev --vdev=event_sw0 -- \
+   sudo build/app/dpdk-test-eventdev -c 0xf -s 0x2 --vdev=event_sw0 -- \
         --test=perf_queue --plcores=2 --wlcore=3 --stlist=p --prod_type_ethdev

 Example command to run perf queue test with event timer adapter:

 .. code-block:: console

-   sudo  <build_dir>/app/dpdk-test-eventdev --vdev="event_octeontx" -- \
-                --wlcores 4 --plcores 12 --test perf_queue --stlist=a \
+   sudo  <build_dir>/app/dpdk-test-eventdev -c 0xfff1 \
+                -- --wlcores 4 --plcores 12 --test perf_queue --stlist=a \
                 --prod_type_timerdev --fwd_latency

 PERF_ATQ Test
@@ -585,15 +585,15 @@ Example command to run perf ``all types queue`` test:

 .. code-block:: console

-   sudo <build_dir>/app/dpdk-test-eventdev --vdev=event_octeontx -- \
+   sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -- \
                 --test=perf_atq --plcores=2 --wlcore=3 --stlist=p --nb_pkts=0

 Example command to run perf ``all types queue`` test with event timer adapter:

 .. code-block:: console

-   sudo  <build_dir>/app/dpdk-test-eventdev --vdev="event_octeontx" -- \
-                --wlcores 4 --plcores 12 --test perf_atq --verbose 20 \
+   sudo  <build_dir>/app/dpdk-test-eventdev -c 0xfff1 \
+                -- --wlcores 4 --plcores 12 --test perf_atq --verbose 20 \
                 --stlist=a --prod_type_timerdev --fwd_latency


@@ -817,13 +817,13 @@ Example command to run pipeline atq test:

 .. code-block:: console

-    sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
+    sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -- \
         --test=pipeline_atq --wlcore=1 --prod_type_ethdev --stlist=a

 Example command to run pipeline atq test with vector events:

 .. code-block:: console

-    sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
+    sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -- \
         --test=pipeline_atq --wlcore=1 --prod_type_ethdev --stlist=a \
         --enable_vector  --vector_size 512
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.074764870 +0800
+++ 0071-doc-fix-commands-in-eventdev-test-tool-guide.patch	2024-03-05 17:39:30.793566494 +0800
@@ -1 +1 @@
-From b3342d76189e46f4b97d09245617a1188145d384 Mon Sep 17 00:00:00 2001
+From d06a34452406cbc0c0802c634a657d0033c7d1f0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b3342d76189e46f4b97d09245617a1188145d384 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org

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

* patch 'ethdev: fix NVGRE encap flow action description' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (70 preceding siblings ...)
  2024-03-05  9:46 ` patch 'doc: fix commands in eventdev test tool guide' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net/nfp: fix resource leak for device initialization' " Xueming Li
                   ` (64 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Sunyang Wu; +Cc: Joey Xing, Ori Kam, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8610d2715d3fd6822556a6e45a31d42846dd83a7 Mon Sep 17 00:00:00 2001
From: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Date: Thu, 30 Nov 2023 14:22:21 +0800
Subject: [PATCH] ethdev: fix NVGRE encap flow action description
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f59d78b5803be7b0c0831309c703273bd2c92a50 ]

Fix incorrect definition of 'NVGRE_ENCAP', and
modified the error comments of 'rte_flow_action_nvgre_encap'.

Fixes: c2beb1d469d2 ("ethdev: add missing items/actions to flow object converter")
Fixes: 3850cf0c8c37 ("ethdev: add tunnel encap/decap actions")

Signed-off-by: Joey Xing <joey.xing@jaguarmicro.com>
Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_flow.c | 2 +-
 lib/ethdev/rte_flow.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 549e329558..04348e0243 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -216,7 +216,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
 		       sizeof(struct rte_flow_action_of_push_mpls)),
 	MK_FLOW_ACTION(VXLAN_ENCAP, sizeof(struct rte_flow_action_vxlan_encap)),
 	MK_FLOW_ACTION(VXLAN_DECAP, 0),
-	MK_FLOW_ACTION(NVGRE_ENCAP, sizeof(struct rte_flow_action_vxlan_encap)),
+	MK_FLOW_ACTION(NVGRE_ENCAP, sizeof(struct rte_flow_action_nvgre_encap)),
 	MK_FLOW_ACTION(NVGRE_DECAP, 0),
 	MK_FLOW_ACTION(RAW_ENCAP, sizeof(struct rte_flow_action_raw_encap)),
 	MK_FLOW_ACTION(RAW_DECAP, sizeof(struct rte_flow_action_raw_decap)),
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index affdc8121b..4cdc1f1d8f 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3471,7 +3471,7 @@ struct rte_flow_action_vxlan_encap {
  */
 struct rte_flow_action_nvgre_encap {
 	/**
-	 * Encapsulating vxlan tunnel definition
+	 * Encapsulating nvgre tunnel definition
 	 * (terminated by the END pattern item).
 	 */
 	struct rte_flow_item *definition;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.114564671 +0800
+++ 0072-ethdev-fix-NVGRE-encap-flow-action-description.patch	2024-03-05 17:39:30.803566494 +0800
@@ -1 +1 @@
-From f59d78b5803be7b0c0831309c703273bd2c92a50 Mon Sep 17 00:00:00 2001
+From 8610d2715d3fd6822556a6e45a31d42846dd83a7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f59d78b5803be7b0c0831309c703273bd2c92a50 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 2cd30d63b7..43a41bdb1d 100644
+index 549e329558..04348e0243 100644
@@ -26 +28 @@
-@@ -219,7 +219,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
+@@ -216,7 +216,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
@@ -36 +38 @@
-index 78b6bbb159..440396be78 100644
+index affdc8121b..4cdc1f1d8f 100644
@@ -39 +41 @@
-@@ -3468,7 +3468,7 @@ struct rte_flow_action_vxlan_encap {
+@@ -3471,7 +3471,7 @@ struct rte_flow_action_vxlan_encap {

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

* patch 'net/nfp: fix resource leak for device initialization' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (71 preceding siblings ...)
  2024-03-05  9:46 ` patch 'ethdev: fix NVGRE encap flow action description' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net/nfp: fix resource leak for CoreNIC firmware' " Xueming Li
                   ` (63 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f2ee31d52cdea323cbc686c99f5131cf22f4b250 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 4 Dec 2023 09:57:12 +0800
Subject: [PATCH] net/nfp: fix resource leak for device initialization
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3699456672516a11bf6cb4b456618d2dd12080e4 ]

Fix the resource leak problem in the abnormal logic of device
initialize function.

Fixes: f26e82397f6d ("net/nfp: implement xstats")
Fixes: 547137405be7 ("net/nfp: initialize IPsec related content")

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

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index f02caf8056..25feb8e394 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -590,9 +590,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev)

 		net_hw->mac_stats = net_hw->mac_stats_bar;
 	} else {
-		if (pf_dev->ctrl_bar == NULL)
-			return -ENODEV;
-
 		/* Use port offset in pf ctrl_bar for this ports control bar */
 		hw->ctrl_bar = pf_dev->ctrl_bar + (port * NFP_NET_CFG_BAR_SZ);
 		net_hw->mac_stats = app_fw_nic->ports[0]->mac_stats_bar +
@@ -604,18 +601,19 @@ nfp_net_init(struct rte_eth_dev *eth_dev)

 	err = nfp_net_common_init(pci_dev, net_hw);
 	if (err != 0)
-		return err;
+		goto free_area;

 	err = nfp_net_tlv_caps_parse(eth_dev);
 	if (err != 0) {
 		PMD_INIT_LOG(ERR, "Failed to parser TLV caps");
 		return err;
+		goto free_area;
 	}

 	err = nfp_ipsec_init(eth_dev);
 	if (err != 0) {
 		PMD_INIT_LOG(ERR, "Failed to init IPsec module");
-		return err;
+		goto free_area;
 	}

 	nfp_net_ethdev_ops_mount(net_hw, eth_dev);
@@ -625,7 +623,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	if (net_hw->eth_xstats_base == NULL) {
 		PMD_INIT_LOG(ERR, "no memory for xstats base values on device %s!",
 				pci_dev->device.name);
-		return -ENOMEM;
+		err = -ENOMEM;
+		goto ipsec_exit;
 	}

 	/* Work out where in the BAR the queues start. */
@@ -655,7 +654,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	eth_dev->data->mac_addrs = rte_zmalloc("mac_addr", RTE_ETHER_ADDR_LEN, 0);
 	if (eth_dev->data->mac_addrs == NULL) {
 		PMD_INIT_LOG(ERR, "Failed to space for MAC address");
-		return -ENOMEM;
+		err = -ENOMEM;
+		goto xstats_free;
 	}

 	nfp_net_pf_read_mac(app_fw_nic, port);
@@ -693,6 +693,16 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	nfp_net_stats_reset(eth_dev);

 	return 0;
+
+xstats_free:
+	rte_free(net_hw->eth_xstats_base);
+ipsec_exit:
+	nfp_ipsec_uninit(eth_dev);
+free_area:
+	if (net_hw->mac_stats_area != NULL)
+		nfp_cpp_area_release_free(net_hw->mac_stats_area);
+
+	return err;
 }

 #define DEFAULT_FW_PATH       "/lib/firmware/netronome"
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.179452373 +0800
+++ 0073-net-nfp-fix-resource-leak-for-device-initialization.patch	2024-03-05 17:39:30.803566494 +0800
@@ -1 +1 @@
-From 3699456672516a11bf6cb4b456618d2dd12080e4 Mon Sep 17 00:00:00 2001
+From f2ee31d52cdea323cbc686c99f5131cf22f4b250 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3699456672516a11bf6cb4b456618d2dd12080e4 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 9e40bce4dd..2a80a592f2 100644
+index f02caf8056..25feb8e394 100644
@@ -24 +26 @@
-@@ -597,9 +597,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
+@@ -590,9 +590,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
@@ -34 +36 @@
-@@ -611,18 +608,19 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
+@@ -604,18 +601,19 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
@@ -56 +58 @@
-@@ -632,7 +630,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
+@@ -625,7 +623,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
@@ -66 +68 @@
-@@ -662,7 +661,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
+@@ -655,7 +654,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
@@ -76 +78 @@
-@@ -700,6 +700,16 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
+@@ -693,6 +693,16 @@ nfp_net_init(struct rte_eth_dev *eth_dev)

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

* patch 'net/nfp: fix resource leak for CoreNIC firmware' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (72 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net/nfp: fix resource leak for device initialization' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net/nfp: fix resource leak for PF initialization' " Xueming Li
                   ` (62 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1d53d5495ba4c5f4a23bc2dbe9f26c33c15e74a3 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 4 Dec 2023 09:57:13 +0800
Subject: [PATCH] net/nfp: fix resource leak for CoreNIC firmware
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8b8f116b199e31795ecd5cedb12302f10c0ae5a4 ]

Fix the resource leak problem in the logic of CoreNIC firmware
application.

Fixes: 646ea79ce481 ("net/nfp: move PF functions into its own file")

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

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 25feb8e394..38ee1c399a 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -310,6 +310,18 @@ nfp_net_keepalive_stop(struct nfp_multi_pf *multi_pf)
 	rte_eal_alarm_cancel(nfp_net_beat_timer, (void *)multi_pf);
 }

+static void
+nfp_net_uninit(struct rte_eth_dev *eth_dev)
+{
+	struct nfp_net_hw *net_hw;
+
+	net_hw = eth_dev->data->dev_private;
+	rte_free(net_hw->eth_xstats_base);
+	nfp_ipsec_uninit(eth_dev);
+	if (net_hw->mac_stats_area != NULL)
+		nfp_cpp_area_release_free(net_hw->mac_stats_area);
+}
+
 /* Reset and stop device. The device can not be restarted. */
 static int
 nfp_net_close(struct rte_eth_dev *dev)
@@ -1130,12 +1142,11 @@ port_cleanup:
 				app_fw_nic->ports[id]->eth_dev != NULL) {
 			struct rte_eth_dev *tmp_dev;
 			tmp_dev = app_fw_nic->ports[id]->eth_dev;
-			nfp_ipsec_uninit(tmp_dev);
+			nfp_net_uninit(tmp_dev);
 			rte_eth_dev_release_port(tmp_dev);
-			app_fw_nic->ports[id] = NULL;
 		}
 	}
-	nfp_cpp_area_free(pf_dev->ctrl_area);
+	nfp_cpp_area_release_free(pf_dev->ctrl_area);
 app_cleanup:
 	rte_free(app_fw_nic);

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.240549175 +0800
+++ 0074-net-nfp-fix-resource-leak-for-CoreNIC-firmware.patch	2024-03-05 17:39:30.803566494 +0800
@@ -1 +1 @@
-From 8b8f116b199e31795ecd5cedb12302f10c0ae5a4 Mon Sep 17 00:00:00 2001
+From 1d53d5495ba4c5f4a23bc2dbe9f26c33c15e74a3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8b8f116b199e31795ecd5cedb12302f10c0ae5a4 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 2a80a592f2..c132e97d1a 100644
+index 25feb8e394..38ee1c399a 100644
@@ -23 +25 @@
-@@ -317,6 +317,18 @@ nfp_net_keepalive_stop(struct nfp_multi_pf *multi_pf)
+@@ -310,6 +310,18 @@ nfp_net_keepalive_stop(struct nfp_multi_pf *multi_pf)
@@ -42 +44 @@
-@@ -1137,12 +1149,11 @@ port_cleanup:
+@@ -1130,12 +1142,11 @@ port_cleanup:

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

* patch 'net/nfp: fix resource leak for PF initialization' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (73 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net/nfp: fix resource leak for CoreNIC firmware' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net/nfp: fix resource leak for flower firmware' " Xueming Li
                   ` (61 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 02916557c12578a78bef1e837aa2b4bb923bca80 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 4 Dec 2023 09:57:14 +0800
Subject: [PATCH] net/nfp: fix resource leak for PF initialization
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 528812a63c4c2d74ccf2c2f2aa297fcbff3ceea9 ]

Fix the resource leak problem in the abnormal logic of PF initialize
function.

Fixes: 646ea79ce481 ("net/nfp: move PF functions into its own file")
Fixes: 8ba461d1eecc ("net/nfp: introduce keepalive mechanism for multiple PF")

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

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 38ee1c399a..bb0ddf3d54 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -1326,12 +1326,13 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 	return 0;

 hwqueues_cleanup:
-	nfp_cpp_area_free(pf_dev->qc_area);
+	nfp_cpp_area_release_free(pf_dev->qc_area);
 sym_tbl_cleanup:
 	free(sym_tbl);
 fw_cleanup:
 	nfp_fw_unload(cpp);
 	nfp_net_keepalive_stop(&pf_dev->multi_pf);
+	nfp_net_keepalive_uninit(&pf_dev->multi_pf);
 eth_table_cleanup:
 	free(nfp_eth_table);
 hwinfo_cleanup:
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.280678476 +0800
+++ 0075-net-nfp-fix-resource-leak-for-PF-initialization.patch	2024-03-05 17:39:30.813566494 +0800
@@ -1 +1 @@
-From 528812a63c4c2d74ccf2c2f2aa297fcbff3ceea9 Mon Sep 17 00:00:00 2001
+From 02916557c12578a78bef1e837aa2b4bb923bca80 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 528812a63c4c2d74ccf2c2f2aa297fcbff3ceea9 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index c132e97d1a..6fdde105ba 100644
+index 38ee1c399a..bb0ddf3d54 100644
@@ -24 +26 @@
-@@ -1333,12 +1333,13 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+@@ -1326,12 +1326,13 @@ nfp_pf_init(struct rte_pci_device *pci_dev)

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

* patch 'net/nfp: fix resource leak for flower firmware' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (74 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net/nfp: fix resource leak for PF initialization' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net/nfp: fix resource leak for exit of CoreNIC " Xueming Li
                   ` (60 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 09e1df883afa97ba2d37c8c4a69a0273c962a7b9 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 4 Dec 2023 09:57:15 +0800
Subject: [PATCH] net/nfp: fix resource leak for flower firmware
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7c596721ae5f41d1dbab8b936a4983928d6b5603 ]

Fix the resource leak problem in the logic of flower firmware
application.

Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 .../net/nfp/flower/nfp_flower_representor.c   | 89 ++++++++++++++++++-
 .../net/nfp/flower/nfp_flower_representor.h   |  1 +
 2 files changed, 86 insertions(+), 4 deletions(-)

diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index 0f0e63aae0..7212d9e024 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -291,6 +291,43 @@ nfp_flower_repr_tx_burst(void *tx_queue,
 	return sent;
 }

+static int
+nfp_flower_repr_uninit(struct rte_eth_dev *eth_dev)
+{
+	struct nfp_flower_representor *repr;
+
+	repr = eth_dev->data->dev_private;
+	rte_ring_free(repr->ring);
+
+	return 0;
+}
+
+static int
+nfp_flower_pf_repr_uninit(__rte_unused struct rte_eth_dev *eth_dev)
+{
+	return 0;
+}
+
+static void
+nfp_flower_repr_free(struct nfp_flower_representor *repr,
+		enum nfp_repr_type repr_type)
+{
+	switch (repr_type) {
+	case NFP_REPR_TYPE_PHYS_PORT:
+		rte_eth_dev_destroy(repr->eth_dev, nfp_flower_repr_uninit);
+		break;
+	case NFP_REPR_TYPE_PF:
+		rte_eth_dev_destroy(repr->eth_dev, nfp_flower_pf_repr_uninit);
+		break;
+	case NFP_REPR_TYPE_VF:
+		rte_eth_dev_destroy(repr->eth_dev, nfp_flower_repr_uninit);
+		break;
+	default:
+		PMD_DRV_LOG(ERR, "Unsupported repr port type.");
+		break;
+	}
+}
+
 static const struct eth_dev_ops nfp_flower_pf_repr_dev_ops = {
 	.dev_infos_get        = nfp_flower_repr_dev_infos_get,

@@ -410,6 +447,7 @@ nfp_flower_pf_repr_init(struct rte_eth_dev *eth_dev,

 	repr->app_fw_flower->pf_repr = repr;
 	repr->app_fw_flower->pf_hw->eth_dev = eth_dev;
+	repr->eth_dev = eth_dev;

 	return 0;
 }
@@ -501,6 +539,8 @@ nfp_flower_repr_init(struct rte_eth_dev *eth_dev,
 		app_fw_flower->vf_reprs[index] = repr;
 	}

+	repr->eth_dev = eth_dev;
+
 	return 0;

 mac_cleanup:
@@ -511,6 +551,35 @@ ring_cleanup:
 	return ret;
 }

+static void
+nfp_flower_repr_free_all(struct nfp_app_fw_flower *app_fw_flower)
+{
+	uint32_t i;
+	struct nfp_flower_representor *repr;
+
+	for (i = 0; i < MAX_FLOWER_VFS; i++) {
+		repr = app_fw_flower->vf_reprs[i];
+		if (repr != NULL) {
+			nfp_flower_repr_free(repr, NFP_REPR_TYPE_VF);
+			app_fw_flower->vf_reprs[i] = NULL;
+		}
+	}
+
+	for (i = 0; i < NFP_MAX_PHYPORTS; i++) {
+		repr = app_fw_flower->phy_reprs[i];
+		if (repr != NULL) {
+			nfp_flower_repr_free(repr, NFP_REPR_TYPE_PHYS_PORT);
+			app_fw_flower->phy_reprs[i] = NULL;
+		}
+	}
+
+	repr = app_fw_flower->pf_repr;
+	if (repr != NULL) {
+		nfp_flower_repr_free(repr, NFP_REPR_TYPE_PF);
+		app_fw_flower->pf_repr = NULL;
+	}
+}
+
 static int
 nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
 {
@@ -585,7 +654,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
 	}

 	if (i < app_fw_flower->num_phyport_reprs)
-		return ret;
+		goto repr_free;

 	/*
 	 * Now allocate eth_dev's for VF representors.
@@ -614,9 +683,14 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
 	}

 	if (i < app_fw_flower->num_vf_reprs)
-		return ret;
+		goto repr_free;

 	return 0;
+
+repr_free:
+	nfp_flower_repr_free_all(app_fw_flower);
+
+	return ret;
 }

 int
@@ -635,7 +709,7 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower)

 	/* Allocate a switch domain for the flower app */
 	if (app_fw_flower->switch_domain_id == RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID &&
-			rte_eth_switch_domain_alloc(&app_fw_flower->switch_domain_id)) {
+			rte_eth_switch_domain_alloc(&app_fw_flower->switch_domain_id) != 0) {
 		PMD_INIT_LOG(WARNING, "failed to allocate switch domain for device");
 	}

@@ -677,8 +751,15 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower)
 	ret = nfp_flower_repr_alloc(app_fw_flower);
 	if (ret != 0) {
 		PMD_INIT_LOG(ERR, "representors allocation failed");
-		return -EINVAL;
+		ret = -EINVAL;
+		goto domain_free;
 	}

 	return 0;
+
+domain_free:
+	if (rte_eth_switch_domain_free(app_fw_flower->switch_domain_id) != 0)
+		PMD_INIT_LOG(WARNING, "failed to free switch domain for device");
+
+	return ret;
 }
diff --git a/drivers/net/nfp/flower/nfp_flower_representor.h b/drivers/net/nfp/flower/nfp_flower_representor.h
index bcb4c3cdb5..8053617562 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.h
+++ b/drivers/net/nfp/flower/nfp_flower_representor.h
@@ -20,6 +20,7 @@ struct nfp_flower_representor {
 	struct rte_ring *ring;
 	struct rte_eth_link link;
 	struct rte_eth_stats repr_stats;
+	struct rte_eth_dev *eth_dev;
 };

 int nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.309506877 +0800
+++ 0076-net-nfp-fix-resource-leak-for-flower-firmware.patch	2024-03-05 17:39:30.813566494 +0800
@@ -1 +1 @@
-From 7c596721ae5f41d1dbab8b936a4983928d6b5603 Mon Sep 17 00:00:00 2001
+From 09e1df883afa97ba2d37c8c4a69a0273c962a7b9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7c596721ae5f41d1dbab8b936a4983928d6b5603 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/nfp: fix resource leak for exit of CoreNIC firmware' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (75 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net/nfp: fix resource leak for flower firmware' " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:46 ` patch 'net/nfp: fix resource leak for exit of flower " Xueming Li
                   ` (59 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e65a677895f1bd39b984971021ded9264874992d Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 4 Dec 2023 09:57:16 +0800
Subject: [PATCH] net/nfp: fix resource leak for exit of CoreNIC firmware
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 66d5f53d3e1beebf31de3b3b2e15371ffe322866 ]

Fix the resource leak problem in the exit logic of CoreNIC firmware.

Fixes: 646ea79ce481 ("net/nfp: move PF functions into its own file")

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

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index bb0ddf3d54..5e473d9c16 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -322,6 +322,55 @@ nfp_net_uninit(struct rte_eth_dev *eth_dev)
 		nfp_cpp_area_release_free(net_hw->mac_stats_area);
 }

+static void
+nfp_cleanup_port_app_fw_nic(struct nfp_pf_dev *pf_dev,
+		uint8_t id)
+{
+	struct rte_eth_dev *eth_dev;
+	struct nfp_app_fw_nic *app_fw_nic;
+
+	app_fw_nic = pf_dev->app_fw_priv;
+	if (app_fw_nic->ports[id] != NULL) {
+		eth_dev = app_fw_nic->ports[id]->eth_dev;
+		if (eth_dev != NULL)
+			nfp_net_uninit(eth_dev);
+
+		app_fw_nic->ports[id] = NULL;
+	}
+}
+
+static void
+nfp_uninit_app_fw_nic(struct nfp_pf_dev *pf_dev)
+{
+	nfp_cpp_area_release_free(pf_dev->ctrl_area);
+	rte_free(pf_dev->app_fw_priv);
+}
+
+void
+nfp_pf_uninit(struct nfp_pf_dev *pf_dev)
+{
+	nfp_cpp_area_release_free(pf_dev->qc_area);
+	free(pf_dev->sym_tbl);
+	if (pf_dev->multi_pf.enabled) {
+		nfp_net_keepalive_stop(&pf_dev->multi_pf);
+		nfp_net_keepalive_uninit(&pf_dev->multi_pf);
+	}
+	free(pf_dev->nfp_eth_table);
+	free(pf_dev->hwinfo);
+	nfp_cpp_free(pf_dev->cpp);
+	rte_free(pf_dev);
+}
+
+static int
+nfp_pf_secondary_uninit(struct nfp_pf_dev *pf_dev)
+{
+	free(pf_dev->sym_tbl);
+	nfp_cpp_free(pf_dev->cpp);
+	rte_free(pf_dev);
+
+	return 0;
+}
+
 /* Reset and stop device. The device can not be restarted. */
 static int
 nfp_net_close(struct rte_eth_dev *dev)
@@ -333,8 +382,19 @@ nfp_net_close(struct rte_eth_dev *dev)
 	struct rte_pci_device *pci_dev;
 	struct nfp_app_fw_nic *app_fw_nic;

-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+	/*
+	 * In secondary process, a released eth device can be found by its name
+	 * in shared memory.
+	 * If the state of the eth device is RTE_ETH_DEV_UNUSED, it means the
+	 * eth device has been released.
+	 */
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+		if (dev->state == RTE_ETH_DEV_UNUSED)
+			return 0;
+
+		nfp_pf_secondary_uninit(dev->process_private);
 		return 0;
+	}

 	hw = dev->data->dev_private;
 	pf_dev = hw->pf_dev;
@@ -351,16 +411,17 @@ nfp_net_close(struct rte_eth_dev *dev)
 	nfp_net_close_tx_queue(dev);
 	nfp_net_close_rx_queue(dev);

-	/* Clear ipsec */
-	nfp_ipsec_uninit(dev);
-
 	/* Cancel possible impending LSC work here before releasing the port */
 	rte_eal_alarm_cancel(nfp_net_dev_interrupt_delayed_handler, (void *)dev);

 	/* Only free PF resources after all physical ports have been closed */
 	/* Mark this port as unused and free device priv resources */
 	nn_cfg_writeb(&hw->super, NFP_NET_CFG_LSC, 0xff);
-	app_fw_nic->ports[hw->idx] = NULL;
+
+	if (pf_dev->app_fw_id != NFP_APP_FW_CORE_NIC)
+		return -EINVAL;
+
+	nfp_cleanup_port_app_fw_nic(pf_dev, hw->idx);

 	for (i = 0; i < app_fw_nic->total_phyports; i++) {
 		id = nfp_function_id_get(pf_dev, i);
@@ -370,26 +431,16 @@ nfp_net_close(struct rte_eth_dev *dev)
 			return 0;
 	}

-	/* Now it is safe to free all PF resources */
-	PMD_INIT_LOG(INFO, "Freeing PF resources");
-	if (pf_dev->multi_pf.enabled) {
-		nfp_net_keepalive_stop(&pf_dev->multi_pf);
-		nfp_net_keepalive_uninit(&pf_dev->multi_pf);
-	}
-	nfp_cpp_area_free(pf_dev->ctrl_area);
-	nfp_cpp_area_free(pf_dev->qc_area);
-	free(pf_dev->hwinfo);
-	free(pf_dev->sym_tbl);
-	nfp_cpp_free(pf_dev->cpp);
-	rte_free(app_fw_nic);
-	rte_free(pf_dev);
-
+	/* Enable in nfp_net_start() */
 	rte_intr_disable(pci_dev->intr_handle);

-	/* Unregister callback func from eal lib */
+	/* Register in nfp_net_init() */
 	rte_intr_callback_unregister(pci_dev->intr_handle,
 			nfp_net_dev_interrupt_handler, (void *)dev);

+	nfp_uninit_app_fw_nic(pf_dev);
+	nfp_pf_uninit(pf_dev);
+
 	return 0;
 }

diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h
index 30fea7ae02..ded491cbdc 100644
--- a/drivers/net/nfp/nfp_net_common.h
+++ b/drivers/net/nfp/nfp_net_common.h
@@ -272,6 +272,7 @@ int nfp_net_flow_ctrl_get(struct rte_eth_dev *dev,
 		struct rte_eth_fc_conf *fc_conf);
 int nfp_net_flow_ctrl_set(struct rte_eth_dev *dev,
 		struct rte_eth_fc_conf *fc_conf);
+void nfp_pf_uninit(struct nfp_pf_dev *pf_dev);

 #define NFP_PRIV_TO_APP_FW_NIC(app_fw_priv)\
 	((struct nfp_app_fw_nic *)app_fw_priv)
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.334851778 +0800
+++ 0077-net-nfp-fix-resource-leak-for-exit-of-CoreNIC-firmwa.patch	2024-03-05 17:39:30.813566494 +0800
@@ -1 +1 @@
-From 66d5f53d3e1beebf31de3b3b2e15371ffe322866 Mon Sep 17 00:00:00 2001
+From e65a677895f1bd39b984971021ded9264874992d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 66d5f53d3e1beebf31de3b3b2e15371ffe322866 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 6fdde105ba..537b4fe792 100644
+index bb0ddf3d54..5e473d9c16 100644
@@ -23 +25 @@
-@@ -329,6 +329,55 @@ nfp_net_uninit(struct rte_eth_dev *eth_dev)
+@@ -322,6 +322,55 @@ nfp_net_uninit(struct rte_eth_dev *eth_dev)
@@ -79 +81 @@
-@@ -340,8 +389,19 @@ nfp_net_close(struct rte_eth_dev *dev)
+@@ -333,8 +382,19 @@ nfp_net_close(struct rte_eth_dev *dev)
@@ -100 +102 @@
-@@ -358,16 +418,17 @@ nfp_net_close(struct rte_eth_dev *dev)
+@@ -351,16 +411,17 @@ nfp_net_close(struct rte_eth_dev *dev)
@@ -122 +124 @@
-@@ -377,26 +438,16 @@ nfp_net_close(struct rte_eth_dev *dev)
+@@ -370,26 +431,16 @@ nfp_net_close(struct rte_eth_dev *dev)

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

* patch 'net/nfp: fix resource leak for exit of flower firmware' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (76 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net/nfp: fix resource leak for exit of CoreNIC " Xueming Li
@ 2024-03-05  9:46 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/nfp: fix resource leak for VF' " Xueming Li
                   ` (58 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:46 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ddeb9d64a933aa84eb4e2c87d341b04401a5947b Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 4 Dec 2023 09:57:17 +0800
Subject: [PATCH] net/nfp: fix resource leak for exit of flower firmware
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a256a1227dbe0eac576a42b6c336ce55b7713109 ]

Fix the resource leak problem in the exit logic of flower firmware.

Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower.c           | 73 ++++---------------
 drivers/net/nfp/flower/nfp_flower.h           |  1 +
 .../net/nfp/flower/nfp_flower_representor.c   | 64 ++++++++++++++++
 3 files changed, 80 insertions(+), 58 deletions(-)

diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index 6b523d98b0..3698a3d4aa 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -82,63 +82,6 @@ nfp_flower_pf_start(struct rte_eth_dev *dev)
 	return 0;
 }

-/* Reset and stop device. The device can not be restarted. */
-static int
-nfp_flower_pf_close(struct rte_eth_dev *dev)
-{
-	uint16_t i;
-	struct nfp_net_hw *hw;
-	struct nfp_pf_dev *pf_dev;
-	struct nfp_net_txq *this_tx_q;
-	struct nfp_net_rxq *this_rx_q;
-	struct nfp_flower_representor *repr;
-	struct nfp_app_fw_flower *app_fw_flower;
-
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return 0;
-
-	repr = dev->data->dev_private;
-	hw = repr->app_fw_flower->pf_hw;
-	pf_dev = hw->pf_dev;
-	app_fw_flower = NFP_PRIV_TO_APP_FW_FLOWER(pf_dev->app_fw_priv);
-
-	nfp_mtr_priv_uninit(pf_dev);
-
-	/*
-	 * We assume that the DPDK application is stopping all the
-	 * threads/queues before calling the device close function.
-	 */
-	nfp_net_disable_queues(dev);
-
-	/* Clear queues */
-	for (i = 0; i < dev->data->nb_tx_queues; i++) {
-		this_tx_q = dev->data->tx_queues[i];
-		nfp_net_reset_tx_queue(this_tx_q);
-	}
-
-	for (i = 0; i < dev->data->nb_rx_queues; i++) {
-		this_rx_q = dev->data->rx_queues[i];
-		nfp_net_reset_rx_queue(this_rx_q);
-	}
-
-	/* Cancel possible impending LSC work here before releasing the port */
-	rte_eal_alarm_cancel(nfp_net_dev_interrupt_delayed_handler, (void *)dev);
-
-	nn_cfg_writeb(&hw->super, NFP_NET_CFG_LSC, 0xff);
-
-	/* Now it is safe to free all PF resources */
-	PMD_DRV_LOG(INFO, "Freeing PF resources");
-	nfp_cpp_area_free(pf_dev->ctrl_area);
-	nfp_cpp_area_free(pf_dev->qc_area);
-	free(pf_dev->hwinfo);
-	free(pf_dev->sym_tbl);
-	nfp_cpp_free(pf_dev->cpp);
-	rte_free(app_fw_flower);
-	rte_free(pf_dev);
-
-	return 0;
-}
-
 static const struct eth_dev_ops nfp_flower_pf_vnic_ops = {
 	.dev_infos_get          = nfp_net_infos_get,
 	.link_update            = nfp_net_link_update,
@@ -146,7 +89,6 @@ static const struct eth_dev_ops nfp_flower_pf_vnic_ops = {

 	.dev_start              = nfp_flower_pf_start,
 	.dev_stop               = nfp_net_stop,
-	.dev_close              = nfp_flower_pf_close,
 };

 static inline struct nfp_flower_representor *
@@ -858,6 +800,21 @@ app_cleanup:
 	return ret;
 }

+void
+nfp_uninit_app_fw_flower(struct nfp_pf_dev *pf_dev)
+{
+	struct nfp_app_fw_flower *app_fw_flower;
+
+	app_fw_flower = pf_dev->app_fw_priv;
+	nfp_flower_cleanup_ctrl_vnic(app_fw_flower->ctrl_hw);
+	nfp_cpp_area_free(app_fw_flower->ctrl_hw->ctrl_area);
+	nfp_cpp_area_free(pf_dev->ctrl_area);
+	rte_free(app_fw_flower->pf_hw);
+	nfp_mtr_priv_uninit(pf_dev);
+	nfp_flow_priv_uninit(pf_dev);
+	rte_free(app_fw_flower);
+}
+
 int
 nfp_secondary_init_app_fw_flower(struct nfp_pf_dev *pf_dev)
 {
diff --git a/drivers/net/nfp/flower/nfp_flower.h b/drivers/net/nfp/flower/nfp_flower.h
index 6f27c06acc..8393de66c5 100644
--- a/drivers/net/nfp/flower/nfp_flower.h
+++ b/drivers/net/nfp/flower/nfp_flower.h
@@ -106,6 +106,7 @@ nfp_flower_support_decap_v2(const struct nfp_app_fw_flower *app_fw_flower)

 int nfp_init_app_fw_flower(struct nfp_pf_dev *pf_dev,
 		const struct nfp_dev_info *dev_info);
+void nfp_uninit_app_fw_flower(struct nfp_pf_dev *pf_dev);
 int nfp_secondary_init_app_fw_flower(struct nfp_pf_dev *pf_dev);
 bool nfp_flower_pf_dispatch_pkts(struct nfp_net_hw *hw,
 		struct rte_mbuf *mbuf,
diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index 7212d9e024..02089d390e 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -328,12 +328,75 @@ nfp_flower_repr_free(struct nfp_flower_representor *repr,
 	}
 }

+/* Reset and stop device. The device can not be restarted. */
+static int
+nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
+{
+	uint16_t i;
+	struct nfp_net_hw *hw;
+	struct nfp_pf_dev *pf_dev;
+	struct nfp_net_txq *this_tx_q;
+	struct nfp_net_rxq *this_rx_q;
+	struct nfp_flower_representor *repr;
+	struct nfp_app_fw_flower *app_fw_flower;
+
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
+	repr = dev->data->dev_private;
+	app_fw_flower = repr->app_fw_flower;
+	hw = app_fw_flower->pf_hw;
+	pf_dev = hw->pf_dev;
+
+	/*
+	 * We assume that the DPDK application is stopping all the
+	 * threads/queues before calling the device close function.
+	 */
+	nfp_net_disable_queues(dev);
+
+	/* Clear queues */
+	for (i = 0; i < dev->data->nb_tx_queues; i++) {
+		this_tx_q = dev->data->tx_queues[i];
+		nfp_net_reset_tx_queue(this_tx_q);
+	}
+
+	for (i = 0; i < dev->data->nb_rx_queues; i++) {
+		this_rx_q = dev->data->rx_queues[i];
+		nfp_net_reset_rx_queue(this_rx_q);
+	}
+
+	if (pf_dev->app_fw_id != NFP_APP_FW_FLOWER_NIC)
+		return -EINVAL;
+
+	nfp_flower_repr_free(repr, repr->repr_type);
+
+	for (i = 0; i < MAX_FLOWER_VFS; i++) {
+		if (app_fw_flower->vf_reprs[i] != NULL)
+			return 0;
+	}
+
+	for (i = 0; i < NFP_MAX_PHYPORTS; i++) {
+		if (app_fw_flower->phy_reprs[i] != NULL)
+			return 0;
+	}
+
+	if (app_fw_flower->pf_repr != NULL)
+		return 0;
+
+	/* Now it is safe to free all PF resources */
+	nfp_uninit_app_fw_flower(pf_dev);
+	nfp_pf_uninit(pf_dev);
+
+	return 0;
+}
+
 static const struct eth_dev_ops nfp_flower_pf_repr_dev_ops = {
 	.dev_infos_get        = nfp_flower_repr_dev_infos_get,

 	.dev_start            = nfp_flower_pf_start,
 	.dev_configure        = nfp_net_configure,
 	.dev_stop             = nfp_net_stop,
+	.dev_close            = nfp_flower_repr_dev_close,

 	.rx_queue_setup       = nfp_net_rx_queue_setup,
 	.tx_queue_setup       = nfp_net_tx_queue_setup,
@@ -356,6 +419,7 @@ static const struct eth_dev_ops nfp_flower_repr_dev_ops = {
 	.dev_start            = nfp_flower_repr_dev_start,
 	.dev_configure        = nfp_net_configure,
 	.dev_stop             = nfp_flower_repr_dev_stop,
+	.dev_close            = nfp_flower_repr_dev_close,

 	.rx_queue_setup       = nfp_flower_repr_rx_queue_setup,
 	.tx_queue_setup       = nfp_flower_repr_tx_queue_setup,
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.362451379 +0800
+++ 0078-net-nfp-fix-resource-leak-for-exit-of-flower-firmwar.patch	2024-03-05 17:39:30.823566495 +0800
@@ -1 +1 @@
-From a256a1227dbe0eac576a42b6c336ce55b7713109 Mon Sep 17 00:00:00 2001
+From ddeb9d64a933aa84eb4e2c87d341b04401a5947b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a256a1227dbe0eac576a42b6c336ce55b7713109 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index f172c8350d..f950ae233b 100644
+index 6b523d98b0..3698a3d4aa 100644

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

* patch 'net/nfp: fix resource leak for VF' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (77 preceding siblings ...)
  2024-03-05  9:46 ` patch 'net/nfp: fix resource leak for exit of flower " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/af_xdp: fix memzone leak on config failure' " Xueming Li
                   ` (57 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c2a5c0d0855ae555373d84f9a350844c1eae8845 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 4 Dec 2023 09:57:18 +0800
Subject: [PATCH] net/nfp: fix resource leak for VF
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a7904d1c6b4fef73d9a8b32b6f6293ba697d10c2 ]

Fix the resource leak problem in the logic of VF.

Fixes: f26e82397f6d ("net/nfp: implement xstats")

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

diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c
index 7927f53403..88da593190 100644
--- a/drivers/net/nfp/nfp_ethdev_vf.c
+++ b/drivers/net/nfp/nfp_ethdev_vf.c
@@ -160,13 +160,17 @@ nfp_netvf_set_link_down(struct rte_eth_dev *dev __rte_unused)
 static int
 nfp_netvf_close(struct rte_eth_dev *dev)
 {
+	struct nfp_net_hw *net_hw;
 	struct rte_pci_device *pci_dev;

 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;

+	net_hw = dev->data->dev_private;
 	pci_dev = RTE_ETH_DEV_TO_PCI(dev);

+	rte_free(net_hw->eth_xstats_base);
+
 	/*
 	 * We assume that the DPDK application is stopping all the
 	 * threads/queues before calling the device close function.
@@ -323,7 +327,7 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
 	if (eth_dev->data->mac_addrs == NULL) {
 		PMD_INIT_LOG(ERR, "Failed to space for MAC address");
 		err = -ENOMEM;
-		goto dev_err_ctrl_map;
+		goto free_xstats;
 	}

 	nfp_read_mac(hw);
@@ -360,8 +364,8 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)

 	return 0;

-dev_err_ctrl_map:
-		nfp_cpp_area_free(net_hw->ctrl_area);
+free_xstats:
+	rte_free(net_hw->eth_xstats_base);

 	return err;
 }
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.390713080 +0800
+++ 0079-net-nfp-fix-resource-leak-for-VF.patch	2024-03-05 17:39:30.823566495 +0800
@@ -1 +1 @@
-From a7904d1c6b4fef73d9a8b32b6f6293ba697d10c2 Mon Sep 17 00:00:00 2001
+From c2a5c0d0855ae555373d84f9a350844c1eae8845 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a7904d1c6b4fef73d9a8b32b6f6293ba697d10c2 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/af_xdp: fix memzone leak on config failure' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (78 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/nfp: fix resource leak for VF' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/memif: fix crash with Tx burst larger than 255' " Xueming Li
                   ` (56 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ciara Loftus, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 01809245ba198265312458828a253a0b87bd2ec8 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 5 Dec 2023 20:23:51 +0800
Subject: [PATCH] net/af_xdp: fix memzone leak on config failure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 960775fc5b7d43cfbf9fa31e4c0b36c4da79615a ]

In xdp_umem_configure() allocated memzone for the 'umem', we should
free it when xsk_umem__create() call fails, otherwise it will lead to
memory zone leak. To fix it move 'umem->mz = mz;' assignment after
'mz == NULL' check.

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

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 353c8688ec..2d151e45c7 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1234,6 +1234,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
 		AF_XDP_LOG(ERR, "Failed to reserve memzone for af_xdp umem.\n");
 		goto err;
 	}
+	umem->mz = mz;

 	ret = xsk_umem__create(&umem->umem, mz->addr,
 			       ETH_AF_XDP_NUM_BUFFERS * ETH_AF_XDP_FRAME_SIZE,
@@ -1244,7 +1245,6 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
 		AF_XDP_LOG(ERR, "Failed to create umem\n");
 		goto err;
 	}
-	umem->mz = mz;

 	return umem;

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.416803581 +0800
+++ 0080-net-af_xdp-fix-memzone-leak-on-config-failure.patch	2024-03-05 17:39:30.823566495 +0800
@@ -1 +1 @@
-From 960775fc5b7d43cfbf9fa31e4c0b36c4da79615a Mon Sep 17 00:00:00 2001
+From 01809245ba198265312458828a253a0b87bd2ec8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 960775fc5b7d43cfbf9fa31e4c0b36c4da79615a ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/memif: fix crash with Tx burst larger than 255' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (79 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/af_xdp: fix memzone leak on config failure' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/hns3: refactor VF mailbox message struct' " Xueming Li
                   ` (55 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Joyce Kong
  Cc: Liangxing Wang, Ruifeng Wang, Stephen Hemminger, Ferruh Yigit,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9cf299a8738c63a463f0a4dbfcda83dd0af67f6b Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Tue, 5 Dec 2023 04:05:24 +0000
Subject: [PATCH] net/memif: fix crash with Tx burst larger than 255
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d8d91d78fef8a9814f918ea40a487646da83d202 ]

There will be a segfault when Tx burst size is larger than 256.
This is because eth_memif_tx uses an index i which is uint8_t to count
transmitted nb_pkts.
Extend i to uint16_t, the same size as nb_pkts.

Fixes: b5613c8f9d0a ("net/memif: add a Tx fast path")

Reported-by: Liangxing Wang <liangxing.wang@arm.com>
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                          | 1 +
 drivers/net/memif/rte_eth_memif.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index bff68cefd8..540a3caab7 100644
--- a/.mailmap
+++ b/.mailmap
@@ -788,6 +788,7 @@ Lewei Yang <leweix.yang@intel.com>
 Leyi Rong <leyi.rong@intel.com>
 Liang Ma <liangma@bytedance.com> <liangma@liangbit.com> <liang.j.ma@intel.com>
 Liang-Min Larry Wang <liang-min.wang@intel.com>
+Liangxing Wang <liangxing.wang@arm.com>
 Liang Xu <liang.xu@cinfotech.cn>
 Liang Zhang <zhangliang@bigo.sg>
 Li Feng <fengli@smartx.com>
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 7cc8c0da91..6f45a00172 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -684,7 +684,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		n_free = __atomic_load_n(&ring->head, __ATOMIC_ACQUIRE) - slot;
 	}

-	uint8_t i;
+	uint16_t i;
 	struct rte_mbuf **buf_tmp = bufs;
 	mbuf_head = *buf_tmp++;
 	struct rte_mempool *mp = mbuf_head->pool;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.446874582 +0800
+++ 0081-net-memif-fix-crash-with-Tx-burst-larger-than-255.patch	2024-03-05 17:39:30.823566495 +0800
@@ -1 +1 @@
-From d8d91d78fef8a9814f918ea40a487646da83d202 Mon Sep 17 00:00:00 2001
+From 9cf299a8738c63a463f0a4dbfcda83dd0af67f6b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d8d91d78fef8a9814f918ea40a487646da83d202 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index dd3a4f7529..297da3b426 100644
+index bff68cefd8..540a3caab7 100644
@@ -28 +30 @@
-@@ -789,6 +789,7 @@ Lewei Yang <leweix.yang@intel.com>
+@@ -788,6 +788,7 @@ Lewei Yang <leweix.yang@intel.com>

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

* patch 'net/hns3: refactor VF mailbox message struct' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (80 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/memif: fix crash with Tx burst larger than 255' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/hns3: refactor PF " Xueming Li
                   ` (54 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c1c62366edd58c38d3c9e0e81eb3bfb7d40bc41a Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 14:55:05 +0800
Subject: [PATCH] net/hns3: refactor VF mailbox message struct
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 692b35be121b724119da001d7ec4c0fabd51177b ]

The data region in VF to PF mbx memssage command is
used to communicate with PF driver. And this data
region exists as an array. As a result, some complicated
feature commands, like setting promisc mode, map/unmap
ring vector and setting VLAN id, have to use magic number
to set them. This isn't good for maintenance of driver.
So this patch refactors these messages by extracting an
hns3_vf_to_pf_msg structure.

In addition, the PF link change event message is reported
by the firmware and is reported in hns3_mbx_vf_to_pf_cmd
format, it also needs to be modified.

Fixes: 463e748964f5 ("net/hns3: support mailbox")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 54 ++++++++++++++---------------
 drivers/net/hns3/hns3_mbx.c       | 24 ++++++-------
 drivers/net/hns3/hns3_mbx.h       | 56 ++++++++++++++++++++++---------
 3 files changed, 76 insertions(+), 58 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 916cc0fb1b..19e734ca8d 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -254,11 +254,12 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
 	 *    the packets with vlan tag in promiscuous mode.
 	 */
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_MBX_VF_TO_PF, false);
-	req->msg[0] = HNS3_MBX_SET_PROMISC_MODE;
-	req->msg[1] = en_bc_pmc ? 1 : 0;
-	req->msg[2] = en_uc_pmc ? 1 : 0;
-	req->msg[3] = en_mc_pmc ? 1 : 0;
-	req->msg[4] = hw->promisc_mode == HNS3_LIMIT_PROMISC_MODE ? 1 : 0;
+	req->msg.code = HNS3_MBX_SET_PROMISC_MODE;
+	req->msg.en_bc = en_bc_pmc ? 1 : 0;
+	req->msg.en_uc = en_uc_pmc ? 1 : 0;
+	req->msg.en_mc = en_mc_pmc ? 1 : 0;
+	req->msg.en_limit_promisc =
+		hw->promisc_mode == HNS3_LIMIT_PROMISC_MODE ? 1 : 0;

 	ret = hns3_cmd_send(hw, &desc, 1);
 	if (ret)
@@ -347,30 +348,28 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
 			     bool mmap, enum hns3_ring_type queue_type,
 			     uint16_t queue_id)
 {
-	struct hns3_vf_bind_vector_msg bind_msg;
+#define HNS3_RING_VERCTOR_DATA_SIZE	14
+	struct hns3_vf_to_pf_msg req = {0};
 	const char *op_str;
-	uint16_t code;
 	int ret;

-	memset(&bind_msg, 0, sizeof(bind_msg));
-	code = mmap ? HNS3_MBX_MAP_RING_TO_VECTOR :
+	req.code = mmap ? HNS3_MBX_MAP_RING_TO_VECTOR :
 		HNS3_MBX_UNMAP_RING_TO_VECTOR;
-	bind_msg.vector_id = (uint8_t)vector_id;
+	req.vector_id = (uint8_t)vector_id;
+	req.ring_num = 1;

 	if (queue_type == HNS3_RING_TYPE_RX)
-		bind_msg.param[0].int_gl_index = HNS3_RING_GL_RX;
+		req.ring_param[0].int_gl_index = HNS3_RING_GL_RX;
 	else
-		bind_msg.param[0].int_gl_index = HNS3_RING_GL_TX;
-
-	bind_msg.param[0].ring_type = queue_type;
-	bind_msg.ring_num = 1;
-	bind_msg.param[0].tqp_index = queue_id;
+		req.ring_param[0].int_gl_index = HNS3_RING_GL_TX;
+	req.ring_param[0].ring_type = queue_type;
+	req.ring_param[0].tqp_index = queue_id;
 	op_str = mmap ? "Map" : "Unmap";
-	ret = hns3_send_mbx_msg(hw, code, 0, (uint8_t *)&bind_msg,
-				sizeof(bind_msg), false, NULL, 0);
+	ret = hns3_send_mbx_msg(hw, req.code, 0, (uint8_t *)&req.vector_id,
+				HNS3_RING_VERCTOR_DATA_SIZE, false, NULL, 0);
 	if (ret)
-		hns3_err(hw, "%s TQP %u fail, vector_id is %u, ret is %d.",
-			 op_str, queue_id, bind_msg.vector_id, ret);
+		hns3_err(hw, "%s TQP %u fail, vector_id is %u, ret = %d.",
+			 op_str, queue_id, req.vector_id, ret);

 	return ret;
 }
@@ -965,19 +964,16 @@ hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
 static int
 hns3vf_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
 {
-#define HNS3VF_VLAN_MBX_MSG_LEN 5
+	struct hns3_mbx_vlan_filter vlan_filter = {0};
 	struct hns3_hw *hw = &hns->hw;
-	uint8_t msg_data[HNS3VF_VLAN_MBX_MSG_LEN];
-	uint16_t proto = htons(RTE_ETHER_TYPE_VLAN);
-	uint8_t is_kill = on ? 0 : 1;

-	msg_data[0] = is_kill;
-	memcpy(&msg_data[1], &vlan_id, sizeof(vlan_id));
-	memcpy(&msg_data[3], &proto, sizeof(proto));
+	vlan_filter.is_kill = on ? 0 : 1;
+	vlan_filter.proto = rte_cpu_to_le_16(RTE_ETHER_TYPE_VLAN);
+	vlan_filter.vlan_id =  rte_cpu_to_le_16(vlan_id);

 	return hns3_send_mbx_msg(hw, HNS3_MBX_SET_VLAN, HNS3_MBX_VLAN_FILTER,
-				 msg_data, HNS3VF_VLAN_MBX_MSG_LEN, true, NULL,
-				 0);
+				(uint8_t *)&vlan_filter, sizeof(vlan_filter),
+				 true, NULL, 0);
 }

 static int
diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index f1743c195e..ad5ec555b3 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -11,8 +11,6 @@
 #include "hns3_intr.h"
 #include "hns3_rxtx.h"

-#define HNS3_CMD_CODE_OFFSET		2
-
 static const struct errno_respcode_map err_code_map[] = {
 	{0, 0},
 	{1, -EPERM},
@@ -127,29 +125,30 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
 	struct hns3_mbx_vf_to_pf_cmd *req;
 	struct hns3_cmd_desc desc;
 	bool is_ring_vector_msg;
-	int offset;
 	int ret;

 	req = (struct hns3_mbx_vf_to_pf_cmd *)desc.data;

 	/* first two bytes are reserved for code & subcode */
-	if (msg_len > (HNS3_MBX_MAX_MSG_SIZE - HNS3_CMD_CODE_OFFSET)) {
+	if (msg_len > HNS3_MBX_MSG_MAX_DATA_SIZE) {
 		hns3_err(hw,
 			 "VF send mbx msg fail, msg len %u exceeds max payload len %d",
-			 msg_len, HNS3_MBX_MAX_MSG_SIZE - HNS3_CMD_CODE_OFFSET);
+			 msg_len, HNS3_MBX_MSG_MAX_DATA_SIZE);
 		return -EINVAL;
 	}

 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_MBX_VF_TO_PF, false);
-	req->msg[0] = code;
+	req->msg.code = code;
 	is_ring_vector_msg = (code == HNS3_MBX_MAP_RING_TO_VECTOR) ||
 			     (code == HNS3_MBX_UNMAP_RING_TO_VECTOR) ||
 			     (code == HNS3_MBX_GET_RING_VECTOR_MAP);
 	if (!is_ring_vector_msg)
-		req->msg[1] = subcode;
+		req->msg.subcode = subcode;
 	if (msg_data) {
-		offset = is_ring_vector_msg ? 1 : HNS3_CMD_CODE_OFFSET;
-		memcpy(&req->msg[offset], msg_data, msg_len);
+		if (is_ring_vector_msg)
+			memcpy(&req->msg.vector_id, msg_data, msg_len);
+		else
+			memcpy(&req->msg.data, msg_data, msg_len);
 	}

 	/* synchronous send */
@@ -296,11 +295,8 @@ static void
 hns3pf_handle_link_change_event(struct hns3_hw *hw,
 				struct hns3_mbx_vf_to_pf_cmd *req)
 {
-#define LINK_STATUS_OFFSET     1
-#define LINK_FAIL_CODE_OFFSET  2
-
-	if (!req->msg[LINK_STATUS_OFFSET])
-		hns3_link_fail_parse(hw, req->msg[LINK_FAIL_CODE_OFFSET]);
+	if (!req->msg.link_status)
+		hns3_link_fail_parse(hw, req->msg.link_fail_code);

 	hns3_update_linkstatus_and_event(hw, true);
 }
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 4a328802b9..59fb73abcc 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -89,7 +89,6 @@ enum hns3_mbx_link_fail_subcode {
 	HNS3_MBX_LF_XSFP_ABSENT,
 };

-#define HNS3_MBX_MAX_MSG_SIZE	16
 #define HNS3_MBX_MAX_RESP_DATA_SIZE	8
 #define HNS3_MBX_DEF_TIME_LIMIT_MS	500

@@ -107,6 +106,46 @@ struct hns3_mbx_resp_status {
 	uint8_t additional_info[HNS3_MBX_MAX_RESP_DATA_SIZE];
 };

+struct hns3_ring_chain_param {
+	uint8_t ring_type;
+	uint8_t tqp_index;
+	uint8_t int_gl_index;
+};
+
+struct hns3_mbx_vlan_filter {
+	uint8_t is_kill;
+	uint16_t vlan_id;
+	uint16_t proto;
+} __rte_packed;
+
+#define HNS3_MBX_MSG_MAX_DATA_SIZE	14
+#define HNS3_MBX_MAX_RING_CHAIN_PARAM_NUM	4
+struct hns3_vf_to_pf_msg {
+	uint8_t code;
+	union {
+		struct {
+			uint8_t subcode;
+			uint8_t data[HNS3_MBX_MSG_MAX_DATA_SIZE];
+		};
+		struct {
+			uint8_t en_bc;
+			uint8_t en_uc;
+			uint8_t en_mc;
+			uint8_t en_limit_promisc;
+		};
+		struct {
+			uint8_t vector_id;
+			uint8_t ring_num;
+			struct hns3_ring_chain_param
+				ring_param[HNS3_MBX_MAX_RING_CHAIN_PARAM_NUM];
+		};
+		struct {
+			uint8_t link_status;
+			uint8_t link_fail_code;
+		};
+	};
+};
+
 struct errno_respcode_map {
 	uint16_t resp_code;
 	int err_no;
@@ -122,7 +161,7 @@ struct hns3_mbx_vf_to_pf_cmd {
 	uint8_t msg_len;
 	uint8_t rsv2;
 	uint16_t match_id;
-	uint8_t msg[HNS3_MBX_MAX_MSG_SIZE];
+	struct hns3_vf_to_pf_msg msg;
 };

 struct hns3_mbx_pf_to_vf_cmd {
@@ -134,19 +173,6 @@ struct hns3_mbx_pf_to_vf_cmd {
 	uint16_t msg[8];
 };

-struct hns3_ring_chain_param {
-	uint8_t ring_type;
-	uint8_t tqp_index;
-	uint8_t int_gl_index;
-};
-
-#define HNS3_MBX_MAX_RING_CHAIN_PARAM_NUM	4
-struct hns3_vf_bind_vector_msg {
-	uint8_t vector_id;
-	uint8_t ring_num;
-	struct hns3_ring_chain_param param[HNS3_MBX_MAX_RING_CHAIN_PARAM_NUM];
-};
-
 struct hns3_pf_rst_done_cmd {
 	uint8_t pf_rst_done;
 	uint8_t rsv[23];
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.475904783 +0800
+++ 0082-net-hns3-refactor-VF-mailbox-message-struct.patch	2024-03-05 17:39:30.823566495 +0800
@@ -1 +1 @@
-From 692b35be121b724119da001d7ec4c0fabd51177b Mon Sep 17 00:00:00 2001
+From c1c62366edd58c38d3c9e0e81eb3bfb7d40bc41a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 692b35be121b724119da001d7ec4c0fabd51177b ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/hns3: refactor PF mailbox message struct' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (81 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/hns3: refactor VF mailbox message struct' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/hns3: refactor send mailbox function' " Xueming Li
                   ` (53 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f876981e54a106d1212164d8f93eb895fb184ce3 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 14:55:06 +0800
Subject: [PATCH] net/hns3: refactor PF mailbox message struct
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4d534598d922130d12c244d3237652fbfdad0f4b ]

The data region in PF to VF mbx memssage command is used
to communicate with VF driver. And this data region exists
as an array. As a result, some complicated feature commands,
like mailbox response, link change event, close promisc mode,
reset request and update pvid state, have to use magic number
to set them. This isn't good for maintenance of driver. So
this patch refactors these messages by extracting an
hns3_pf_to_vf_msg structure.

Fixes: 463e748964f5 ("net/hns3: support mailbox")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_mbx.c | 38 ++++++++++++++++++-------------------
 drivers/net/hns3/hns3_mbx.h | 25 +++++++++++++++++++++++-
 2 files changed, 43 insertions(+), 20 deletions(-)

diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index ad5ec555b3..c90f5d59ba 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -192,17 +192,17 @@ static void
 hns3vf_handle_link_change_event(struct hns3_hw *hw,
 				struct hns3_mbx_pf_to_vf_cmd *req)
 {
+	struct hns3_mbx_link_status *link_info =
+		(struct hns3_mbx_link_status *)req->msg.msg_data;
 	uint8_t link_status, link_duplex;
-	uint16_t *msg_q = req->msg;
 	uint8_t support_push_lsc;
 	uint32_t link_speed;

-	memcpy(&link_speed, &msg_q[2], sizeof(link_speed));
-	link_status = rte_le_to_cpu_16(msg_q[1]);
-	link_duplex = (uint8_t)rte_le_to_cpu_16(msg_q[4]);
-	hns3vf_update_link_status(hw, link_status, link_speed,
-				  link_duplex);
-	support_push_lsc = (*(uint8_t *)&msg_q[5]) & 1u;
+	link_status = (uint8_t)rte_le_to_cpu_16(link_info->link_status);
+	link_speed = rte_le_to_cpu_32(link_info->speed);
+	link_duplex = (uint8_t)rte_le_to_cpu_16(link_info->duplex);
+	hns3vf_update_link_status(hw, link_status, link_speed, link_duplex);
+	support_push_lsc = (link_info->flag) & 1u;
 	hns3vf_update_push_lsc_cap(hw, support_push_lsc);
 }

@@ -211,7 +211,6 @@ hns3_handle_asserting_reset(struct hns3_hw *hw,
 			    struct hns3_mbx_pf_to_vf_cmd *req)
 {
 	enum hns3_reset_level reset_level;
-	uint16_t *msg_q = req->msg;

 	/*
 	 * PF has asserted reset hence VF should go in pending
@@ -219,7 +218,7 @@ hns3_handle_asserting_reset(struct hns3_hw *hw,
 	 * has been completely reset. After this stack should
 	 * eventually be re-initialized.
 	 */
-	reset_level = rte_le_to_cpu_16(msg_q[1]);
+	reset_level = rte_le_to_cpu_16(req->msg.reset_level);
 	hns3_atomic_set_bit(reset_level, &hw->reset.pending);

 	hns3_warn(hw, "PF inform reset level %d", reset_level);
@@ -241,8 +240,9 @@ hns3_handle_mbx_response(struct hns3_hw *hw, struct hns3_mbx_pf_to_vf_cmd *req)
 		 * to match the request.
 		 */
 		if (req->match_id == resp->match_id) {
-			resp->resp_status = hns3_resp_to_errno(req->msg[3]);
-			memcpy(resp->additional_info, &req->msg[4],
+			resp->resp_status =
+				hns3_resp_to_errno(req->msg.resp_status);
+			memcpy(resp->additional_info, &req->msg.resp_data,
 			       HNS3_MBX_MAX_RESP_DATA_SIZE);
 			rte_io_wmb();
 			resp->received_match_resp = true;
@@ -255,7 +255,8 @@ hns3_handle_mbx_response(struct hns3_hw *hw, struct hns3_mbx_pf_to_vf_cmd *req)
 	 * support copy request's match_id to its response. So VF follows the
 	 * original scheme to process.
 	 */
-	msg_data = (uint32_t)req->msg[1] << HNS3_MBX_RESP_CODE_OFFSET | req->msg[2];
+	msg_data = (uint32_t)req->msg.vf_mbx_msg_code <<
+			HNS3_MBX_RESP_CODE_OFFSET | req->msg.vf_mbx_msg_subcode;
 	if (resp->req_msg_data != msg_data) {
 		hns3_warn(hw,
 			"received response tag (%u) is mismatched with requested tag (%u)",
@@ -263,8 +264,8 @@ hns3_handle_mbx_response(struct hns3_hw *hw, struct hns3_mbx_pf_to_vf_cmd *req)
 		return;
 	}

-	resp->resp_status = hns3_resp_to_errno(req->msg[3]);
-	memcpy(resp->additional_info, &req->msg[4],
+	resp->resp_status = hns3_resp_to_errno(req->msg.resp_status);
+	memcpy(resp->additional_info, &req->msg.resp_data,
 	       HNS3_MBX_MAX_RESP_DATA_SIZE);
 	rte_io_wmb();
 	resp->received_match_resp = true;
@@ -305,8 +306,7 @@ static void
 hns3_update_port_base_vlan_info(struct hns3_hw *hw,
 				struct hns3_mbx_pf_to_vf_cmd *req)
 {
-#define PVID_STATE_OFFSET	1
-	uint16_t new_pvid_state = req->msg[PVID_STATE_OFFSET] ?
+	uint16_t new_pvid_state = req->msg.pvid_state ?
 		HNS3_PORT_BASE_VLAN_ENABLE : HNS3_PORT_BASE_VLAN_DISABLE;
 	/*
 	 * Currently, hardware doesn't support more than two layers VLAN offload
@@ -355,7 +355,7 @@ hns3_handle_mbx_msg_out_intr(struct hns3_hw *hw)
 	while (next_to_use != tail) {
 		desc = &crq->desc[next_to_use];
 		req = (struct hns3_mbx_pf_to_vf_cmd *)desc->data;
-		opcode = req->msg[0] & 0xff;
+		opcode = req->msg.code & 0xff;

 		flag = rte_le_to_cpu_16(crq->desc[next_to_use].flag);
 		if (!hns3_get_bit(flag, HNS3_CMDQ_RX_OUTVLD_B))
@@ -428,7 +428,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)

 		desc = &crq->desc[crq->next_to_use];
 		req = (struct hns3_mbx_pf_to_vf_cmd *)desc->data;
-		opcode = req->msg[0] & 0xff;
+		opcode = req->msg.code & 0xff;

 		flag = rte_le_to_cpu_16(crq->desc[crq->next_to_use].flag);
 		if (unlikely(!hns3_get_bit(flag, HNS3_CMDQ_RX_OUTVLD_B))) {
@@ -484,7 +484,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 			 * hns3 PF kernel driver, VF driver will receive this
 			 * mailbox message from PF driver.
 			 */
-			hns3_handle_promisc_info(hw, req->msg[1]);
+			hns3_handle_promisc_info(hw, req->msg.promisc_en);
 			break;
 		default:
 			hns3_err(hw, "received unsupported(%u) mbx msg",
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 59fb73abcc..09780fcebd 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -118,6 +118,13 @@ struct hns3_mbx_vlan_filter {
 	uint16_t proto;
 } __rte_packed;

+struct hns3_mbx_link_status {
+	uint16_t link_status;
+	uint32_t speed;
+	uint16_t duplex;
+	uint8_t flag;
+} __rte_packed;
+
 #define HNS3_MBX_MSG_MAX_DATA_SIZE	14
 #define HNS3_MBX_MAX_RING_CHAIN_PARAM_NUM	4
 struct hns3_vf_to_pf_msg {
@@ -146,6 +153,22 @@ struct hns3_vf_to_pf_msg {
 	};
 };

+struct hns3_pf_to_vf_msg {
+	uint16_t code;
+	union {
+		struct {
+			uint16_t vf_mbx_msg_code;
+			uint16_t vf_mbx_msg_subcode;
+			uint16_t resp_status;
+			uint8_t resp_data[HNS3_MBX_MAX_RESP_DATA_SIZE];
+		};
+		uint16_t promisc_en;
+		uint16_t reset_level;
+		uint16_t pvid_state;
+		uint8_t msg_data[HNS3_MBX_MSG_MAX_DATA_SIZE];
+	};
+};
+
 struct errno_respcode_map {
 	uint16_t resp_code;
 	int err_no;
@@ -170,7 +193,7 @@ struct hns3_mbx_pf_to_vf_cmd {
 	uint8_t msg_len;
 	uint8_t rsv1;
 	uint16_t match_id;
-	uint16_t msg[8];
+	struct hns3_pf_to_vf_msg msg;
 };

 struct hns3_pf_rst_done_cmd {
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.514800484 +0800
+++ 0083-net-hns3-refactor-PF-mailbox-message-struct.patch	2024-03-05 17:39:30.833566495 +0800
@@ -1 +1 @@
-From 4d534598d922130d12c244d3237652fbfdad0f4b Mon Sep 17 00:00:00 2001
+From f876981e54a106d1212164d8f93eb895fb184ce3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4d534598d922130d12c244d3237652fbfdad0f4b ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/hns3: refactor send mailbox function' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (82 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/hns3: refactor PF " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/hns3: refactor handle " Xueming Li
                   ` (52 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1be4ad59be7f6d3cea9c6e4536339178714c2cfc Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 14:55:07 +0800
Subject: [PATCH] net/hns3: refactor send mailbox function
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c9bd98d84587dbc0dddb8964ad3d7d54818aca01 ]

The 'hns3_send_mbx_msg' function has following problem:
1. the name is vague, missing caller indication
2. too many input parameters because the filling messages
   are placed in commands the send command.

Therefore, a common interface is encapsulated to fill in
the mailbox message before sending it.

Fixes: 463e748964f5 ("net/hns3: support mailbox")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 141 ++++++++++++++++++------------
 drivers/net/hns3/hns3_mbx.c       |  50 ++++-------
 drivers/net/hns3/hns3_mbx.h       |   8 +-
 drivers/net/hns3/hns3_rxtx.c      |  18 ++--
 4 files changed, 116 insertions(+), 101 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 19e734ca8d..b0d0c29df1 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -91,11 +91,13 @@ hns3vf_add_uc_mac_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 {
 	/* mac address was checked by upper level interface */
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+	struct hns3_vf_to_pf_msg req;
 	int ret;

-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_UNICAST,
-				HNS3_MBX_MAC_VLAN_UC_ADD, mac_addr->addr_bytes,
-				RTE_ETHER_ADDR_LEN, false, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_UNICAST,
+			 HNS3_MBX_MAC_VLAN_UC_ADD);
+	memcpy(req.data, mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret) {
 		hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
 				      mac_addr);
@@ -110,12 +112,13 @@ hns3vf_remove_uc_mac_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 {
 	/* mac address was checked by upper level interface */
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+	struct hns3_vf_to_pf_msg req;
 	int ret;

-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_UNICAST,
-				HNS3_MBX_MAC_VLAN_UC_REMOVE,
-				mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN,
-				false, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_UNICAST,
+			 HNS3_MBX_MAC_VLAN_UC_REMOVE);
+	memcpy(req.data, mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret) {
 		hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
 				       mac_addr);
@@ -134,6 +137,7 @@ hns3vf_set_default_mac_addr(struct rte_eth_dev *dev,
 	struct rte_ether_addr *old_addr;
 	uint8_t addr_bytes[HNS3_TWO_ETHER_ADDR_LEN]; /* for 2 MAC addresses */
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+	struct hns3_vf_to_pf_msg req;
 	int ret;

 	/*
@@ -146,9 +150,10 @@ hns3vf_set_default_mac_addr(struct rte_eth_dev *dev,
 	memcpy(&addr_bytes[RTE_ETHER_ADDR_LEN], old_addr->addr_bytes,
 	       RTE_ETHER_ADDR_LEN);

-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_UNICAST,
-				HNS3_MBX_MAC_VLAN_UC_MODIFY, addr_bytes,
-				HNS3_TWO_ETHER_ADDR_LEN, true, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_UNICAST,
+			 HNS3_MBX_MAC_VLAN_UC_MODIFY);
+	memcpy(req.data, addr_bytes, HNS3_TWO_ETHER_ADDR_LEN);
+	ret = hns3vf_mbx_send(hw, &req, true, NULL, 0);
 	if (ret) {
 		/*
 		 * The hns3 VF PMD depends on the hns3 PF kernel ethdev
@@ -185,12 +190,13 @@ hns3vf_add_mc_mac_addr(struct hns3_hw *hw,
 		       struct rte_ether_addr *mac_addr)
 {
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+	struct hns3_vf_to_pf_msg req;
 	int ret;

-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_MULTICAST,
-				HNS3_MBX_MAC_VLAN_MC_ADD,
-				mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN, false,
-				NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_MULTICAST,
+			 HNS3_MBX_MAC_VLAN_MC_ADD);
+	memcpy(req.data, mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret) {
 		hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
 				      mac_addr);
@@ -206,12 +212,13 @@ hns3vf_remove_mc_mac_addr(struct hns3_hw *hw,
 			  struct rte_ether_addr *mac_addr)
 {
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+	struct hns3_vf_to_pf_msg req;
 	int ret;

-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_MULTICAST,
-				HNS3_MBX_MAC_VLAN_MC_REMOVE,
-				mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN, false,
-				NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_MULTICAST,
+			 HNS3_MBX_MAC_VLAN_MC_REMOVE);
+	memcpy(req.data, mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret) {
 		hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
 				       mac_addr);
@@ -348,7 +355,6 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
 			     bool mmap, enum hns3_ring_type queue_type,
 			     uint16_t queue_id)
 {
-#define HNS3_RING_VERCTOR_DATA_SIZE	14
 	struct hns3_vf_to_pf_msg req = {0};
 	const char *op_str;
 	int ret;
@@ -365,8 +371,7 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
 	req.ring_param[0].ring_type = queue_type;
 	req.ring_param[0].tqp_index = queue_id;
 	op_str = mmap ? "Map" : "Unmap";
-	ret = hns3_send_mbx_msg(hw, req.code, 0, (uint8_t *)&req.vector_id,
-				HNS3_RING_VERCTOR_DATA_SIZE, false, NULL, 0);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret)
 		hns3_err(hw, "%s TQP %u fail, vector_id is %u, ret = %d.",
 			 op_str, queue_id, req.vector_id, ret);
@@ -452,10 +457,12 @@ cfg_err:
 static int
 hns3vf_config_mtu(struct hns3_hw *hw, uint16_t mtu)
 {
+	struct hns3_vf_to_pf_msg req;
 	int ret;

-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_MTU, 0, (const uint8_t *)&mtu,
-				sizeof(mtu), true, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_MTU, 0);
+	memcpy(req.data, &mtu, sizeof(mtu));
+	ret = hns3vf_mbx_send(hw, &req, true, NULL, 0);
 	if (ret)
 		hns3_err(hw, "Failed to set mtu (%u) for vf: %d", mtu, ret);

@@ -646,12 +653,13 @@ hns3vf_get_push_lsc_cap(struct hns3_hw *hw)
 	uint16_t val = HNS3_PF_PUSH_LSC_CAP_NOT_SUPPORTED;
 	uint16_t exp = HNS3_PF_PUSH_LSC_CAP_UNKNOWN;
 	struct hns3_vf *vf = HNS3_DEV_HW_TO_VF(hw);
+	struct hns3_vf_to_pf_msg req;

 	__atomic_store_n(&vf->pf_push_lsc_cap, HNS3_PF_PUSH_LSC_CAP_UNKNOWN,
 			 __ATOMIC_RELEASE);

-	(void)hns3_send_mbx_msg(hw, HNS3_MBX_GET_LINK_STATUS, 0, NULL, 0, false,
-				NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_GET_LINK_STATUS, 0);
+	(void)hns3vf_mbx_send(hw, &req, false, NULL, 0);

 	while (remain_ms > 0) {
 		rte_delay_ms(HNS3_POLL_RESPONE_MS);
@@ -746,12 +754,13 @@ hns3vf_check_tqp_info(struct hns3_hw *hw)
 static int
 hns3vf_get_port_base_vlan_filter_state(struct hns3_hw *hw)
 {
+	struct hns3_vf_to_pf_msg req;
 	uint8_t resp_msg;
 	int ret;

-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_VLAN,
-				HNS3_MBX_GET_PORT_BASE_VLAN_STATE, NULL, 0,
-				true, &resp_msg, sizeof(resp_msg));
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_VLAN,
+			 HNS3_MBX_GET_PORT_BASE_VLAN_STATE);
+	ret = hns3vf_mbx_send(hw, &req, true, &resp_msg, sizeof(resp_msg));
 	if (ret) {
 		if (ret == -ETIME) {
 			/*
@@ -792,10 +801,12 @@ hns3vf_get_queue_info(struct hns3_hw *hw)
 {
 #define HNS3VF_TQPS_RSS_INFO_LEN	6
 	uint8_t resp_msg[HNS3VF_TQPS_RSS_INFO_LEN];
+	struct hns3_vf_to_pf_msg req;
 	int ret;

-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_GET_QINFO, 0, NULL, 0, true,
-				resp_msg, HNS3VF_TQPS_RSS_INFO_LEN);
+	hns3vf_mbx_setup(&req, HNS3_MBX_GET_QINFO, 0);
+	ret = hns3vf_mbx_send(hw, &req, true,
+			      resp_msg, HNS3VF_TQPS_RSS_INFO_LEN);
 	if (ret) {
 		PMD_INIT_LOG(ERR, "Failed to get tqp info from PF: %d", ret);
 		return ret;
@@ -833,10 +844,11 @@ hns3vf_get_basic_info(struct hns3_hw *hw)
 {
 	uint8_t resp_msg[HNS3_MBX_MAX_RESP_DATA_SIZE];
 	struct hns3_basic_info *basic_info;
+	struct hns3_vf_to_pf_msg req;
 	int ret;

-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_GET_BASIC_INFO, 0, NULL, 0,
-				true, resp_msg, sizeof(resp_msg));
+	hns3vf_mbx_setup(&req, HNS3_MBX_GET_BASIC_INFO, 0);
+	ret = hns3vf_mbx_send(hw, &req, true, resp_msg, sizeof(resp_msg));
 	if (ret) {
 		hns3_err(hw, "failed to get basic info from PF, ret = %d.",
 				ret);
@@ -856,10 +868,11 @@ static int
 hns3vf_get_host_mac_addr(struct hns3_hw *hw)
 {
 	uint8_t host_mac[RTE_ETHER_ADDR_LEN];
+	struct hns3_vf_to_pf_msg req;
 	int ret;

-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_GET_MAC_ADDR, 0, NULL, 0,
-				true, host_mac, RTE_ETHER_ADDR_LEN);
+	hns3vf_mbx_setup(&req, HNS3_MBX_GET_MAC_ADDR, 0);
+	ret = hns3vf_mbx_send(hw, &req, true, host_mac, RTE_ETHER_ADDR_LEN);
 	if (ret) {
 		hns3_err(hw, "Failed to get mac addr from PF: %d", ret);
 		return ret;
@@ -908,6 +921,7 @@ static void
 hns3vf_request_link_info(struct hns3_hw *hw)
 {
 	struct hns3_vf *vf = HNS3_DEV_HW_TO_VF(hw);
+	struct hns3_vf_to_pf_msg req;
 	bool send_req;
 	int ret;

@@ -919,8 +933,8 @@ hns3vf_request_link_info(struct hns3_hw *hw)
 	if (!send_req)
 		return;

-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_GET_LINK_STATUS, 0, NULL, 0, false,
-				NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_GET_LINK_STATUS, 0);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret) {
 		hns3_err(hw, "failed to fetch link status, ret = %d", ret);
 		return;
@@ -964,16 +978,18 @@ hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
 static int
 hns3vf_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
 {
-	struct hns3_mbx_vlan_filter vlan_filter = {0};
+	struct hns3_mbx_vlan_filter *vlan_filter;
+	struct hns3_vf_to_pf_msg req = {0};
 	struct hns3_hw *hw = &hns->hw;

-	vlan_filter.is_kill = on ? 0 : 1;
-	vlan_filter.proto = rte_cpu_to_le_16(RTE_ETHER_TYPE_VLAN);
-	vlan_filter.vlan_id =  rte_cpu_to_le_16(vlan_id);
+	req.code = HNS3_MBX_SET_VLAN;
+	req.subcode = HNS3_MBX_VLAN_FILTER;
+	vlan_filter = (struct hns3_mbx_vlan_filter *)req.data;
+	vlan_filter->is_kill = on ? 0 : 1;
+	vlan_filter->proto = rte_cpu_to_le_16(RTE_ETHER_TYPE_VLAN);
+	vlan_filter->vlan_id = rte_cpu_to_le_16(vlan_id);

-	return hns3_send_mbx_msg(hw, HNS3_MBX_SET_VLAN, HNS3_MBX_VLAN_FILTER,
-				(uint8_t *)&vlan_filter, sizeof(vlan_filter),
-				 true, NULL, 0);
+	return hns3vf_mbx_send(hw, &req, true, NULL, 0);
 }

 static int
@@ -1002,6 +1018,7 @@ hns3vf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 static int
 hns3vf_en_vlan_filter(struct hns3_hw *hw, bool enable)
 {
+	struct hns3_vf_to_pf_msg req;
 	uint8_t msg_data;
 	int ret;

@@ -1009,9 +1026,10 @@ hns3vf_en_vlan_filter(struct hns3_hw *hw, bool enable)
 		return 0;

 	msg_data = enable ? 1 : 0;
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_VLAN,
-			HNS3_MBX_ENABLE_VLAN_FILTER, &msg_data,
-			sizeof(msg_data), true, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_VLAN,
+			 HNS3_MBX_ENABLE_VLAN_FILTER);
+	memcpy(req.data, &msg_data, sizeof(msg_data));
+	ret = hns3vf_mbx_send(hw, &req, true, NULL, 0);
 	if (ret)
 		hns3_err(hw, "%s vlan filter failed, ret = %d.",
 				enable ? "enable" : "disable", ret);
@@ -1022,12 +1040,15 @@ hns3vf_en_vlan_filter(struct hns3_hw *hw, bool enable)
 static int
 hns3vf_en_hw_strip_rxvtag(struct hns3_hw *hw, bool enable)
 {
+	struct hns3_vf_to_pf_msg req;
 	uint8_t msg_data;
 	int ret;

 	msg_data = enable ? 1 : 0;
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_VLAN, HNS3_MBX_VLAN_RX_OFF_CFG,
-				&msg_data, sizeof(msg_data), false, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_VLAN,
+			 HNS3_MBX_VLAN_RX_OFF_CFG);
+	memcpy(req.data, &msg_data, sizeof(msg_data));
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret)
 		hns3_err(hw, "vf %s strip failed, ret = %d.",
 				enable ? "enable" : "disable", ret);
@@ -1171,11 +1192,13 @@ hns3vf_dev_configure_vlan(struct rte_eth_dev *dev)
 static int
 hns3vf_set_alive(struct hns3_hw *hw, bool alive)
 {
+	struct hns3_vf_to_pf_msg req;
 	uint8_t msg_data;

 	msg_data = alive ? 1 : 0;
-	return hns3_send_mbx_msg(hw, HNS3_MBX_SET_ALIVE, 0, &msg_data,
-				 sizeof(msg_data), false, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_ALIVE, 0);
+	memcpy(req.data, &msg_data, sizeof(msg_data));
+	return hns3vf_mbx_send(hw, &req, false, NULL, 0);
 }

 static void
@@ -1183,11 +1206,12 @@ hns3vf_keep_alive_handler(void *param)
 {
 	struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param;
 	struct hns3_adapter *hns = eth_dev->data->dev_private;
+	struct hns3_vf_to_pf_msg req;
 	struct hns3_hw *hw = &hns->hw;
 	int ret;

-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_KEEP_ALIVE, 0, NULL, 0,
-				false, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_KEEP_ALIVE, 0);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret)
 		hns3_err(hw, "VF sends keeping alive cmd failed(=%d)",
 			 ret);
@@ -1326,9 +1350,11 @@ err_init_hardware:
 static int
 hns3vf_clear_vport_list(struct hns3_hw *hw)
 {
-	return hns3_send_mbx_msg(hw, HNS3_MBX_HANDLE_VF_TBL,
-				 HNS3_MBX_VPORT_LIST_CLEAR, NULL, 0, false,
-				 NULL, 0);
+	struct hns3_vf_to_pf_msg req;
+
+	hns3vf_mbx_setup(&req, HNS3_MBX_HANDLE_VF_TBL,
+			 HNS3_MBX_VPORT_LIST_CLEAR);
+	return hns3vf_mbx_send(hw, &req, false, NULL, 0);
 }

 static int
@@ -1797,12 +1823,13 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
 static int
 hns3vf_prepare_reset(struct hns3_adapter *hns)
 {
+	struct hns3_vf_to_pf_msg req;
 	struct hns3_hw *hw = &hns->hw;
 	int ret;

 	if (hw->reset.level == HNS3_VF_FUNC_RESET) {
-		ret = hns3_send_mbx_msg(hw, HNS3_MBX_RESET, 0, NULL,
-					0, true, NULL, 0);
+		hns3vf_mbx_setup(&req, HNS3_MBX_RESET, 0);
+		ret = hns3vf_mbx_send(hw, &req, true, NULL, 0);
 		if (ret)
 			return ret;
 	}
diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index c90f5d59ba..43195ff184 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -24,6 +24,14 @@ static const struct errno_respcode_map err_code_map[] = {
 	{95, -EOPNOTSUPP},
 };

+void
+hns3vf_mbx_setup(struct hns3_vf_to_pf_msg *req, uint8_t code, uint8_t subcode)
+{
+	memset(req, 0, sizeof(struct hns3_vf_to_pf_msg));
+	req->code = code;
+	req->subcode = subcode;
+}
+
 static int
 hns3_resp_to_errno(uint16_t resp_code)
 {
@@ -118,45 +126,24 @@ hns3_mbx_prepare_resp(struct hns3_hw *hw, uint16_t code, uint16_t subcode)
 }

 int
-hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
-		  const uint8_t *msg_data, uint8_t msg_len, bool need_resp,
-		  uint8_t *resp_data, uint16_t resp_len)
+hns3vf_mbx_send(struct hns3_hw *hw,
+		struct hns3_vf_to_pf_msg *req, bool need_resp,
+		uint8_t *resp_data, uint16_t resp_len)
 {
-	struct hns3_mbx_vf_to_pf_cmd *req;
+	struct hns3_mbx_vf_to_pf_cmd *cmd;
 	struct hns3_cmd_desc desc;
-	bool is_ring_vector_msg;
 	int ret;

-	req = (struct hns3_mbx_vf_to_pf_cmd *)desc.data;
-
-	/* first two bytes are reserved for code & subcode */
-	if (msg_len > HNS3_MBX_MSG_MAX_DATA_SIZE) {
-		hns3_err(hw,
-			 "VF send mbx msg fail, msg len %u exceeds max payload len %d",
-			 msg_len, HNS3_MBX_MSG_MAX_DATA_SIZE);
-		return -EINVAL;
-	}
-
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_MBX_VF_TO_PF, false);
-	req->msg.code = code;
-	is_ring_vector_msg = (code == HNS3_MBX_MAP_RING_TO_VECTOR) ||
-			     (code == HNS3_MBX_UNMAP_RING_TO_VECTOR) ||
-			     (code == HNS3_MBX_GET_RING_VECTOR_MAP);
-	if (!is_ring_vector_msg)
-		req->msg.subcode = subcode;
-	if (msg_data) {
-		if (is_ring_vector_msg)
-			memcpy(&req->msg.vector_id, msg_data, msg_len);
-		else
-			memcpy(&req->msg.data, msg_data, msg_len);
-	}
+	cmd = (struct hns3_mbx_vf_to_pf_cmd *)desc.data;
+	cmd->msg = *req;

 	/* synchronous send */
 	if (need_resp) {
-		req->mbx_need_resp |= HNS3_MBX_NEED_RESP_BIT;
+		cmd->mbx_need_resp |= HNS3_MBX_NEED_RESP_BIT;
 		rte_spinlock_lock(&hw->mbx_resp.lock);
-		hns3_mbx_prepare_resp(hw, code, subcode);
-		req->match_id = hw->mbx_resp.match_id;
+		hns3_mbx_prepare_resp(hw, req->code, req->subcode);
+		cmd->match_id = hw->mbx_resp.match_id;
 		ret = hns3_cmd_send(hw, &desc, 1);
 		if (ret) {
 			rte_spinlock_unlock(&hw->mbx_resp.lock);
@@ -165,7 +152,8 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
 			return ret;
 		}

-		ret = hns3_get_mbx_resp(hw, code, subcode, resp_data, resp_len);
+		ret = hns3_get_mbx_resp(hw, req->code, req->subcode,
+					resp_data, resp_len);
 		rte_spinlock_unlock(&hw->mbx_resp.lock);
 	} else {
 		/* asynchronous send */
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 09780fcebd..2952b96ab6 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -208,7 +208,9 @@ struct hns3_pf_rst_done_cmd {

 struct hns3_hw;
 void hns3_dev_handle_mbx_msg(struct hns3_hw *hw);
-int hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
-		      const uint8_t *msg_data, uint8_t msg_len, bool need_resp,
-		      uint8_t *resp_data, uint16_t resp_len);
+void hns3vf_mbx_setup(struct hns3_vf_to_pf_msg *req,
+		      uint8_t code, uint8_t subcode);
+int hns3vf_mbx_send(struct hns3_hw *hw,
+		    struct hns3_vf_to_pf_msg *req_msg, bool need_resp,
+		    uint8_t *resp_data, uint16_t resp_len);
 #endif /* HNS3_MBX_H */
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 09b7e90c70..9087bcffed 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -686,13 +686,12 @@ tqp_reset_fail:
 static int
 hns3vf_reset_tqp(struct hns3_hw *hw, uint16_t queue_id)
 {
-	uint8_t msg_data[2];
+	struct hns3_vf_to_pf_msg req;
 	int ret;

-	memcpy(msg_data, &queue_id, sizeof(uint16_t));
-
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_QUEUE_RESET, 0, msg_data,
-				 sizeof(msg_data), true, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_QUEUE_RESET, 0);
+	memcpy(req.data, &queue_id, sizeof(uint16_t));
+	ret = hns3vf_mbx_send(hw, &req, true, NULL, 0);
 	if (ret)
 		hns3_err(hw, "fail to reset tqp, queue_id = %u, ret = %d.",
 			 queue_id, ret);
@@ -769,15 +768,14 @@ static int
 hns3vf_reset_all_tqps(struct hns3_hw *hw)
 {
 #define HNS3VF_RESET_ALL_TQP_DONE	1U
+	struct hns3_vf_to_pf_msg req;
 	uint8_t reset_status;
-	uint8_t msg_data[2];
 	int ret;
 	uint16_t i;

-	memset(msg_data, 0, sizeof(msg_data));
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_QUEUE_RESET, 0, msg_data,
-				sizeof(msg_data), true, &reset_status,
-				sizeof(reset_status));
+	hns3vf_mbx_setup(&req, HNS3_MBX_QUEUE_RESET, 0);
+	ret = hns3vf_mbx_send(hw, &req, true,
+			      &reset_status, sizeof(reset_status));
 	if (ret) {
 		hns3_err(hw, "fail to send rcb reset mbx, ret = %d.", ret);
 		return ret;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.547637285 +0800
+++ 0084-net-hns3-refactor-send-mailbox-function.patch	2024-03-05 17:39:30.833566495 +0800
@@ -1 +1 @@
-From c9bd98d84587dbc0dddb8964ad3d7d54818aca01 Mon Sep 17 00:00:00 2001
+From 1be4ad59be7f6d3cea9c6e4536339178714c2cfc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c9bd98d84587dbc0dddb8964ad3d7d54818aca01 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/hns3: refactor handle mailbox function' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (83 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/hns3: refactor send mailbox function' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/hns3: fix VF multiple count on one reset' " Xueming Li
                   ` (51 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8abf8591dcc17e9a0a7cd11da0597d90fe095b46 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 14:55:08 +0800
Subject: [PATCH] net/hns3: refactor handle mailbox function
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 277d522ae39f6c9daa38c5ad5d3b94f632f9cf49 ]

The mailbox messages of the PF and VF are processed in
the same function. The PF and VF call the same function
to process the messages. This code is excessive coupling
and isn't good for maintenance. Therefore, this patch
separates the interfaces that handle PF mailbox message
and handle VF mailbox message.

Fixes: 463e748964f5 ("net/hns3: support mailbox")
Fixes: 109e4dd1bd7a ("net/hns3: get link state change through mailbox")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    |  2 +-
 drivers/net/hns3/hns3_ethdev_vf.c |  4 +-
 drivers/net/hns3/hns3_mbx.c       | 69 ++++++++++++++++++++++++-------
 drivers/net/hns3/hns3_mbx.h       |  3 +-
 4 files changed, 58 insertions(+), 20 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index ae81368f68..bccd9db0dd 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -380,7 +380,7 @@ hns3_interrupt_handler(void *param)
 		hns3_warn(hw, "received reset interrupt");
 		hns3_schedule_reset(hns);
 	} else if (event_cause == HNS3_VECTOR0_EVENT_MBX) {
-		hns3_dev_handle_mbx_msg(hw);
+		hns3pf_handle_mbx_msg(hw);
 	} else if (event_cause != HNS3_VECTOR0_EVENT_PTP) {
 		hns3_warn(hw, "received unknown event: vector0_int_stat:0x%x "
 			  "ras_int_stat:0x%x cmdq_int_stat:0x%x",
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index b0d0c29df1..f5a7a2b1f4 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -618,7 +618,7 @@ hns3vf_interrupt_handler(void *param)
 		hns3_schedule_reset(hns);
 		break;
 	case HNS3VF_VECTOR0_EVENT_MBX:
-		hns3_dev_handle_mbx_msg(hw);
+		hns3vf_handle_mbx_msg(hw);
 		break;
 	default:
 		break;
@@ -670,7 +670,7 @@ hns3vf_get_push_lsc_cap(struct hns3_hw *hw)
 		 * driver has to actively handle the HNS3_MBX_LINK_STAT_CHANGE
 		 * mailbox from PF driver to get this capability.
 		 */
-		hns3_dev_handle_mbx_msg(hw);
+		hns3vf_handle_mbx_msg(hw);
 		if (__atomic_load_n(&vf->pf_push_lsc_cap, __ATOMIC_ACQUIRE) !=
 			HNS3_PF_PUSH_LSC_CAP_UNKNOWN)
 			break;
diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index 43195ff184..9cdbc1668a 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -78,7 +78,7 @@ hns3_get_mbx_resp(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
 			return -EIO;
 		}

-		hns3_dev_handle_mbx_msg(hw);
+		hns3vf_handle_mbx_msg(hw);
 		rte_delay_us(HNS3_WAIT_RESP_US);

 		if (hw->mbx_resp.received_match_resp)
@@ -372,9 +372,57 @@ scan_next:
 }

 void
-hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
+hns3pf_handle_mbx_msg(struct hns3_hw *hw)
+{
+	struct hns3_cmq_ring *crq = &hw->cmq.crq;
+	struct hns3_mbx_vf_to_pf_cmd *req;
+	struct hns3_cmd_desc *desc;
+	uint16_t flag;
+
+	rte_spinlock_lock(&hw->cmq.crq.lock);
+
+	while (!hns3_cmd_crq_empty(hw)) {
+		if (__atomic_load_n(&hw->reset.disable_cmd, __ATOMIC_RELAXED)) {
+			rte_spinlock_unlock(&hw->cmq.crq.lock);
+			return;
+		}
+		desc = &crq->desc[crq->next_to_use];
+		req = (struct hns3_mbx_vf_to_pf_cmd *)desc->data;
+
+		flag = rte_le_to_cpu_16(crq->desc[crq->next_to_use].flag);
+		if (unlikely(!hns3_get_bit(flag, HNS3_CMDQ_RX_OUTVLD_B))) {
+			hns3_warn(hw,
+				  "dropped invalid mailbox message, code = %u",
+				  req->msg.code);
+
+			/* dropping/not processing this invalid message */
+			crq->desc[crq->next_to_use].flag = 0;
+			hns3_mbx_ring_ptr_move_crq(crq);
+			continue;
+		}
+
+		switch (req->msg.code) {
+		case HNS3_MBX_PUSH_LINK_STATUS:
+			hns3pf_handle_link_change_event(hw, req);
+			break;
+		default:
+			hns3_err(hw, "received unsupported(%u) mbx msg",
+				 req->msg.code);
+			break;
+		}
+		crq->desc[crq->next_to_use].flag = 0;
+		hns3_mbx_ring_ptr_move_crq(crq);
+	}
+
+	/* Write back CMDQ_RQ header pointer, IMP need this pointer */
+	hns3_write_dev(hw, HNS3_CMDQ_RX_HEAD_REG, crq->next_to_use);
+
+	rte_spinlock_unlock(&hw->cmq.crq.lock);
+}
+
+void
+hns3vf_handle_mbx_msg(struct hns3_hw *hw)
 {
-	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	struct hns3_cmq_ring *crq = &hw->cmq.crq;
 	struct hns3_mbx_pf_to_vf_cmd *req;
 	struct hns3_cmd_desc *desc;
@@ -385,7 +433,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 	rte_spinlock_lock(&hw->cmq.crq.lock);

 	handle_out = (rte_eal_process_type() != RTE_PROC_PRIMARY ||
-		      !rte_thread_is_intr()) && hns->is_vf;
+		      !rte_thread_is_intr());
 	if (handle_out) {
 		/*
 		 * Currently, any threads in the primary and secondary processes
@@ -430,8 +478,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 			continue;
 		}

-		handle_out = hns->is_vf && desc->opcode == 0;
-		if (handle_out) {
+		if (desc->opcode == 0) {
 			/* Message already processed by other thread */
 			crq->desc[crq->next_to_use].flag = 0;
 			hns3_mbx_ring_ptr_move_crq(crq);
@@ -448,16 +495,6 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 		case HNS3_MBX_ASSERTING_RESET:
 			hns3_handle_asserting_reset(hw, req);
 			break;
-		case HNS3_MBX_PUSH_LINK_STATUS:
-			/*
-			 * This message is reported by the firmware and is
-			 * reported in 'struct hns3_mbx_vf_to_pf_cmd' format.
-			 * Therefore, we should cast the req variable to
-			 * 'struct hns3_mbx_vf_to_pf_cmd' and then process it.
-			 */
-			hns3pf_handle_link_change_event(hw,
-				(struct hns3_mbx_vf_to_pf_cmd *)req);
-			break;
 		case HNS3_MBX_PUSH_VLAN_INFO:
 			/*
 			 * When the PVID configuration status of VF device is
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 2952b96ab6..2b6cb8f513 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -207,7 +207,8 @@ struct hns3_pf_rst_done_cmd {
 	((crq)->next_to_use = ((crq)->next_to_use + 1) % (crq)->desc_num)

 struct hns3_hw;
-void hns3_dev_handle_mbx_msg(struct hns3_hw *hw);
+void hns3pf_handle_mbx_msg(struct hns3_hw *hw);
+void hns3vf_handle_mbx_msg(struct hns3_hw *hw);
 void hns3vf_mbx_setup(struct hns3_vf_to_pf_msg *req,
 		      uint8_t code, uint8_t subcode);
 int hns3vf_mbx_send(struct hns3_hw *hw,
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.582398286 +0800
+++ 0085-net-hns3-refactor-handle-mailbox-function.patch	2024-03-05 17:39:30.833566495 +0800
@@ -1 +1 @@
-From 277d522ae39f6c9daa38c5ad5d3b94f632f9cf49 Mon Sep 17 00:00:00 2001
+From 8abf8591dcc17e9a0a7cd11da0597d90fe095b46 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 277d522ae39f6c9daa38c5ad5d3b94f632f9cf49 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/hns3: fix VF multiple count on one reset' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (84 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/hns3: refactor handle " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/hns3: fix disable command with firmware' " Xueming Li
                   ` (50 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 48d9241bbdfb813302c12f057b0d79d557856010 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 15:44:14 +0800
Subject: [PATCH] net/hns3: fix VF multiple count on one reset
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 072a07a9dcbd604b1983bf2cb266d3dd4dc89824 ]

There are two ways for the hns3 VF driver to know reset event, namely,
interrupt task and periodic detection task. For the latter, the real
reset process will delay several microseconds to execute. Both tasks
cause the count to increase by 1.

However, the periodic detection task also detects a reset event A
after interrupt task receive a reset event A. As a result, the reset
count will be double.

So this patch adds the comparison of reset level for VF in case of the
multiple reset count.

Fixes: a5475d61fa34 ("net/hns3: support VF")

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

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index f5a7a2b1f4..83d3d66005 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -569,13 +569,8 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
 		val = hns3_read_dev(hw, HNS3_VF_RST_ING);
 		hns3_write_dev(hw, HNS3_VF_RST_ING, val | HNS3_VF_RST_ING_BIT);
 		val = cmdq_stat_reg & ~BIT(HNS3_VECTOR0_RST_INT_B);
-		if (clearval) {
-			hw->reset.stats.global_cnt++;
-			hns3_warn(hw, "Global reset detected, clear reset status");
-		} else {
-			hns3_schedule_delayed_reset(hns);
-			hns3_warn(hw, "Global reset detected, don't clear reset status");
-		}
+		hw->reset.stats.global_cnt++;
+		hns3_warn(hw, "Global reset detected, clear reset status");

 		ret = HNS3VF_VECTOR0_EVENT_RST;
 		goto out;
@@ -590,9 +585,9 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)

 	val = 0;
 	ret = HNS3VF_VECTOR0_EVENT_OTHER;
+
 out:
-	if (clearval)
-		*clearval = val;
+	*clearval = val;
 	return ret;
 }

@@ -1731,11 +1726,25 @@ is_vf_reset_done(struct hns3_hw *hw)
 	return true;
 }

+static enum hns3_reset_level
+hns3vf_detect_reset_event(struct hns3_hw *hw)
+{
+	enum hns3_reset_level reset = HNS3_NONE_RESET;
+	uint32_t cmdq_stat_reg;
+
+	cmdq_stat_reg = hns3_read_dev(hw, HNS3_VECTOR0_CMDQ_STAT_REG);
+	if (BIT(HNS3_VECTOR0_RST_INT_B) & cmdq_stat_reg)
+		reset = HNS3_VF_RESET;
+
+	return reset;
+}
+
 bool
 hns3vf_is_reset_pending(struct hns3_adapter *hns)
 {
+	enum hns3_reset_level last_req;
 	struct hns3_hw *hw = &hns->hw;
-	enum hns3_reset_level reset;
+	enum hns3_reset_level new_req;

 	/*
 	 * According to the protocol of PCIe, FLR to a PF device resets the PF
@@ -1758,13 +1767,18 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return false;

-	hns3vf_check_event_cause(hns, NULL);
-	reset = hns3vf_get_reset_level(hw, &hw->reset.pending);
-	if (hw->reset.level != HNS3_NONE_RESET && reset != HNS3_NONE_RESET &&
-	    hw->reset.level < reset) {
-		hns3_warn(hw, "High level reset %d is pending", reset);
+	new_req = hns3vf_detect_reset_event(hw);
+	if (new_req == HNS3_NONE_RESET)
+		return false;
+
+	last_req = hns3vf_get_reset_level(hw, &hw->reset.pending);
+	if (last_req == HNS3_NONE_RESET || last_req < new_req) {
+		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+		hns3_schedule_delayed_reset(hns);
+		hns3_warn(hw, "High level reset detected, delay do reset");
 		return true;
 	}
+
 	return false;
 }

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.616679088 +0800
+++ 0086-net-hns3-fix-VF-multiple-count-on-one-reset.patch	2024-03-05 17:39:30.833566495 +0800
@@ -1 +1 @@
-From 072a07a9dcbd604b1983bf2cb266d3dd4dc89824 Mon Sep 17 00:00:00 2001
+From 48d9241bbdfb813302c12f057b0d79d557856010 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 072a07a9dcbd604b1983bf2cb266d3dd4dc89824 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/hns3: fix disable command with firmware' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (85 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/hns3: fix VF multiple count on one reset' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/hns3: fix reset level comparison' " Xueming Li
                   ` (49 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a3584fcde635c1a12b036469a57887f75c08d370 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 15:44:15 +0800
Subject: [PATCH] net/hns3: fix disable command with firmware
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 66048270a49088f79c2a020bd28ee0a93c4a73ed ]

Disable command only when need to delay handle reset.
This patch fixes it.

Fixes: 5be38fc6c0fc ("net/hns3: fix multiple reset detected log")

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

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index bccd9db0dd..d626bdd5b1 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5552,18 +5552,16 @@ hns3_detect_reset_event(struct hns3_hw *hw)

 	last_req = hns3_get_reset_level(hns, &hw->reset.pending);
 	vector0_intr_state = hns3_read_dev(hw, HNS3_VECTOR0_OTHER_INT_STS_REG);
-	if (BIT(HNS3_VECTOR0_IMPRESET_INT_B) & vector0_intr_state) {
-		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+	if (BIT(HNS3_VECTOR0_IMPRESET_INT_B) & vector0_intr_state)
 		new_req = HNS3_IMP_RESET;
-	} else if (BIT(HNS3_VECTOR0_GLOBALRESET_INT_B) & vector0_intr_state) {
-		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+	else if (BIT(HNS3_VECTOR0_GLOBALRESET_INT_B) & vector0_intr_state)
 		new_req = HNS3_GLOBAL_RESET;
-	}

 	if (new_req == HNS3_NONE_RESET)
 		return HNS3_NONE_RESET;

 	if (last_req == HNS3_NONE_RESET || last_req < new_req) {
+		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
 		hns3_schedule_delayed_reset(hns);
 		hns3_warn(hw, "High level reset detected, delay do reset");
 	}
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.646752289 +0800
+++ 0087-net-hns3-fix-disable-command-with-firmware.patch	2024-03-05 17:39:30.843566495 +0800
@@ -1 +1 @@
-From 66048270a49088f79c2a020bd28ee0a93c4a73ed Mon Sep 17 00:00:00 2001
+From a3584fcde635c1a12b036469a57887f75c08d370 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 66048270a49088f79c2a020bd28ee0a93c4a73ed ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/hns3: fix reset level comparison' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (86 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/hns3: fix disable command with firmware' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/nfp: fix Rx memory leak' " Xueming Li
                   ` (48 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cb1cef89c47a4d266c9077b39170e4b96ce0784e Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 15:44:16 +0800
Subject: [PATCH] net/hns3: fix reset level comparison
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 ]

Currently, there are two problems in hns3vf_is_reset_pending():
1. The new detect reset level is not HNS3_NONE_RESET, but the
   last reset level is HNS3_NONE_RESET, this function returns false.
2. Comparison between last_req and new_req is opposite.

In addition, the reset level comparison in hns3_detect_reset_event()
is similar to the hns3vf_is_reset_pending(). So this patch fixes
above the problems and merges the logic of reset level comparison.

Fixes: 5be38fc6c0fc ("net/hns3: fix multiple reset detected log")

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

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index d626bdd5b1..eafcf2c6f6 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5545,27 +5545,15 @@ is_pf_reset_done(struct hns3_hw *hw)
 static enum hns3_reset_level
 hns3_detect_reset_event(struct hns3_hw *hw)
 {
-	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	enum hns3_reset_level new_req = HNS3_NONE_RESET;
-	enum hns3_reset_level last_req;
 	uint32_t vector0_intr_state;

-	last_req = hns3_get_reset_level(hns, &hw->reset.pending);
 	vector0_intr_state = hns3_read_dev(hw, HNS3_VECTOR0_OTHER_INT_STS_REG);
 	if (BIT(HNS3_VECTOR0_IMPRESET_INT_B) & vector0_intr_state)
 		new_req = HNS3_IMP_RESET;
 	else if (BIT(HNS3_VECTOR0_GLOBALRESET_INT_B) & vector0_intr_state)
 		new_req = HNS3_GLOBAL_RESET;

-	if (new_req == HNS3_NONE_RESET)
-		return HNS3_NONE_RESET;
-
-	if (last_req == HNS3_NONE_RESET || last_req < new_req) {
-		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
-		hns3_schedule_delayed_reset(hns);
-		hns3_warn(hw, "High level reset detected, delay do reset");
-	}
-
 	return new_req;
 }

@@ -5584,10 +5572,14 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
 		return false;

 	new_req = hns3_detect_reset_event(hw);
+	if (new_req == HNS3_NONE_RESET)
+		return false;
+
 	last_req = hns3_get_reset_level(hns, &hw->reset.pending);
-	if (last_req != HNS3_NONE_RESET && new_req != HNS3_NONE_RESET &&
-	    new_req < last_req) {
-		hns3_warn(hw, "High level reset %d is pending", last_req);
+	if (last_req == HNS3_NONE_RESET || last_req < new_req) {
+		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+		hns3_schedule_delayed_reset(hns);
+		hns3_warn(hw, "High level reset detected, delay do reset");
 		return true;
 	}
 	last_req = hns3_get_reset_level(hns, &hw->reset.request);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.679629090 +0800
+++ 0088-net-hns3-fix-reset-level-comparison.patch	2024-03-05 17:39:30.843566495 +0800
@@ -1 +1 @@
-From 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 Mon Sep 17 00:00:00 2001
+From cb1cef89c47a4d266c9077b39170e4b96ce0784e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/nfp: fix Rx memory leak' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (87 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/hns3: fix reset level comparison' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/nfp: fix Rx descriptor' " Xueming Li
                   ` (47 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Long Wu; +Cc: Chaoyong He, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e024c471f940415824c3ca508f71135bf4072bae Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Mon, 11 Dec 2023 13:45:25 +0800
Subject: [PATCH] net/nfp: fix Rx memory leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2bef94420b9036c4ad7e41270e9623ab540fa35f ]

If the Rx ring is full and do not care its return value, this will
cause memory leak.

Fixes: 766d51c9ce29 ("net/nfp: merge receive function")

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

diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index 3698a3d4aa..1dc9b4250b 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -133,7 +133,9 @@ nfp_flower_pf_dispatch_pkts(struct nfp_net_hw *hw,
 		return false;
 	}

-	rte_ring_enqueue(repr->ring, (void *)mbuf);
+	if (rte_ring_enqueue(repr->ring, (void *)mbuf) != 0)
+		return false;
+
 	return true;
 }

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.706014490 +0800
+++ 0089-net-nfp-fix-Rx-memory-leak.patch	2024-03-05 17:39:30.843566495 +0800
@@ -1 +1 @@
-From 2bef94420b9036c4ad7e41270e9623ab540fa35f Mon Sep 17 00:00:00 2001
+From e024c471f940415824c3ca508f71135bf4072bae Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2bef94420b9036c4ad7e41270e9623ab540fa35f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index f950ae233b..94b50611f0 100644
+index 3698a3d4aa..1dc9b4250b 100644

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

* patch 'net/nfp: fix Rx descriptor' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (88 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/nfp: fix Rx memory leak' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/hns3: remove QinQ insert support for VF' " Xueming Li
                   ` (46 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Long Wu; +Cc: Chaoyong He, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 48fe88cb3ce34d1d38859ef2856eda2113bfc8c7 Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Mon, 11 Dec 2023 13:45:26 +0800
Subject: [PATCH] net/nfp: fix Rx descriptor
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 580ea0b09a7c293c8912884109dc92abfea1229a ]

If the Rx loop is broken and PMD does not update the descriptor, packets
will not be received successfully.

Fixes: 766d51c9ce29 ("net/nfp: merge receive function")

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

diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c
index f21e120a43..8ca651ba55 100644
--- a/drivers/net/nfp/nfp_rxtx.c
+++ b/drivers/net/nfp/nfp_rxtx.c
@@ -747,15 +747,6 @@ nfp_net_recv_pkts(void *rx_queue,
 		/* Checking the checksum flag */
 		nfp_net_rx_cksum(rxq, rxds, mb);

-		if (meta.port_id == 0) {
-			rx_pkts[avail++] = mb;
-		} else if (nfp_flower_pf_dispatch_pkts(hw, mb, meta.port_id)) {
-			avail_multiplexed++;
-		} else {
-			rte_pktmbuf_free(mb);
-			break;
-		}
-
 		/* Now resetting and updating the descriptor */
 		rxds->vals[0] = 0;
 		rxds->vals[1] = 0;
@@ -768,6 +759,15 @@ nfp_net_recv_pkts(void *rx_queue,
 		rxq->rd_p++;
 		if (unlikely(rxq->rd_p == rxq->rx_count)) /* Wrapping */
 			rxq->rd_p = 0;
+
+		if (meta.port_id == 0) {
+			rx_pkts[avail++] = mb;
+		} else if (nfp_flower_pf_dispatch_pkts(hw, mb, meta.port_id)) {
+			avail_multiplexed++;
+		} else {
+			rte_pktmbuf_free(mb);
+			break;
+		}
 	}

 	if (nb_hold == 0)
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.732004191 +0800
+++ 0090-net-nfp-fix-Rx-descriptor.patch	2024-03-05 17:39:30.843566495 +0800
@@ -1 +1 @@
-From 580ea0b09a7c293c8912884109dc92abfea1229a Mon Sep 17 00:00:00 2001
+From 48fe88cb3ce34d1d38859ef2856eda2113bfc8c7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 580ea0b09a7c293c8912884109dc92abfea1229a ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 5094bbf145..3840e2372c 100644
+index f21e120a43..8ca651ba55 100644
@@ -23 +25 @@
-@@ -765,15 +765,6 @@ nfp_net_recv_pkts(void *rx_queue,
+@@ -747,15 +747,6 @@ nfp_net_recv_pkts(void *rx_queue,
@@ -39 +41 @@
-@@ -786,6 +777,15 @@ nfp_net_recv_pkts(void *rx_queue,
+@@ -768,6 +759,15 @@ nfp_net_recv_pkts(void *rx_queue,

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

* patch 'net/hns3: remove QinQ insert support for VF' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (89 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/nfp: fix Rx descriptor' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'doc: add --latencystats option in testpmd guide' " Xueming Li
                   ` (45 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e670d64d34218d896b1121c0fb3700b91cb63204 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 28 Dec 2023 20:14:28 +0800
Subject: [PATCH] net/hns3: remove QinQ insert support for VF
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f6e79b8d3968150736499bc225762b62fbf1b768 ]

In the HIP08 platform, the PF driver will notify VF driver to update
the PVID state [1], and VF will declare support QinQ insert when PVID
is disabled.

In the later platform (e.g. HIP09), the hardware has been improved,
so the PF driver will NOT notify VF driver to update the PVID state.

However, the later platform still have constraint: PVID and QinQ insert
cannot be enabled at the same time, otherwise, the hardware discards
packets and reports an error interrupt.

Plus, as far as we known, VF driver's users don't use the QinQ insert.

Therefore, we declare that the VF driver don't support QinQ insert.

[1] commit b4e4d7ac9f09 ("net/hns3: support setting VF PVID by PF driver")

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

diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 8f224aa00c..28c26b049c 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -85,7 +85,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 				 RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE |
 				 RTE_ETH_TX_OFFLOAD_VLAN_INSERT);

-	if (!hw->port_base_vlan_cfg.state)
+	if (!hns->is_vf && !hw->port_base_vlan_cfg.state)
 		info->tx_offload_capa |= RTE_ETH_TX_OFFLOAD_QINQ_INSERT;

 	if (hns3_dev_get_support(hw, OUTER_UDP_CKSUM))
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.754539692 +0800
+++ 0091-net-hns3-remove-QinQ-insert-support-for-VF.patch	2024-03-05 17:39:30.853566496 +0800
@@ -1 +1 @@
-From f6e79b8d3968150736499bc225762b62fbf1b768 Mon Sep 17 00:00:00 2001
+From e670d64d34218d896b1121c0fb3700b91cb63204 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f6e79b8d3968150736499bc225762b62fbf1b768 ]
@@ -22,2 +24,0 @@
-
-Cc: stable@dpdk.org

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

* patch 'doc: add --latencystats option in testpmd guide' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (90 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/hns3: remove QinQ insert support for VF' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'app/testpmd: hide --bitrate-stats in help if disabled' " Xueming Li
                   ` (44 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ec2260423ed7747c677a1a5a4dd50643bed2254d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 9 Jan 2024 15:08:49 -0800
Subject: [PATCH] doc: add --latencystats option in testpmd guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8cd8f0a90bba2862d8044529e11276d6f6321192 ]

Option was added but never added to documentation.

Fixes: 62d3216d6194 ("app/testpmd: add latency statistics calculation")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 doc/guides/testpmd_app_ug/run_app.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index 24a086401e..1a9b812a7f 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -422,6 +422,10 @@ The command line options are:

     Set the logical core N to perform bitrate calculation.

+*   ``--latencystats=N``
+
+    Set the logical core N to perform latency and jitter calculations.
+
 *   ``--print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|dev_probed|dev_released|flow_aged|err_recovering|recovery_success|recovery_failed|all>``

     Enable printing the occurrence of the designated event. Using all will
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.783265093 +0800
+++ 0092-doc-add-latencystats-option-in-testpmd-guide.patch	2024-03-05 17:39:30.853566496 +0800
@@ -1 +1 @@
-From 8cd8f0a90bba2862d8044529e11276d6f6321192 Mon Sep 17 00:00:00 2001
+From ec2260423ed7747c677a1a5a4dd50643bed2254d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8cd8f0a90bba2862d8044529e11276d6f6321192 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/testpmd: hide --bitrate-stats in help if disabled' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (91 preceding siblings ...)
  2024-03-05  9:47 ` patch 'doc: add --latencystats option in testpmd guide' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/vmxnet3: fix initialization on FreeBSD' " Xueming Li
                   ` (43 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From edc0e91ffc15d513a9686dc878e6fa1442a3c2db Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 9 Jan 2024 15:09:27 -0800
Subject: [PATCH] app/testpmd: hide --bitrate-stats in help if disabled
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e96491cb91fd048a79e848d713d65d45f0dde915 ]

Like other #ifdef options, bitrate-stats should not be printed
in help if not configured.

Also reordered latencystats help string to group it with bitrate-stats.

Fixes: e25e6c70fb56 ("app/testpmd: add --bitrate-stats option")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/parameters.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index a9ca58339d..11b0cce577 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -100,10 +100,6 @@ usage(char* progname)
 	       "of peer ports.\n");
 	printf("  --eth-peer=X,M:M:M:M:M:M: set the MAC address of the X peer "
 	       "port (0 <= X < %d).\n", RTE_MAX_ETHPORTS);
-#endif
-#ifdef RTE_LIB_LATENCYSTATS
-	printf("  --latencystats=N: enable latency and jitter statistics "
-	       "monitoring on forwarding lcore id N.\n");
 #endif
 	printf("  --disable-crc-strip: disable CRC stripping by hardware.\n");
 	printf("  --enable-scatter: enable scattered Rx.\n");
@@ -167,8 +163,14 @@ usage(char* progname)
 	printf("  --disable-device-start: do not automatically start port\n");
 	printf("  --no-lsc-interrupt: disable link status change interrupt.\n");
 	printf("  --no-rmv-interrupt: disable device removal interrupt.\n");
+#ifdef RTE_LIB_BITRATESTATS
 	printf("  --bitrate-stats=N: set the logical core N to perform "
 		"bit-rate calculation.\n");
+#endif
+#ifdef RTE_LIB_LATENCYSTATS
+	printf("  --latencystats=N: enable latency and jitter statistics "
+	       "monitoring on forwarding lcore id N.\n");
+#endif
 	printf("  --print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|err_recovering|recovery_success|recovery_failed|all>: "
 	       "enable print of designated event or all of them.\n");
 	printf("  --mask-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|err_recovering|recovery_success|recovery_failed||all>: "
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.813053294 +0800
+++ 0093-app-testpmd-hide-bitrate-stats-in-help-if-disabled.patch	2024-03-05 17:39:30.853566496 +0800
@@ -1 +1 @@
-From e96491cb91fd048a79e848d713d65d45f0dde915 Mon Sep 17 00:00:00 2001
+From edc0e91ffc15d513a9686dc878e6fa1442a3c2db Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e96491cb91fd048a79e848d713d65d45f0dde915 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/vmxnet3: fix initialization on FreeBSD' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (92 preceding siblings ...)
  2024-03-05  9:47 ` patch 'app/testpmd: hide --bitrate-stats in help if disabled' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/nfp: fix device close' " Xueming Li
                   ` (42 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Lewis Donzis, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c65a2bfc264067ab34b81bad07f6f273524488ce Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 9 Jan 2024 14:23:43 +0000
Subject: [PATCH] net/vmxnet3: fix initialization on FreeBSD
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 40d5676ff1ea43cc2c121fd66d19a29a1c9107bb ]

DPDK does not support interrupts on FreeBSD, so the vmxnet3 driver
returns error when enabling interrupts as it initializes. We can fix
this by #ifdef'ing out the interrupt calls when building for FreeBSD,
allowing the driver to initialize correctly.

Fixes: 046f11619567 ("net/vmxnet3: support MSI-X interrupt")

Reported-by: Lewis Donzis <lew@perftech.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Lewis Donzis <lew@perftech.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                             | 1 +
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/.mailmap b/.mailmap
index 540a3caab7..aada8ea84c 100644
--- a/.mailmap
+++ b/.mailmap
@@ -785,6 +785,7 @@ Leszek Zygo <leszek.zygo@intel.com>
 Levend Sayar <levendsayar@gmail.com>
 Lev Faerman <lev.faerman@intel.com>
 Lewei Yang <leweix.yang@intel.com>
+Lewis Donzis <lew@perftech.com>
 Leyi Rong <leyi.rong@intel.com>
 Liang Ma <liangma@bytedance.com> <liangma@liangbit.com> <liang.j.ma@intel.com>
 Liang-Min Larry Wang <liang-min.wang@intel.com>
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index e49191718a..7032f0e324 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -257,6 +257,7 @@ vmxnet3_disable_all_intrs(struct vmxnet3_hw *hw)
 		vmxnet3_disable_intr(hw, i);
 }

+#ifndef RTE_EXEC_ENV_FREEBSD
 /*
  * Enable all intrs used by the device
  */
@@ -280,6 +281,7 @@ vmxnet3_enable_all_intrs(struct vmxnet3_hw *hw)
 			vmxnet3_enable_intr(hw, i);
 	}
 }
+#endif

 /*
  * Gets tx data ring descriptor size.
@@ -1129,6 +1131,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
 	/* Setting proper Rx Mode and issue Rx Mode Update command */
 	vmxnet3_dev_set_rxmode(hw, VMXNET3_RXM_UCAST | VMXNET3_RXM_BCAST, 1);

+#ifndef RTE_EXEC_ENV_FREEBSD
 	/* Setup interrupt callback  */
 	rte_intr_callback_register(dev->intr_handle,
 				   vmxnet3_interrupt_handler, dev);
@@ -1140,6 +1143,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)

 	/* enable all intrs */
 	vmxnet3_enable_all_intrs(hw);
+#endif

 	vmxnet3_process_events(dev);

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.839424795 +0800
+++ 0094-net-vmxnet3-fix-initialization-on-FreeBSD.patch	2024-03-05 17:39:30.863566496 +0800
@@ -1 +1 @@
-From 40d5676ff1ea43cc2c121fd66d19a29a1c9107bb Mon Sep 17 00:00:00 2001
+From c65a2bfc264067ab34b81bad07f6f273524488ce Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 40d5676ff1ea43cc2c121fd66d19a29a1c9107bb ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index d85e074fbd..32ff4ceb4b 100644
+index 540a3caab7..aada8ea84c 100644
@@ -27 +29 @@
-@@ -786,6 +786,7 @@ Leszek Zygo <leszek.zygo@intel.com>
+@@ -785,6 +785,7 @@ Leszek Zygo <leszek.zygo@intel.com>
@@ -36 +38 @@
-index b239ea3ede..1e6febb092 100644
+index e49191718a..7032f0e324 100644
@@ -39 +41 @@
-@@ -258,6 +258,7 @@ vmxnet3_disable_all_intrs(struct vmxnet3_hw *hw)
+@@ -257,6 +257,7 @@ vmxnet3_disable_all_intrs(struct vmxnet3_hw *hw)
@@ -47 +49 @@
-@@ -281,6 +282,7 @@ vmxnet3_enable_all_intrs(struct vmxnet3_hw *hw)
+@@ -280,6 +281,7 @@ vmxnet3_enable_all_intrs(struct vmxnet3_hw *hw)
@@ -55 +57 @@
-@@ -1130,6 +1132,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
+@@ -1129,6 +1131,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
@@ -63 +65 @@
-@@ -1141,6 +1144,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
+@@ -1140,6 +1143,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)

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

* patch 'net/nfp: fix device close' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (93 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/vmxnet3: fix initialization on FreeBSD' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/nfp: fix device resource freeing' " Xueming Li
                   ` (41 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Long Wu; +Cc: Chaoyong He, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 52bd57a03befe691c2bf6c2d257efbb8f2b0768e Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Thu, 14 Dec 2023 18:24:29 +0800
Subject: [PATCH] net/nfp: fix device close
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 243bbfa0f92f57851ae9369133256a622c79a2a0 ]

Close interface use "rte_eth_dev_destroy()" to destroy representor.
The "rte_eth_dev_destroy()" will call "rte_eth_dev_release_port()" but
the "rte_eth_dev_close()" also calls "rte_eth_dev_release_port()".
This will cause Segmentation fault.

Remove the "rte_eth_dev_destroy()" in nfp representor close interface.

Fixes: 7c596721ae5f ("net/nfp: fix resource leak for flower firmware")

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

diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index 02089d390e..a18b3951da 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -314,13 +314,13 @@ nfp_flower_repr_free(struct nfp_flower_representor *repr,
 {
 	switch (repr_type) {
 	case NFP_REPR_TYPE_PHYS_PORT:
-		rte_eth_dev_destroy(repr->eth_dev, nfp_flower_repr_uninit);
+		nfp_flower_repr_uninit(repr->eth_dev);
 		break;
 	case NFP_REPR_TYPE_PF:
-		rte_eth_dev_destroy(repr->eth_dev, nfp_flower_pf_repr_uninit);
+		nfp_flower_pf_repr_uninit(repr->eth_dev);
 		break;
 	case NFP_REPR_TYPE_VF:
-		rte_eth_dev_destroy(repr->eth_dev, nfp_flower_repr_uninit);
+		nfp_flower_repr_uninit(repr->eth_dev);
 		break;
 	default:
 		PMD_DRV_LOG(ERR, "Unsupported repr port type.");
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.867063196 +0800
+++ 0095-net-nfp-fix-device-close.patch	2024-03-05 17:39:30.863566496 +0800
@@ -1 +1 @@
-From 243bbfa0f92f57851ae9369133256a622c79a2a0 Mon Sep 17 00:00:00 2001
+From 52bd57a03befe691c2bf6c2d257efbb8f2b0768e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 243bbfa0f92f57851ae9369133256a622c79a2a0 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 7d8c055b80..27ea3891bd 100644
+index 02089d390e..a18b3951da 100644

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

* patch 'net/nfp: fix device resource freeing' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (94 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/nfp: fix device close' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/nfp: free switch domain ID on close' " Xueming Li
                   ` (40 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Long Wu; +Cc: Chaoyong He, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a581442d9ba98f8a21bf4e1d71e0cfa85d1e1eb1 Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Thu, 14 Dec 2023 18:24:30 +0800
Subject: [PATCH] net/nfp: fix device resource freeing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 09309f87358b3a538af47e31340898a15bb34d85 ]

Set the representor array to NULL to avoid that close interface
does not free some resource.

Representor array points to dev_private which is already freed by
'rte_eth_dev_release_port()', and 'nfp_flower_repr_dev_close()' requires
pointers to be NULL to proceed freeing other resources.

Fixes: 7c596721ae5f ("net/nfp: fix resource leak for flower firmware")

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

diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index a18b3951da..4937c0780a 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -294,17 +294,30 @@ nfp_flower_repr_tx_burst(void *tx_queue,
 static int
 nfp_flower_repr_uninit(struct rte_eth_dev *eth_dev)
 {
+	uint16_t index;
 	struct nfp_flower_representor *repr;

 	repr = eth_dev->data->dev_private;
 	rte_ring_free(repr->ring);

+	if (repr->repr_type == NFP_REPR_TYPE_PHYS_PORT) {
+		index = NFP_FLOWER_CMSG_PORT_PHYS_PORT_NUM(repr->port_id);
+		repr->app_fw_flower->phy_reprs[index] = NULL;
+	} else {
+		index = repr->vf_id;
+		repr->app_fw_flower->vf_reprs[index] = NULL;
+	}
+
 	return 0;
 }

 static int
-nfp_flower_pf_repr_uninit(__rte_unused struct rte_eth_dev *eth_dev)
+nfp_flower_pf_repr_uninit(struct rte_eth_dev *eth_dev)
 {
+	struct nfp_flower_representor *repr = eth_dev->data->dev_private;
+
+	repr->app_fw_flower->pf_repr = NULL;
+
 	return 0;
 }

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.892517897 +0800
+++ 0096-net-nfp-fix-device-resource-freeing.patch	2024-03-05 17:39:30.863566496 +0800
@@ -1 +1 @@
-From 09309f87358b3a538af47e31340898a15bb34d85 Mon Sep 17 00:00:00 2001
+From a581442d9ba98f8a21bf4e1d71e0cfa85d1e1eb1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 09309f87358b3a538af47e31340898a15bb34d85 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 27ea3891bd..5f7c1fa737 100644
+index a18b3951da..4937c0780a 100644

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

* patch 'net/nfp: free switch domain ID on close' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (95 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/nfp: fix device resource freeing' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/mana: prevent values overflow returned from RDMA layer' " Xueming Li
                   ` (39 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Long Wu; +Cc: Chaoyong He, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 84e9d93f57b58a1959237c13bb9986e854937cb3 Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Thu, 14 Dec 2023 18:24:31 +0800
Subject: [PATCH] net/nfp: free switch domain ID on close
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 20eaa8e2ebae621b32d740f6c0529e11d33519ff ]

Free domain id in close interface.

Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")

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

diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index 1dc9b4250b..326d36c3a9 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -814,6 +814,7 @@ nfp_uninit_app_fw_flower(struct nfp_pf_dev *pf_dev)
 	rte_free(app_fw_flower->pf_hw);
 	nfp_mtr_priv_uninit(pf_dev);
 	nfp_flow_priv_uninit(pf_dev);
+	rte_eth_switch_domain_free(app_fw_flower->switch_domain_id);
 	rte_free(app_fw_flower);
 }

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.916455597 +0800
+++ 0097-net-nfp-free-switch-domain-ID-on-close.patch	2024-03-05 17:39:30.863566496 +0800
@@ -1 +1 @@
-From 20eaa8e2ebae621b32d740f6c0529e11d33519ff Mon Sep 17 00:00:00 2001
+From 84e9d93f57b58a1959237c13bb9986e854937cb3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 20eaa8e2ebae621b32d740f6c0529e11d33519ff ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 94b50611f0..88a1b061e1 100644
+index 1dc9b4250b..326d36c3a9 100644

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

* patch 'net/mana: prevent values overflow returned from RDMA layer' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (96 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/nfp: free switch domain ID on close' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'drivers/net: fix buffer overflow for packet types list' " Xueming Li
                   ` (38 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7de2520f2d4c410c26528e46075739c0b7e82715 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Thu, 18 Jan 2024 10:05:37 -0800
Subject: [PATCH] net/mana: prevent values overflow returned from RDMA layer
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b7e79896c47e9b884eaed1bac439f84250fd959f ]

The device capabilities reported from RDMA layer are in int. Those
values can overflow with the data types defined in dev_info_get().

Fix this by doing a upper bound before returning those values.

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

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/mana.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 781ed76139..58257c971e 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -296,8 +296,8 @@ mana_dev_info_get(struct rte_eth_dev *dev,
 	dev_info->min_rx_bufsize = MIN_RX_BUF_SIZE;
 	dev_info->max_rx_pktlen = MANA_MAX_MTU + RTE_ETHER_HDR_LEN;

-	dev_info->max_rx_queues = priv->max_rx_queues;
-	dev_info->max_tx_queues = priv->max_tx_queues;
+	dev_info->max_rx_queues = RTE_MIN(priv->max_rx_queues, UINT16_MAX);
+	dev_info->max_tx_queues = RTE_MIN(priv->max_tx_queues, UINT16_MAX);

 	dev_info->max_mac_addrs = MANA_MAX_MAC_ADDR;
 	dev_info->max_hash_mac_addrs = 0;
@@ -338,16 +338,20 @@ mana_dev_info_get(struct rte_eth_dev *dev,

 	/* Buffer limits */
 	dev_info->rx_desc_lim.nb_min = MIN_BUFFERS_PER_QUEUE;
-	dev_info->rx_desc_lim.nb_max = priv->max_rx_desc;
+	dev_info->rx_desc_lim.nb_max = RTE_MIN(priv->max_rx_desc, UINT16_MAX);
 	dev_info->rx_desc_lim.nb_align = MIN_BUFFERS_PER_QUEUE;
-	dev_info->rx_desc_lim.nb_seg_max = priv->max_recv_sge;
-	dev_info->rx_desc_lim.nb_mtu_seg_max = priv->max_recv_sge;
+	dev_info->rx_desc_lim.nb_seg_max =
+		RTE_MIN(priv->max_recv_sge, UINT16_MAX);
+	dev_info->rx_desc_lim.nb_mtu_seg_max =
+		RTE_MIN(priv->max_recv_sge, UINT16_MAX);

 	dev_info->tx_desc_lim.nb_min = MIN_BUFFERS_PER_QUEUE;
-	dev_info->tx_desc_lim.nb_max = priv->max_tx_desc;
+	dev_info->tx_desc_lim.nb_max = RTE_MIN(priv->max_tx_desc, UINT16_MAX);
 	dev_info->tx_desc_lim.nb_align = MIN_BUFFERS_PER_QUEUE;
-	dev_info->tx_desc_lim.nb_seg_max = priv->max_send_sge;
-	dev_info->rx_desc_lim.nb_mtu_seg_max = priv->max_recv_sge;
+	dev_info->tx_desc_lim.nb_seg_max =
+		RTE_MIN(priv->max_send_sge, UINT16_MAX);
+	dev_info->tx_desc_lim.nb_mtu_seg_max =
+		RTE_MIN(priv->max_send_sge, UINT16_MAX);

 	/* Speed */
 	dev_info->speed_capa = RTE_ETH_LINK_SPEED_100G;
@@ -1385,9 +1389,9 @@ mana_probe_port(struct ibv_device *ibdev, struct ibv_device_attr_ex *dev_attr,
 	priv->max_mr = dev_attr->orig_attr.max_mr;
 	priv->max_mr_size = dev_attr->orig_attr.max_mr_size;

-	DRV_LOG(INFO, "dev %s max queues %d desc %d sge %d",
+	DRV_LOG(INFO, "dev %s max queues %d desc %d sge %d mr %" PRIu64,
 		name, priv->max_rx_queues, priv->max_rx_desc,
-		priv->max_send_sge);
+		priv->max_send_sge, priv->max_mr_size);

 	rte_eth_copy_pci_info(eth_dev, pci_dev);

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.942120198 +0800
+++ 0098-net-mana-prevent-values-overflow-returned-from-RDMA-.patch	2024-03-05 17:39:30.863566496 +0800
@@ -1 +1 @@
-From b7e79896c47e9b884eaed1bac439f84250fd959f Mon Sep 17 00:00:00 2001
+From 7de2520f2d4c410c26528e46075739c0b7e82715 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b7e79896c47e9b884eaed1bac439f84250fd959f ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'drivers/net: fix buffer overflow for packet types list' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (97 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/mana: prevent values overflow returned from RDMA layer' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'app/testpmd: fix crash in multi-process forwarding' " Xueming Li
                   ` (37 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Sivaramakrishnan Venkat; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From db4ba50b3a16b3ee2c41a4e0107544109f87987f Mon Sep 17 00:00:00 2001
From: Sivaramakrishnan Venkat <venkatx.sivaramakrishnan@intel.com>
Date: Thu, 1 Feb 2024 15:50:20 +0000
Subject: [PATCH] drivers/net: fix buffer overflow for packet types list
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2e3ddb568044308b40f60fdb2ddc62160b95b1b1 ]

Address Sanitizer detects a buffer overflow caused by an incorrect
ptypes list. Missing "RTE_PTYPE_UNKNOWN" ptype causes buffer overflow.
Fix the ptypes list for drivers.

Fixes: 0849ac3b6122 ("net/tap: add packet type management")
Fixes: a7bdc3bd4244 ("net/dpaa: support packet type parsing")
Fixes: 4ccc8d770d3b ("net/mvneta: add PMD skeleton")
Fixes: f3f0d77db6b0 ("net/mrvl: support packet type parsing")
Fixes: 71e8bb65046e ("net/nfp: update supported list of packet types")
Fixes: 659b494d3d88 ("net/pfe: add packet types and basic statistics")
Fixes: 398a1be14168 ("net/thunderx: remove generic passX references")

Signed-off-by: Sivaramakrishnan Venkat <venkatx.sivaramakrishnan@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/dpaa/dpaa_ethdev.c      | 3 ++-
 drivers/net/mvneta/mvneta_ethdev.c  | 3 ++-
 drivers/net/mvpp2/mrvl_ethdev.c     | 3 ++-
 drivers/net/nfp/nfp_net_common.c    | 1 +
 drivers/net/pfe/pfe_ethdev.c        | 3 ++-
 drivers/net/tap/rte_eth_tap.c       | 1 +
 drivers/net/thunderx/nicvf_ethdev.c | 2 ++
 7 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index ef4c06db6a..779bdc5860 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -363,7 +363,8 @@ dpaa_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_UDP,
 		RTE_PTYPE_L4_SCTP,
-		RTE_PTYPE_TUNNEL_ESP
+		RTE_PTYPE_TUNNEL_ESP,
+		RTE_PTYPE_UNKNOWN
 	};

 	PMD_INIT_FUNC_TRACE();
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index daa69e533a..212c300c14 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -198,7 +198,8 @@ mvneta_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 		RTE_PTYPE_L3_IPV4,
 		RTE_PTYPE_L3_IPV6,
 		RTE_PTYPE_L4_TCP,
-		RTE_PTYPE_L4_UDP
+		RTE_PTYPE_L4_UDP,
+		RTE_PTYPE_UNKNOWN
 	};

 	return ptypes;
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index c12364941d..4cc64c7cad 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1777,7 +1777,8 @@ mrvl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 		RTE_PTYPE_L3_IPV6_EXT,
 		RTE_PTYPE_L2_ETHER_ARP,
 		RTE_PTYPE_L4_TCP,
-		RTE_PTYPE_L4_UDP
+		RTE_PTYPE_L4_UDP,
+		RTE_PTYPE_UNKNOWN
 	};

 	return ptypes;
diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
index e969b840d6..46d0e07850 100644
--- a/drivers/net/nfp/nfp_net_common.c
+++ b/drivers/net/nfp/nfp_net_common.c
@@ -1299,6 +1299,7 @@ nfp_net_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_INNER_L4_NONFRAG,
 		RTE_PTYPE_INNER_L4_ICMP,
 		RTE_PTYPE_INNER_L4_SCTP,
+		RTE_PTYPE_UNKNOWN
 	};

 	if (dev->rx_pkt_burst != nfp_net_recv_pkts)
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 551f3cf193..0073dd7405 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -520,7 +520,8 @@ pfe_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L3_IPV6_EXT,
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_UDP,
-		RTE_PTYPE_L4_SCTP
+		RTE_PTYPE_L4_SCTP,
+		RTE_PTYPE_UNKNOWN
 	};

 	if (dev->rx_pkt_burst == pfe_recv_pkts ||
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index b41fa971cb..3fa03cdbee 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1803,6 +1803,7 @@ tap_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 		RTE_PTYPE_L4_UDP,
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_SCTP,
+		RTE_PTYPE_UNKNOWN
 	};

 	return ptypes;
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index a504d41dfe..5a0c3dc4a6 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -392,12 +392,14 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_UDP,
 		RTE_PTYPE_L4_FRAG,
+		RTE_PTYPE_UNKNOWN
 	};
 	static const uint32_t ptypes_tunnel[] = {
 		RTE_PTYPE_TUNNEL_GRE,
 		RTE_PTYPE_TUNNEL_GENEVE,
 		RTE_PTYPE_TUNNEL_VXLAN,
 		RTE_PTYPE_TUNNEL_NVGRE,
+		RTE_PTYPE_UNKNOWN
 	};
 	static const uint32_t ptypes_end = RTE_PTYPE_UNKNOWN;

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.967243999 +0800
+++ 0099-drivers-net-fix-buffer-overflow-for-packet-types-lis.patch	2024-03-05 17:39:30.873566496 +0800
@@ -1 +1 @@
-From 2e3ddb568044308b40f60fdb2ddc62160b95b1b1 Mon Sep 17 00:00:00 2001
+From db4ba50b3a16b3ee2c41a4e0107544109f87987f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2e3ddb568044308b40f60fdb2ddc62160b95b1b1 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index bb2de5de80..cf73f9d50b 100644
+index ef4c06db6a..779bdc5860 100644
@@ -60 +62 @@
-index a91509d92a..82cb8d5368 100644
+index c12364941d..4cc64c7cad 100644
@@ -74 +76 @@
-index a438eb5871..c907d9d5f6 100644
+index e969b840d6..46d0e07850 100644
@@ -77 +79 @@
-@@ -1365,6 +1365,7 @@ nfp_net_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -1299,6 +1299,7 @@ nfp_net_supported_ptypes_get(struct rte_eth_dev *dev)

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

* patch 'app/testpmd: fix crash in multi-process forwarding' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (98 preceding siblings ...)
  2024-03-05  9:47 ` patch 'drivers/net: fix buffer overflow for packet types list' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/ionic: fix missing volatile type for cqe pointers' " Xueming Li
                   ` (36 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Chengwen Feng, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 49b4ce1f949f50caa700026d9128b61231816504 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 30 Jan 2024 09:32:49 +0800
Subject: [PATCH] app/testpmd: fix crash in multi-process forwarding
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b3a33138f317d1c651cd86f423cc703176eb7b07 ]

On multi-process scenario, each process creates flows based on the
number of queues. When nbcore is greater than 1, multiple cores may
use the same queue to forward packet, like:
dpdk-testpmd -a BDF --proc-type=auto -- -i --rxq=4 --txq=4
--nb-cores=2 --num-procs=2 --proc-id=0
testpmd> start
mac packet forwarding - ports=1 - cores=2 - streams=4 - NUMA support
enabled, MP allocation mode: native
Logical Core 2 (socket 0) forwards packets on 2 streams:
  RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
  RX P=0/Q=1 (socket 0) -> TX P=0/Q=1 (socket 0) peer=02:00:00:00:00:00
Logical Core 3 (socket 0) forwards packets on 2 streams:
  RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
  RX P=0/Q=1 (socket 0) -> TX P=0/Q=1 (socket 0) peer=02:00:00:00:00:00

After this commit, the result will be:
dpdk-testpmd -a BDF --proc-type=auto -- -i --rxq=4 --txq=4
--nb-cores=2 --num-procs=2 --proc-id=0
testpmd> start
io packet forwarding - ports=1 - cores=2 - streams=2 - NUMA support
enabled, MP allocation mode: native
Logical Core 2 (socket 0) forwards packets on 1 streams:
  RX P=0/Q=0 (socket 2) -> TX P=0/Q=0 (socket 2) peer=02:00:00:00:00:00
Logical Core 3 (socket 0) forwards packets on 1 streams:
  RX P=0/Q=1 (socket 2) -> TX P=0/Q=1 (socket 2) peer=02:00:00:00:00:00

Fixes: a550baf24af9 ("app/testpmd: support multi-process")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/config.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cad7537bc6..2c4dedd603 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4794,7 +4794,6 @@ rss_fwd_config_setup(void)
 	queueid_t  nb_q;
 	streamid_t  sm_id;
 	int start;
-	int end;

 	nb_q = nb_rxq;
 	if (nb_q > nb_txq)
@@ -4802,7 +4801,7 @@ rss_fwd_config_setup(void)
 	cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores;
 	cur_fwd_config.nb_fwd_ports = nb_fwd_ports;
 	cur_fwd_config.nb_fwd_streams =
-		(streamid_t) (nb_q * cur_fwd_config.nb_fwd_ports);
+		(streamid_t) (nb_q / num_procs * cur_fwd_config.nb_fwd_ports);

 	if (cur_fwd_config.nb_fwd_streams < cur_fwd_config.nb_fwd_lcores)
 		cur_fwd_config.nb_fwd_lcores =
@@ -4824,7 +4823,6 @@ rss_fwd_config_setup(void)
 	 * the 2~3 queue for secondary process.
 	 */
 	start = proc_id * nb_q / num_procs;
-	end = start + nb_q / num_procs;
 	rxp = 0;
 	rxq = start;
 	for (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) {
@@ -4843,8 +4841,6 @@ rss_fwd_config_setup(void)
 			continue;
 		rxp = 0;
 		rxq++;
-		if (rxq >= end)
-			rxq = start;
 	}
 }

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.997079900 +0800
+++ 0100-app-testpmd-fix-crash-in-multi-process-forwarding.patch	2024-03-05 17:39:30.873566496 +0800
@@ -1 +1 @@
-From b3a33138f317d1c651cd86f423cc703176eb7b07 Mon Sep 17 00:00:00 2001
+From 49b4ce1f949f50caa700026d9128b61231816504 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b3a33138f317d1c651cd86f423cc703176eb7b07 ]
@@ -33 +35,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ionic: fix missing volatile type for cqe pointers' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (99 preceding siblings ...)
  2024-03-05  9:47 ` patch 'app/testpmd: fix crash in multi-process forwarding' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/ionic: fix RSS query' " Xueming Li
                   ` (35 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Neel Patel; +Cc: Andrew Boyer, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2ea5bde55737cf3bbb8e6767267261e686e6f85d Mon Sep 17 00:00:00 2001
From: Neel Patel <neel.patel@amd.com>
Date: Tue, 6 Feb 2024 19:13:08 -0800
Subject: [PATCH] net/ionic: fix missing volatile type for cqe pointers
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 463ad260d35ee5934ab206d392a1a3e08b5506d0 ]

This memory may be changed by the hardware, so the volatile
keyword is required for correctness.

Fixes: e86a6fcc7cf3 ("net/ionic: add optimized non-scattered Rx/Tx")

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
Signed-off-by: Neel Patel <neel.patel@amd.com>
---
 drivers/net/ionic/ionic_rxtx.c        | 4 ++--
 drivers/net/ionic/ionic_rxtx_sg.c     | 8 +++++---
 drivers/net/ionic/ionic_rxtx_simple.c | 8 +++++---
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index b9e73b4871..2f1ca986b3 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -752,7 +752,7 @@ ionic_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
 	struct ionic_rx_qcq *rxq = rx_queue;
 	struct ionic_qcq *qcq = &rxq->qcq;
-	struct ionic_rxq_comp *cq_desc;
+	volatile struct ionic_rxq_comp *cq_desc;
 	uint16_t mask, head, tail, pos;
 	bool done_color;

@@ -791,7 +791,7 @@ ionic_dev_tx_descriptor_status(void *tx_queue, uint16_t offset)
 {
 	struct ionic_tx_qcq *txq = tx_queue;
 	struct ionic_qcq *qcq = &txq->qcq;
-	struct ionic_txq_comp *cq_desc;
+	volatile struct ionic_txq_comp *cq_desc;
 	uint16_t mask, head, tail, pos, cq_pos;
 	bool done_color;

diff --git a/drivers/net/ionic/ionic_rxtx_sg.c b/drivers/net/ionic/ionic_rxtx_sg.c
index ab8e56e91c..241b6f8587 100644
--- a/drivers/net/ionic/ionic_rxtx_sg.c
+++ b/drivers/net/ionic/ionic_rxtx_sg.c
@@ -27,7 +27,8 @@ ionic_tx_flush_sg(struct ionic_tx_qcq *txq)
 	struct ionic_cq *cq = &txq->qcq.cq;
 	struct ionic_queue *q = &txq->qcq.q;
 	struct rte_mbuf *txm;
-	struct ionic_txq_comp *cq_desc, *cq_desc_base = cq->base;
+	struct ionic_txq_comp *cq_desc_base = cq->base;
+	volatile struct ionic_txq_comp *cq_desc;
 	void **info;
 	uint32_t i;

@@ -252,7 +253,7 @@ ionic_xmit_pkts_sg(void *tx_queue, struct rte_mbuf **tx_pkts,
  */
 static __rte_always_inline void
 ionic_rx_clean_one_sg(struct ionic_rx_qcq *rxq,
-		struct ionic_rxq_comp *cq_desc,
+		volatile struct ionic_rxq_comp *cq_desc,
 		struct ionic_rx_service *rx_svc)
 {
 	struct ionic_queue *q = &rxq->qcq.q;
@@ -438,7 +439,8 @@ ionic_rxq_service_sg(struct ionic_rx_qcq *rxq, uint32_t work_to_do,
 	struct ionic_cq *cq = &rxq->qcq.cq;
 	struct ionic_queue *q = &rxq->qcq.q;
 	struct ionic_rxq_desc *q_desc_base = q->base;
-	struct ionic_rxq_comp *cq_desc, *cq_desc_base = cq->base;
+	struct ionic_rxq_comp *cq_desc_base = cq->base;
+	volatile struct ionic_rxq_comp *cq_desc;
 	uint32_t work_done = 0;
 	uint64_t then, now, hz, delta;

diff --git a/drivers/net/ionic/ionic_rxtx_simple.c b/drivers/net/ionic/ionic_rxtx_simple.c
index 5f81856256..0992177afc 100644
--- a/drivers/net/ionic/ionic_rxtx_simple.c
+++ b/drivers/net/ionic/ionic_rxtx_simple.c
@@ -27,7 +27,8 @@ ionic_tx_flush(struct ionic_tx_qcq *txq)
 	struct ionic_cq *cq = &txq->qcq.cq;
 	struct ionic_queue *q = &txq->qcq.q;
 	struct rte_mbuf *txm;
-	struct ionic_txq_comp *cq_desc, *cq_desc_base = cq->base;
+	struct ionic_txq_comp *cq_desc_base = cq->base;
+	volatile struct ionic_txq_comp *cq_desc;
 	void **info;

 	cq_desc = &cq_desc_base[cq->tail_idx];
@@ -225,7 +226,7 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
  */
 static __rte_always_inline void
 ionic_rx_clean_one(struct ionic_rx_qcq *rxq,
-		struct ionic_rxq_comp *cq_desc,
+		volatile struct ionic_rxq_comp *cq_desc,
 		struct ionic_rx_service *rx_svc)
 {
 	struct ionic_queue *q = &rxq->qcq.q;
@@ -359,7 +360,8 @@ ionic_rxq_service(struct ionic_rx_qcq *rxq, uint32_t work_to_do,
 	struct ionic_cq *cq = &rxq->qcq.cq;
 	struct ionic_queue *q = &rxq->qcq.q;
 	struct ionic_rxq_desc *q_desc_base = q->base;
-	struct ionic_rxq_comp *cq_desc, *cq_desc_base = cq->base;
+	struct ionic_rxq_comp *cq_desc_base = cq->base;
+	volatile struct ionic_rxq_comp *cq_desc;
 	uint32_t work_done = 0;
 	uint64_t then, now, hz, delta;

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.026525001 +0800
+++ 0101-net-ionic-fix-missing-volatile-type-for-cqe-pointers.patch	2024-03-05 17:39:30.883566497 +0800
@@ -1 +1 @@
-From 463ad260d35ee5934ab206d392a1a3e08b5506d0 Mon Sep 17 00:00:00 2001
+From 2ea5bde55737cf3bbb8e6767267261e686e6f85d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 463ad260d35ee5934ab206d392a1a3e08b5506d0 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index e7a0e16ae1..8a9c5ae191 100644
+index b9e73b4871..2f1ca986b3 100644
@@ -24 +26 @@
-@@ -756,7 +756,7 @@ ionic_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
+@@ -752,7 +752,7 @@ ionic_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
@@ -33 +35 @@
-@@ -795,7 +795,7 @@ ionic_dev_tx_descriptor_status(void *tx_queue, uint16_t offset)
+@@ -791,7 +791,7 @@ ionic_dev_tx_descriptor_status(void *tx_queue, uint16_t offset)
@@ -43 +45 @@
-index 6c028a698c..1392342463 100644
+index ab8e56e91c..241b6f8587 100644
@@ -46 +48,2 @@
-@@ -28,7 +28,8 @@ ionic_tx_flush_sg(struct ionic_tx_qcq *txq)
+@@ -27,7 +27,8 @@ ionic_tx_flush_sg(struct ionic_tx_qcq *txq)
+ 	struct ionic_cq *cq = &txq->qcq.cq;
@@ -48 +50,0 @@
- 	struct ionic_tx_stats *stats = &txq->stats;
@@ -56 +58 @@
-@@ -254,7 +255,7 @@ ionic_xmit_pkts_sg(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -252,7 +253,7 @@ ionic_xmit_pkts_sg(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -65 +67 @@
-@@ -440,7 +441,8 @@ ionic_rxq_service_sg(struct ionic_rx_qcq *rxq, uint32_t work_to_do,
+@@ -438,7 +439,8 @@ ionic_rxq_service_sg(struct ionic_rx_qcq *rxq, uint32_t work_to_do,
@@ -76 +78 @@
-index 5969287b66..00152c885a 100644
+index 5f81856256..0992177afc 100644
@@ -79 +81,2 @@
-@@ -28,7 +28,8 @@ ionic_tx_flush(struct ionic_tx_qcq *txq)
+@@ -27,7 +27,8 @@ ionic_tx_flush(struct ionic_tx_qcq *txq)
+ 	struct ionic_cq *cq = &txq->qcq.cq;
@@ -81 +83,0 @@
- 	struct ionic_tx_stats *stats = &txq->stats;
@@ -89 +91 @@
-@@ -227,7 +228,7 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -225,7 +226,7 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -98 +100 @@
-@@ -361,7 +362,8 @@ ionic_rxq_service(struct ionic_rx_qcq *rxq, uint32_t work_to_do,
+@@ -359,7 +360,8 @@ ionic_rxq_service(struct ionic_rx_qcq *rxq, uint32_t work_to_do,

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

* patch 'net/ionic: fix RSS query' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (100 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/ionic: fix missing volatile type for cqe pointers' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/ionic: fix device close' " Xueming Li
                   ` (34 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Akshay Dorwat; +Cc: Andrew Boyer, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9583f634f31a41bf41c38f0b6f60b41c41fd61eb Mon Sep 17 00:00:00 2001
From: Akshay Dorwat <akshay.dorwat@amd.com>
Date: Tue, 6 Feb 2024 19:13:11 -0800
Subject: [PATCH] net/ionic: fix RSS query
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1df32bfd0317a3c8aed1e91b51ca2aa8317812e4 ]

The routine that copies out the RSS config can't use memcpy() because
'reta_conf->reta' is an array of uint16_t while 'lif->rss_ind_tbl' is
an array of uint8_t. Instead, copy the values individually.

Fixes: 22e7171bc63b ("net/ionic: support RSS")

Signed-off-by: Akshay Dorwat <akshay.dorwat@amd.com>
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 .mailmap                         | 1 +
 drivers/net/ionic/ionic_ethdev.c | 9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.mailmap b/.mailmap
index aada8ea84c..65c0e8e0ac 100644
--- a/.mailmap
+++ b/.mailmap
@@ -29,6 +29,7 @@ Akash Saxena <akash.saxena@caviumnetworks.com>
 Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
 Akhil Goyal <gakhil@marvell.com> <akhil.goyal@nxp.com>
 Akihiko Odaki <akihiko.odaki@daynix.com>
+Akshay Dorwat <akshay.dorwat@amd.com>
 Alain Leon <xerebz@gmail.com>
 Alan Brady <alan.brady@intel.com>
 Alan Carew <alan.carew@intel.com>
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 340fd0cd59..008e50e0b9 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -561,7 +561,7 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
 	struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
 	struct ionic_adapter *adapter = lif->adapter;
 	struct ionic_identity *ident = &adapter->ident;
-	int i, num;
+	int i, j, num;
 	uint16_t tbl_sz = rte_le_to_cpu_16(ident->lif.eth.rss_ind_tbl_sz);

 	IONIC_PRINT_CALL();
@@ -582,9 +582,10 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
 	num = reta_size / RTE_ETH_RETA_GROUP_SIZE;

 	for (i = 0; i < num; i++) {
-		memcpy(reta_conf->reta,
-			&lif->rss_ind_tbl[i * RTE_ETH_RETA_GROUP_SIZE],
-			RTE_ETH_RETA_GROUP_SIZE);
+		for (j = 0; j < RTE_ETH_RETA_GROUP_SIZE; j++) {
+			reta_conf->reta[j] =
+				lif->rss_ind_tbl[(i * RTE_ETH_RETA_GROUP_SIZE) + j];
+		}
 		reta_conf++;
 	}

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.054127802 +0800
+++ 0102-net-ionic-fix-RSS-query.patch	2024-03-05 17:39:30.883566497 +0800
@@ -1 +1 @@
-From 1df32bfd0317a3c8aed1e91b51ca2aa8317812e4 Mon Sep 17 00:00:00 2001
+From 9583f634f31a41bf41c38f0b6f60b41c41fd61eb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1df32bfd0317a3c8aed1e91b51ca2aa8317812e4 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index d066dc35b6..dc7cd0497d 100644
+index aada8ea84c..65c0e8e0ac 100644

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

* patch 'net/ionic: fix device close' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (101 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/ionic: fix RSS query' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/bonding: fix flow count query' " Xueming Li
                   ` (33 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Andrew Boyer; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1ce60b941d17ee06fec8c363f8e58a6db0616af0 Mon Sep 17 00:00:00 2001
From: Andrew Boyer <andrew.boyer@amd.com>
Date: Tue, 6 Feb 2024 19:13:14 -0800
Subject: [PATCH] net/ionic: fix device close
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 73028be3b4d4d52f5d73becfd22bff3f57a81252 ]

The close routine should release all resources, but not
call rte_eth_dev_destroy(). As written this code will call
rte_eth_dev_release_port() twice and segfault.

Instead, move rte_eth_dev_destroy() to the remove routine.
eth_ionic_dev_uninit() will call close if necessary.

Fixes: 175e4e7ed760 ("net/ionic: complete release on close")

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_ethdev.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 008e50e0b9..4ec9598b8e 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -970,19 +970,21 @@ ionic_dev_close(struct rte_eth_dev *eth_dev)

 	ionic_lif_stop(lif);

-	ionic_lif_free_queues(lif);
-
 	IONIC_PRINT(NOTICE, "Removing device %s", eth_dev->device->name);
 	if (adapter->intf->unconfigure_intr)
 		(*adapter->intf->unconfigure_intr)(adapter);

-	rte_eth_dev_destroy(eth_dev, eth_ionic_dev_uninit);
-
 	ionic_port_reset(adapter);
 	ionic_reset(adapter);
+
+	ionic_lif_free_queues(lif);
+	ionic_lif_deinit(lif);
+	ionic_lif_free(lif); /* Does not free LIF object */
+
 	if (adapter->intf->unmap_bars)
 		(*adapter->intf->unmap_bars)(adapter);

+	lif->adapter = NULL;
 	rte_free(adapter);

 	return 0;
@@ -1059,21 +1061,18 @@ err:
 static int
 eth_ionic_dev_uninit(struct rte_eth_dev *eth_dev)
 {
-	struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
-	struct ionic_adapter *adapter = lif->adapter;
-
 	IONIC_PRINT_CALL();

 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;

-	adapter->lif = NULL;
-
-	ionic_lif_deinit(lif);
-	ionic_lif_free(lif);
+	if (eth_dev->state != RTE_ETH_DEV_UNUSED)
+		ionic_dev_close(eth_dev);

-	if (!(lif->state & IONIC_LIF_F_FW_RESET))
-		ionic_lif_reset(lif);
+	eth_dev->dev_ops = NULL;
+	eth_dev->rx_pkt_burst = NULL;
+	eth_dev->tx_pkt_burst = NULL;
+	eth_dev->tx_pkt_prepare = NULL;

 	return 0;
 }
@@ -1228,17 +1227,18 @@ eth_ionic_dev_remove(struct rte_device *rte_dev)
 {
 	char name[RTE_ETH_NAME_MAX_LEN];
 	struct rte_eth_dev *eth_dev;
+	int ret = 0;

 	/* Adapter lookup is using the eth_dev name */
 	snprintf(name, sizeof(name), "%s_lif", rte_dev->name);

 	eth_dev = rte_eth_dev_allocated(name);
 	if (eth_dev)
-		ionic_dev_close(eth_dev);
+		ret = rte_eth_dev_destroy(eth_dev, eth_ionic_dev_uninit);
 	else
 		IONIC_PRINT(DEBUG, "Cannot find device %s", rte_dev->name);

-	return 0;
+	return ret;
 }

 RTE_LOG_REGISTER_DEFAULT(ionic_logtype, NOTICE);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.091610403 +0800
+++ 0103-net-ionic-fix-device-close.patch	2024-03-05 17:39:30.883566497 +0800
@@ -1 +1 @@
-From 73028be3b4d4d52f5d73becfd22bff3f57a81252 Mon Sep 17 00:00:00 2001
+From 1ce60b941d17ee06fec8c363f8e58a6db0616af0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 73028be3b4d4d52f5d73becfd22bff3f57a81252 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 7c55a26956..bedcf958e2 100644
+index 008e50e0b9..4ec9598b8e 100644
@@ -25 +27 @@
-@@ -1009,19 +1009,21 @@ ionic_dev_close(struct rte_eth_dev *eth_dev)
+@@ -970,19 +970,21 @@ ionic_dev_close(struct rte_eth_dev *eth_dev)
@@ -51 +53 @@
-@@ -1098,21 +1100,18 @@ err:
+@@ -1059,21 +1061,18 @@ err:
@@ -79 +81 @@
-@@ -1267,17 +1266,18 @@ eth_ionic_dev_remove(struct rte_device *rte_dev)
+@@ -1228,17 +1227,18 @@ eth_ionic_dev_remove(struct rte_device *rte_dev)

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

* patch 'net/bonding: fix flow count query' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (102 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/ionic: fix device close' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/mana: fix memory leak on MR allocation' " Xueming Li
                   ` (32 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Mário Kuka; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3fb48407081ae377a19ebed021b03896a904c2ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A1rio=20Kuka?= <kuka@cesnet.cz>
Date: Wed, 3 Jan 2024 12:10:35 +0100
Subject: [PATCH] net/bonding: fix flow count query
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 02a2accb5f54183d448edf35902b71023ab908ac ]

The rte_flow_query_count structure returned from the bonding driver
always indicates that hits and bytes are invalid (bytes_set and
hits_set flags are zero) because bond_flow_query_count() from the
net/bonding driver does not set the bytes_set and hits_set flags.

Fixes: 49dad9028e2a ("net/bonding: support flow API")

Signed-off-by: Mário Kuka <kuka@cesnet.cz>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/bonding/rte_eth_bond_flow.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_flow.c b/drivers/net/bonding/rte_eth_bond_flow.c
index 71a91675f7..5d0be5caf5 100644
--- a/drivers/net/bonding/rte_eth_bond_flow.c
+++ b/drivers/net/bonding/rte_eth_bond_flow.c
@@ -180,6 +180,8 @@ bond_flow_query_count(struct rte_eth_dev *dev, struct rte_flow *flow,

 	count->bytes = 0;
 	count->hits = 0;
+	count->bytes_set = 0;
+	count->hits_set = 0;
 	rte_memcpy(&member_count, count, sizeof(member_count));
 	for (i = 0; i < internals->member_count; i++) {
 		ret = rte_flow_query(internals->members[i].port_id,
@@ -192,8 +194,12 @@ bond_flow_query_count(struct rte_eth_dev *dev, struct rte_flow *flow,
 		}
 		count->bytes += member_count.bytes;
 		count->hits += member_count.hits;
+		count->bytes_set |= member_count.bytes_set;
+		count->hits_set |= member_count.hits_set;
 		member_count.bytes = 0;
 		member_count.hits = 0;
+		member_count.bytes_set = 0;
+		member_count.hits_set = 0;
 	}
 	return 0;
 }
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.125738104 +0800
+++ 0104-net-bonding-fix-flow-count-query.patch	2024-03-05 17:39:30.883566497 +0800
@@ -1 +1 @@
-From 02a2accb5f54183d448edf35902b71023ab908ac Mon Sep 17 00:00:00 2001
+From 3fb48407081ae377a19ebed021b03896a904c2ad Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 02a2accb5f54183d448edf35902b71023ab908ac ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/mana: fix memory leak on MR allocation' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (103 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/bonding: fix flow count query' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/mana: handle MR cache expansion failure' " Xueming Li
                   ` (31 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6679de7a8f35b249bc00f264807bdaf0b90651d9 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Thu, 8 Feb 2024 16:05:03 -0800
Subject: [PATCH] net/mana: fix memory leak on MR allocation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9d61fe41acaaf6bf88c173acce2b3165ddf0eb9d ]

Use a MR on the stack instead of allocating it. This fixes the memory
leak in the code where a MR is allocated but never freed.

Fixes: 0f5db3c68ba7 ("net/mana: implement memory registration")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/mr.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/net/mana/mr.c b/drivers/net/mana/mr.c
index b8e6ea0bbf..dfb2412834 100644
--- a/drivers/net/mana/mr.c
+++ b/drivers/net/mana/mr.c
@@ -40,7 +40,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 	struct ibv_mr *ibv_mr;
 	struct mana_range ranges[pool->nb_mem_chunks];
 	uint32_t i;
-	struct mana_mr_cache *mr;
+	struct mana_mr_cache mr;
 	int ret;

 	rte_mempool_mem_iter(pool, mana_mempool_chunk_cb, ranges);
@@ -75,14 +75,13 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 			DP_LOG(DEBUG, "MR lkey %u addr %p len %zu",
 			       ibv_mr->lkey, ibv_mr->addr, ibv_mr->length);

-			mr = rte_calloc("MANA MR", 1, sizeof(*mr), 0);
-			mr->lkey = ibv_mr->lkey;
-			mr->addr = (uintptr_t)ibv_mr->addr;
-			mr->len = ibv_mr->length;
-			mr->verb_obj = ibv_mr;
+			mr.lkey = ibv_mr->lkey;
+			mr.addr = (uintptr_t)ibv_mr->addr;
+			mr.len = ibv_mr->length;
+			mr.verb_obj = ibv_mr;

 			rte_spinlock_lock(&priv->mr_btree_lock);
-			ret = mana_mr_btree_insert(&priv->mr_btree, mr);
+			ret = mana_mr_btree_insert(&priv->mr_btree, &mr);
 			rte_spinlock_unlock(&priv->mr_btree_lock);
 			if (ret) {
 				ibv_dereg_mr(ibv_mr);
@@ -90,7 +89,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 				return ret;
 			}

-			ret = mana_mr_btree_insert(local_tree, mr);
+			ret = mana_mr_btree_insert(local_tree, &mr);
 			if (ret) {
 				/* Don't need to clean up MR as it's already
 				 * in the global tree
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.152729805 +0800
+++ 0105-net-mana-fix-memory-leak-on-MR-allocation.patch	2024-03-05 17:39:30.893566497 +0800
@@ -1 +1 @@
-From 9d61fe41acaaf6bf88c173acce2b3165ddf0eb9d Mon Sep 17 00:00:00 2001
+From 6679de7a8f35b249bc00f264807bdaf0b90651d9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9d61fe41acaaf6bf88c173acce2b3165ddf0eb9d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index d6a5ad1460..c9d0f7ef5a 100644
+index b8e6ea0bbf..dfb2412834 100644

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

* patch 'net/mana: handle MR cache expansion failure' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (104 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/mana: fix memory leak on MR allocation' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'common/sfc_efx/base: use C11 static assert' " Xueming Li
                   ` (30 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 216918c28c77c571c4e1f3bbcc6140df9062f2f5 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Thu, 8 Feb 2024 16:05:04 -0800
Subject: [PATCH] net/mana: handle MR cache expansion failure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0c7bc26bb0b39bfe8999f422329bd52861b43a72 ]

On MR cache expansion failure, the request should fail as there is no
path to get a new MR into the tree. Attempting to insert a new MR to the
cache tree will result in memory violation.

Fixes: 0f5db3c68ba7 ("net/mana: implement memory registration")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/mana.h |  6 +++---
 drivers/net/mana/mr.c   | 45 ++++++++++++++++++++++++++++-------------
 2 files changed, 34 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h
index 6836872dc2..822b8a1f15 100644
--- a/drivers/net/mana/mana.h
+++ b/drivers/net/mana/mana.h
@@ -522,9 +522,9 @@ void mana_del_pmd_mr(struct mana_mr_cache *mr);
 void mana_mempool_chunk_cb(struct rte_mempool *mp, void *opaque,
 			   struct rte_mempool_memhdr *memhdr, unsigned int idx);

-struct mana_mr_cache *mana_mr_btree_lookup(struct mana_mr_btree *bt,
-					   uint16_t *idx,
-					   uintptr_t addr, size_t len);
+int mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
+			 uintptr_t addr, size_t len,
+			 struct mana_mr_cache **cache);
 int mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry);
 int mana_mr_btree_init(struct mana_mr_btree *bt, int n, int socket);
 void mana_mr_btree_free(struct mana_mr_btree *bt);
diff --git a/drivers/net/mana/mr.c b/drivers/net/mana/mr.c
index dfb2412834..eb6d073a95 100644
--- a/drivers/net/mana/mr.c
+++ b/drivers/net/mana/mr.c
@@ -137,8 +137,12 @@ mana_find_pmd_mr(struct mana_mr_btree *local_mr_btree, struct mana_priv *priv,

 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);
+	ret = mana_mr_btree_lookup(local_mr_btree, &idx,
+				   (uintptr_t)mbuf->buf_addr, mbuf->buf_len,
+				   &mr);
+	if (ret)
+		return NULL;
+
 	if (mr) {
 		DP_LOG(DEBUG, "Local mr lkey %u addr 0x%" PRIxPTR " len %zu",
 		       mr->lkey, mr->addr, mr->len);
@@ -147,11 +151,14 @@ try_again:

 	/* If not found, try to find the MR in global tree */
 	rte_spinlock_lock(&priv->mr_btree_lock);
-	mr = mana_mr_btree_lookup(&priv->mr_btree, &idx,
-				  (uintptr_t)mbuf->buf_addr,
-				  mbuf->buf_len);
+	ret = mana_mr_btree_lookup(&priv->mr_btree, &idx,
+				   (uintptr_t)mbuf->buf_addr,
+				   mbuf->buf_len, &mr);
 	rte_spinlock_unlock(&priv->mr_btree_lock);

+	if (ret)
+		return NULL;
+
 	/* If found in the global tree, add it to the local tree */
 	if (mr) {
 		ret = mana_mr_btree_insert(local_mr_btree, mr);
@@ -227,22 +234,23 @@ mana_mr_btree_expand(struct mana_mr_btree *bt, int n)
 /*
  * Look for a region of memory in MR cache.
  */
-struct mana_mr_cache *
-mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
-		     uintptr_t addr, size_t len)
+int mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
+			 uintptr_t addr, size_t len,
+			 struct mana_mr_cache **cache)
 {
 	struct mana_mr_cache *table;
 	uint16_t n;
 	uint16_t base = 0;
 	int ret;

-	n = bt->len;
+	*cache = NULL;

+	n = bt->len;
 	/* Try to double the cache if it's full */
 	if (n == bt->size) {
 		ret = mana_mr_btree_expand(bt, bt->size << 1);
 		if (ret)
-			return NULL;
+			return ret;
 	}

 	table = bt->table;
@@ -261,14 +269,16 @@ mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,

 	*idx = base;

-	if (addr + len <= table[base].addr + table[base].len)
-		return &table[base];
+	if (addr + len <= table[base].addr + table[base].len) {
+		*cache = &table[base];
+		return 0;
+	}

 	DP_LOG(DEBUG,
 	       "addr 0x%" PRIxPTR " len %zu idx %u sum 0x%" PRIxPTR " not found",
 	       addr, len, *idx, addr + len);

-	return NULL;
+	return 0;
 }

 int
@@ -313,14 +323,21 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry)
 	struct mana_mr_cache *table;
 	uint16_t idx = 0;
 	uint16_t shift;
+	int ret;
+
+	ret = mana_mr_btree_lookup(bt, &idx, entry->addr, entry->len, &table);
+	if (ret)
+		return ret;

-	if (mana_mr_btree_lookup(bt, &idx, entry->addr, entry->len)) {
+	if (table) {
 		DP_LOG(DEBUG, "Addr 0x%" PRIxPTR " len %zu exists in btree",
 		       entry->addr, entry->len);
 		return 0;
 	}

 	if (bt->len >= bt->size) {
+		DP_LOG(ERR, "Btree overflow detected len %u size %u",
+		       bt->len, bt->size);
 		bt->overflow = 1;
 		return -1;
 	}
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.177888506 +0800
+++ 0106-net-mana-handle-MR-cache-expansion-failure.patch	2024-03-05 17:39:30.893566497 +0800
@@ -1 +1 @@
-From 0c7bc26bb0b39bfe8999f422329bd52861b43a72 Mon Sep 17 00:00:00 2001
+From 216918c28c77c571c4e1f3bbcc6140df9062f2f5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0c7bc26bb0b39bfe8999f422329bd52861b43a72 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 4c56e6f746..3626925871 100644
+index 6836872dc2..822b8a1f15 100644
@@ -23 +25 @@
-@@ -523,9 +523,9 @@ void mana_del_pmd_mr(struct mana_mr_cache *mr);
+@@ -522,9 +522,9 @@ void mana_del_pmd_mr(struct mana_mr_cache *mr);
@@ -37 +39 @@
-index c9d0f7ef5a..c4045141bc 100644
+index dfb2412834..eb6d073a95 100644
@@ -40 +42 @@
-@@ -138,8 +138,12 @@ mana_alloc_pmd_mr(struct mana_mr_btree *local_mr_btree, struct mana_priv *priv,
+@@ -137,8 +137,12 @@ mana_find_pmd_mr(struct mana_mr_btree *local_mr_btree, struct mana_priv *priv,
@@ -55 +57 @@
-@@ -148,11 +152,14 @@ try_again:
+@@ -147,11 +151,14 @@ try_again:
@@ -73 +75 @@
-@@ -228,22 +235,23 @@ mana_mr_btree_expand(struct mana_mr_btree *bt, int n)
+@@ -227,22 +234,23 @@ mana_mr_btree_expand(struct mana_mr_btree *bt, int n)
@@ -102 +104 @@
-@@ -262,14 +270,16 @@ mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
+@@ -261,14 +269,16 @@ mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
@@ -122 +124 @@
-@@ -314,14 +324,21 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry)
+@@ -313,14 +323,21 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry)

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

* patch 'common/sfc_efx/base: use C11 static assert' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (105 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/mana: handle MR cache expansion failure' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' " Xueming Li
                   ` (29 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c7b50f40e114efaacade1feaaf11f8f6ff3d6bbb Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sun, 11 Feb 2024 21:48:59 -0800
Subject: [PATCH] common/sfc_efx/base: use C11 static assert
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 047d7032b76a226f2f1c36775688950933f9121b ]

The sfc base code had its own definition of static assertions
using the out of bound array access hack. Replace it with a
static_assert like rte_common.h.

The use of null pointer to compute offset is not always a constant
in older versions of clang. Use standard offsetof() instead.

Fixes: f67e4719147d ("net/sfc/base: fix coding style")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/efx.h | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index 3312c2fa8f..5773cb00b3 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -7,6 +7,8 @@
 #ifndef	_SYS_EFX_H
 #define	_SYS_EFX_H

+#include <assert.h>
+
 #include "efx_annote.h"
 #include "efsys.h"
 #include "efx_types.h"
@@ -17,14 +19,20 @@
 extern "C" {
 #endif

-#define	EFX_STATIC_ASSERT(_cond)		\
-	((void)sizeof (char[(_cond) ? 1 : -1]))
+/*
+ * Triggers an error at compilation time if the condition is false.
+ *
+ * The  { } exists to workaround a bug in clang (#55821)
+ * where it would not handle _Static_assert in a switch case.
+ */
+#define	EFX_STATIC_ASSERT(_cond) \
+	{ static_assert((_cond), #_cond); }

 #define	EFX_ARRAY_SIZE(_array)			\
 	(sizeof (_array) / sizeof ((_array)[0]))

 #define	EFX_FIELD_OFFSET(_type, _field)		\
-	((size_t)&(((_type *)0)->_field))
+	offsetof(_type, _field)

 /* The macro expands divider twice */
 #define	EFX_DIV_ROUND_UP(_n, _d)		(((_n) + (_d) - 1) / (_d))
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.203637107 +0800
+++ 0107-common-sfc_efx-base-use-C11-static-assert.patch	2024-03-05 17:39:30.893566497 +0800
@@ -1 +1 @@
-From 047d7032b76a226f2f1c36775688950933f9121b Mon Sep 17 00:00:00 2001
+From c7b50f40e114efaacade1feaaf11f8f6ff3d6bbb Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 047d7032b76a226f2f1c36775688950933f9121b ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (106 preceding siblings ...)
  2024-03-05  9:47 ` patch 'common/sfc_efx/base: use C11 static assert' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/softnic: fix include of log library' " Xueming Li
                   ` (28 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Wathsala Vithanage
  Cc: Liangxing Wang, Ruifeng Wang, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From edaeda9ef7ec00ecce31b4e5d16158e60fb1e15f Mon Sep 17 00:00:00 2001
From: Wathsala Vithanage <wathsala.vithanage@arm.com>
Date: Wed, 14 Feb 2024 00:36:16 +0000
Subject: [PATCH] net/memif: fix extra mbuf refcnt update in zero copy Tx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit aa3e97fcb55d7b68fef864aa76078bdae375ad3d ]

The refcnt update of stored mbufs in memif driver is redundant since
those mbufs are only freed in eth_memif_tx_zc(). No other place can
free those stored mbufs quietly. By removing this redundant update
single core dpdk memif performance can be improved by 7.5%.

testpmd stats on Arm Neoverse N1 (Ampere Altra)
+-----------------------------+-----------------------+
|        | With refcnt update | Without refcnt update |
+--------+--------------------+-----------------------+
| Rx-pps |      2748851       |         2955487       |
+--------+--------------------+-----------------------+
| Tx-pps |      2748812       |         2955436       |
+--------+--------------------+-----------------------+

Fixes: 43b815d88188 ("net/memif: support zero-copy slave")

Signed-off-by: Liangxing Wang <liangxing.wang@arm.com>
Signed-off-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                          | 1 +
 drivers/net/memif/rte_eth_memif.c | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/.mailmap b/.mailmap
index 65c0e8e0ac..55901a26c0 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1511,6 +1511,7 @@ Walter Heymans <walter.heymans@corigine.com>
 Wang Sheng-Hui <shhuiw@gmail.com>
 Wangyu (Eric) <seven.wangyu@huawei.com>
 Waterman Cao <waterman.cao@intel.com>
+Wathsala Vithanage <wathsala.vithanage@arm.com>
 Weichun Chen <weichunx.chen@intel.com>
 Wei Dai <wei.dai@intel.com>
 Weifeng Li <liweifeng96@126.com>
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 6f45a00172..18377d9caf 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -265,8 +265,6 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q
 	cur_tail = __atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE);
 	while (mq->last_tail != cur_tail) {
 		RTE_MBUF_PREFETCH_TO_FREE(mq->buffers[(mq->last_tail + 1) & mask]);
-		/* Decrement refcnt and free mbuf. (current segment) */
-		rte_mbuf_refcnt_update(mq->buffers[mq->last_tail & mask], -1);
 		rte_pktmbuf_free_seg(mq->buffers[mq->last_tail & mask]);
 		mq->last_tail++;
 	}
@@ -825,10 +823,6 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
 next_in_chain:
 	/* store pointer to mbuf to free it later */
 	mq->buffers[slot & mask] = mbuf;
-	/* Increment refcnt to make sure the buffer is not freed before server
-	 * receives it. (current segment)
-	 */
-	rte_mbuf_refcnt_update(mbuf, 1);
 	/* populate descriptor */
 	d0 = &ring->desc[slot & mask];
 	d0->length = rte_pktmbuf_data_len(mbuf);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.230372508 +0800
+++ 0108-net-memif-fix-extra-mbuf-refcnt-update-in-zero-copy-.patch	2024-03-05 17:39:30.893566497 +0800
@@ -1 +1 @@
-From aa3e97fcb55d7b68fef864aa76078bdae375ad3d Mon Sep 17 00:00:00 2001
+From edaeda9ef7ec00ecce31b4e5d16158e60fb1e15f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit aa3e97fcb55d7b68fef864aa76078bdae375ad3d ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -33 +35 @@
-index e040e2219b..b2d0fc0729 100644
+index 65c0e8e0ac..55901a26c0 100644
@@ -36 +38 @@
-@@ -1518,6 +1518,7 @@ Walter Heymans <walter.heymans@corigine.com>
+@@ -1511,6 +1511,7 @@ Walter Heymans <walter.heymans@corigine.com>

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

* patch 'net/softnic: fix include of log library' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (107 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/gve: fix DQO for chained descriptors' " Xueming Li
                   ` (27 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Cristian Dumitrescu; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From de543e342adb07a4d94fcf1714c1d8f1a2145dc6 Mon Sep 17 00:00:00 2001
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Date: Tue, 13 Feb 2024 17:38:09 +0000
Subject: [PATCH] net/softnic: fix include of log library
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 96893df75bf50a82cabd8debe3492d564a5d13d5 ]

When rte_log.h was moved to a new directory, the include path was not
updated for the generated C code produced by the pipeline library,
which results in build failure for this code.

Fixes: 09ce41310930 ("log: separate logging functions out of EAL")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/softnic/rte_eth_softnic_cli.c | 2 ++
 examples/pipeline/cli.c                   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c
index 085523fe03..95e705c553 100644
--- a/drivers/net/softnic/rte_eth_softnic_cli.c
+++ b/drivers/net/softnic/rte_eth_softnic_cli.c
@@ -337,6 +337,7 @@ cmd_softnic_pipeline_libbuild(struct pmd_internals *softnic __rte_unused,
 		 "-I %s/lib/eal/include "
 		 "-I %s/lib/eal/x86/include "
 		 "-I %s/lib/eal/include/generic "
+		 "-I %s/lib/log "
 		 "-I %s/lib/meter "
 		 "-I %s/lib/port "
 		 "-I %s/lib/table "
@@ -361,6 +362,7 @@ cmd_softnic_pipeline_libbuild(struct pmd_internals *softnic __rte_unused,
 		 install_dir,
 		 install_dir,
 		 install_dir,
+		 install_dir,
 		 log_file,
 		 obj_file,
 		 lib_file,
diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c
index 2ae6cc579f..afb143c01f 100644
--- a/examples/pipeline/cli.c
+++ b/examples/pipeline/cli.c
@@ -714,6 +714,7 @@ cmd_pipeline_libbuild(char **tokens,
 		 "-I %s/lib/eal/include "
 		 "-I %s/lib/eal/x86/include "
 		 "-I %s/lib/eal/include/generic "
+		 "-I %s/lib/log "
 		 "-I %s/lib/meter "
 		 "-I %s/lib/port "
 		 "-I %s/lib/table "
@@ -738,6 +739,7 @@ cmd_pipeline_libbuild(char **tokens,
 		 install_dir,
 		 install_dir,
 		 install_dir,
+		 install_dir,
 		 log_file,
 		 obj_file,
 		 lib_file,
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.256033409 +0800
+++ 0109-net-softnic-fix-include-of-log-library.patch	2024-03-05 17:39:30.903566497 +0800
@@ -1 +1 @@
-From 96893df75bf50a82cabd8debe3492d564a5d13d5 Mon Sep 17 00:00:00 2001
+From de543e342adb07a4d94fcf1714c1d8f1a2145dc6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 96893df75bf50a82cabd8debe3492d564a5d13d5 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -41 +43 @@
-index c1efea3c1a..015717cb39 100644
+index 2ae6cc579f..afb143c01f 100644
@@ -44 +46 @@
-@@ -707,6 +707,7 @@ cmd_pipeline_libbuild(char **tokens,
+@@ -714,6 +714,7 @@ cmd_pipeline_libbuild(char **tokens,
@@ -52 +54 @@
-@@ -731,6 +732,7 @@ cmd_pipeline_libbuild(char **tokens,
+@@ -738,6 +739,7 @@ cmd_pipeline_libbuild(char **tokens,

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

* patch 'net/gve: fix DQO for chained descriptors' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (108 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/softnic: fix include of log library' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net: add macros for VLAN metadata parsing' " Xueming Li
                   ` (26 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Rushil Gupta; +Cc: Joshua Washington, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 561a3f508fcc648f599b683656af8d8e54814789 Mon Sep 17 00:00:00 2001
From: Rushil Gupta <rushilg@google.com>
Date: Thu, 15 Feb 2024 10:02:30 +0000
Subject: [PATCH] net/gve: fix DQO for chained descriptors
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ab2fc2cd7016ba4b65b2f9fd845f0f9a7a87ef16 ]

DQO Tx path had a bug where driver was overwriting mbufs in sw-ring.
We fixed this bug by cleaning slots for all segments.

Fixes: 4022f9999f56 ("net/gve: support basic Tx data path for DQO")

Signed-off-by: Rushil Gupta <rushilg@google.com>
Reviewed-by: Joshua Washington <joshwash@google.com>
---
 drivers/net/gve/gve_tx_dqo.c | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c
index 16101de84f..30a1455b20 100644
--- a/drivers/net/gve/gve_tx_dqo.c
+++ b/drivers/net/gve/gve_tx_dqo.c
@@ -13,7 +13,7 @@ gve_tx_clean_dqo(struct gve_tx_queue *txq)
 	struct gve_tx_compl_desc *compl_desc;
 	struct gve_tx_queue *aim_txq;
 	uint16_t nb_desc_clean;
-	struct rte_mbuf *txe;
+	struct rte_mbuf *txe, *txe_next;
 	uint16_t compl_tag;
 	uint16_t next;

@@ -43,10 +43,15 @@ gve_tx_clean_dqo(struct gve_tx_queue *txq)
 		PMD_DRV_LOG(DEBUG, "GVE_COMPL_TYPE_DQO_REINJECTION !!!");
 		/* FALLTHROUGH */
 	case GVE_COMPL_TYPE_DQO_PKT:
+		/* free all segments. */
 		txe = aim_txq->sw_ring[compl_tag];
-		if (txe != NULL) {
+		while (txe != NULL) {
+			txe_next = txe->next;
 			rte_pktmbuf_free_seg(txe);
-			txe = NULL;
+			if (aim_txq->sw_ring[compl_tag] == txe)
+				aim_txq->sw_ring[compl_tag] = NULL;
+			txe = txe_next;
+			compl_tag = (compl_tag + 1) & (aim_txq->sw_size - 1);
 		}
 		break;
 	case GVE_COMPL_TYPE_DQO_MISS:
@@ -83,6 +88,7 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	uint16_t tx_id;
 	uint16_t sw_id;
 	uint64_t bytes;
+	uint16_t first_sw_id;

 	sw_ring = txq->sw_ring;
 	txr = txq->tx_ring;
@@ -107,23 +113,25 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)

 		ol_flags = tx_pkt->ol_flags;
 		nb_used = tx_pkt->nb_segs;
-
+		first_sw_id = sw_id;
 		do {
-			txd = &txr[tx_id];
+			if (sw_ring[sw_id] != NULL)
+				PMD_DRV_LOG(DEBUG, "Overwriting an entry in sw_ring");

+			txd = &txr[tx_id];
 			sw_ring[sw_id] = tx_pkt;

 			/* fill Tx descriptor */
 			txd->pkt.buf_addr = rte_cpu_to_le_64(rte_mbuf_data_iova(tx_pkt));
 			txd->pkt.dtype = GVE_TX_PKT_DESC_DTYPE_DQO;
-			txd->pkt.compl_tag = rte_cpu_to_le_16(sw_id);
+			txd->pkt.compl_tag = rte_cpu_to_le_16(first_sw_id);
 			txd->pkt.buf_size = RTE_MIN(tx_pkt->data_len, GVE_TX_MAX_BUF_SIZE_DQO);

 			/* size of desc_ring and sw_ring could be different */
 			tx_id = (tx_id + 1) & mask;
 			sw_id = (sw_id + 1) & sw_mask;

-			bytes += tx_pkt->pkt_len;
+			bytes += tx_pkt->data_len;
 			tx_pkt = tx_pkt->next;
 		} while (tx_pkt);

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.282763810 +0800
+++ 0110-net-gve-fix-DQO-for-chained-descriptors.patch	2024-03-05 17:39:30.903566497 +0800
@@ -1 +1 @@
-From ab2fc2cd7016ba4b65b2f9fd845f0f9a7a87ef16 Mon Sep 17 00:00:00 2001
+From 561a3f508fcc648f599b683656af8d8e54814789 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ab2fc2cd7016ba4b65b2f9fd845f0f9a7a87ef16 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net: add macros for VLAN metadata parsing' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (109 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/gve: fix DQO for chained descriptors' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/netvsc: fix " Xueming Li
                   ` (25 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Alan Elder; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From de2d362411cbc91c28216db27330f5d6f6bb7635 Mon Sep 17 00:00:00 2001
From: Alan Elder <alan.elder@microsoft.com>
Date: Mon, 19 Feb 2024 09:31:25 +0000
Subject: [PATCH] net: add macros for VLAN metadata parsing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc ]

Add common macros for extracting parts of VLAN tag.

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

Signed-off-by: Alan Elder <alan.elder@microsoft.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap            |  1 +
 lib/net/rte_ether.h | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/.mailmap b/.mailmap
index 55901a26c0..9541b3b02e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -34,6 +34,7 @@ Alain Leon <xerebz@gmail.com>
 Alan Brady <alan.brady@intel.com>
 Alan Carew <alan.carew@intel.com>
 Alan Dewar <alan.dewar@att.com> <adewar@brocade.com>
+Alan Elder <alan.elder@microsoft.com>
 Alan Liu <zaoxingliu@gmail.com>
 Alan Winkowski <walan@marvell.com>
 Alejandro Lucero <alejandro.lucero@netronome.com>
diff --git a/lib/net/rte_ether.h b/lib/net/rte_ether.h
index ce073ea818..75285bdd12 100644
--- a/lib/net/rte_ether.h
+++ b/lib/net/rte_ether.h
@@ -46,6 +46,20 @@ extern "C" {

 #define RTE_ETHER_MIN_MTU 68 /**< Minimum MTU for IPv4 packets, see RFC 791. */

+/* VLAN header fields */
+#define RTE_VLAN_DEI_SHIFT	12
+#define RTE_VLAN_PRI_SHIFT	13
+#define RTE_VLAN_PRI_MASK	0xe000 /* Priority Code Point */
+#define RTE_VLAN_DEI_MASK	0x1000 /* Drop Eligible Indicator */
+#define RTE_VLAN_ID_MASK	0x0fff /* VLAN Identifier */
+
+#define RTE_VLAN_TCI_ID(vlan_tci)	((vlan_tci) & RTE_VLAN_ID_MASK)
+#define RTE_VLAN_TCI_PRI(vlan_tci)	(((vlan_tci) & RTE_VLAN_PRI_MASK) >> RTE_VLAN_PRI_SHIFT)
+#define RTE_VLAN_TCI_DEI(vlan_tci)	(((vlan_tci) & RTE_VLAN_DEI_MASK) >> RTE_VLAN_DEI_SHIFT)
+#define RTE_VLAN_TCI_MAKE(id, pri, dei)	((id) |					\
+					 ((pri) << RTE_VLAN_PRI_SHIFT) |	\
+					 ((dei) << RTE_VLAN_DEI_SHIFT))
+
 /**
  * Ethernet address:
  * A universally administered address is uniquely assigned to a device by its
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.305307010 +0800
+++ 0111-net-add-macros-for-VLAN-metadata-parsing.patch	2024-03-05 17:39:30.903566497 +0800
@@ -1 +1 @@
-From b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc Mon Sep 17 00:00:00 2001
+From de2d362411cbc91c28216db27330f5d6f6bb7635 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index b2d0fc0729..12d2875641 100644
+index 55901a26c0..9541b3b02e 100644

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

* patch 'net/netvsc: fix VLAN metadata parsing' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (110 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net: add macros for VLAN metadata parsing' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/bnxt: fix array overflow' " Xueming Li
                   ` (24 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Alan Elder; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c3ccbda492b50510574f90c9a08f26871bc55912 Mon Sep 17 00:00:00 2001
From: Alan Elder <alan.elder@microsoft.com>
Date: Mon, 19 Feb 2024 09:31:39 +0000
Subject: [PATCH] net/netvsc: fix VLAN metadata parsing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 ]

The previous code incorrectly parsed the VLAN ID and priority.
If the 16-bits of VLAN ID and priority/CFI on the wire was
0123456789ABCDEF the code parsed it as 456789ABCDEF3012.  There
were macros defined to handle this conversion but they were not
used.

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

Signed-off-by: Alan Elder <alan.elder@microsoft.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/netvsc/hn_rxtx.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index e4f5015aa3..9bf1ec5509 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -612,7 +612,9 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
 					   RTE_PTYPE_L4_MASK);

 	if (info->vlan_info != HN_NDIS_VLAN_INFO_INVALID) {
-		m->vlan_tci = info->vlan_info;
+		m->vlan_tci = RTE_VLAN_TCI_MAKE(NDIS_VLAN_INFO_ID(info->vlan_info),
+						NDIS_VLAN_INFO_PRI(info->vlan_info),
+						NDIS_VLAN_INFO_CFI(info->vlan_info));
 		m->ol_flags |= RTE_MBUF_F_RX_VLAN_STRIPPED | RTE_MBUF_F_RX_VLAN;

 		/* NDIS always strips tag, put it back if necessary */
@@ -1332,7 +1334,9 @@ static void hn_encap(struct rndis_packet_msg *pkt,
 	if (m->ol_flags & RTE_MBUF_F_TX_VLAN) {
 		pi_data = hn_rndis_pktinfo_append(pkt, NDIS_VLAN_INFO_SIZE,
 						  NDIS_PKTINFO_TYPE_VLAN);
-		*pi_data = m->vlan_tci;
+		*pi_data = NDIS_VLAN_INFO_MAKE(RTE_VLAN_TCI_ID(m->vlan_tci),
+					       RTE_VLAN_TCI_PRI(m->vlan_tci),
+					       RTE_VLAN_TCI_DEI(m->vlan_tci));
 	}

 	if (m->ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.332632311 +0800
+++ 0112-net-netvsc-fix-VLAN-metadata-parsing.patch	2024-03-05 17:39:30.903566497 +0800
@@ -1 +1 @@
-From f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 Mon Sep 17 00:00:00 2001
+From c3ccbda492b50510574f90c9a08f26871bc55912 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/bnxt: fix array overflow' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (111 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/netvsc: fix " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/bnxt: fix 50G and 100G forced speed' " Xueming Li
                   ` (23 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Damodharam Ammepalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3fa018b15a6329237d9dd5066a5fac3c3bb53652 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Mon, 11 Dec 2023 09:11:03 -0800
Subject: [PATCH] net/bnxt: fix array overflow
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4371b402c7bdbe821fff77e3c08e2faba67cb9b3 ]

In some cases the number of elements in the context memory array
can exceed the MAX_CTX_PAGES and that can cause the static members
ctx_pg_arr and ctx_dma_arr to overflow.
Allocate them dynamically to prevent this overflow.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  4 ++--
 drivers/net/bnxt/bnxt_ethdev.c | 42 +++++++++++++++++++++++++++-------
 2 files changed, 36 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 0e01b1d4ba..aab09e3edf 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -449,8 +449,8 @@ struct bnxt_ring_mem_info {

 struct bnxt_ctx_pg_info {
 	uint32_t	entries;
-	void		*ctx_pg_arr[MAX_CTX_PAGES];
-	rte_iova_t	ctx_dma_arr[MAX_CTX_PAGES];
+	void		**ctx_pg_arr;
+	rte_iova_t	*ctx_dma_arr;
 	struct bnxt_ring_mem_info ring_mem;
 };

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index acf7e6e46e..9e63942a0f 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4750,7 +4750,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
 {
 	struct bnxt_ring_mem_info *rmem = &ctx_pg->ring_mem;
 	const struct rte_memzone *mz = NULL;
-	char mz_name[RTE_MEMZONE_NAMESIZE];
+	char name[RTE_MEMZONE_NAMESIZE];
 	rte_iova_t mz_phys_addr;
 	uint64_t valid_bits = 0;
 	uint32_t sz;
@@ -4762,6 +4762,19 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
 	rmem->nr_pages = RTE_ALIGN_MUL_CEIL(mem_size, BNXT_PAGE_SIZE) /
 			 BNXT_PAGE_SIZE;
 	rmem->page_size = BNXT_PAGE_SIZE;
+
+	snprintf(name, RTE_MEMZONE_NAMESIZE, "bnxt_ctx_pg_arr%s_%x_%d",
+		 suffix, idx, bp->eth_dev->data->port_id);
+	ctx_pg->ctx_pg_arr = rte_zmalloc(name, sizeof(void *) * rmem->nr_pages, 0);
+	if (ctx_pg->ctx_pg_arr == NULL)
+		return -ENOMEM;
+
+	snprintf(name, RTE_MEMZONE_NAMESIZE, "bnxt_ctx_dma_arr%s_%x_%d",
+		 suffix, idx, bp->eth_dev->data->port_id);
+	ctx_pg->ctx_dma_arr = rte_zmalloc(name, sizeof(rte_iova_t *) * rmem->nr_pages, 0);
+	if (ctx_pg->ctx_dma_arr == NULL)
+		return -ENOMEM;
+
 	rmem->pg_arr = ctx_pg->ctx_pg_arr;
 	rmem->dma_arr = ctx_pg->ctx_dma_arr;
 	rmem->flags = BNXT_RMEM_VALID_PTE_FLAG;
@@ -4769,13 +4782,13 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
 	valid_bits = PTU_PTE_VALID;

 	if (rmem->nr_pages > 1) {
-		snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
+		snprintf(name, RTE_MEMZONE_NAMESIZE,
 			 "bnxt_ctx_pg_tbl%s_%x_%d",
 			 suffix, idx, bp->eth_dev->data->port_id);
-		mz_name[RTE_MEMZONE_NAMESIZE - 1] = 0;
-		mz = rte_memzone_lookup(mz_name);
+		name[RTE_MEMZONE_NAMESIZE - 1] = 0;
+		mz = rte_memzone_lookup(name);
 		if (!mz) {
-			mz = rte_memzone_reserve_aligned(mz_name,
+			mz = rte_memzone_reserve_aligned(name,
 						rmem->nr_pages * 8,
 						bp->eth_dev->device->numa_node,
 						RTE_MEMZONE_2MB |
@@ -4794,11 +4807,11 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
 		rmem->pg_tbl_mz = mz;
 	}

-	snprintf(mz_name, RTE_MEMZONE_NAMESIZE, "bnxt_ctx_%s_%x_%d",
+	snprintf(name, RTE_MEMZONE_NAMESIZE, "bnxt_ctx_%s_%x_%d",
 		 suffix, idx, bp->eth_dev->data->port_id);
-	mz = rte_memzone_lookup(mz_name);
+	mz = rte_memzone_lookup(name);
 	if (!mz) {
-		mz = rte_memzone_reserve_aligned(mz_name,
+		mz = rte_memzone_reserve_aligned(name,
 						 mem_size,
 						 bp->eth_dev->device->numa_node,
 						 RTE_MEMZONE_1GB |
@@ -4844,6 +4857,17 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
 		return;

 	bp->ctx->flags &= ~BNXT_CTX_FLAG_INITED;
+	rte_free(bp->ctx->qp_mem.ctx_pg_arr);
+	rte_free(bp->ctx->srq_mem.ctx_pg_arr);
+	rte_free(bp->ctx->cq_mem.ctx_pg_arr);
+	rte_free(bp->ctx->vnic_mem.ctx_pg_arr);
+	rte_free(bp->ctx->stat_mem.ctx_pg_arr);
+	rte_free(bp->ctx->qp_mem.ctx_dma_arr);
+	rte_free(bp->ctx->srq_mem.ctx_dma_arr);
+	rte_free(bp->ctx->cq_mem.ctx_dma_arr);
+	rte_free(bp->ctx->vnic_mem.ctx_dma_arr);
+	rte_free(bp->ctx->stat_mem.ctx_dma_arr);
+
 	rte_memzone_free(bp->ctx->qp_mem.ring_mem.mz);
 	rte_memzone_free(bp->ctx->srq_mem.ring_mem.mz);
 	rte_memzone_free(bp->ctx->cq_mem.ring_mem.mz);
@@ -4856,6 +4880,8 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
 	rte_memzone_free(bp->ctx->stat_mem.ring_mem.pg_tbl_mz);

 	for (i = 0; i < bp->ctx->tqm_fp_rings_count + 1; i++) {
+		rte_free(bp->ctx->tqm_mem[i]->ctx_pg_arr);
+		rte_free(bp->ctx->tqm_mem[i]->ctx_dma_arr);
 		if (bp->ctx->tqm_mem[i])
 			rte_memzone_free(bp->ctx->tqm_mem[i]->ring_mem.mz);
 	}
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.356474212 +0800
+++ 0113-net-bnxt-fix-array-overflow.patch	2024-03-05 17:39:30.913566498 +0800
@@ -1 +1 @@
-From 4371b402c7bdbe821fff77e3c08e2faba67cb9b3 Mon Sep 17 00:00:00 2001
+From 3fa018b15a6329237d9dd5066a5fac3c3bb53652 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4371b402c7bdbe821fff77e3c08e2faba67cb9b3 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 50f59552fa..dd08393b82 100644
+index 0e01b1d4ba..aab09e3edf 100644
@@ -25 +27 @@
-@@ -455,8 +455,8 @@ struct bnxt_ring_mem_info {
+@@ -449,8 +449,8 @@ struct bnxt_ring_mem_info {
@@ -37 +39 @@
-index b0589e2e49..762d863f14 100644
+index acf7e6e46e..9e63942a0f 100644
@@ -40 +42 @@
-@@ -4769,7 +4769,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4750,7 +4750,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -49 +51 @@
-@@ -4781,6 +4781,19 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4762,6 +4762,19 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -69 +71 @@
-@@ -4788,13 +4801,13 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4769,13 +4782,13 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -87 +89 @@
-@@ -4813,11 +4826,11 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4794,11 +4807,11 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -102 +104 @@
-@@ -4863,6 +4876,17 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
+@@ -4844,6 +4857,17 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
@@ -120 +122 @@
-@@ -4875,6 +4899,8 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
+@@ -4856,6 +4880,8 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)

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

* patch 'net/bnxt: fix 50G and 100G forced speed' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (112 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/bnxt: fix array overflow' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/bnxt: fix speed change from 200G to 25G on Thor' " Xueming Li
                   ` (22 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e1f8152ede3691aae1d920397e045f4edf8e0e79 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Nov 2023 00:12:01 -0800
Subject: [PATCH] net/bnxt: fix 50G and 100G forced speed
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit dd8d40bc8294ee1f5753205d14f37accc7a7debc ]

Thor based NICs can support PAM4 as well as NRZ link negotiation.
While PAM4 can negotiate speeds at 50G, 100G and 200G, the PMD will
use NRZ signaling for 50G and 100G speeds. PAM4 signaling will be
used only for 200G speed negotiations.

Driver has to check for NRZ speed support first while forcing speed.

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

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

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 06f196760f..b6ce4fc5f0 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3039,6 +3039,8 @@ static uint16_t bnxt_check_eth_link_autoneg(uint32_t conf_link)
 static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
 					  struct bnxt_link_info *link_info)
 {
+	uint16_t support_pam4_speeds = link_info->support_pam4_speeds;
+	uint16_t support_speeds = link_info->support_speeds;
 	uint16_t eth_link_speed = 0;

 	if (conf_link_speed == RTE_ETH_LINK_SPEED_AUTONEG)
@@ -3076,23 +3078,23 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
 			HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_40GB;
 		break;
 	case RTE_ETH_LINK_SPEED_50G:
-		if (link_info->support_pam4_speeds &
-		    HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_50G) {
-			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_50GB;
-			link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
-		} else {
+		if (support_speeds & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB) {
 			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_50GB;
 			link_info->link_signal_mode = BNXT_SIG_MODE_NRZ;
+		} else if (support_pam4_speeds &
+			   HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_50G) {
+			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_50GB;
+			link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
 		}
 		break;
 	case RTE_ETH_LINK_SPEED_100G:
-		if (link_info->support_pam4_speeds &
-		    HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_100G) {
-			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_100GB;
-			link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
-		} else {
+		if (support_speeds & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB) {
 			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100GB;
 			link_info->link_signal_mode = BNXT_SIG_MODE_NRZ;
+		} else if (support_pam4_speeds &
+			   HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_100G) {
+			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_100GB;
+			link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
 		}
 		break;
 	case RTE_ETH_LINK_SPEED_200G:
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.387615013 +0800
+++ 0114-net-bnxt-fix-50G-and-100G-forced-speed.patch	2024-03-05 17:39:30.923566498 +0800
@@ -1 +1 @@
-From dd8d40bc8294ee1f5753205d14f37accc7a7debc Mon Sep 17 00:00:00 2001
+From e1f8152ede3691aae1d920397e045f4edf8e0e79 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dd8d40bc8294ee1f5753205d14f37accc7a7debc ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 2ae0cb2067..8f37077522 100644
+index 06f196760f..b6ce4fc5f0 100644
@@ -27 +29 @@
-@@ -3158,6 +3158,8 @@ static uint16_t bnxt_check_eth_link_autoneg(uint32_t conf_link)
+@@ -3039,6 +3039,8 @@ static uint16_t bnxt_check_eth_link_autoneg(uint32_t conf_link)
@@ -36 +38 @@
-@@ -3195,23 +3197,23 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
+@@ -3076,23 +3078,23 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,

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

* patch 'net/bnxt: fix speed change from 200G to 25G on Thor' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (113 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/bnxt: fix 50G and 100G forced speed' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/bnxt: fix backward firmware compatibility' " Xueming Li
                   ` (21 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1fb50b8baa45801c07841e5c4ea840790d6d970d Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Sat, 4 Nov 2023 22:31:07 -0700
Subject: [PATCH] net/bnxt: fix speed change from 200G to 25G on Thor
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 753b8ff26162ffaf118c03e47ab75cfd2229d4e8 ]

While forcing speed to 200G, driver sets the structure variable
"bp->link_info->link_signal_mode" value to BNXT_SIG_MODE_PAM4.
After that when the user forces the speed back to 25G, this
cached value is not set back to BNXT_SIG_MODE_NRZ which results
in issuing the HWRM_PORT_PHY_CFG command with wrong inputs.

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

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

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b6ce4fc5f0..d9ad361c6c 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3072,6 +3072,7 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
 	case RTE_ETH_LINK_SPEED_25G:
 		eth_link_speed =
 			HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_25GB;
+		link_info->link_signal_mode = BNXT_SIG_MODE_NRZ;
 		break;
 	case RTE_ETH_LINK_SPEED_40G:
 		eth_link_speed =
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.418147614 +0800
+++ 0115-net-bnxt-fix-speed-change-from-200G-to-25G-on-Thor.patch	2024-03-05 17:39:30.933566498 +0800
@@ -1 +1 @@
-From 753b8ff26162ffaf118c03e47ab75cfd2229d4e8 Mon Sep 17 00:00:00 2001
+From 1fb50b8baa45801c07841e5c4ea840790d6d970d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 753b8ff26162ffaf118c03e47ab75cfd2229d4e8 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 8f37077522..441e3aef51 100644
+index b6ce4fc5f0..d9ad361c6c 100644
@@ -26 +28 @@
-@@ -3191,6 +3191,7 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
+@@ -3072,6 +3072,7 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
@@ -29 +31 @@
- 			HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_25GB;
+ 			HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_25GB;

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

* patch 'net/bnxt: fix backward firmware compatibility' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (114 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/bnxt: fix speed change from 200G to 25G on Thor' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/bnxt: modify locking for representor Tx' " Xueming Li
                   ` (20 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c26cb2a6440e50a23c799612306ae3b746f7b54a Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 7 Dec 2023 07:56:26 -0800
Subject: [PATCH] net/bnxt: fix backward firmware compatibility
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 589619999b0411a4266e335fe105e1c7cba6e02b ]

On older firmware versions, HWRM_FUNC_QCAPS response is not
returning the maximum number of multicast filters that can be
supported by the function. As a result, memory allocation with
size 0 fails.

Bugzilla ID: 1309

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h      | 1 +
 drivers/net/bnxt/bnxt_hwrm.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index aab09e3edf..7908efba78 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -896,6 +896,7 @@ struct bnxt {
 	struct rte_ether_addr	*mcast_addr_list;
 	rte_iova_t		mc_list_dma_addr;
 	uint32_t		nb_mc_addr;
+#define BNXT_DFLT_MAX_MC_ADDR	16 /* for compatibility with older firmware */
 	uint32_t		max_mcast_addr; /* maximum number of mcast filters supported */

 	struct rte_eth_rss_conf	rss_conf; /* RSS configuration. */
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d9ad361c6c..94c3249ae4 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -863,6 +863,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 		    bp->max_l2_ctx, bp->max_vnics);
 	bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
 	bp->max_mcast_addr = rte_le_to_cpu_32(resp->max_mcast_filters);
+	if (!bp->max_mcast_addr)
+		bp->max_mcast_addr = BNXT_DFLT_MAX_MC_ADDR;
 	memcpy(bp->dsn, resp->device_serial_number, sizeof(bp->dsn));

 	if (BNXT_PF(bp))
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.447695315 +0800
+++ 0116-net-bnxt-fix-backward-firmware-compatibility.patch	2024-03-05 17:39:30.943566499 +0800
@@ -1 +1 @@
-From 589619999b0411a4266e335fe105e1c7cba6e02b Mon Sep 17 00:00:00 2001
+From c26cb2a6440e50a23c799612306ae3b746f7b54a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 589619999b0411a4266e335fe105e1c7cba6e02b ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 3290c57a72..4b8a691f80 100644
+index aab09e3edf..7908efba78 100644
@@ -25 +27 @@
-@@ -974,6 +974,7 @@ struct bnxt {
+@@ -896,6 +896,7 @@ struct bnxt {
@@ -34 +36 @@
-index 441e3aef51..9260bcb4cd 100644
+index d9ad361c6c..94c3249ae4 100644
@@ -37 +39 @@
-@@ -901,6 +901,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -863,6 +863,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)

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

* patch 'net/bnxt: modify locking for representor Tx' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (115 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/bnxt: fix backward firmware compatibility' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/bnxt: fix deadlock in ULP timer callback' " Xueming Li
                   ` (19 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Peter Spreadborough, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d9e1762f076530d7ffa47e0649fe4a2b4c53d609 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 8 Feb 2024 09:13:25 -0800
Subject: [PATCH] net/bnxt: modify locking for representor Tx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d46406c7070724c8cfd04b805849339d1178f528 ]

Currently the representor Tx function is synchronized using a per
device lock. But that is not sufficient when there is simultaneous
traffic on the parent Tx ring and the representor rings.
Moreover the representor Tx is not protected from incursions by the
parent transmits. This can cause parent Tx threads to crossover into
the representor Tx contexts. Prevent this by using per TxQ locking and
protect not just representor Tx, but also the parent Tx using the lock.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  1 -
 drivers/net/bnxt/bnxt_ethdev.c | 11 +----------
 drivers/net/bnxt/bnxt_reps.c   |  6 +++---
 drivers/net/bnxt/bnxt_txq.c    |  6 ++++++
 drivers/net/bnxt/bnxt_txq.h    |  1 +
 drivers/net/bnxt/bnxt_txr.c    | 13 +++++++++++++
 drivers/net/bnxt/bnxt_txr.h    |  4 +++-
 7 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 7908efba78..be2fd689bb 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -550,7 +550,6 @@ struct bnxt_mark_info {

 struct bnxt_rep_info {
 	struct rte_eth_dev	*vfr_eth_dev;
-	pthread_mutex_t		vfr_lock;
 	pthread_mutex_t		vfr_start_lock;
 	bool			conduit_valid;
 };
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9e63942a0f..0fc561d258 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1673,10 +1673,8 @@ bnxt_uninit_locks(struct bnxt *bp)
 	pthread_mutex_destroy(&bp->def_cp_lock);
 	pthread_mutex_destroy(&bp->health_check_lock);
 	pthread_mutex_destroy(&bp->err_recovery_lock);
-	if (bp->rep_info) {
-		pthread_mutex_destroy(&bp->rep_info->vfr_lock);
+	if (bp->rep_info)
 		pthread_mutex_destroy(&bp->rep_info->vfr_start_lock);
-	}
 }

 static void bnxt_drv_uninit(struct bnxt *bp)
@@ -6199,13 +6197,6 @@ static int bnxt_init_rep_info(struct bnxt *bp)
 	for (i = 0; i < BNXT_MAX_CFA_CODE; i++)
 		bp->cfa_code_map[i] = BNXT_VF_IDX_INVALID;

-	rc = pthread_mutex_init(&bp->rep_info->vfr_lock, NULL);
-	if (rc) {
-		PMD_DRV_LOG(ERR, "Unable to initialize vfr_lock\n");
-		bnxt_free_rep_info(bp);
-		return rc;
-	}
-
 	rc = pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
 	if (rc) {
 		PMD_DRV_LOG(ERR, "Unable to initialize vfr_start_lock\n");
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 78337431af..a15f993328 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -124,8 +124,8 @@ bnxt_rep_tx_burst(void *tx_queue,
 	qid = vfr_txq->txq->queue_id;
 	vf_rep_bp = vfr_txq->bp;
 	parent = vf_rep_bp->parent_dev->data->dev_private;
-	pthread_mutex_lock(&parent->rep_info->vfr_lock);
 	ptxq = parent->tx_queues[qid];
+	pthread_mutex_lock(&ptxq->txq_lock);

 	ptxq->vfr_tx_cfa_action = vf_rep_bp->vfr_tx_cfa_action;

@@ -134,9 +134,9 @@ bnxt_rep_tx_burst(void *tx_queue,
 		vf_rep_bp->tx_pkts[qid]++;
 	}

-	rc = bnxt_xmit_pkts(ptxq, tx_pkts, nb_pkts);
+	rc = _bnxt_xmit_pkts(ptxq, tx_pkts, nb_pkts);
 	ptxq->vfr_tx_cfa_action = 0;
-	pthread_mutex_unlock(&parent->rep_info->vfr_lock);
+	pthread_mutex_unlock(&ptxq->txq_lock);

 	return rc;
 }
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 4df4604975..696603757b 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -112,6 +112,7 @@ void bnxt_tx_queue_release_op(struct rte_eth_dev *dev, uint16_t queue_idx)
 		txq->mz = NULL;

 		rte_free(txq->free);
+		pthread_mutex_destroy(&txq->txq_lock);
 		rte_free(txq);
 		dev->data->tx_queues[queue_idx] = NULL;
 	}
@@ -195,6 +196,11 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 		goto err;
 	}

+	rc = pthread_mutex_init(&txq->txq_lock, NULL);
+	if (rc != 0) {
+		PMD_DRV_LOG(ERR, "TxQ mutex init failed!");
+		goto err;
+	}
 	return 0;
 err:
 	bnxt_tx_queue_release_op(eth_dev, queue_idx);
diff --git a/drivers/net/bnxt/bnxt_txq.h b/drivers/net/bnxt/bnxt_txq.h
index 3a483ad5c3..9e54985c4c 100644
--- a/drivers/net/bnxt/bnxt_txq.h
+++ b/drivers/net/bnxt/bnxt_txq.h
@@ -26,6 +26,7 @@ struct bnxt_tx_queue {
 	int			index;
 	int			tx_wake_thresh;
 	uint32_t		vfr_tx_cfa_action;
+	pthread_mutex_t		txq_lock;
 	struct bnxt_tx_ring_info	*tx_ring;

 	unsigned int		cp_nr_rings;
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 899986764f..cef14427a8 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -562,6 +562,19 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)

 uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts)
+{
+	struct bnxt_tx_queue *txq = tx_queue;
+	uint16_t rc;
+
+	pthread_mutex_lock(&txq->txq_lock);
+	rc = _bnxt_xmit_pkts(tx_queue, tx_pkts, nb_pkts);
+	pthread_mutex_unlock(&txq->txq_lock);
+
+	return rc;
+}
+
+uint16_t _bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+			 uint16_t nb_pkts)
 {
 	int rc;
 	uint16_t nb_tx_pkts = 0;
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index e64ea2c7d1..09078d545d 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -47,7 +47,9 @@ void bnxt_free_tx_rings(struct bnxt *bp);
 int bnxt_init_one_tx_ring(struct bnxt_tx_queue *txq);
 int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq, unsigned int socket_id);
 uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
-			       uint16_t nb_pkts);
+			uint16_t nb_pkts);
+uint16_t _bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+			 uint16_t nb_pkts);
 #if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.477923716 +0800
+++ 0117-net-bnxt-modify-locking-for-representor-Tx.patch	2024-03-05 17:39:30.953566499 +0800
@@ -1 +1 @@
-From d46406c7070724c8cfd04b805849339d1178f528 Mon Sep 17 00:00:00 2001
+From d9e1762f076530d7ffa47e0649fe4a2b4c53d609 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d46406c7070724c8cfd04b805849339d1178f528 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index b604284256..23b0829e9e 100644
+index 7908efba78..be2fd689bb 100644
@@ -33 +35 @@
-@@ -623,7 +623,6 @@ struct bnxt_mark_info {
+@@ -550,7 +550,6 @@ struct bnxt_mark_info {
@@ -42 +44 @@
-index 74064e8971..72debaca64 100644
+index 9e63942a0f..0fc561d258 100644
@@ -45 +47 @@
-@@ -1802,10 +1802,8 @@ bnxt_uninit_locks(struct bnxt *bp)
+@@ -1673,10 +1673,8 @@ bnxt_uninit_locks(struct bnxt *bp)
@@ -57 +59 @@
-@@ -6523,13 +6521,6 @@ static int bnxt_init_rep_info(struct bnxt *bp)
+@@ -6199,13 +6197,6 @@ static int bnxt_init_rep_info(struct bnxt *bp)
@@ -72 +74 @@
-index d96d972904..3a4720bc3c 100644
+index 78337431af..a15f993328 100644
@@ -98 +100 @@
-index 7d91e88c9d..05032f7807 100644
+index 4df4604975..696603757b 100644
@@ -101 +103 @@
-@@ -114,6 +114,7 @@ void bnxt_tx_queue_release_op(struct rte_eth_dev *dev, uint16_t queue_idx)
+@@ -112,6 +112,7 @@ void bnxt_tx_queue_release_op(struct rte_eth_dev *dev, uint16_t queue_idx)
@@ -109 +111 @@
-@@ -197,6 +198,11 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -195,6 +196,11 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -134 +136 @@
-index d74d271d91..7fc44e989d 100644
+index 899986764f..cef14427a8 100644
@@ -137 +139 @@
-@@ -567,6 +567,19 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
+@@ -562,6 +562,19 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)

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

* patch 'net/bnxt: fix deadlock in ULP timer callback' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (116 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/bnxt: modify locking for representor Tx' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'ml/cnxk: fix xstats calculation' " Xueming Li
                   ` (18 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Weiguo Li; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a77f545bd7ebc03a2bd8f7457ea4c76ce0e42f1f Mon Sep 17 00:00:00 2001
From: Weiguo Li <liweiguo@xencore.cn>
Date: Sat, 4 Nov 2023 12:06:58 +0800
Subject: [PATCH] net/bnxt: fix deadlock in ULP timer callback
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 81132be766f57ad39a7fe0ad86717b9618e60889 ]

The function 'ulp_ha_mgr_timer_cb' acquires a lock on the context
entry at the beginning with bnxt_ulp_cntxt_entry_acquire(). This lock
is expected to be released by bnxt_ulp_cntxt_entry_release() at the
end of the function.

However, the second early return statement in the function could
potentially bypass the lock release. To fix this issue, add
bnxt_ulp_cntxt_entry_release() before the return statement.

Fixes: 1993b267dbcb ("net/bnxt: cleanup ULP parser and mapper")

Signed-off-by: Weiguo Li <liweiguo@xencore.cn>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
index f3f5bda890..852deef3b4 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
@@ -253,6 +253,7 @@ ulp_ha_mgr_timer_cb(void *arg)

 	myclient_cnt = bnxt_ulp_cntxt_num_shared_clients_get(ulp_ctx);
 	if (myclient_cnt == 0) {
+		bnxt_ulp_cntxt_entry_release();
 		BNXT_TF_DBG(ERR,
 			    "PANIC Client Count is zero kill timer\n.");
 		return;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.509691217 +0800
+++ 0118-net-bnxt-fix-deadlock-in-ULP-timer-callback.patch	2024-03-05 17:39:30.953566499 +0800
@@ -1 +1 @@
-From 81132be766f57ad39a7fe0ad86717b9618e60889 Mon Sep 17 00:00:00 2001
+From a77f545bd7ebc03a2bd8f7457ea4c76ce0e42f1f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 81132be766f57ad39a7fe0ad86717b9618e60889 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* patch 'ml/cnxk: fix xstats calculation' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (117 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/bnxt: fix deadlock in ULP timer callback' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/cnxk: fix flow RSS configuration' " Xueming Li
                   ` (17 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Anup Prabhu; +Cc: Srikanth Yalavarthi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f047cea92658f8a247f99e8fe59c604db857a628 Mon Sep 17 00:00:00 2001
From: Anup Prabhu <aprabhu@marvell.com>
Date: Tue, 28 Nov 2023 06:04:00 -0800
Subject: [PATCH] ml/cnxk: fix xstats calculation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 59ee1e574bd6106100175017807f2242a080fc2a ]

Exclude the hardware and firmware latency of model data
caching run from xstats calculation.

Fixes: 9cfad6c334f2 ("ml/cnxk: update device and model xstats functions")

Signed-off-by: Anup Prabhu <aprabhu@marvell.com>
Acked-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
 drivers/ml/cnxk/cn10k_ml_ops.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/ml/cnxk/cn10k_ml_ops.c b/drivers/ml/cnxk/cn10k_ml_ops.c
index 7f7e5efcea..5370038733 100644
--- a/drivers/ml/cnxk/cn10k_ml_ops.c
+++ b/drivers/ml/cnxk/cn10k_ml_ops.c
@@ -288,6 +288,7 @@ cn10k_ml_model_xstat_get(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_layer *l
 static int
 cn10k_ml_cache_model_data(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_layer *layer)
 {
+	struct cn10k_ml_layer_xstats *xstats;
 	char str[RTE_MEMZONE_NAMESIZE];
 	const struct plt_memzone *mz;
 	uint64_t isize = 0;
@@ -309,6 +310,16 @@ cn10k_ml_cache_model_data(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_layer *
 				      PLT_PTR_ADD(mz->addr, isize), 1);
 	plt_memzone_free(mz);

+	/* Reset sync xstats. */
+	xstats = layer->glow.sync_xstats;
+	xstats->hw_latency_tot = 0;
+	xstats->hw_latency_min = UINT64_MAX;
+	xstats->hw_latency_max = 0;
+	xstats->fw_latency_tot = 0;
+	xstats->fw_latency_min = UINT64_MAX;
+	xstats->fw_latency_max = 0;
+	xstats->dequeued_count = 0;
+
 	return ret;
 }

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.534182918 +0800
+++ 0119-ml-cnxk-fix-xstats-calculation.patch	2024-03-05 17:39:30.953566499 +0800
@@ -1 +1 @@
-From 59ee1e574bd6106100175017807f2242a080fc2a Mon Sep 17 00:00:00 2001
+From f047cea92658f8a247f99e8fe59c604db857a628 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 59ee1e574bd6106100175017807f2242a080fc2a ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/cnxk: fix flow RSS configuration' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (118 preceding siblings ...)
  2024-03-05  9:47 ` patch 'ml/cnxk: fix xstats calculation' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/thunderx: fix DMAC control register update' " Xueming Li
                   ` (16 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Kiran Kumar K; +Cc: Satheesh Paul, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 874fd2886685566630c7715424a6ad7961928182 Mon Sep 17 00:00:00 2001
From: Kiran Kumar K <kirankumark@marvell.com>
Date: Fri, 15 Dec 2023 12:15:43 +0530
Subject: [PATCH] net/cnxk: fix flow RSS configuration
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 752ce2f3e5bf7bd8add8dc9629f3b824886c641e ]

While creating a RSS rule, if no RSS types are specified,
use RSS types from dev config.

Fixes: bc778a17fa46 ("net/cnxk: support flow RSS")

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Satheesh Paul <psatheesh@marvell.com>
---
 drivers/net/cnxk/cnxk_flow.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
index 08ab75e2bb..800ae5d1df 100644
--- a/drivers/net/cnxk/cnxk_flow.c
+++ b/drivers/net/cnxk/cnxk_flow.c
@@ -102,15 +102,19 @@ npc_rss_action_validate(struct rte_eth_dev *eth_dev,
 }

 static void
-npc_rss_flowkey_get(struct cnxk_eth_dev *eth_dev,
-		    const struct roc_npc_action *rss_action,
-		    uint32_t *flowkey_cfg)
+npc_rss_flowkey_get(struct cnxk_eth_dev *eth_dev, const struct roc_npc_action *rss_action,
+		    uint32_t *flowkey_cfg, uint64_t default_rss_types)
 {
 	const struct roc_npc_action_rss *rss;
+	uint64_t rss_types;

 	rss = (const struct roc_npc_action_rss *)rss_action->conf;
+	rss_types = rss->types;
+	/* If no RSS types are specified, use default one */
+	if (rss_types == 0)
+		rss_types = default_rss_types;

-	*flowkey_cfg = cnxk_rss_ethdev_to_nix(eth_dev, rss->types, rss->level);
+	*flowkey_cfg = cnxk_rss_ethdev_to_nix(eth_dev, rss_types, rss->level);
 }

 static int
@@ -204,7 +208,8 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
 				goto err_exit;
 			in_actions[i].type = ROC_NPC_ACTION_TYPE_RSS;
 			in_actions[i].conf = actions->conf;
-			npc_rss_flowkey_get(dev, &in_actions[i], flowkey_cfg);
+			npc_rss_flowkey_get(dev, &in_actions[i], flowkey_cfg,
+					    eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf);
 			break;

 		case RTE_FLOW_ACTION_TYPE_SECURITY:
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.559748519 +0800
+++ 0120-net-cnxk-fix-flow-RSS-configuration.patch	2024-03-05 17:39:30.953566499 +0800
@@ -1 +1 @@
-From 752ce2f3e5bf7bd8add8dc9629f3b824886c641e Mon Sep 17 00:00:00 2001
+From 874fd2886685566630c7715424a6ad7961928182 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 752ce2f3e5bf7bd8add8dc9629f3b824886c641e ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 11670d37e0..a92b61c332 100644
+index 08ab75e2bb..800ae5d1df 100644
@@ -22 +24 @@
-@@ -103,15 +103,19 @@ npc_rss_action_validate(struct rte_eth_dev *eth_dev, const struct rte_flow_attr
+@@ -102,15 +102,19 @@ npc_rss_action_validate(struct rte_eth_dev *eth_dev,
@@ -46 +48 @@
-@@ -293,7 +297,8 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
+@@ -204,7 +208,8 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,

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

* patch 'net/thunderx: fix DMAC control register update' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (119 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/cnxk: fix flow RSS configuration' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'common/cnxk: fix mbox region copy' " Xueming Li
                   ` (15 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Hanumanth Pothula; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0e5798d30b0a7c87e4c43a554d798d7799cf6824 Mon Sep 17 00:00:00 2001
From: Hanumanth Pothula <hpothula@marvell.com>
Date: Thu, 21 Dec 2023 16:49:59 +0530
Subject: [PATCH] net/thunderx: fix DMAC control register update
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 44a8635459cbc83cde94b64971faee34ca9be19d ]

By default dmac control register is set to reject packets
on mac address match, leading all unicast packets to drop.
Update DMAC control register to allow packets on MAC address
match rather than dropping.

Fixes: e438796617dc ("net/thunderx: add PMD skeleton")

Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
---
 drivers/net/thunderx/base/nicvf_mbox.c | 12 ++++++++++++
 drivers/net/thunderx/base/nicvf_mbox.h | 10 ++++++++++
 drivers/net/thunderx/nicvf_ethdev.c    | 26 ++++++++++++++++++++++++++
 3 files changed, 48 insertions(+)

diff --git a/drivers/net/thunderx/base/nicvf_mbox.c b/drivers/net/thunderx/base/nicvf_mbox.c
index 5993eec4e6..0e0176974d 100644
--- a/drivers/net/thunderx/base/nicvf_mbox.c
+++ b/drivers/net/thunderx/base/nicvf_mbox.c
@@ -485,3 +485,15 @@ nicvf_mbox_reset_xcast(struct nicvf *nic)
 	mbx.msg.msg = NIC_MBOX_MSG_RESET_XCAST;
 	nicvf_mbox_send_msg_to_pf(nic, &mbx);
 }
+
+int
+nicvf_mbox_set_xcast(struct nicvf *nic, uint8_t  mode, uint64_t mac)
+{
+	struct nic_mbx mbx = { .msg = { 0 } };
+
+	mbx.xcast.msg = NIC_MBOX_MSG_SET_XCAST;
+	mbx.xcast.mode = mode;
+	mbx.xcast.mac = mac;
+
+	return nicvf_mbox_send_msg_to_pf(nic, &mbx);
+}
diff --git a/drivers/net/thunderx/base/nicvf_mbox.h b/drivers/net/thunderx/base/nicvf_mbox.h
index 322c8159cb..47f3d13755 100644
--- a/drivers/net/thunderx/base/nicvf_mbox.h
+++ b/drivers/net/thunderx/base/nicvf_mbox.h
@@ -45,6 +45,8 @@
 #define	NIC_MBOX_MSG_CFG_DONE		0xF0	/* VF configuration done */
 #define	NIC_MBOX_MSG_SHUTDOWN		0xF1	/* VF is being shutdown */
 #define NIC_MBOX_MSG_RESET_XCAST	0xF2    /* Reset DCAM filtering mode */
+#define	NIC_MBOX_MSG_ADD_MCAST		0xF3	/* ADD MAC to DCAM filters */
+#define	NIC_MBOX_MSG_SET_XCAST		0xF4	/* Set MCAST/BCAST Rx mode */
 #define	NIC_MBOX_MSG_MAX		0x100	/* Maximum number of messages */

 /* Get vNIC VF configuration */
@@ -190,6 +192,12 @@ struct change_link_mode_msg {

 };

+struct xcast {
+	uint8_t    msg;
+	uint8_t    mode;
+	uint64_t   mac:48;
+};
+
 struct nic_mbx {
 /* 128 bit shared memory between PF and each VF */
 union {
@@ -209,6 +217,7 @@ union {
 	struct reset_stat_cfg	reset_stat;
 	struct set_link_state	set_link;
 	struct change_link_mode_msg mode;
+	struct xcast xcast;
 };
 };

@@ -239,5 +248,6 @@ void nicvf_mbox_cfg_done(struct nicvf *nic);
 void nicvf_mbox_link_change(struct nicvf *nic);
 void nicvf_mbox_reset_xcast(struct nicvf *nic);
 int nicvf_mbox_change_mode(struct nicvf *nic, struct change_link_mode *cfg);
+int nicvf_mbox_set_xcast(struct nicvf *nic, uint8_t  mode, uint64_t mac);

 #endif /* __THUNDERX_NICVF_MBOX__ */
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 5a0c3dc4a6..ba2ef4058e 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -58,6 +58,10 @@ RTE_LOG_REGISTER_SUFFIX(nicvf_logtype_driver, driver, NOTICE);
 #define NICVF_QLM_MODE_SGMII  7
 #define NICVF_QLM_MODE_XFI   12

+#define BCAST_ACCEPT      0x01
+#define CAM_ACCEPT        (1 << 3)
+#define BGX_MCAST_MODE(x) ((x) << 1)
+
 enum nicvf_link_speed {
 	NICVF_LINK_SPEED_SGMII,
 	NICVF_LINK_SPEED_XAUI,
@@ -2185,9 +2189,22 @@ nicvf_eth_dev_uninit(struct rte_eth_dev *dev)
 	nicvf_dev_close(dev);
 	return 0;
 }
+
+static inline uint64_t ether_addr_to_u64(uint8_t *addr)
+{
+	uint64_t u = 0;
+	int i;
+
+	for (i = 0; i < RTE_ETHER_ADDR_LEN; i++)
+		u = u << 8 | addr[i];
+
+	return u;
+}
+
 static int
 nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
 {
+	uint8_t dmac_ctrl_reg = 0;
 	int ret;
 	struct rte_pci_device *pci_dev;
 	struct nicvf *nic = nicvf_pmd_priv(eth_dev);
@@ -2311,6 +2328,15 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
 		goto malloc_fail;
 	}

+	/* set DMAC CTRL reg to allow MAC */
+	dmac_ctrl_reg = BCAST_ACCEPT | BGX_MCAST_MODE(2) | CAM_ACCEPT;
+	ret = nicvf_mbox_set_xcast(nic, dmac_ctrl_reg,
+			ether_addr_to_u64(nic->mac_addr));
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Failed to set mac addr");
+		goto malloc_fail;
+	}
+
 	ret = nicvf_set_first_skip(eth_dev);
 	if (ret) {
 		PMD_INIT_LOG(ERR, "Failed to configure first skip");
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.599785720 +0800
+++ 0121-net-thunderx-fix-DMAC-control-register-update.patch	2024-03-05 17:39:30.963566499 +0800
@@ -1 +1 @@
-From 44a8635459cbc83cde94b64971faee34ca9be19d Mon Sep 17 00:00:00 2001
+From 0e5798d30b0a7c87e4c43a554d798d7799cf6824 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 44a8635459cbc83cde94b64971faee34ca9be19d ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -83 +85 @@
-index ddcc52770e..609d95dcfa 100644
+index 5a0c3dc4a6..ba2ef4058e 100644
@@ -97 +99 @@
-@@ -2182,9 +2186,22 @@ nicvf_eth_dev_uninit(struct rte_eth_dev *dev)
+@@ -2185,9 +2189,22 @@ nicvf_eth_dev_uninit(struct rte_eth_dev *dev)
@@ -120 +122 @@
-@@ -2308,6 +2325,15 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2311,6 +2328,15 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)

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

* patch 'common/cnxk: fix mbox region copy' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (120 preceding siblings ...)
  2024-03-05  9:47 ` patch 'net/thunderx: fix DMAC control register update' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'common/cnxk: fix VLAN check for inner header' " Xueming Li
                   ` (14 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Harman Kalra; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4f69dab88c41f1db915ceac639e8585563a69771 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Thu, 21 Dec 2023 12:08:10 +0530
Subject: [PATCH] common/cnxk: fix mbox region copy
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4590d008892ce8a2d17ee7f1ed3fb10204a809e4 ]

Using proper API to perform copy to mbox device memory region

Fixes: 02719901d50f ("common/cnxk: send link status event to VF")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/common/cnxk/roc_dev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c
index e7e89bf3d6..084343c3b4 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -198,9 +198,8 @@ af_pf_wait_msg(struct dev *dev, uint16_t vf, int num_msg)
 			vf_msg = mbox_alloc_msg(&dev->mbox_vfpf_up, vf, sz);
 			if (vf_msg) {
 				mbox_req_init(MBOX_MSG_CGX_LINK_EVENT, vf_msg);
-				memcpy((uint8_t *)vf_msg +
-				       sizeof(struct mbox_msghdr), &linfo,
-				       sizeof(struct cgx_link_user_info));
+				mbox_memcpy((uint8_t *)vf_msg + sizeof(struct mbox_msghdr), &linfo,
+					    sizeof(struct cgx_link_user_info));

 				vf_msg->rc = msg->rc;
 				vf_msg->pcifunc = msg->pcifunc;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.635513821 +0800
+++ 0122-common-cnxk-fix-mbox-region-copy.patch	2024-03-05 17:39:30.963566499 +0800
@@ -1 +1 @@
-From 4590d008892ce8a2d17ee7f1ed3fb10204a809e4 Mon Sep 17 00:00:00 2001
+From 4f69dab88c41f1db915ceac639e8585563a69771 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4590d008892ce8a2d17ee7f1ed3fb10204a809e4 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'common/cnxk: fix VLAN check for inner header' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (121 preceding siblings ...)
  2024-03-05  9:47 ` patch 'common/cnxk: fix mbox region copy' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/cnxk: fix aged flow query' " Xueming Li
                   ` (13 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Harman Kalra; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ecdb679c52824c52c0a652a7c0e2936973be8730 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Thu, 21 Dec 2023 12:08:11 +0530
Subject: [PATCH] common/cnxk: fix VLAN check for inner header
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4f52aafa5901e653e536eb3126b818d78d7be1bc ]

Adding the has vlan check in inner headers i.e in LF layer. If
has_vlan is 0 it should be masked out while installing flow rule.

Fixes: c34ea71b878d ("common/cnxk: add NPC parsing API")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/common/cnxk/roc_npc_parse.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index ecd1b3e13b..3c288070fb 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -1092,6 +1092,7 @@ npc_parse_lf(struct npc_parse_state *pst)
 {
 	const struct roc_npc_item_info *pattern, *last_pattern;
 	char hw_mask[NPC_MAX_EXTRACT_HW_LEN];
+	const struct roc_npc_flow_item_eth *eth_item;
 	struct npc_parse_item_info info;
 	int lid, lt, lflags;
 	int nr_vlans = 0;
@@ -1108,10 +1109,12 @@ npc_parse_lf(struct npc_parse_state *pst)
 	lt = NPC_LT_LF_TU_ETHER;
 	lflags = 0;

+	eth_item = pst->pattern->spec;
+
 	/* No match support for vlan tags */
 	info.def_mask = NULL;
 	info.hw_mask = NULL;
-	info.len = pst->pattern->size;
+	info.len = sizeof(eth_item->hdr);
 	info.spec = NULL;
 	info.mask = NULL;
 	info.hw_hdr_len = 0;
@@ -1142,12 +1145,15 @@ npc_parse_lf(struct npc_parse_state *pst)
 	}

 	info.hw_mask = &hw_mask;
-	info.len = pst->pattern->size;
+	info.len = sizeof(eth_item->hdr);
 	info.hw_hdr_len = 0;
 	npc_get_hw_supp_mask(pst, &info, lid, lt);
 	info.spec = NULL;
 	info.mask = NULL;

+	if (eth_item && eth_item->has_vlan)
+		pst->set_vlan_ltype_mask = true;
+
 	rc = npc_parse_item_basic(pst->pattern, &info);
 	if (rc != 0)
 		return rc;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.663285022 +0800
+++ 0123-common-cnxk-fix-VLAN-check-for-inner-header.patch	2024-03-05 17:39:30.963566499 +0800
@@ -1 +1 @@
-From 4f52aafa5901e653e536eb3126b818d78d7be1bc Mon Sep 17 00:00:00 2001
+From ecdb679c52824c52c0a652a7c0e2936973be8730 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4f52aafa5901e653e536eb3126b818d78d7be1bc ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 9ceb707ebb..571d6b8e5d 100644
+index ecd1b3e13b..3c288070fb 100644
@@ -21 +23 @@
-@@ -1097,6 +1097,7 @@ npc_parse_lf(struct npc_parse_state *pst)
+@@ -1092,6 +1092,7 @@ npc_parse_lf(struct npc_parse_state *pst)
@@ -29 +31 @@
-@@ -1113,10 +1114,12 @@ npc_parse_lf(struct npc_parse_state *pst)
+@@ -1108,10 +1109,12 @@ npc_parse_lf(struct npc_parse_state *pst)
@@ -43 +45 @@
-@@ -1147,12 +1150,15 @@ npc_parse_lf(struct npc_parse_state *pst)
+@@ -1142,12 +1145,15 @@ npc_parse_lf(struct npc_parse_state *pst)

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

* patch 'net/cnxk: fix aged flow query' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li
                   ` (122 preceding siblings ...)
  2024-03-05  9:47 ` patch 'common/cnxk: fix VLAN check for inner header' " Xueming Li
@ 2024-03-05  9:47 ` Xueming Li
  2024-03-05  9:47 ` patch 'net/mlx5: fix jump action validation' " Xueming Li
                   ` (12 subsequent siblings)
  136 siblings, 0 replies; 263+ messages in thread
From: Xueming Li @ 2024-03-05  9:47 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 23.11.1

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 01c5db8d99fd3dc101cf9e6ebacbb6c150467529 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Fri, 2 Feb 2024 10:51:37 +0530
Subject: [PATCH] net/cnxk: fix aged flow query
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4ebef525d40d74ca66b8d444ff154739ecc0908d ]

After all aged flows are destroyed, the aged_flows bitmap
is free-ed. Querying aged flows tries to access this bitmap
resulting in a segmentation fault. Fixing this by not accessing
the bitmap if no aged flows are present.

Fixes: 357f5ebc8a24 ("common/cnxk: support flow aging")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/common/cnxk/roc_npc_aging.c | 4 ++++
 drivers/net/cnxk/cnxk_flow.c        | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/drivers/common/cnxk/roc_npc_aging.c b/drivers/common/cnxk/roc_npc_aging.c
index 254dd2139b..e0f2dc2291 100644
--- a/drivers/common/cnxk/roc_npc_aging.c
+++ b/drivers/common/cnxk/roc_npc_aging.c
@@ -234,8 +234,11 @@ npc_age_flow_list_entry_delete(struct roc_npc *roc_npc,
 {
 	struct npc *npc = roc_npc_to_npc_priv(roc_npc);
 	struct npc_age_flow_list_head *list;
+	struct roc_npc_flow_age *flow_age;
 	struct npc_age_flow_entry *curr;

+	flow_age = &roc_npc->flow_age;
+
 	list = &npc->age_flow_list;
 	curr = TAILQ_FIRST(list);

@@ -244,6 +247,7 @@ npc_age_flow_list_entry_delete(struct roc_npc *roc_npc,

 	while (curr) {
 		if (flow->mcam_id == curr->flow->mcam_id) {
+			plt_bitmap_clear(flow_age->aged_flows, flow->mcam_id);
 			TAILQ_REMOVE(list, curr, next);
 			plt_free(curr);
 			break;
diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
index 800ae5d1df..be0330fa04 100644
--- a/drivers/net/cnxk/cnxk_flow.c
+++ b/drivers/net/cnxk/cnxk_flow.c
@@ -508,6 +508,9 @@ cnxk_flow_get_aged_flows(struct rte_eth_dev *eth_dev, void **context,

 	flow_age = &roc_npc->flow_age;

+	if (!flow_age->age_flow_refcnt)
+		return 0;
+
 	do {
 		sn = plt_seqcount_read_begin(&flow_age->seq_cnt);

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:34.689993023 +0800
+++ 0124-net-cnxk-fix-aged-flow-query.patch	2024-03-05 17:39:30.963566499 +0800
@@ -1 +1 @@
-From 4ebef525d40d74ca66b8d444ff154739ecc0908d Mon Sep 17 00:00:00 2001
+From 01c5db8d99fd3dc101cf9e6ebacbb6c150467529 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4ebef525d40d74ca66b8d444ff154739ecc0908d ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -46 +48 @@
-index a92b61c332..4deccd1a67 100644
+index 800ae5d1df..be0330fa04 100644
@@ -49 +51 @@
-@@ -616,6 +616,9 @@ cnxk_flow_get_aged_flows(struct rte_eth_dev *eth_dev, void **context,
+@@ -508,6 +508,9 @@ cnxk_flow_get_aged_flows(struct rte_eth_dev *eth_dev, void **context,

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

* patch 'net/mlx5: fix jump action validation' has been queued to stable release 23.11.1
  2024-03-05  9:45 patches have been queued to stable release 23.11.1 Xueming Li